/* Je récupère ma caution : page d'attente
   Charte : sarcelle #0F8A7E, marine #17294B, doré #C79A4E, Poppins.
   #0B6E64 (sarcelle foncé) sert aux textes et boutons : le sarcelle de la charte
   n'atteint pas le contraste minimal (4,5:1) pour du petit texte sur blanc. */

@font-face { font-family: "Poppins"; font-weight: 400; font-style: normal; font-display: swap; src: url("polices/poppins-latin-400-normal.woff") format("woff"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-style: normal; font-display: swap; src: url("polices/poppins-latin-500-normal.woff") format("woff"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-style: normal; font-display: swap; src: url("polices/poppins-latin-600-normal.woff") format("woff"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-style: normal; font-display: swap; src: url("polices/poppins-latin-700-normal.woff") format("woff"); }

:root {
  --sarcelle: #0F8A7E;
  --sarcelle-fonce: #0B6E64;
  --sarcelle-pale: #E3F2EF;
  --marine: #17294B;
  --marine-doux: #4A5A76;
  --dore: #C79A4E;
  --papier: #F4F8F7;
  --trait: #CFE0DD;
  --blanc: #FFFFFF;
  --rayon: 14px;
  --largeur: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--marine);
  background: var(--blanc);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sarcelle-fonce); text-underline-offset: 3px; }
a:hover { color: var(--marine); }
:focus-visible { outline: 3px solid var(--dore); outline-offset: 3px; border-radius: 4px; }

.conteneur { width: min(100% - 2rem, var(--largeur)); margin-inline: auto; }
.lien-evitement { position: absolute; left: -9999px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.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; }
.lien-evitement:focus { left: 1rem; top: 1rem; background: var(--blanc); padding: .5rem 1rem; z-index: 10; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 .6em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); font-weight: 700; }
h1 .surtitre { display: block; margin-bottom: .7rem; font-size: clamp(.85rem, 1.6vw, 1rem); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--sarcelle-fonce); line-height: 1.4; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 600; }
h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: 0; }
p { margin: 0 0 1em; max-width: 62ch; }

/* En-tête */
.entete { padding: 1.25rem 0; }
.entete .conteneur { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.entete__logo img { width: 210px; }
.entete__lien { font-weight: 500; font-size: .95rem; white-space: nowrap; }

/* Bouton */
.bouton {
  display: inline-block;
  font: inherit; font-weight: 600; font-size: 1.05rem;
  color: var(--blanc); background: var(--sarcelle-fonce);
  border: 0; border-radius: 999px;
  padding: .85rem 1.6rem; text-decoration: none; cursor: pointer;
}
.bouton:hover { background: var(--marine); color: var(--blanc); }

/* Ouverture */
.ouverture { padding: 2rem 0 4.5rem; background: var(--blanc); }
.ouverture .conteneur { display: grid; gap: 3rem; align-items: center; }
.ouverture__texte p { font-size: 1.15rem; color: var(--marine-doux); }
.ouverture__date { font-weight: 500; color: var(--marine) !important; font-size: 1rem !important; margin-top: 1.5rem; }
.ouverture__visuel { margin: 0; }
.ouverture__visuel img { width: 100%; }
.ouverture__visuel figcaption { font-size: .82rem; color: var(--marine-doux); margin-top: .7rem; text-align: right; }

/* Situations illustrées */
.situations { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.75rem 1.25rem; grid-template-columns: repeat(2, 1fr); }
.situations__illu { display: block; width: 100%; height: auto; margin-bottom: .9rem; }
.situations h3 { font-size: 1.05rem; margin-bottom: .35rem; }
.situations p { font-size: .95rem; color: var(--marine-doux); margin: 0; }

/* Pictogrammes */
.picto { display: block; width: 46px; height: 46px; color: var(--sarcelle-fonce); margin-bottom: .75rem; }

/* La fiche d'état des lieux (élément signature) */
.fiche {
  background: var(--blanc);
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  padding: 1.5rem 1.5rem 1.25rem;
  box-shadow: 0 24px 48px -28px rgba(23, 41, 75, .45);
  position: relative;
  max-width: 520px;
  justify-self: center;
  width: 100%;
}
.fiche__titre { font-weight: 600; font-size: 1.05rem; margin: 0; }
.fiche__sous-titre { font-size: .85rem; color: var(--marine-doux); margin: 0 0 1rem; }
.fiche table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.fiche th { text-align: left; font-weight: 500; font-size: .78rem; color: var(--marine-doux); padding: 0 .4rem .5rem 0; border-bottom: 2px solid var(--marine); }
.fiche td { padding: .7rem .4rem .7rem 0; border-bottom: 1px solid var(--trait); vertical-align: middle; }
.fiche td:first-child { font-weight: 500; }
.fiche .col-case { width: 2.2rem; text-align: center; padding-right: 0; }
.case { display: inline-grid; place-items: center; width: 1.45rem; height: 1.45rem; border: 2px solid var(--marine); border-radius: 5px; }
.case svg { width: 1rem; height: 1rem; stroke: var(--sarcelle); stroke-width: 3.2; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; animation: cocher .35s ease-out forwards; }
.fiche tr:nth-child(1) .case svg { animation-delay: .5s; }
.fiche tr:nth-child(2) .case svg { animation-delay: .85s; }
.fiche tr:nth-child(3) .case svg { animation-delay: 1.2s; }
.fiche tr:nth-child(4) .case svg { animation-delay: 1.55s; }
.fiche tr:nth-child(5) .case svg { animation-delay: 1.9s; }
.tampon {
  position: absolute; right: -.75rem; bottom: -1.4rem;
  transform: rotate(-7deg) scale(1);
  border: 3px solid var(--dore); color: var(--marine); background: #FBF5EA;
  border-radius: 10px; padding: .35rem .9rem;
  font-weight: 700; font-size: .95rem; letter-spacing: .01em;
  opacity: 0; animation: tamponner .4s 2.35s cubic-bezier(.2, 1.6, .4, 1) forwards;
}
@keyframes cocher { to { stroke-dashoffset: 0; } }
@keyframes tamponner { from { opacity: 0; transform: rotate(-7deg) scale(1.5); } to { opacity: 1; transform: rotate(-7deg) scale(1); } }

/* Sections */
.section { padding: 4.5rem 0; }
.section--papier { background: var(--papier); }
.intro { max-width: 62ch; margin-bottom: 2.5rem; }
.intro p { color: var(--marine-doux); font-size: 1.1rem; }

.principes { list-style: none; padding: 0; margin: 0; display: grid; gap: 2rem; }
.principes li { padding-top: .25rem; }
.principes p { color: var(--marine-doux); margin: 0; }

/* Kits */
.kits { display: grid; gap: 1.5rem; margin-bottom: 2.5rem; }
.kit { background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--rayon); overflow: hidden; display: flex; flex-direction: column; }
.kit__image { height: 250px; display: flex; justify-content: center; align-items: center; padding: .8rem 1rem; }
.kit__image img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.kit--s .kit__image { background: #E3F2EF; }
.kit--m .kit__image { background: #E5E9F1; }
.kit--l .kit__image { background: #F6EEDF; }
.kit__bande { display: flex; align-items: baseline; gap: .75rem; padding: 1rem 1.25rem; color: var(--blanc); }
.kit--s .kit__bande { background: var(--sarcelle); }
.kit--m .kit__bande { background: var(--marine); }
.kit--l .kit__bande { background: var(--dore); color: var(--marine); }
.kit__lettre { font-size: 3rem; font-weight: 700; line-height: 1; }
.kit__nom { font-size: 1.15rem; font-weight: 600; }
.kit__corps { padding: 1.25rem; display: flex; flex-direction: column; flex: 1; }
.kit__logement { font-weight: 600; margin-bottom: .5rem; }
.kit__corps p { font-size: .98rem; color: var(--marine-doux); }
.kit__prix { margin-top: auto; margin-bottom: 0 !important; padding-top: .75rem; border-top: 1px dashed var(--trait); font-size: .9rem !important; color: var(--marine) !important; font-weight: 500; }

.contenu-commun { background: var(--blanc); border-radius: var(--rayon); border: 1px solid var(--trait); padding: 1.5rem 1.5rem .5rem; }
.contenu-commun ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.contenu-commun li { margin-bottom: .35rem; }
.contenu-commun li::marker { color: var(--sarcelle); }
.note { font-size: .9rem; color: var(--marine-doux); }

/* Étapes (vraie séquence, d'où la numérotation) */
.etapes { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.5rem; counter-reset: etape; }
.etapes li { counter-increment: etape; display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; align-items: start; }
.etapes li::before { content: counter(etape); display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--sarcelle-pale); color: var(--sarcelle-fonce); font-weight: 700; font-size: 1.2rem; }
.etapes h3 { margin: .55rem 0 .3rem; }
.etapes p { color: var(--marine-doux); margin: 0; }
.etapes-grille { display: grid; gap: 3rem; align-items: center; }
.etapes-grille .fiche { margin-bottom: 1.5rem; }

/* La fiche se coche quand elle arrive à l'écran (si JavaScript est actif) */
html.js .fiche .case svg, html.js .fiche .tampon { animation-play-state: paused; }
html.js .fiche.est-visible .case svg, html.js .fiche.est-visible .tampon { animation-play-state: running; }

/* Liste d'attente */
.attente { background: var(--marine); color: var(--blanc); }
.attente .conteneur { display: grid; gap: 2.5rem; align-items: start; }
.attente h2 { color: var(--blanc); }
.attente__texte p { color: #D6DDEA; }
.attente__texte strong { color: var(--dore); font-weight: 600; }
.formulaire { background: var(--blanc); color: var(--marine); border-radius: var(--rayon); padding: 1.75rem; }
.champ { margin-bottom: 1.1rem; }
.champ label { display: block; font-weight: 500; font-size: .95rem; margin-bottom: .35rem; }
.champ .facultatif { font-weight: 400; color: var(--marine-doux); }
.champ input[type="email"], .champ select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--marine);
  padding: .75rem .9rem; border: 2px solid var(--trait); border-radius: 10px; background: var(--blanc);
}
.champ input[type="email"]:focus, .champ select:focus { border-color: var(--sarcelle-fonce); outline: none; box-shadow: 0 0 0 3px var(--sarcelle-pale); }
.consentement { display: grid; grid-template-columns: 1.4rem 1fr; gap: .6rem; align-items: start; font-size: .88rem; color: var(--marine-doux); margin-bottom: 1.25rem; }
.consentement input { width: 1.2rem; height: 1.2rem; margin: .2rem 0 0; accent-color: var(--sarcelle-fonce); }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.formulaire .bouton { width: 100%; }
.message { margin: 1rem 0 0; font-size: .95rem; font-weight: 500; min-height: 1.5em; }
.message--ok { color: var(--sarcelle-fonce); }
.message--erreur { color: #A3261B; }

/* Professionnels */
.pros { padding: 3rem 0; border-top: 1px solid var(--trait); }
.pros p { margin: 0; }

/* Pied de page */
.pied { background: var(--marine); color: #D6DDEA; padding: 2.5rem 0; font-size: .9rem; border-top: 1px solid rgba(255, 255, 255, .12); }
.pied .conteneur { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; align-items: center; justify-content: space-between; }
.pied img { width: 190px; }
.pied a { color: var(--blanc); }
.pied ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }

/* Pages de texte (mentions légales) */
.texte-legal { padding: 2rem 0 4rem; }
.texte-legal .conteneur { max-width: 760px; }
.texte-legal h2 { font-size: 1.35rem; margin-top: 2.2rem; }
.texte-legal p, .texte-legal li { color: var(--marine-doux); }
.a-completer { background: #FBF0D9; color: var(--marine); padding: 0 .25rem; border-radius: 3px; }

/* Grands écrans */
@media (min-width: 760px) {
  .principes { grid-template-columns: repeat(3, 1fr); }
  .kits { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 960px) {
  .ouverture { padding-top: 3rem; background: linear-gradient(90deg, var(--blanc) 0 55%, var(--papier) 55% 100%); }
  .ouverture .conteneur { grid-template-columns: 1fr 1.05fr; }
  .situations { grid-template-columns: repeat(4, 1fr); }
  .etapes-grille { grid-template-columns: 1fr 1fr; }
  .attente .conteneur { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .entete__logo img { width: 170px; }
  .entete__lien { font-size: .85rem; }
  .fiche { padding: 1.1rem 1rem 1rem; }
  .fiche table { font-size: .82rem; }
  .fiche .col-piece { display: none; }
  .tampon { right: .25rem; }
  .situations h3 { font-size: .95rem; }
  .situations p { font-size: .88rem; }
  .kit__image { height: 240px; }
}

/* Mouvement réduit : la fiche apparaît directement cochée */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .case svg { animation: none; stroke-dashoffset: 0; }
  .tampon { animation: none; opacity: 1; }
}
