/* Kdastre — site public.
   Blanc froid et vert profond, comme un plan cadastral sur calque ; le
   carmin est réservé à la parcelle et à l'action principale. Titres en
   Bricolage Grotesque (hébergée ici), texte en police système : aucune
   requête vers un tiers. Une seule animation : le tracé de la parcelle. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/BricolageGrotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --encre: #14201a;
  --encre-douce: #4a5a51;
  --blanc: #ffffff;
  --calque: #f1f5f0;
  --vert: #2e5b48;
  --vert-vif: #3f7a60;
  --vert-pale: #e3ece6;
  --carmin: #b23a2c;
  --carmin-fonce: #93291d;
  --trait: #d3dcd5;
  --titre: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --texte: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --large: 72rem;
  --rayon: 14px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--blanc);
  color: var(--encre);
  font: 17px/1.6 var(--texte);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--vert-vif); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 {
  font-family: var(--titre);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 6.4vw, 4.9rem); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; line-height: 1.25; }
p { margin: 0; }

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

/* --- En-tête ------------------------------------------------------------- */

.entete {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--trait);
}
.entete .cadre { display: flex; align-items: center; gap: 2rem; height: 68px; }
.marque {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-family: var(--titre);
  font-weight: 750;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
}
.marque img { width: 32px; height: 32px; border-radius: 8px; }
.entete nav { display: flex; gap: 1.75rem; margin-left: auto; font-size: 0.95rem; }
.entete nav a { text-decoration: none; color: var(--encre-douce); }
.entete nav a:hover, .entete nav a[aria-current] { color: var(--encre); }

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 600 1rem/1 var(--texte);
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.bouton.principal { background: var(--carmin); color: var(--blanc); }
.bouton.principal:hover { background: var(--carmin-fonce); }
.bouton.secondaire { border-color: var(--trait); color: var(--encre); background: var(--blanc); }
.bouton.secondaire:hover { border-color: var(--encre); }
.bouton.petit { min-height: 40px; padding: 0 1.1rem; font-size: 0.92rem; }

/* --- Ouverture ----------------------------------------------------------- */

.ouverture { padding: clamp(3rem, 7vw, 6rem) 0 clamp(3.5rem, 7vw, 6.5rem); overflow: hidden; }
.ouverture .cadre {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.ouverture .accroche { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--encre-douce); margin: 1.5rem 0 2.2rem; max-width: 34rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.garanties { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin-top: 2.2rem; font-size: 0.9rem; color: var(--encre-douce); }
.garanties span { display: inline-flex; align-items: center; gap: 0.45rem; }
.garanties svg { width: 18px; height: 18px; color: var(--vert-vif); flex: none; }

/* Le plan : parcelles sur calque, une parcelle carmin, deux fiches. */
.plan {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 28px;
  background: var(--calque);
  border: 1px solid var(--trait);
}
.plan > svg { width: 100%; height: 100%; border-radius: 28px; }
.plan .limites { fill: none; stroke: var(--vert); stroke-width: 1.4; opacity: 0.55; }
.plan .rue { fill: var(--blanc); stroke: var(--trait); stroke-width: 1; }
.plan .bati { fill: var(--trait); }
.plan .cible { fill: var(--carmin); fill-opacity: 0.16; stroke: var(--carmin); stroke-width: 3; stroke-linejoin: round; }
.plan .epingle { fill: var(--carmin); }
.plan .nom-rue { font: 600 11px var(--texte); fill: var(--encre-douce); letter-spacing: 0.02em; }

@media (prefers-reduced-motion: no-preference) {
  .plan .cible {
    stroke-dasharray: 620;
    stroke-dashoffset: 620;
    fill-opacity: 0;
    animation: trace 1.6s 0.3s cubic-bezier(0.65, 0, 0.35, 1) forwards, remplit 0.6s 1.7s ease-out forwards;
  }
  .plan .epingle { opacity: 0; transform: translateY(-10px); transform-box: fill-box; animation: pose 0.45s 1.9s ease-out forwards; }
  .plan .vignette { opacity: 0; transform: translateY(12px); animation: pose 0.5s ease-out forwards; }
  .plan .vignette.fiche { animation-delay: 2.1s; }
  .plan .vignette.suivi { animation-delay: 2.35s; }
}
@keyframes trace { to { stroke-dashoffset: 0; } }
@keyframes remplit { to { fill-opacity: 0.16; } }
@keyframes pose { to { opacity: 1; transform: none; } }

.vignette {
  position: absolute;
  background: var(--blanc);
  border: 1px solid var(--trait);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  font-size: 0.86rem;
  line-height: 1.4;
  box-shadow: 0 18px 40px -22px rgba(20, 32, 26, 0.45);
}
.vignette.fiche { left: -6%; bottom: 9%; width: 54%; }
.vignette.suivi { right: -5%; top: 7%; width: 50%; }
.vignette .titre-vignette { font: 700 1rem/1.2 var(--titre); letter-spacing: -0.01em; margin-bottom: 0.45rem; }
.vignette dl { display: grid; grid-template-columns: auto 1fr; gap: 0.15rem 0.75rem; margin: 0; }
.vignette dt { color: var(--encre-douce); }
.vignette dd { margin: 0; text-align: right; font-weight: 600; }
.vignette ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.vignette li { display: flex; align-items: center; gap: 0.5rem; }
.vignette li svg { width: 18px; height: 18px; flex: none; color: var(--vert-vif); }
.vignette li.attente { color: var(--encre-douce); }
.vignette li.attente svg { color: var(--trait); }

/* --- Sections ------------------------------------------------------------ */

.section { padding: clamp(4rem, 8vw, 7rem) 0; }
.section.calque { background: var(--calque); }
.section.sans-haut { padding-top: 0; }
.intro { max-width: 40rem; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.intro p { margin-top: 1rem; color: var(--encre-douce); font-size: 1.1rem; }

/* Parcours : une vraie séquence, en frise comme le suivi de l'app. */
.frise { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.5rem; counter-reset: etape; }
.frise li { position: relative; counter-increment: etape; padding-top: 3.4rem; }
.frise li::before {
  content: counter(etape);
  position: absolute;
  top: 0;
  left: 0;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--blanc);
  border: 2px solid var(--vert);
  color: var(--vert);
  font: 700 1.05rem/2.15rem var(--titre);
  text-align: center;
  z-index: 1;
}
.frise li::after {
  content: "";
  position: absolute;
  top: 1.2rem;
  left: 2.4rem;
  right: -1.5rem;
  height: 2px;
  background: var(--trait);
}
.frise li:last-child::after { display: none; }
.frise li:last-child::before { background: var(--vert); color: var(--blanc); }
.frise h3 { margin-bottom: 0.5rem; }
.frise p { color: var(--encre-douce); font-size: 0.97rem; }

/* La fiche parcelle : un seul aperçu, comme dans l'app. */
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.duo .intro { margin-bottom: 0; }
.points { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1rem; }
.points li { display: flex; gap: 0.85rem; align-items: flex-start; }
.points svg { width: 22px; height: 22px; flex: none; color: var(--vert-vif); margin-top: 0.15rem; }
.points strong { display: block; }
.points span { color: var(--encre-douce); font-size: 0.97rem; }

.ecran {
  background: var(--blanc);
  border: 1px solid var(--trait);
  border-radius: 28px;
  padding: 1.6rem;
  box-shadow: 0 40px 80px -48px rgba(20, 32, 26, 0.5);
}
.ecran .tete { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--trait); }
.ecran .tete strong { font: 750 1.5rem/1.1 var(--titre); letter-spacing: -0.02em; }
.ecran .tete span { color: var(--encre-douce); font-size: 0.92rem; }
.ecran h3 { font-size: 0.95rem; margin: 1.3rem 0 0.6rem; color: var(--vert); letter-spacing: 0; }
.ecran table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.ecran td { padding: 0.45rem 0; border-bottom: 1px solid var(--calque); }
.ecran td:last-child { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.pastilles { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pastille { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.75rem; border-radius: 999px; background: var(--calque); font-size: 0.88rem; }
.pastille i { width: 8px; height: 8px; border-radius: 50%; background: var(--vert-vif); }
.pastille.moyen i { background: #c9a227; }
.ecran figcaption { margin-top: 1.4rem; font-size: 0.82rem; color: var(--encre-douce); }
.ecran { margin: 0; }

/* Gratuité : le bandeau sombre. */
.bandeau { background: var(--vert); color: var(--blanc); border-radius: 32px; padding: clamp(2.2rem, 6vw, 4.5rem); display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.bandeau p { color: rgba(255, 255, 255, 0.82); margin-top: 1.2rem; font-size: 1.08rem; }
.bandeau ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; }
.bandeau li { padding: 1rem 1.1rem; border-radius: 16px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16); }
.bandeau li strong { display: block; font-family: var(--titre); font-size: 1.1rem; letter-spacing: -0.01em; }
.bandeau li span { color: rgba(255, 255, 255, 0.78); font-size: 0.95rem; }

/* Règles : quatre engagements, sans cartes. */
.regles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.regles div { border-top: 2px solid var(--encre); padding-top: 1.2rem; }
.regles h3 { margin-bottom: 0.5rem; }
.regles p { color: var(--encre-douce); font-size: 0.97rem; }

.appel { text-align: center; }
.appel h2 { max-width: 38rem; margin: 0 auto; }
.appel p { color: var(--encre-douce); margin: 1rem auto 2rem; max-width: 34rem; font-size: 1.1rem; }
.appel .actions { justify-content: center; }

/* --- Pages de texte (confidentialité, conditions, mentions) -------------- */

.document { padding: clamp(3rem, 6vw, 5rem) 0 clamp(4rem, 8vw, 6rem); }
.document .cadre { max-width: 46rem; }
.document h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.document .maj { color: var(--encre-douce); margin: 1rem 0 0; font-size: 0.95rem; }
.document .provisoire { margin: 1.5rem 0 2rem; padding: 0.9rem 1.1rem; border-radius: 12px; background: #fbf4dc; border: 1px solid #ecd893; font-size: 0.95rem; }
.document h2 { font-size: 1.55rem; margin: 2.8rem 0 0.8rem; }
.document p, .document ul { margin: 0 0 1rem; }
.document ul { padding-left: 1.2rem; }
.document li { margin-bottom: 0.4rem; }
.document a { color: var(--vert); text-underline-offset: 3px; }
.document .defile { overflow-x: auto; margin: 0 0 1.5rem; }
.document table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.document th, .document td { text-align: left; vertical-align: top; padding: 0.7rem 0.75rem 0.7rem 0; border-bottom: 1px solid var(--trait); }
.document th { font-family: var(--titre); font-size: 1rem; }

/* --- Pied ---------------------------------------------------------------- */

.pied { border-top: 1px solid var(--trait); padding: 2.5rem 0 3rem; font-size: 0.92rem; color: var(--encre-douce); }
.pied .cadre { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2rem; }
.pied nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.pied a { text-decoration: none; }
.pied a:hover { color: var(--encre); text-decoration: underline; }
.pied .france { margin-left: auto; color: var(--encre); font-weight: 600; }

/* --- Écrans étroits ------------------------------------------------------ */

@media (max-width: 62rem) {
  .ouverture .cadre, .duo, .bandeau { grid-template-columns: 1fr; }
  .plan { max-width: 34rem; margin: 0 auto; width: 100%; }
  .frise { grid-template-columns: 1fr; gap: 0; }
  .frise li { padding: 0 0 2rem 3.6rem; }
  .frise li::after { top: 2.4rem; bottom: 0; left: 1.15rem; right: auto; width: 2px; height: auto; }
  .regles { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 40rem) {
  .entete nav { display: none; }
  .entete .bouton { margin-left: auto; }
  .vignette.fiche { left: 3%; width: 62%; }
  .vignette.suivi { right: 3%; width: 58%; }
  .vignette { font-size: 0.78rem; padding: 0.7rem 0.8rem; }
  .regles { grid-template-columns: 1fr; }
  .pied .france { margin-left: 0; }
}
