/* Couleurs du site de Sandro */
:root {
  --fond: #0B1220;
  --carte: #121B2E;
  --carte-survol: #18233B;
  --bordure: #24314D;
  --violet: #7C3AED;
  --violet-clair: #A78BFA;
  --violet-fond: rgba(124, 58, 237, 0.16);
  --texte: #F1F4FA;
  --texte-doux: #A3AEC5;
  --erreur: #F87171;
  --rayon: 14px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  min-height: 100vh;
}

.conteneur {
  max-width: 680px;
  margin: 0 auto;
  padding: 28px 16px 64px;
}

.chargement { color: var(--texte-doux); text-align: center; margin-top: 30vh; }

/* ── Barre de progression ── */
.progression {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11, 18, 32, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--bordure);
  padding: 12px 16px 14px;
}
.progression-texte {
  max-width: 680px; margin: 0 auto 8px;
  display: flex; gap: 10px; font-size: 14px; color: var(--texte-doux);
}
#progression-etape { color: var(--violet-clair); font-weight: 600; white-space: nowrap; }
.progression-barre {
  max-width: 680px; margin: 0 auto;
  height: 6px; background: var(--bordure); border-radius: 99px; overflow: hidden;
}
.progression-remplissage {
  height: 100%; width: 0; background: var(--violet);
  border-radius: 99px; transition: width .35s ease;
}

/* ── Accueil et remerciement ── */
.accueil h1, .merci h1 {
  font-size: clamp(26px, 6.5vw, 36px);
  line-height: 1.2; margin: 8px 0 24px; letter-spacing: -0.01em;
}
.accueil p { margin: 0 0 14px; }
.accueil .salut { font-weight: 600; }
.duree {
  display: inline-block; margin: 6px 0 22px; padding: 4px 12px;
  border-radius: 99px; background: var(--violet-fond); color: var(--violet-clair); font-size: 14px; font-weight: 600;
}
.accueil .rgpd {
  margin-top: 28px; padding: 14px 16px; font-size: 14px; color: var(--texte-doux);
  border: 1px solid var(--bordure); border-radius: var(--rayon); line-height: 1.5;
}
.merci { text-align: center; padding-top: 12vh; }
.merci p { font-size: 19px; margin: 0 0 10px; }
.merci .signature { margin-top: 26px; font-weight: 700; color: var(--violet-clair); font-size: 22px; }
.merci .coche {
  width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%;
  background: var(--violet); display: grid; place-items: center; font-size: 34px;
}

/* ── Sections et questions ── */
.section h2 { font-size: 24px; margin: 0 0 22px; }
.question {
  background: var(--carte); border: 1px solid var(--bordure);
  border-radius: var(--rayon); padding: 18px 16px 16px; margin: 0 0 18px;
  scroll-margin-top: 90px;
}
.question.en-erreur { border-color: var(--erreur); }
.question-titre { font-weight: 650; font-size: 18px; margin: 0 0 4px; line-height: 1.4; }
.numero { color: var(--violet-clair); margin-right: 4px; }
.etoile { color: var(--violet-clair); }
.question-aide { font-size: 14px; color: var(--texte-doux); margin: 0 0 12px; }
.facultatif { font-size: 13px; color: var(--texte-doux); font-weight: 400; margin-left: 6px; }
.message-erreur { color: var(--erreur); font-size: 14px; margin: 0 0 10px; font-weight: 600; }
.message-info { color: var(--violet-clair); font-size: 14px; margin: 10px 0 0; }

/* Options (cases à cocher et boutons ronds) */
.options { display: grid; gap: 8px; }
.option {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; min-height: 52px;
  border: 1.5px solid var(--bordure); border-radius: 12px;
  background: var(--fond); cursor: pointer;
  transition: border-color .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
}
.option:hover { background: var(--carte-survol); }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option .marque {
  flex: none; width: 22px; height: 22px; border: 2px solid var(--texte-doux);
  border-radius: 50%; display: grid; place-items: center;
}
.option input[type="checkbox"] + .marque { border-radius: 6px; }
.option input:checked + .marque { border-color: var(--violet); background: var(--violet); }
.option input:checked + .marque::after {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff;
}
.option input[type="checkbox"]:checked + .marque::after {
  width: 6px; height: 11px; border-radius: 0; background: none;
  border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg);
}
.option:has(input:checked) { border-color: var(--violet); background: var(--violet-fond); }
.option:has(input:focus-visible) { outline: 2px solid var(--violet-clair); outline-offset: 2px; }
.option:has(input:disabled) { opacity: .4; cursor: not-allowed; }

/* Textes libres */
textarea, input[type="text"] {
  width: 100%; font: inherit; color: var(--texte);
  background: var(--fond); border: 1.5px solid var(--bordure); border-radius: 12px;
  padding: 12px 14px;
}
textarea { min-height: 120px; resize: vertical; }
textarea:focus, input[type="text"]:focus { outline: none; border-color: var(--violet); }
::placeholder { color: #5D6A85; }

/* Tableau de la question 15 : une carte par idée */
.ligne-tableau {
  border: 1px solid var(--bordure); border-radius: 12px; padding: 14px 12px 12px; margin: 0 0 12px;
  background: var(--fond);
}
.ligne-tableau.en-erreur { border-color: var(--erreur); }
.ligne-tableau { min-width: 0; }
.ligne-tableau legend { padding: 0; float: left; width: 100%; }
.ligne-tableau .options { clear: both; }
.ligne-titre { font-weight: 600; margin: 0 0 10px; font-size: 16px; display: flex; gap: 8px; }
.ligne-titre .lettre { color: var(--violet-clair); }
.ligne-tableau .options { gap: 6px; }
.ligne-tableau .option { min-height: 46px; padding: 10px 12px; font-size: 15.5px; background: var(--carte); }
.ligne-tableau .option.meilleure { font-weight: 600; }
.ligne-tableau .option.meilleure:has(input:checked) { background: var(--violet); color: #fff; }
.ligne-tableau .option.meilleure:has(input:checked) .marque { border-color: #fff; background: #fff; }
.ligne-tableau .option.meilleure:has(input:checked) .marque::after { background: var(--violet); }
.ligne-tableau .option .note { margin-left: auto; font-size: 12px; color: var(--texte-doux); font-weight: 400; }
@media (min-width: 640px) {
  .ligne-tableau .options { grid-template-columns: repeat(5, 1fr); }
  .ligne-tableau .option {
    flex-direction: column; align-items: center; text-align: center;
    font-size: 13.5px; line-height: 1.3; padding: 10px 6px; gap: 8px;
  }
  .ligne-tableau .option .note { margin: 0; }
}

/* ── Boutons ── */
.boutons { display: flex; gap: 10px; margin-top: 26px; }
button {
  font: inherit; font-weight: 650; border-radius: 12px; cursor: pointer;
  padding: 15px 22px; min-height: 54px; border: none;
}
.btn-principal { background: var(--violet); color: #fff; flex: 1; }
.btn-principal:hover { background: #6D28D9; }
.btn-principal:disabled { opacity: .6; cursor: wait; }
.btn-secondaire { background: transparent; color: var(--texte-doux); border: 1.5px solid var(--bordure); }
.btn-secondaire:hover { color: var(--texte); border-color: var(--texte-doux); }
.erreur-envoi { color: var(--erreur); margin-top: 14px; font-weight: 600; }

/* Piège à robots : invisible pour les humains */
.piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

[hidden] { display: none !important; }

/* Vérification anti-robot (n'apparaît qu'en cas de doute) */
.zone-turnstile { margin-top: 18px; display: flex; justify-content: center; }
.zone-turnstile:empty { margin: 0; }
