/* 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: .82rem; border-radius: 999px; padding: 4px 12px; margin: 4px 0 8px;
}
h1 { font-size: 1.55rem; line-height: 1.15; margin: 0 0 6px; font-weight: 900; }
.subtitle { color: var(--muted); margin: 0 0 12px; font-size: .98rem; }
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 { display: flex; gap: 6px; justify-content: center; margin: 10px 0; flex-wrap: wrap; }
.countdown .chip {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 6px 10px; font-weight: 800; font-size: .9rem; min-width: 64px; text-align: center;
}
.countdown .chip small { display: block; font-weight: 700; color: var(--muted); font-size: .68rem; text-transform: uppercase; }

.goal-card { border: 2px dashed var(--orange); background: #fff8f1; }
.goal-card h2 { color: #b3540a; }

.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; }
.free-tag { color: var(--green); font-weight: 900; }
s { color: var(--muted); font-weight: 600; }

.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-card { border: 2px dashed var(--orange); background: #fff8f1; }

.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: 10px 12px; border: 1.5px solid var(--line);
  border-radius: 10px; font: inherit; 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); }
.goal-card { border: 2px dashed var(--orange); background: #fff8f1; }

.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; }
.goal-card { border: 2px dashed var(--orange); background: #fff8f1; }

.rules summary { font-weight: 900; cursor: pointer; font-size: 1.05rem; }
.rules-text { white-space: pre-wrap; font-size: .9rem; margin-top: 10px; }
.eligibility { font-weight: 700; color: var(--muted); font-size: .88rem; }
.fineprint { color: var(--muted); font-size: .8rem; 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; }
