/* Concours Protéines d'abord — mobile d'abord, colonne étroite centrée (façon KingSumo) */
:root {
  --green: #1e7d3c;
  --green-dark: #145c2b;
  --green-soft: #e7f5ec;
  --orange: #ff8a3d;
  --yellow: #ffd23f;
  --ink: #22301f;
  --muted: #66735f;
  --line: #dfe8dc;
  --card: #ffffff;
  --bg: #f2f8f1;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
}
.wrap { max-width: 680px; margin: 0 auto; padding: 10px 12px 90px; }
.wrap.wide { max-width: 880px; }

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 2px 10px;
}
.brand { font-weight: 900; color: var(--green-dark); font-size: 1.05rem; }
.lang-btn {
  border: 2px solid var(--green); background: #fff; color: var(--green-dark);
  font-weight: 800; border-radius: 999px; padding: 4px 14px; cursor: pointer;
  text-decoration: none; font-size: .9rem;
}

.pill {
  display: inline-block; background: var(--yellow); color: #5c4500;
  font-weight: 800; font-size: .92rem; border-radius: 999px; padding: 5px 14px; margin: 4px 0 8px;
}
h1 { font-size: 1.6rem; line-height: 1.15; margin: 0 0 6px; font-weight: 900; }
.subtitle { color: var(--muted); margin: 0 0 12px; font-size: 1rem; }
h2 { font-size: 1.15rem; font-weight: 900; margin: 0 0 8px; }
h3 { font-size: 1rem; font-weight: 800; margin: 14px 0 6px; }
.section-title { margin: 18px 0 8px; }

.banner-total {
  background: linear-gradient(90deg, var(--green), #35a854);
  color: #fff; font-weight: 900; font-size: 1.15rem; text-align: center;
  border-radius: var(--radius); padding: 12px 10px; margin: 10px 0;
  box-shadow: 0 4px 14px rgba(30,125,60,.25);
}

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin: 12px 0;
}
.fallback { text-align: center; padding: 34px 18px; }
.fallback-emoji { font-size: 2.2rem; }

.video-slot { margin: 10px 0; }
.video-embed { position: relative; padding-top: 56.25%; border-radius: var(--radius); overflow: hidden; background: #0d2413; }
.video-embed iframe, .video-embed video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.hero-image, .prize-image {
  width: 100%; max-height: 340px; object-fit: contain; /* jamais recadrée */
  border-radius: var(--radius); background: #fff; display: block; margin: 8px 0;
}

.countdown { margin: 10px 0; }
.cd-label { text-align: center; font-weight: 800; color: var(--muted); font-size: .95rem; margin-bottom: 6px; }
.cd-row { display: flex; gap: 8px; }
.cd-box {
  flex: 1; background: #fff; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 8px 4px 7px; text-align: center; box-shadow: 0 2px 8px rgba(20,92,43,.06);
}
.cd-box b { display: block; font-size: 1.45rem; font-weight: 900; color: var(--green-dark); line-height: 1.05; font-variant-numeric: tabular-nums; }
.cd-box small { display: block; font-weight: 700; color: var(--muted); font-size: .88rem; text-transform: uppercase; letter-spacing: .04em; }


.goal-line, .prize-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid var(--line);
}
.prize-row:last-child { border-bottom: 0; }
.prize-row .p-name { font-weight: 700; }
.prize-row .p-sponsor { color: var(--muted); font-size: .85rem; display: block; font-weight: 600; }
.prize-row .p-value { font-weight: 900; color: var(--green-dark); white-space: nowrap; }

.goal-cta {
  display: block; text-align: center; background: var(--orange); color: #fff;
  font-weight: 900; border-radius: 10px; padding: 11px; text-decoration: none; margin-top: 10px;
}
.goal-note { font-size: .82rem; color: var(--muted); text-align: center; margin: 8px 0 0; }


.goal-cta { display: block; text-align: center; background: var(--orange); color: #fff; font-weight: 900; border-radius: 10px; padding: 11px; text-decoration: none; margin-top: 10px; }

label { display: block; font-weight: 700; font-size: .92rem; margin: 10px 0; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="url"], input[type="search"], input[type="datetime-local"], textarea, select {
  width: 100%; margin-top: 4px; padding: 11px 12px; border: 1.5px solid var(--line);
  border-radius: 10px; font: inherit; font-size: 1rem; background: #fff;
}
.consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; font-size: .88rem; }
.consent input { margin-top: 3px; width: 18px; height: 18px; flex: none; }

.cta {
  width: 100%; background: var(--green); color: #fff; border: 0; cursor: pointer;
  font-weight: 900; font-size: 1.05rem; border-radius: 12px; padding: 13px; margin-top: 8px;
}
.cta:hover { background: var(--green-dark); }
.cta.danger { background: #b3540a; }
.form-msg { min-height: 1.2em; font-size: .9rem; font-weight: 700; }
.form-msg.err { color: #b3261e; }
.form-msg.ok { color: var(--green-dark); }

.goal-cta:hover { filter: brightness(1.05); }

.sticky-cta {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 12px; z-index: 50;
  background: var(--green); color: #fff; font-weight: 900; text-decoration: none;
  padding: 13px 22px; border-radius: 999px; box-shadow: 0 8px 22px rgba(20,92,43,.4);
  width: calc(100% - 24px); max-width: 420px; text-align: center;
}
@media (min-width: 700px) { .sticky-cta { display: none; } }

.ref-row { display: flex; gap: 8px; }
.ref-row input { flex: 1; }
.mini-btn {
  background: var(--green-soft); color: var(--green-dark); border: 1.5px solid var(--green);
  font-weight: 800; border-radius: 10px; padding: 8px 14px; cursor: pointer; white-space: nowrap;
}
.mini-btn.big { padding: 10px 16px; }
.mini-btn.done { opacity: .55; }
.share-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.share-row a {
  background: #fff; border: 1.5px solid var(--line); border-radius: 999px;
  padding: 6px 12px; font-weight: 800; font-size: .85rem; color: var(--ink); text-decoration: none;
}

.bonus-list { display: grid; gap: 8px; }
.bonus-item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px;
}
.bonus-item .b-label { font-weight: 700; font-size: .93rem; }
.bonus-item .b-weight { color: var(--green-dark); font-weight: 900; font-size: .85rem; display: block;}

.winner-panel { background: #fffbe8; border: 2px solid var(--yellow); border-radius: var(--radius); padding: 12px; margin-top: 14px; }
.stq-q { font-size: 1.3rem; font-weight: 900; }
.stq-done { font-weight: 800; color: var(--green-dark); }
.gift-panel { background: var(--green-soft); border-radius: var(--radius); padding: 12px; margin-top: 14px; }
.gift-item { background: #fff; border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.gift-item .g-code { font-weight: 900; font-size: 1.1rem; letter-spacing: .5px; }
.gift-item a { color: var(--green-dark); font-weight: 800; }

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-partner {
  background: #fff; border: 1.5px solid var(--green); color: var(--green-dark);
  border-radius: 999px; padding: 6px 14px; font-weight: 800;
}

.goal-cta { display:block; text-align:center; background: var(--orange); color:#fff; font-weight:900; border-radius:10px; padding:11px; text-decoration:none; margin-top:10px; }

.rules summary { font-weight: 900; cursor: pointer; font-size: 1.05rem; }
.rules pre { white-space: pre-wrap; font-size: .95rem; margin-top: 10px; font-family: inherit; line-height: 1.5; }
.eligibility { font-weight: 700; color: var(--muted); font-size: .94rem; }
.fineprint { color: var(--muted); font-size: .9rem; text-align: center; }

.goal-cta { display: block; }

/* Admin */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.stat { background: var(--green-soft); border-radius: 10px; padding: 10px; text-align: center; }
.stat b { display: block; font-size: 1.4rem; color: var(--green-dark); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.btn-row input { flex: 1; min-width: 160px; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .86rem; }
th, td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; }
.grid-form label { margin: 6px 0; }
.editor-item { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 6px 0; display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.embed-code { background: #0d2413; color: #baf0c8; padding: 10px; border-radius: 10px; overflow-x: auto; font-size: .82rem; }
.winner-row { border: 1.5px solid var(--yellow); background: #fffbe8; border-radius: 10px; padding: 10px 12px; margin: 8px 0; }

/* ============================================================
   Passe beauté KingSumo + fonctions v3
   Mobile d'abord (390 px) ; l'ordinateur adapte en deux colonnes.
   ============================================================ */

/* --- mise en page : mobile = colonne unique (inscription d'abord),
       ordinateur = visuel à gauche, inscription à droite --- */
.layout { display: flex; flex-direction: column; }
@media (min-width: 900px) {
  .wrap { max-width: 1060px; }
  .layout { display: grid; grid-template-columns: 1.02fr .98fr; gap: 18px; align-items: start; }
  .col-visual { grid-column: 1; grid-row: 1; }
  .col-entry { grid-column: 2; grid-row: 1; }
  .col-entry .card, .col-visual .card { margin-top: 0; }
}

.preview-bar {
  background: #fff3cd; border: 1.5px dashed #b58900; color: #6b5200;
  border-radius: 10px; padding: 10px 12px; font-weight: 800; text-align: center; margin: 8px 0;
}

/* --- couverture générée (aucune image fournie) : dégradés superposés,
       reflets radiaux, motif de points discret, échelle de type propre --- */
.cover-slot { margin: 10px 0 4px; }
.gen-cover {
  position: relative; overflow: hidden; color: #fff;
  border-radius: 18px; padding: 26px 22px 20px;
  aspect-ratio: 16 / 10;
  display: flex; flex-direction: column; justify-content: center; gap: 10px;
  background:
    radial-gradient(420px 200px at 85% -10%, rgba(255, 210, 63, .45), rgba(255, 210, 63, 0) 70%),
    radial-gradient(520px 300px at -10% 110%, rgba(53, 168, 84, .55), rgba(53, 168, 84, 0) 70%),
    linear-gradient(135deg, #145c2b 0%, #1e7d3c 48%, #2f9e4f 100%);
  box-shadow: 0 10px 26px rgba(20, 92, 43, .28);
}
.gen-cover::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255, 255, 255, .13) 1.5px, transparent 1.7px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(115deg, transparent 55%, #000 100%);
  mask-image: linear-gradient(115deg, transparent 55%, #000 100%);
}
.gc-kicker { position: relative; z-index: 1; font-weight: 900; letter-spacing: .22em; font-size: .9rem; color: var(--yellow); text-transform: uppercase; }
.gc-name { position: relative; z-index: 1; font-weight: 900; font-size: clamp(1.55rem, 6.2vw, 2.35rem); line-height: 1.08; text-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
.gc-foot { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 4px; }
.gc-brand { font-weight: 900; font-size: 1rem; }
.gc-value {
  background: rgba(255, 255, 255, .16); border: 1.5px solid rgba(255, 255, 255, .4);
  border-radius: 999px; padding: 5px 14px; font-weight: 900; font-size: 1rem; white-space: nowrap;
}
@media (min-width: 900px) { .gen-cover { aspect-ratio: 2 / 1; } }
/* mini-aperçu dans la création rapide */
#qcCover .gen-cover { aspect-ratio: 2 / 1; padding: 18px 18px 14px; }
#qcCover .gc-name { font-size: 1.45rem; }

/* --- pastilles Valeur / Gagnants --- */
.meta-pills { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 2px; }
.meta-pill {
  background: #fff; border: 1.5px solid var(--green); color: var(--green-dark);
  border-radius: 999px; padding: 7px 16px; font-weight: 900; font-size: 1rem;
  box-shadow: 0 2px 8px rgba(20, 92, 43, .08);
}

/* --- carte du grand prix --- */
.prize-hero { border-top: 6px solid var(--green); }
.prize-tag {
  display: inline-block; background: var(--green-soft); color: var(--green-dark);
  font-weight: 900; font-size: .9rem; border-radius: 999px; padding: 3px 12px; margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: .06em;
}
.includes { margin: 8px 0; padding-left: 20px; }
.includes li { margin: 4px 0; font-size: 1rem; }
.grand-value { font-weight: 900; color: var(--green-dark); font-size: 1.12rem; margin-top: 8px; }

/* --- panneau de statut : LE moment viral --- */
.status-panel { border: 2px solid var(--green); border-top: 8px solid var(--green); box-shadow: 0 10px 26px rgba(20, 92, 43, .14); }
.entries-big { text-align: center; margin: 10px 0 2px; }
.entries-big span { display: block; font-size: 3rem; font-weight: 900; color: var(--green-dark); line-height: 1; }
.entries-big small { font-weight: 800; color: var(--muted); font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; }
.status-summary { text-align: center; font-weight: 700; color: var(--ink); margin: 4px 0 12px; font-size: 1rem; }
.ref-label { font-weight: 700; font-size: .95rem; margin-bottom: 6px; }
.share-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.share-row a.sb {
  flex: 1 1 30%; text-align: center; border-radius: 12px; padding: 13px 10px;
  font-weight: 900; font-size: 1rem; color: #fff; text-decoration: none; min-height: 48px;
  display: flex; align-items: center; justify-content: center;
}
.share-row a.sb-fb { background: #1877f2; }
.share-row a.sb-ms { background: linear-gradient(45deg, #0099ff, #a033ff 55%, #ff5280); }
.share-row a.sb-wa { background: #25d366; }
.share-row a.sb-x { background: #111; }
.share-row a.sb-mail { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }

/* --- confirmation du courriel / liste d'attente --- */
.confirm-box { background: #fff8e1; border: 2px solid var(--yellow); border-radius: 12px; padding: 12px; margin: 10px 0; }
.confirm-box p { margin: 0 0 10px; font-weight: 700; font-size: .98rem; }
.confirmed-line { font-weight: 800; color: var(--green-dark); font-size: .98rem; margin: 8px 0; }
.waitlist-note { background: var(--green-soft); border-radius: 12px; padding: 12px; font-weight: 700; font-size: 1rem; margin: 10px 0; }

/* --- classement des référents --- */
.lb-list { display: grid; gap: 8px; }
.lb-row {
  display: flex; align-items: center; gap: 12px; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px;
}
.lb-rank { font-weight: 900; color: var(--green-dark); font-size: 1.15rem; min-width: 1.6em; text-align: center; }
.lb-email { font-weight: 700; flex: 1; }
.lb-count { font-weight: 800; color: var(--muted); font-size: .95rem; white-space: nowrap; }

/* --- admin : navigation, création rapide, promouvoir --- */
.admin-nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }
.admin-nav button {
  border: 2px solid var(--green); background: #fff; color: var(--green-dark);
  font-weight: 900; border-radius: 999px; padding: 9px 16px; cursor: pointer; font-size: .95rem;
}
.admin-nav button.active { background: var(--green); color: #fff; }
.qc-dur { margin: 10px 0; }
.qc-dur-label { display: block; font-weight: 800; font-size: .95rem; margin-bottom: 8px; }
.dur-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.dur-pills label { margin: 0; cursor: pointer; }
.dur-pills input { position: absolute; opacity: 0; pointer-events: none; }
.dur-pills span {
  display: inline-block; border: 2px solid var(--line); background: #fff; border-radius: 999px;
  padding: 9px 18px; font-weight: 900; font-size: .98rem;
}
.dur-pills input:checked + span { background: var(--green); border-color: var(--green); color: #fff; }
.dur-pills input:focus-visible + span { outline: 3px solid var(--yellow); outline-offset: 2px; }
.qc-readout { font-weight: 700; color: var(--muted); font-size: .95rem; margin: 8px 0 0; }
.qc-cover-wrap { margin: 14px 0; }
.cta.qc-save { width: auto; padding: 13px 26px; }
.checklist { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 8px; }
.checklist li { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1rem; }
.checklist .dot { width: 14px; height: 14px; border-radius: 50%; background: #c9d4c6; flex: none; }
.checklist .dot.ok { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.badge-preview { background: var(--green-soft); border-radius: 12px; padding: 16px; text-align: center; }
.file-label { display: inline-flex; align-items: center; cursor: pointer; }
