/* Dossier chantier : page vitrine et questionnaire.
   Une seule famille (Atkinson Hyperlegible, conçue pour la lisibilité) ; l'orange d'horodatage
   est réservé au tampon de date des « photos ». */

@font-face {
  font-family: "Atkinson";
  src: url("/static/fonts/atkinson-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson";
  src: url("/static/fonts/atkinson-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --ardoise: #27333d;
  --ardoise-2: #3b4a56;
  --fond: #f4f6f5;
  --blanc: #ffffff;
  --ligne: #d3d9d6;
  --plan: #2f6690;
  --tampon: #f0661a;
  --texte-doux: #55636d;
  --erreur: #b3261e;

  --t-0: 1rem;        /* 17-18 px */
  --t-1: 1.25rem;
  --t-2: 1.6rem;
  --t-3: clamp(1.65rem, 5vw, 2.2rem);
  --t-4: clamp(2.4rem, 7vw, 4.1rem);
  --mesure: 36rem;
  --gouttiere: clamp(1.25rem, 5vw, 3rem);
}

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

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

body {
  margin: 0;
  font-family: "Atkinson", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--t-0);
  line-height: 1.55;
  color: var(--ardoise);
  background: var(--fond);
}

h1, h2, h3 { line-height: 1.12; margin: 0 0 0.6em; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: var(--t-4); letter-spacing: -0.025em; }
h2 { font-size: var(--t-3); }
h3 { font-size: var(--t-1); }
p { margin: 0 0 1em; max-width: var(--mesure); }

a { color: var(--plan); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--plan); outline-offset: 3px; border-radius: 2px; }

.lien-evitement {
  position: absolute; left: -999px; top: 0;
  background: var(--blanc); padding: 0.6rem 1rem; z-index: 10;
}
.lien-evitement:focus { left: 1rem; }

.cadre { width: 100%; max-width: 68rem; margin: 0 auto; padding: 0 var(--gouttiere); }

/* ---------- En-tête */
.entete { border-bottom: 1px solid var(--ligne); background: var(--fond); }
.entete .cadre { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-top: 1rem; padding-bottom: 1rem; flex-wrap: wrap; }
.marque { font-weight: 700; font-size: var(--t-1); color: var(--ardoise); text-decoration: none; }
.marque small { font-weight: 400; font-size: 0.75em; color: var(--texte-doux); margin-left: 0.4rem; }
.entete nav a { font-weight: 700; }

/* ---------- Boutons */
.bouton {
  display: inline-block;
  font: inherit; font-weight: 700;
  background: var(--ardoise); color: var(--blanc);
  border: 2px solid var(--ardoise); border-radius: 6px;
  padding: 0.85rem 1.4rem; min-height: 48px;
  text-decoration: none; cursor: pointer;
}
.bouton:hover { background: var(--ardoise-2); border-color: var(--ardoise-2); }
.bouton.secondaire { background: transparent; color: var(--ardoise); }
.bouton.secondaire:hover { background: var(--blanc); }
.bouton[disabled] { opacity: 0.55; cursor: progress; }

/* ---------- Accueil : héros */
.heros { padding: clamp(2.5rem, 8vw, 5.5rem) 0 clamp(2.5rem, 7vw, 4.5rem); }
.heros .cadre { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 900px) { .heros .cadre { grid-template-columns: 1.15fr 1fr; } }
.heros h1 { max-width: 14ch; }
.heros .chapeau { font-size: var(--t-1); color: var(--ardoise-2); max-width: 32rem; }
.heros .actions { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: center; margin-top: 1.75rem; }
.heros .duree { color: var(--texte-doux); }

/* La « photo » de preuve : un tirage avec un tampon d'horodatage. */
.tirage {
  margin: 0;
  background: var(--blanc);
  padding: 0.75rem 0.75rem 0;
  border: 1px solid var(--ligne);
  box-shadow: 0 18px 30px -22px rgba(39, 51, 61, 0.55);
  transform: rotate(-1.5deg);
  max-width: 30rem;
  justify-self: center;
  width: 100%;
}
.tirage .image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(#a9bccb 0 38%, #8a9aa5 38% 100%);
}
.tirage svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tampon {
  position: absolute; right: 4%; bottom: 5%;
  font-family: "Courier New", ui-monospace, monospace; font-weight: 700;
  font-size: clamp(1rem, 3.6vw, 1.45rem); letter-spacing: 0.08em;
  color: var(--tampon);
  text-shadow: 0 0 6px rgba(240, 102, 26, 0.75), 0 0 1px #ffd2b8;
}
.tirage figcaption {
  padding: 0.7rem 0.15rem 0.8rem;
  font-size: 0.9rem; color: var(--texte-doux);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.tirage figcaption strong { color: var(--ardoise); }

@media (prefers-reduced-motion: no-preference) {
  .tampon { animation: impression 900ms 400ms both steps(1, end); }
  @keyframes impression { 0% { opacity: 0; } 30% { opacity: 1; } 45% { opacity: 0.2; } 60%, 100% { opacity: 1; } }
}

/* ---------- Sections */
.section { padding: clamp(2.75rem, 7vw, 4.5rem) 0; border-top: 1px solid var(--ligne); }
.section.foncee { background: var(--ardoise); color: #e9eef0; border-top: 0; }
.section.foncee h2, .section.foncee h3 { color: var(--blanc); }
.section.foncee a { color: #9cc7e6; }
.section .intro { font-size: var(--t-1); color: var(--ardoise-2); }
.section.foncee .intro { color: #cdd7dc; }

.situations { display: grid; gap: 1.75rem 2.5rem; margin-top: 2rem; }
@media (min-width: 800px) { .situations { grid-template-columns: repeat(3, 1fr); } }
.situation { border-left: 4px solid var(--ardoise); padding-left: 1rem; }
.situation h3 { margin-bottom: 0.35rem; }
.situation .metier { color: var(--texte-doux); margin: 0 0 0.4rem; }
.situation p:last-child { margin-bottom: 0; }

.etapes { list-style: none; counter-reset: etape; padding: 0; margin: 2rem 0 0; display: grid; gap: 1.5rem; }
@media (min-width: 800px) { .etapes { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; } }
.etapes li { counter-increment: etape; }
.etapes li::before {
  content: counter(etape);
  display: inline-grid; place-items: center;
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  border: 2px solid currentColor; font-weight: 700; margin-bottom: 0.6rem;
}
.etapes h3 { margin-bottom: 0.3rem; }

.hors-portee { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, 0.18); }

.deux-colonnes { display: grid; gap: 2rem 3rem; }
@media (min-width: 850px) { .deux-colonnes { grid-template-columns: 1fr 1fr; } }

.fondateurs { align-self: start; background: var(--blanc); border: 1px solid var(--ligne); border-radius: 8px; padding: 1.5rem; }
.fondateurs ul { padding-left: 1.2rem; margin: 0 0 1rem; }
.fondateurs li { margin-bottom: 0.35rem; }

.appel-final { text-align: left; }
.appel-final .bouton { margin-top: 0.5rem; }

/* ---------- Pied de page */
.pied { border-top: 1px solid var(--ligne); padding: 2rem 0 3rem; color: var(--texte-doux); font-size: 0.92rem; }
.pied .cadre { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between; }
.pied p { margin: 0; }

/* ---------- Pages de texte (confidentialité) */
.texte { padding: clamp(2rem, 6vw, 3.5rem) 0 3rem; }
.texte .cadre { max-width: 46rem; }
.texte h1 { font-size: var(--t-3); }
.texte h2 { font-size: var(--t-1); margin-top: 2rem; }
.texte li { margin-bottom: 0.4rem; max-width: var(--mesure); }

/* ---------- Questionnaire */
.questionnaire { padding: clamp(1.5rem, 5vw, 3rem) 0 4rem; }
.questionnaire .cadre { max-width: 42rem; }
.salutation { font-size: var(--t-1); color: var(--ardoise-2); }

.progression { margin: 1.5rem 0 2rem; }
.progression p { margin: 0 0 0.45rem; color: var(--texte-doux); font-weight: 700; }
.progression .barre { height: 8px; background: var(--ligne); border-radius: 4px; overflow: hidden; }
.progression .barre span { display: block; height: 100%; width: 0; background: var(--ardoise); }
@media (prefers-reduced-motion: no-preference) { .progression .barre span { transition: width 250ms ease-out; } }

.etape-form h2 { font-size: var(--t-2); }
.etape-form > p.consigne { color: var(--ardoise-2); }

.question { margin: 0 0 1.75rem; padding: 0; border: 0; min-width: 0; }
.question > legend, .question > label.libelle {
  display: block; font-weight: 700; font-size: 1.05rem; margin-bottom: 0.3rem; padding: 0;
}
.question .aide { color: var(--texte-doux); font-size: 0.95rem; margin: 0 0 0.6rem; }
.facultatif { font-weight: 400; color: var(--texte-doux); }

.question input[type="text"],
.question input[type="email"],
.question input[type="tel"],
.question input[type="number"],
.question select,
.question textarea {
  width: 100%; font: inherit; color: inherit;
  background: var(--blanc); border: 2px solid #aab4b0; border-radius: 6px;
  padding: 0.7rem 0.8rem; min-height: 48px;
}
.question textarea { min-height: 8.5rem; resize: vertical; }
.question input:focus, .question select:focus, .question textarea:focus { border-color: var(--plan); outline: none; box-shadow: 0 0 0 3px rgba(47, 102, 144, 0.25); }

.choix { display: grid; gap: 0.5rem; }
.choix label {
  display: flex; gap: 0.75rem; align-items: flex-start;
  background: var(--blanc); border: 2px solid var(--ligne); border-radius: 6px;
  padding: 0.7rem 0.85rem; cursor: pointer; min-height: 48px;
}
.choix label:hover { border-color: #aab4b0; }
.choix input { width: 1.25rem; height: 1.25rem; margin: 0.15rem 0 0; flex: none; accent-color: var(--ardoise); }
.choix label:has(input:checked) { border-color: var(--ardoise); }
.choix label:has(input:focus-visible) { outline: 3px solid var(--plan); outline-offset: 2px; }

.presentation-produit { background: var(--blanc); border: 1px solid var(--ligne); border-left: 4px solid var(--ardoise); padding: 1.1rem 1.25rem; margin: 0 0 2rem; }
.presentation-produit p:last-child { margin-bottom: 0; }

.navigation-form { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; flex-wrap: wrap-reverse; }
.navigation-form .bouton:only-child { margin-left: auto; }

.message-erreur { color: var(--erreur); font-weight: 700; margin: 0.4rem 0 0; }
.question.invalide input, .question.invalide textarea, .question.invalide select { border-color: var(--erreur); }
.question.invalide .choix label { border-color: #e3b3af; }
.alerte { border: 2px solid var(--erreur); background: #fff5f4; border-radius: 6px; padding: 0.85rem 1rem; margin-bottom: 1.5rem; }

.pot-de-miel { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }

.merci { padding-top: 1rem; }
.merci .tampon-texte { font-family: "Courier New", ui-monospace, monospace; font-weight: 700; color: var(--tampon); letter-spacing: 0.08em; font-size: 1.2rem; }

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

noscript p { background: #fff5f4; border: 2px solid var(--erreur); padding: 1rem; border-radius: 6px; }
