/* ==========================================================================
   Casette — le sondage public (/sondage, /s/<provenance>).

   D'après l'écran « Sondage » de la maquette (docs/maquette/Sondage.dc.html),
   pensé pour un téléphone de 390 px : une colonne, de gros boutons (56 px pour
   l'action principale, 48 px au moins pour un choix), le bouton « Suivant »
   en bas de l'écran. Sur un ordinateur, la même colonne, centrée.

   Charte (comme vitrine.css) : Épinard sur Sésame pour le texte (7,6 pour 1),
   Betterave pour le bouton principal (texte blanc, 5,4 pour 1), jamais de
   petit texte Betterave. Aucune couleur n'est écrite hors de :root.
   ========================================================================== */

@font-face {
  font-family: 'Delius';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/delius-400-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/quicksand-latin.woff2') format('woff2');
}

:root {
  --epinard: #3D490B;
  --epinard-doux: #5E6B26;
  --betterave: #AF4A47;
  --sesame: #FFDEBF;
  --blanc: #FFFFFF;

  --titre: 'Delius', ui-rounded, system-ui, sans-serif;
  --texte: 'Quicksand', ui-rounded, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--sesame);
  color: var(--epinard);
  font-family: var(--texte);
  font-size: 17px;
  line-height: 1.5;
}

a { color: var(--epinard); text-underline-offset: 3px; }
a:hover { color: var(--betterave); }
button { font: inherit; cursor: pointer; color: inherit; }
input, textarea { font: inherit; color: var(--epinard); }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--epinard); outline-offset: 3px;
}
[hidden] { display: none !important; }

.lecteur-seul {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Le champ piège : hors de l'écran, pas seulement caché (certains robots
   sautent les champs en display:none). */
.piege { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }


/* --------------------------------------------------------------------------
   LA COLONNE
   -------------------------------------------------------------------------- */
.sondage {
  max-width: 480px; margin: 0 auto;
  min-height: 100vh; min-height: 100dvh;
  padding: 20px 20px 28px;
  display: flex; flex-direction: column; gap: 14px;
}

.barre { display: flex; align-items: center; justify-content: space-between; height: 44px; flex-shrink: 0; }
.rond, .rond-vide { width: 44px; height: 44px; flex-shrink: 0; }
.rond {
  border: none; border-radius: 50%; background: var(--blanc); padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.rond svg path { fill: none; stroke: var(--epinard); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.logo-lien { display: block; line-height: 0; }
.logo { display: block; height: 22px; width: auto; }

.avancement { height: 8px; flex-shrink: 0; background: var(--blanc); border-radius: 999px; overflow: hidden; }
.avancement-barre { height: 8px; width: 0; background: var(--betterave); border-radius: 999px; transition: width .25s ease; }
@media (prefers-reduced-motion: reduce) { .avancement-barre { transition: none; } }

.ecran { flex-grow: 1; display: flex; flex-direction: column; gap: 14px; padding-top: 16px; outline: none; }


/* --------------------------------------------------------------------------
   LES TEXTES
   -------------------------------------------------------------------------- */
.titre { margin: 0; font-family: var(--titre); font-weight: 400; font-size: 28px; line-height: 1.2; outline: none; }
.titre-2 { font-size: 26px; margin-top: 10px; }
.chapeau { margin: 0; font-size: 17px; line-height: 1.5; }
.chapeau-petit { margin: 0; font-size: 16px; line-height: 1.5; }
.aide { margin: 0; font-size: 15px; font-weight: 600; color: var(--epinard-doux); }
.etiquette { font-size: 15px; font-weight: 700; }
.mention { margin: 0; font-size: 13px; line-height: 1.45; color: var(--epinard-doux); text-align: center; }
.mention a { color: var(--epinard-doux); }

.intro { display: flex; flex-direction: column; gap: 18px; padding-top: 12px; text-align: center; align-items: center; }
.intro .titre { font-size: 32px; line-height: 1.15; }
.porte { width: 72px; height: 96px; color: var(--epinard); }
.depuis { margin: 0; background: var(--blanc); border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 700; }

.encart { background: var(--blanc); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.encart p { margin: 0; font-size: 16px; line-height: 1.5; }
.encart .fort { font-weight: 700; }

.merci { flex-grow: 1; display: flex; flex-direction: column; gap: 18px; align-items: center; justify-content: center; text-align: center; }
.stickers { display: flex; gap: 8px; align-items: center; }
.stickers img { height: 92px; width: auto; }
.titre-merci { font-size: 44px; }

.alerte { margin: 0; background: var(--blanc); border-left: 4px solid var(--betterave); border-radius: 12px; padding: 12px 14px; font-size: 15px; font-weight: 600; }


/* --------------------------------------------------------------------------
   LES CHAMPS ET LES BOUTONS
   -------------------------------------------------------------------------- */
.champ {
  width: 100%; border: 2px solid var(--epinard); border-radius: 16px; background: var(--blanc);
  font-size: 17px; padding: 0 16px;
}
input.champ { height: 54px; }
textarea.champ { padding: 14px 16px; resize: none; line-height: 1.45; }
.champ::placeholder { color: var(--epinard-doux); opacity: 1; }

.bas { margin-top: auto; padding-top: 10px; display: flex; flex-direction: column; gap: 10px; }

.principal {
  display: flex; align-items: center; justify-content: center; width: 100%;
  min-height: 56px; border: none; border-radius: 999px; padding: 0 20px;
  background: var(--betterave); color: var(--blanc); font-weight: 700; font-size: 18px; text-decoration: none;
}
.principal:hover { filter: brightness(0.94); color: var(--blanc); }
.principal:disabled { opacity: .7; cursor: wait; }

.lien {
  align-self: flex-start; min-height: 44px; border: none; background: none; padding: 0;
  font-weight: 700; font-size: 16px; color: var(--epinard); text-decoration: underline; text-underline-offset: 3px;
}
.lien-centre { align-self: center; min-height: 48px; }
.lien-doux { align-self: center; font-size: 15px; color: var(--epinard-doux); }
.lien:disabled { opacity: .6; cursor: wait; }

.oui-non { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.gros-choix {
  height: 72px; border: 2px solid var(--epinard); border-radius: 20px; background: var(--blanc);
  font-family: var(--titre); font-size: 24px;
}

.liste-choix { display: flex; flex-direction: column; gap: 12px; }
.choix {
  min-height: 58px; border: 2px solid var(--epinard); border-radius: 18px; background: var(--blanc);
  font-weight: 700; font-size: 17px; text-align: left; padding: 8px 18px;
}

.puces { display: flex; flex-wrap: wrap; gap: 10px; }
.puce {
  min-height: 48px; padding: 10px 18px; border-radius: 999px; border: 2px solid var(--epinard);
  background: var(--blanc); font-weight: 700; font-size: 16px; text-align: left;
}

.notes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.note { height: 52px; border-radius: 14px; border: 2px solid var(--epinard); background: var(--blanc); font-weight: 700; font-size: 18px; }
.bornes { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--epinard-doux); }

/* Choisi : Sésame sur Épinard, comme la maquette. */
.gros-choix[aria-pressed="true"], .choix[aria-pressed="true"], .puce[aria-pressed="true"], .note[aria-pressed="true"] {
  background: var(--epinard); color: var(--sesame);
}
.gros-choix:hover, .choix:hover, .puce:hover, .note:hover { filter: brightness(0.96); }

.precision { display: flex; flex-direction: column; gap: 8px; }

.consentement { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.45; cursor: pointer; }
.consentement input { width: 24px; height: 24px; margin: 0; flex-shrink: 0; accent-color: var(--epinard); }
