/* Questionnaire métier SNDA — en-tête 3677, corps SNDA
   Chartes officielles : docs/23-charte-graphique.md */

:root {
  /* SNDA */
  --primary:        #002d3f;
  --primary-medium: #006086;
  --primary-light:  #c1d9e3;
  --secondary:      #f49c24;
  --secondary-lt:   #ffefda;
  --atlantic:       #229db9;
  --artic:          #b3dcd8;
  --artic-light:    #e6ecec;
  /* 3677 */
  --rouge:          #d41116;
  --lie-de-vin:     #6a0927;
  /* neutres */
  --gris-clair:     #ededed;
  --gris-moyen:     #d8d8d8;
  --gris-texte:     #767676;
  --blanc:          #fff;

  --rayon:   10px;
  --rayon-l: 25px;
  --ombre:   0 4px 33px 1px rgba(0,0,0,.07);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--artic-light);
  color: var(--primary);
  font: 400 16px/1.65 Montserrat, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 46rem; margin: 0 auto; padding-left: 1.25rem; padding-right: 1.25rem; }

/* ---------- en-tête : charte 3677 ---------- */
header {
  background: linear-gradient(135deg, var(--rouge) 0%, var(--lie-de-vin) 100%);
  color: var(--blanc);
  padding: 2.5rem 0 2.25rem;
}
.header-haut {
  display: flex; align-items: center; gap: 1.15rem;
  margin-bottom: 1.6rem;
}
.header-haut img {
  height: 78px; width: auto; flex-shrink: 0;
  filter: drop-shadow(0 2px 7px rgba(0,0,0,.25));
}
.header-haut .sep {
  width: 1px; height: 46px;
  background: rgba(255,255,255,.3);
  flex-shrink: 0;
}
.header-haut .logo-snda {
  height: 72px; width: auto; flex-shrink: 0;
  filter: drop-shadow(0 2px 7px rgba(0,0,0,.25));
}

header h1 {
  font: 900 clamp(1.55rem, 4.5vw, 2.15rem)/1.15 Montserrat, sans-serif;
  text-transform: uppercase;
  margin: 0 0 .8rem;
  text-wrap: balance;
}
header .intro { margin: 0; max-width: 36rem; color: rgba(255,255,255,.92); }

.infos {
  display: flex; flex-wrap: wrap; gap: .35rem 1.5rem;
  margin-top: 1.35rem; padding-top: 1.1rem;
  border-top: 1px solid rgba(255,255,255,.22);
  font-size: .875rem; color: rgba(255,255,255,.85);
}
.infos b { color: var(--blanc); font-weight: 700; }

/* ---------- progression ---------- */
.barre {
  position: sticky; top: 0; z-index: 20;
  background: var(--blanc);
  border-bottom: 1px solid var(--gris-moyen);
  padding: 1rem 0;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.barre-in {
  max-width: 46rem; margin: 0 auto; padding: 0 1.25rem;
  display: flex; align-items: center; gap: 1rem;
}
.piste { flex: 1; height: 5px; background: var(--gris-clair); border-radius: 3px; overflow: hidden; }
.jauge { height: 100%; width: 0; background: var(--secondary); transition: width .3s ease; }
.compteur {
  font-size: .8125rem; color: var(--gris-texte); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
@media (prefers-reduced-motion: reduce) { .jauge { transition: none; } }

/* ---------- corps : charte SNDA ---------- */
main { padding-top: 3rem; padding-bottom: 3.5rem; }

section {
  background: var(--blanc);
  border-radius: var(--rayon);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--ombre);
}

.titre {
  display: flex; align-items: baseline; gap: .65rem;
  margin: 0 0 1.25rem;
  padding-bottom: .7rem;
  border-bottom: 2px solid var(--artic);
}
.num {
  font: 900 1.3rem/1 Montserrat, sans-serif;
  color: var(--secondary);
  font-variant-numeric: tabular-nums;
}
.titre h2 { font: 900 1.1rem/1.25 Montserrat, sans-serif; text-transform: uppercase;
            letter-spacing: .01em; margin: 0; }

.note {
  background: var(--secondary-lt);
  border-left: 4px solid var(--secondary);
  padding: .7rem .9rem;
  margin: 0 0 1.25rem;
  border-radius: 0 6px 6px 0;
  font-size: .9rem;
  line-height: 1.5;
}

/* champs */
.champ { margin-bottom: 1.35rem; }
.champ:last-child { margin-bottom: 0; }

label, .etiquette {
  display: block; font-weight: 600;
  margin-bottom: .25rem; line-height: 1.4;
}
.aide {
  font-size: .875rem; color: var(--gris-texte);
  margin: 0 0 .5rem; line-height: 1.45;
}

input[type=text], textarea {
  width: 100%; font: inherit; color: var(--primary);
  background: var(--blanc);
  border: 1px solid var(--gris-moyen);
  border-radius: 6px;
  padding: .55rem .7rem;
}
textarea { min-height: 4.75rem; resize: vertical; line-height: 1.55; }
input[type=text]:focus, textarea:focus {
  outline: 2px solid var(--atlantic);
  outline-offset: 1px;
  border-color: var(--atlantic);
}
::placeholder { color: #9d9d9d; opacity: 1; }

/* choix */
.options { display: flex; flex-direction: column; gap: .35rem; }
.option {
  display: flex; align-items: flex-start; gap: .6rem;
  padding: .5rem .7rem;
  border: 1px solid var(--gris-moyen);
  border-radius: 6px;
  cursor: pointer;
  line-height: 1.4;
}
.option:hover { border-color: var(--atlantic); background: var(--artic-light); }
.option input { margin: .25rem 0 0; accent-color: var(--atlantic); flex-shrink: 0; }
.option:focus-within { outline: 2px solid var(--atlantic); outline-offset: 1px; }

.duo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
  gap: .85rem;
}
.duo label { font-size: .9375rem; }

/* envoi — bouton charte 3677 */
.envoi { text-align: center; padding: 1.75rem 1.5rem; }
button {
  font: 900 1rem/1 Montserrat, sans-serif;
  text-transform: uppercase; letter-spacing: .03em;
  background: #000; color: var(--blanc);
  border: none; border-radius: var(--rayon-l);
  padding: .85rem 2rem;
  cursor: pointer;
  transition: background .2s ease;
}
button:hover { background: var(--rouge); box-shadow: 0 0 10px rgba(0,0,0,.2); }
button:focus-visible { outline: 3px solid var(--atlantic); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { button { transition: none; } }

.etat {
  font-size: .875rem; color: var(--primary-medium);
  min-height: 1.3em; margin: .9rem 0 0;
}
.envoi .rappel {
  font-size: .875rem; color: var(--gris-texte);
  margin: .6rem 0 0; line-height: 1.5;
}

.pot { position: absolute; left: -9999px; }

footer {
  text-align: center;
  font-size: .8125rem; color: var(--gris-texte);
  padding: 0 1.25rem 2.5rem;
  max-width: 40rem; margin: 0 auto;
  line-height: 1.5;
}

/* ---------- mobile ---------- */
@media (max-width: 40rem) {
  header { padding: 1.75rem 0 1.75rem; }
  .header-haut { margin-bottom: 1.25rem; }
  .header-haut img { height: 54px; }
  .header-haut .logo-snda { height: 50px; }
  .header-haut { gap: .85rem; }
  .header-haut .sep { height: 34px; }
  section { padding: 1.25rem 1.1rem; border-radius: 8px; }
  main { padding-top: 2rem; padding-bottom: 2.5rem; }
  .wrap, .barre-in { padding-left: 1rem; padding-right: 1rem; }
}
