/* Module formulaire « Noël en Lumière » — charte de l'opération.
   Pensé d'abord pour mobile ; fond transparent pour s'intégrer dans Framer. */
:root {
  --nuit: #0b1730;
  --nuit-2: #13233f;
  --nuit-3: #1b2f52;
  --trait: rgba(255, 255, 255, 0.14);
  --texte: #f4f1ea;
  --doux: #a3afc2;
  --citron: #c8f25c;
  --ambre: #fec014;
  --vert: #00a672;
  --rouge: #ff8f7a;
  --rayon: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: transparent;
  color: var(--texte);
  font: 16px/1.5 "Hanken Grotesk", "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.module {
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 16px 22px;
  background: var(--nuit);
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
}

/* ----- étapes ----- */
.etapes { display: flex; gap: 8px; list-style: none; margin: 0 0 16px; padding: 0; }
.etapes li {
  flex: 1; display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 999px;
  background: var(--nuit-2); color: var(--doux); font-size: 13px; font-weight: 600;
  min-width: 0;
}
.etapes b {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px;
  background: var(--nuit-3); color: var(--doux);
}
.etapes span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.etapes li.actif { color: var(--texte); box-shadow: inset 0 0 0 1px var(--citron); }
.etapes li.actif b, .etapes li.fait b { background: var(--citron); color: var(--nuit); }
@media (max-width: 480px) {
  .etapes li:not(.actif) span { display: none; }
  .etapes li:not(.actif) { flex: none; }
}

.volet { display: none; }
.volet.actif { display: block; animation: entree 0.25s ease; }
@keyframes entree { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .volet.actif { animation: none; } }

/* ----- aperçu LED ----- */
.apercu, .recap {
  background: #000; border-radius: 12px; padding: 10px;
  border: 1px solid #2a2418;
  box-shadow: 0 0 0 4px #0a0a0a, 0 10px 30px rgba(0, 0, 0, 0.5);
  margin-bottom: 18px;
}
.apercu canvas, .recap canvas { display: block; width: 100%; height: auto; border-radius: 4px; }
.apercu-pied {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  margin-top: 8px; font-size: 12px; color: #8d8573;
}
.lien { background: none; border: 0; padding: 4px 0; color: var(--ambre); font: inherit; font-weight: 700; cursor: pointer; }
.lien:hover { text-decoration: underline; }

/* ----- champs ----- */
.champ { margin-bottom: 14px; min-width: 0; }
.rang { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .rang { grid-template-columns: 1fr; gap: 0; } }
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
label i, .case i { color: var(--ambre); font-style: normal; }
input:not([type="checkbox"]), textarea, select {
  width: 100%; padding: 12px 14px;
  font: inherit; font-size: 16px; /* 16 px : évite le zoom automatique sur iPhone */
  color: var(--texte); background: var(--nuit-2);
  border: 1px solid var(--trait); border-radius: 10px;
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { resize: vertical; min-height: 92px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--doux) 50%), linear-gradient(135deg, var(--doux) 50%, transparent 50%); background-position: calc(100% - 20px) 52%, calc(100% - 14px) 52%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
select option { color: #111; }
input::placeholder, textarea::placeholder { color: #6f7d95; }
input:focus-visible, textarea:focus-visible, select:focus-visible { border-color: var(--citron); box-shadow: 0 0 0 3px rgba(200, 242, 92, 0.22); }
.champ.faux input, .champ.faux textarea { border-color: var(--rouge); }

.sous { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-top: 5px; }
.compteur { font-size: 12px; color: var(--doux); font-variant-numeric: tabular-nums; margin-left: auto; white-space: nowrap; }
.compteur.plein { color: var(--rouge); font-weight: 700; }
.erreur { display: block; font-size: 13px; color: var(--rouge); min-height: 0; }
.erreur:not(:empty) { margin-top: 5px; }
.info { margin: 6px 0 0; font-size: 13px; color: var(--ambre); }
.info button { background: none; border: 0; padding: 0; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.intro { margin: 0 0 16px; color: var(--doux); font-size: 14px; }
.note { margin: 14px 0 0; font-size: 12.5px; color: var(--doux); }
.note a, .case a { color: var(--citron); }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ----- cases ----- */
.case {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px; margin-bottom: 10px;
  background: var(--nuit-2); border: 1px solid var(--trait); border-radius: 10px;
  font-size: 14px; font-weight: 400; cursor: pointer;
}
.case input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--citron); }
.case em { color: var(--doux); font-style: normal; font-size: 12.5px; }
.case.faux { border-color: var(--rouge); }
.interets { border: 0; padding: 0; margin: 16px 0 6px; }
.interets legend { font-size: 14px; font-weight: 600; margin-bottom: 8px; padding: 0; }
.interets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.interets legend { grid-column: 1 / -1; }
.case.mini { margin: 0; padding: 10px 12px; align-items: center; }
@media (max-width: 380px) { .interets { grid-template-columns: 1fr; } }
.turnstile:not(:empty) { margin: 14px 0 4px; }

/* ----- boutons ----- */
.actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; margin-top: 18px; }
.bouton {
  flex: 1; max-width: 320px; min-height: 50px; padding: 12px 22px;
  font: inherit; font-weight: 800; color: var(--nuit);
  background: var(--citron); border: 0; border-radius: 999px; cursor: pointer;
  transition: transform 0.1s, filter 0.15s;
}
.bouton:hover { filter: brightness(1.06); }
.bouton:active { transform: scale(0.98); }
.bouton[disabled] { opacity: 0.6; cursor: wait; }
.retour {
  min-height: 50px; padding: 12px 18px; font: inherit; font-weight: 600;
  color: var(--texte); background: transparent; border: 1px solid var(--trait); border-radius: 999px; cursor: pointer;
}
.bouton:focus-visible, .retour:focus-visible, .lien:focus-visible { outline: 3px solid rgba(200, 242, 92, 0.5); outline-offset: 2px; }

/* ----- fin ----- */
.merci { text-align: center; padding: 14px 4px 4px; }
.merci h2 { font-size: 22px; margin: 12px 0 8px; }
.merci p { color: var(--doux); margin: 0 0 12px; }
.coche { width: 56px; height: 56px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--vert); color: #fff; font-size: 28px; font-weight: 800; }
details { text-align: left; margin: 14px 0; font-size: 13px; color: var(--ambre); }
pre { white-space: pre-wrap; word-break: break-word; background: #000; color: #cfd6e4; padding: 12px; border-radius: 8px; font-size: 12px; }
