/* ══════════════════════════════
   RESET + BASE
══════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: #1a1a1a;
  line-height: 1.5;
  background: #f5f5f5;
}

:root {
  --orange:   #F06A00;
  --orange-h: #D45E00;
  --green:    #1d2a17;
  --white:    #ffffff;
  --grey:     #f5f5f5;
  --border:   #e0e0e0;
  --text:     #1a1a1a;
  --muted:    #666666;
}

a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ══════════════════════════════
   UTILITAIRES
══════════════════════════════ */
.c-orange  { color: var(--orange); }
.c-white   { color: var(--white); }
.req       { color: #d9534f; }
.icon-sm        { width: 16px; height: 16px; vertical-align: middle; margin-right: 4px; flex-shrink: 0; }
.icon-md        { width: 22px; height: 22px; display: block; flex-shrink: 0; }
/* Filtre pour passer une icône colorée/sombre en blanc sur fond sombre */
.icon-white     { filter: brightness(0) invert(1); }
/* Filtre pour le chart-green sur hero sombre */
.icon-sm.chart  { filter: brightness(0) invert(1); }

/* ══════════════════════════════
   LOGO PLACEHOLDER
══════════════════════════════ */
.logo-placeholder {
  background: var(--orange);
  color: var(--white);
  font-size: 1.2rem;
  font-weight: 900;
  padding: 7px 14px;
  border-radius: 4px;
  letter-spacing: 2px;
  display: inline-block;
}
.logo-placeholder.sm { font-size: .8rem; padding: 4px 8px; }
.logo-img { height: 90px; width: auto; display: block; }

/* ══════════════════════════════
   S1 — HERO (image plein cadre)
══════════════════════════════ */
#s1 {
  background: #1f211e;
  display: flex;
  flex-direction: column;
}
.hero {
  position: relative;
  min-height: 520px;
  background-image: url('images/hero-layout.png');
  background-color: #1f211e;
  background-size: cover;
  background-position: center 70%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 0%, transparent 45%, rgba(31,33,30,.4) 65%, rgba(31,33,30,.85) 80%, #1f211e 95%);
  z-index: 1;
}

/* Logo + badge superposés sur l'image */
.hero-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 80px;
}
.hero-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-baseline {
  font-size: 1.25rem;
  font-weight: 700;
  color: rgba(255,255,255,.95);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.badge-n1 {
  width: 100px;
  height: 100px;
  background: var(--white);
  border-radius: 50%;
  border: none;
  box-shadow: 0 2px 12px rgba(0,0,0,.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text);
  line-height: 1.2;
}
.b-kws   { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text); }
.b-num   { font-size: 1.9rem; font-weight: 900; line-height: 1; color: var(--orange); }
.b-label { font-size: .68rem; font-weight: 700; text-transform: uppercase; color: var(--text); }

.hero-content {
  position: relative;
  z-index: 2;
  padding: 24px 80px 56px;
  max-width: 600px;
}
.hero-eyebrow {
  font-size: .95rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.5;
  margin-bottom: 10px;
}
.hero-title {
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--white);
  text-transform: uppercase;
  line-height: 1.15;
  margin-bottom: 18px;
}
.hero-amount {
  font-size: 2.8rem;
  color: var(--orange);
}
.hero-intro {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ddd;
  margin-bottom: 24px;
  line-height: 1.7;
}
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tag {
  display: inline-block;
  color: var(--white);
  padding: 5px 14px;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ══════════════════════════════
   S1 — LOTS
══════════════════════════════ */
.lots-wrapper {
  display: flex;
  flex-wrap: wrap;           /* passe en colonne dès que ça ne rentre plus */
  align-items: stretch;
  gap: 16px;
  background: #1f211e;
  padding: 24px 120px;
}

/* Carte blanche gauche */
.lots-left {
  flex: 1 0 400px;   /* ne rétrécit pas sous 400px → wrap automatique */
  background: var(--white);
  border-radius: 12px;
  padding: 24px 24px 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}
.lots-title {
  font-size: 1.5rem;
  font-weight: 900;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 6px;
  color: var(--text);
}
.lots-subtitle {
  text-align: center;
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 20px;
}
.lot-grid-goodies {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  width: 100%;
  margin-bottom: 8px;
}
.lot-grid-goodies img {
  width: 100%;
  height: 90px;
  object-fit: contain;
  display: block;
  background: var(--white);
}
.lot-nc {
  font-size: .7rem;
  font-weight: 400;
  color: var(--muted);
  text-align: center;
  margin-top: 6px;
  font-style: italic;
}
.lots-mentions {
  text-align: center;
  font-size: .7rem;
  color: var(--muted);
  margin-top: 14px;
  font-style: italic;
}
.lots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.lot-card {
  text-align: center;
  padding: 0 16px;
  border-right: 1px solid var(--border);
}
.lot-card:last-child { border-right: none; }

.lot-badge {
  display: inline-block;
  background: var(--green);
  color: var(--white);
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
  line-height: 1.3;
}
.lot-img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  margin-bottom: 8px;
  display: block;
}
.lot-img-ph {
  width: 100%;
  height: 120px;
  background: var(--grey);
  border: 2px dashed var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: .72rem;
  margin-bottom: 8px;
}
.lot-name   { font-size: .78rem; font-weight: 400; text-transform: uppercase; color: var(--text); }
.lot-value  { font-size: .76rem; color: var(--orange); font-weight: 800; margin-top: 2px; }
.lot-detail { font-size: .7rem; color: var(--muted); font-weight: 600; margin-top: 6px; line-height: 1.5; }

/* Panneau vert foncé droite */
.lots-right {
  flex: 0 0 420px;
  background: #1d2a17;
  border-radius: 12px;
  padding: 24px 20px;
  border: 2px solid rgba(255,255,255,.25);
  display: flex;
  align-items: center;
}
.features-list { list-style: none; display: flex; flex-direction: column; gap: 18px; width: 100%; }
.features-list li { display: flex; align-items: flex-start; gap: 14px; }
.feat-icon {
  width: 3.5rem;
  height: 3.5rem;
  background: rgba(255,255,255,.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  color: var(--white);
  font-weight: 700;
  flex-shrink: 0;
}
.feat-icon .icon-md {
  width: 2rem;
  height: 2rem;
}
.features-list strong { display: block; font-size: .98rem; font-weight: 800; color: var(--white); text-transform: uppercase; margin-bottom: 4px; }
.features-list p      { font-size: .88rem; color: rgba(255,255,255,.75); line-height: 1.5; }

/* ══════════════════════════════
   S1 — STATS BAR
══════════════════════════════ */
.stats-bar {
  background: var(--green);
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 32px;
}
.stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.stat-icon {
  font-size: .7rem;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 4px;
  padding: 3px 6px;
}

/* ══════════════════════════════
   STEP HEADER (commun S2/S3/S4)
══════════════════════════════ */
.step-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
}
.step-num {
  width: 36px;
  height: 36px;
  background: var(--orange);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 900;
  flex-shrink: 0;
  margin-top: 2px;
}
.step-tag {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--orange);
  margin-bottom: 4px;
}
.step-title { font-size: 1.25rem; font-weight: 800; text-transform: uppercase; margin-bottom: 4px; }
.step-desc  { font-size: .95rem; color: var(--muted); line-height: 1.6; }

/* ══════════════════════════════
   FORM COMMUN
══════════════════════════════ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 16px;
}
label {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
}
input[type="text"] {
  padding: 11px 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: .95rem;
  font-size: .9rem;
  outline: none;
  width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
input[type="text"]:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(240,106,0,.15);
}
input[type="text"].error { border-color: #d9534f; }
label.error { font-size: .75rem; color: #d9534f; font-weight: 400; margin-top: 1px; }
.classement-error-msg {
  display: none;
  font-size: .88rem;
  font-weight: 600;
  color: #d9534f;
  background: rgba(217,83,79,.08);
  border: 1px solid rgba(217,83,79,.3);
  border-radius: 6px;
  padding: .6rem 1rem;
  margin-bottom: 1rem;
  text-align: center;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.optin-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}
.optin-group input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; }
.optin-group label { font-size: .88rem; color: var(--muted); font-weight: 400; }
.mentions { font-size: .72rem; color: var(--muted); margin-bottom: 16px; }

.btn-orange {
  display: inline-block;
  background: var(--orange);
  color: var(--white);
  border: none;
  border-radius: 4px;
  padding: 13px 28px;
  font-size: .9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  cursor: pointer;
  transition: background .15s;
  width: 100%;
  text-align: center;
}
.btn-orange:hover { background: var(--orange-h); }
.btn-outline {
  background: transparent;
  color: var(--orange);
  border: 2px solid var(--orange);
  width: auto;
  display: inline-block;
}
.btn-outline:hover { background: var(--orange); color: var(--white); text-decoration: none; }
#btn-participe {
  width: auto;
  display: inline-block;
  margin-top: 20px;
}
.cta-link {
  color: var(--orange);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.cta-link:hover { color: var(--text); }

/* Bloc explicatif "Comment sont déterminés les gagnants ?" */
.rules-block {
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1rem;
}
.rules-title {
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 6px;
}
.rules-intro {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 14px;
  line-height: 1.5;
}
.rules-dates {
  margin: 14px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rules-date-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .82rem;
  color: var(--text);
  line-height: 1.5;
}
.rules-date-item p { margin: 0; }
.rules-date-item img { margin-top: 2px; flex-shrink: 0; }
.rules-mentions {
  font-size: .76rem;
  color: var(--muted);
  margin-top: 14px;
  font-style: italic;
}
.rules-mentions a { color: var(--orange); }

/* ══════════════════════════════
   S2 — MICRO-FORMULAIRE
══════════════════════════════ */
#s2 {
  background: var(--white);
  border-top: 4px solid var(--orange);
  padding: 40px 80px 32px;
}
.s2-body {
  display: flex;
  gap: 40px;
  align-items: center;
}
.s2-left { flex: 1; }
.s2-cta  { flex: 0 0 220px; }
.s2-cta .btn-orange { white-space: nowrap; }

.s2-trust {
  display: flex;
  gap: 16px;
  margin: 16px 0 8px;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: .72rem;
  color: var(--muted);
  line-height: 1.4;
  flex: 1;
  min-width: 120px;
}
.trust-icon {
  font-size: .65rem;
  color: var(--muted);
  flex-shrink: 0;
}

/* ══════════════════════════════
   S3 — JEU
══════════════════════════════ */
#s3 {
  background: var(--grey);
  border-top: 4px solid var(--orange);
}
.rules-row {
  display: flex;
  flex-direction: column;
  gap: 2.8rem;
  padding: 2rem 0;
  border-radius: 10px;
  margin-bottom: 28px;
  max-width: 28rem;
}
.rules-row p {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--white);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
  width: 100%;
}
.rules-row p img {
  flex-shrink: 0;
  width: 4.5rem;
  height: 4.5rem;
  margin-top: 2px;
}
.rules-row .results-note {
  margin-left: auto;
  font-size: .72rem;
  font-style: italic;
  color: var(--muted);
}
.s3-layout {
  display: flex;
  flex-wrap: wrap;   /* passe en colonne dès que ça ne rentre plus */
  gap: 2rem;
  column-gap: 5rem;
  align-items: flex-start;
  padding: 40px 80px 48px;
  background-image: url("images/bg-terrain.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.s3-left,
.s3-left * {
  color: var(--white);
}
.s3-left .c-orange,
.s3-left .c-orange *,
.s3-left .cta-link {
  color: var(--orange);
}
.s3-left .step-tag,
.s3-left .step-title,
.s3-left .step-desc {
  font-size: 1.05rem;
  color: var(--white);
  text-shadow: 0 2px 8px rgba(0, 0, 0, .7);
}
.s3-left {
  flex: 0 0 auto;    /* largeur naturelle, ne grandit pas */
  max-width: 28rem;
  background: rgba(0, 0, 0, .45);
  border-radius: 12px;
  padding: 1.5rem;
}
.s3-left .step-header {
  margin-bottom: 2.5rem;
}
.s3-right {
  flex: 1 0 50rem;   /* préfère 50 rem, ne rétrécit pas → wrap automatique */
  max-width: 60rem;
}
#btn-valider-classement {
  width: auto;
  padding-left: 2.25rem;
  padding-right: 2.25rem;
  display: block;
  margin: 2rem auto 0;
}

.rules-box {
  background: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.rules-box p { font-size: .78rem; color: var(--text); line-height: 1.5; }

.results-note {
  font-size: .74rem;
  color: var(--muted);
  line-height: 1.5;
  text-align: center;
  padding: 10px;
  background: var(--white);
  border-radius: 6px;
  border: 1px solid var(--border);
}


.cards-perf-wrapper {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
}
.cards-perf-inner {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.cards-perf-inner #cards-source {
  margin-bottom: 0.75rem;
}
.perf-label {
  flex-shrink: 0;
  width: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--orange);
  writing-mode: vertical-rl;
  text-align: center;
  line-height: 1.4;
}
.perf-left  { transform: rotate(180deg); }
.perf-right { transform: none; }
.perf-label-inner {
  display: inline-block;
  background: var(--orange);
  color: var(--white);
  border-radius: 4px;
  padding: 10px 8px;
  font-weight: 700;
  text-shadow: none;
}

.scroll-hint-mobile { display: none; }

.cards-title {
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--white);
  text-align: center;
  margin-bottom: 12px;
}

/* Source : cartes à glisser */
#cards-source {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
  padding: 0;
}

/* ── Zone de classement (destination) ── */
.rank-drop-label {
  text-align: center;
  font-size: .95rem;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: .5px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .5);
  margin: 8px 0 10px;
}

/* Wrapper grid-stacking : fond pointillé + liste au même endroit */
.rank-target-wrapper {
  display: grid;
}
.slots-bg,
#rank-slots {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.slots-bg {
  pointer-events: none;
  z-index: 0;
}
.slot-ph {
  border: 2px dashed var(--orange);
  border-radius: 8px;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slot-ph span {
  font-size: 2.2rem;
  font-weight: 900;
  color: rgba(240, 106, 0, 0.85);
}
#rank-slots {
  list-style: none;
  padding: 0;
  margin: 0;
  z-index: 1;
  min-height: 15rem;
  align-content: start;
}
.drag-item {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  transition: border-color .15s, box-shadow .15s;
}
.drag-item--img {
  border: none;
  border-radius: 8px;
  background: transparent;
}

/* Numéro de rang affiché sur les cartes déposées dans le classement */
#rank-slots {
  counter-reset: rank-counter;
}
#rank-slots li {
  position: relative;
  counter-increment: rank-counter;
}
#rank-slots li::before {
  content: counter(rank-counter);
  position: absolute;
  top: 34px;
  right: 15px;
  width: 1.4rem;
  height: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--orange);
  color: var(--white);
  font-size: .65rem;
  font-weight: 800;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
  z-index: 5;
}
.variety-card-img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 8px;
}
.drag-item:hover           { border-color: var(--orange); box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.drag-item:active          { cursor: grabbing; }
.drag-item.sortable-ghost  { opacity: .35; }
.drag-item.sortable-chosen { box-shadow: 0 6px 20px rgba(0,0,0,.15); border-color: var(--orange); }

/* Position badges */
.pos-badge {
  text-align: center;
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 6px;
  letter-spacing: .3px;
}
.pos-def { background: #E8C84A; color: #1a1a1a; }
.pos-mid { background: var(--orange); color: var(--white); }
.pos-att { background: #5BA4CF; color: var(--white); }

.variety-img {
  width: 100%;
  height: 7rem;
  object-fit: cover;
}
.variety-info {
  padding: 8px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.variety-name {
  font-size: .72rem;
  font-weight: 800;
  color: var(--green);
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}
.variety-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 6px;
  flex: 1;
}
.variety-bullets li {
  font-size: .66rem;
  color: var(--muted);
  position: relative;
  padding-left: 9px;
  line-height: 1.4;
}
.variety-bullets li::before { content: '▸'; position: absolute; left: 0; color: var(--orange); }
.variety-link { font-size: .68rem; font-weight: 600; color: var(--orange); margin-top: auto; }

/* Zone de classement */
.rank-zone {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  align-items: stretch;
}
.rank-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
}
.rank-label {
  font-size: .64rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.3;
  flex-shrink: 0;
}
.rank-nums {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.rank-nums span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--white);
  font-size: .8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rank-nums .arr {
  background: none;
  color: var(--muted);
  font-size: .9rem;
  width: auto;
  height: auto;
}

/* Points system */
.points-box {
  flex: 0 0 200px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}
.points-title {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}
.points-box p {
  font-size: .68rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 8px;
}
.score-display {
  background: var(--grey);
  border-radius: 6px;
  padding: 8px;
  font-size: .7rem;
  color: var(--text);
  line-height: 1.4;
}
.score-display strong {
  display: block;
  font-size: 1.4rem;
  color: var(--orange);
  font-weight: 900;
  margin-top: 4px;
}

/* ══════════════════════════════
   S4 — FORMULAIRE COMPLET
══════════════════════════════ */
#s4 {
  background: var(--white);
  border-top: 4px solid var(--orange);
  padding: 40px 80px 48px;
}
.s4-cols {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}
.s4-visual {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.s4-visual-img {
  max-width: 34rem;
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}
.s4-form {
  flex: 1;
  max-width: 36rem;
}
.s4-rules-recap {
  font-size: .76rem;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 14px;
  font-style: italic;
}
.s4-form .btn-orange {
  width: auto;
  padding-left: 2.5rem;
  padding-right: 2.5rem;
}

/* Confirmation / Merci — modal centré */
#Confirmation {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9000;
  width: min(520px, 90vw);
}
#Confirmation.visible {
  display: block;
}


/* Flou sur tout le contenu de la page quand la modal est ouverte */
body.page-blurred::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 8999;
}
body.page-blurred > *:not(#Confirmation) {
  filter: blur(5px);
  pointer-events: none;
  user-select: none;
}
.merci-step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.merci-logo {
  height: 5.625rem;
  width: auto;
  margin-left: auto;
  flex-shrink: 0;
}
.s4-merci {
  background: var(--white);
  border-radius: 16px;
  padding: 3rem;
  color: var(--text);
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.merci-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.merci-trophy-wrap {
  flex-shrink: 0;
}
.merci-trophy {
  width: 9rem;
  height: 9rem;
  object-fit: contain;
}
.merci-content { flex: 1; }
.s4-merci .step-title { color: var(--text); }
.s4-merci .step-desc  { color: var(--muted); }
.s4-merci p           { font-size: .85rem; color: var(--text); line-height: 1.6; margin-bottom: 16px; }
.merci-cta-detail     { margin: 0 0 1.2rem; }
.merci-share          { font-weight: 600; color: var(--text) !important; }
.merci-socials        { display: flex; gap: 10px; flex-wrap: wrap; }

/* Overlay de chargement */
#loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
#loading-overlay.active { display: flex; }
.loading-box {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem 2.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
}
.loading-box p { margin: 0; font-weight: 600; color: var(--text); }
.loading-spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 4px solid var(--border);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.social-btn {
  padding: 8px 16px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 4px;
  color: var(--white);
  font-size: .78rem;
  font-weight: 600;
}
.social-btn:hover { background: rgba(255,255,255,.28); text-decoration: none; }
.social-btn--icon { padding: 6px; background: transparent; border: none; }
.social-btn--icon:hover { background: transparent; }
.social-fb-icon { width: 2.2rem; height: 2.2rem; object-fit: contain; display: block; }

/* ══════════════════════════════
   FOOTER
══════════════════════════════ */
.site-footer {
  background: var(--green);
  padding: 18px 32px;
}
.footer-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  color: rgba(255,255,255,.75);
  font-size: .72rem;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: .4px;
}
.footer-logo {
  height: 3.5rem;
  width: auto;
  border-radius: 4px;
  object-fit: contain;
}
.footer-calendar { width: 2rem; height: 2rem; flex-shrink: 0; }
.footer-cal-block { display: flex; align-items: center; gap: 8px; }
.footer-link { color: var(--white); font-weight: 700; }

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */

/* ── ~1400px : les deux blocs passent en pleine largeur quand ils wrappent ── */
@media (max-width: 1400px) {
  .s3-left  { flex: 0 0 100%; max-width: 100%; }
  .s3-right { flex: 0 0 100%; max-width: 100%; }
  .step-title { word-break: break-word; white-space: normal; }
  .s3-left .step-header { margin-bottom: 1.2rem; }
  .rules-row {
    max-width: 100%;
    gap: 1.2rem;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    text-align: center;
  }
  .rules-row p { flex: 1; align-items: center; gap: 0.5rem; font-size: 0.85rem; }
  .rules-row p img { width: 2.8rem; height: 2.8rem; margin-top: 0; }
}

/* ── 900px ── */
@media (max-width: 900px) {
  .s2-body, .s4-cols { flex-direction: column; }
  .s4-visual { order: 2; }
  .s4-form   { order: 1; }
  /* lots : pleine largeur quand ils wrappent */
  .lots-left  { flex: 0 0 100%; }
  .lots-right { flex: 0 0 100%; }
  .rules-row { flex-direction: column; align-items: flex-start; padding: 1rem 0; margin-bottom: 0; }
  .rules-row .results-note { margin-left: 0; }
  .lots-grid  { grid-template-columns: repeat(3, 1fr); }
}

/* ── 600px : mobile ── */
@media (max-width: 600px) {
  .s4-merci { padding: 2rem; }
  .merci-logo { margin-left: 0; align-self: center; display: block; margin: 0 auto; }
  .hero-title { text-shadow: 0 2px 8px rgba(0, 0, 0, .6); }
  .s3-left *,
  .s3-left span,
  .s3-left .c-orange,
  .s3-left .cta-link { text-shadow: 0 2px 6px rgba(0, 0, 0, .6); }
  .s3-layout { padding: 28px 12px; }
  .merci-step-header { flex-direction: column; align-items: flex-start; }
  .merci-step-header .step-num { order: -1; margin-bottom: 8px; }
  .hero-intro { color: var(--white); }
  .hero-intro .c-orange { color: var(--white); }
  .hero-top { padding: 16px 20px; }
  .site-header { padding: 10px 16px; }
  .header-baseline { display: none; }
  #s1 .hero-content { padding: 32px 20px; }
  .hero-title  { font-size: 1.45rem; }
  .hero-amount { font-size: 2rem; }
  .badge-n1 { width: 64px; height: 64px; }
  .b-num    { font-size: 1.2rem; }
  .b-kws    { font-size: .55rem; }
  .b-label  { font-size: .5rem; }
  #s2 { padding: 16px 20px 28px; }
  #s4 { padding: 28px 20px; }
  .s2-cta { margin-top: -1rem; flex: none; }
  .form-row-2 { grid-template-columns: 1fr; }

  /* ── Scroll hint mobile ── */
  .scroll-hint-mobile { display: block; font-size: .85rem; color: var(--white); text-shadow: 0 2px 6px rgba(0, 0, 0, .6); text-align: center; margin-bottom: 8px; }
  .cards-title { text-shadow: 0 2px 6px rgba(0, 0, 0, .6); }
  .rank-drop-label span {
    display: inline-block;
    background: rgba(0, 0, 0, .55);
    color: var(--white);
    padding: 6px 14px;
    border-radius: 20px;
    text-shadow: none;
  }

  /* ── S3 drag & drop : grille 2x2 sur petit écran ── */
  .cards-perf-wrapper { gap: 0; }
  .perf-label { display: none; }
  .cards-perf-inner { overflow-x: visible; }
  #cards-source,
  .slots-bg,
  #rank-slots {
    grid-template-columns: repeat(2, 1fr);
    min-width: 0;
  }
  .rank-target-wrapper { min-width: 0; }
  .slot-ph { min-height: 0; aspect-ratio: 3 / 4; }
  #rank-slots { min-height: 11rem; }
  .variety-img { height: 5rem; }

  /* ── Lots ── */
  .lots-grid  { grid-template-columns: 1fr; width: 100%; gap: 1.5rem; }
  .lot-card   { border-right: none; padding: 0 8px; }
  .lots-wrapper { padding: 16px; }
  .lots-left  { padding: 16px; }
  .stats-bar  { flex-direction: column; text-align: center; }
  .footer-inner { flex-direction: column; text-align: center; }
}
