/* Groupe VASCO — site institutionnel (candidat, VAS-PUB-001 ouvert).
   Direction : la planche cadastrale. Encre marine, papier calque, trait de
   bornage or. Polices auto-hébergées (trio validé le 2026-08-13 pour les
   créations) ; aucune ressource externe, aucun style inline (CSP 'self'). */

@font-face {
  font-family: "Gelasio";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/gelasio-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/inter-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/inter-latin-600-normal.woff2") format("woff2");
}

:root {
  --encre: #0f2238;
  --marine: #1f3a5f;
  --calque: #f2f4f1;
  --feuille: #ffffff;
  --trait: #d3d9d6;
  --trait-fort: #9aa6a3;
  --texte: #18212c;
  --texte-doux: #525d69;
  --or: #b8860b;
  --or-clair: #dcb764;
  --or-fonce: #855f05;
  --sur-encre: #eef2f6;
  --sur-encre-doux: #b4c2d3;
  --err: #a8281e;
  --ok: #1e6f48;
  --serif: "Gelasio", georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, blinkmacsystemfont, "Segoe UI", roboto, sans-serif;
  --gouttiere: clamp(1.25rem, 4.5vw, 3.5rem);
  --rythme: clamp(3.75rem, 9vw, 7.5rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--calque);
  color: var(--texte);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }

:focus-visible { outline: 3px solid var(--or); outline-offset: 3px; }

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

.skip {
  position: absolute;
  left: var(--gouttiere);
  top: -4rem;
  z-index: 40;
  padding: 0.6rem 1rem;
  background: var(--encre);
  color: var(--sur-encre);
}
.skip:focus { top: 0.5rem; }

.sheet {
  width: 100%;
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: var(--gouttiere);
}

/* ---- Typographie ---- */

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.35rem, 6.1vw, 4.75rem);
  line-height: 1.05;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.titre {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.75rem, 3.5vw, 2.7rem);
  line-height: 1.14;
  letter-spacing: -0.006em;
  text-wrap: balance;
}

.intertitre {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.35;
}

.chapo {
  font-size: clamp(1.125rem, 1.6vw, 1.3rem);
  line-height: 1.55;
  max-width: 36rem;
}

.prose > * + * { margin-top: 1.1rem; }
.prose { max-width: 38rem; }
.prose a { text-decoration-color: var(--or); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.prose a:hover { color: var(--or-fonce); }

/* ---- Barre de navigation ---- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--calque);
  border-bottom: 1px solid var(--trait);
}

.topbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  min-height: 4.25rem;
  padding-block: 0.6rem;
}

.brand {
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--encre);
  white-space: nowrap;
}

.brand b { font-weight: 400; letter-spacing: 0.16em; }

.nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.6rem;
}

.nav a {
  display: inline-block;
  padding: 0.45rem 0;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--texte);
  border-bottom: 2px solid transparent;
}

.nav a:hover { border-bottom-color: var(--trait-fort); }
.nav a[aria-current="page"] { border-bottom-color: var(--or); }

.nav a.nav-cta {
  padding: 0.55rem 1.1rem;
  background: var(--marine);
  color: #fff;
  font-weight: 600;
  border-bottom: none;
}

.nav a.nav-cta:hover { background: var(--encre); }

.nav-toggle {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  color: var(--encre);
  background: transparent;
  border: 1px solid var(--trait-fort);
  cursor: pointer;
}

/* Sans JavaScript, le bouton reste masqué et la navigation s'affiche en
   lignes ; avec JavaScript (html.js), elle se replie sur petit écran. */
@media (max-width: 69.99rem) {
  .js .nav { flex-basis: 100%; }
  .js .nav:not(.is-open) { display: none; }
  .js .nav ul { flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 0.75rem; }
  .js .nav li { border-top: 1px solid var(--trait); }
  .js .nav a { display: block; padding: 0.85rem 0; border-bottom: none; font-size: 1.0625rem; }
  .js .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--or); padding-left: 0.85rem; }
  .js .nav a.nav-cta { margin-top: 0.85rem; padding: 0.85rem 1rem; text-align: center; }
}

@media (min-width: 70rem) {
  .nav-toggle { display: none; }
}

/* ---- Boutons et liens d'action ---- */

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.75rem;
}

.btn {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.3;
  padding: 0.95rem 1.6rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 140ms ease, color 140ms ease;
}

.btn-plein { background: var(--marine); color: #fff; }
.btn-plein:hover { background: var(--encre); }

.btn-or { background: var(--or-clair); color: var(--encre); }
.btn-or:hover { background: #ecd08a; }

.btn[disabled] { opacity: 0.6; cursor: progress; }

.lien {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--or);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

.lien:hover { text-decoration-color: currentColor; }

/* ---- Héros (accueil) : la planche ---- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--encre);
  color: var(--sur-encre);
}

.hero-texte {
  position: relative;
  z-index: 2;
  padding-block: clamp(3rem, 8vw, 6.5rem) clamp(2.25rem, 5vw, 3.5rem);
}

.hero .display { max-width: 15em; }
.hero .chapo { margin-top: 1.6rem; color: var(--sur-encre-doux); }
.hero .actions { margin-top: 2.2rem; }
.hero .lien { color: var(--sur-encre); text-decoration-color: var(--or-clair); }

.hero-plan { line-height: 0; }
/* Petit écran : la planche devient un bandeau, cadré sur la parcelle bornée. */
.hero-plan svg { width: 180vw; max-width: none; margin-left: -68vw; height: 80vw; }

@media (min-width: 40rem) {
  .hero-plan svg { width: 130vw; margin-left: -35vw; height: 56vw; }
}

@media (min-width: 62rem) {
  .hero { min-height: min(46rem, calc(100vh - 4.25rem)); display: grid; align-items: center; }
  .hero-texte { padding-block: 6rem; }
  .hero .display { max-width: 11.5em; }
  .hero-plan { position: absolute; inset: 0 0 0 36%; z-index: 0; }
  .hero-plan svg { width: 100%; height: 100%; margin-left: 0; }
  /* Le texte reste lisible : la planche s'efface sous la colonne de gauche. */
  .hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, var(--encre) 0%, var(--encre) 40%, rgba(15, 34, 56, 0) 68%);
    pointer-events: none;
  }
}

/* Un seul mouvement orchestré : la planche se trace, puis la parcelle est bornée. */
@media (prefers-reduced-motion: no-preference) {
  .hero-plan [pathLength] {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: tracer 1.5s cubic-bezier(0.3, 0, 0.2, 1) forwards;
  }
  .hero-plan .plan-roads [pathLength] { animation-duration: 1.1s; }
  .hero-plan .plan-strips [pathLength] { animation-delay: 0.35s; }
  .hero-plan .plan-strips [pathLength]:nth-child(3n) { animation-delay: 0.55s; }
  .hero-plan .plan-strips [pathLength]:nth-child(3n + 1) { animation-delay: 0.75s; }
  .hero-plan .plan-fields [pathLength] { animation-delay: 0.9s; }
  .hero-plan .plan-parcel-line { animation-delay: 1.7s; animation-duration: 0.9s; }
  .hero-plan .plan-numbers,
  .hero-plan .plan-water,
  .hero-plan .plan-compass { opacity: 0; animation: paraitre 0.8s ease 1.4s forwards; }
  .hero-plan .plan-parcel-fill,
  .hero-plan .plan-bornes { opacity: 0; animation: paraitre 0.6s ease 2.5s forwards; }
}

@keyframes tracer { to { stroke-dashoffset: 0; } }
@keyframes paraitre { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---- En-tête des pages intérieures ---- */

.entete {
  background:
    linear-gradient(90deg, var(--encre) 0%, var(--encre) 42%, rgba(15, 34, 56, 0.55) 100%),
    url("/plan.svg") right 38% / cover no-repeat,
    var(--encre);
  color: var(--sur-encre);
  padding-block: clamp(3rem, 8vw, 6rem) clamp(2.5rem, 6vw, 4.5rem);
}

.entete .display { font-size: clamp(2.2rem, 5.2vw, 4rem); max-width: 14em; }
.entete .chapo { margin-top: 1.4rem; color: var(--sur-encre-doux); }
.entete .actions { margin-top: 2rem; }
.entete .lien { color: var(--sur-encre); text-decoration-color: var(--or-clair); }

/* ---- Blocs de contenu ---- */

.bloc { padding-block: var(--rythme); }
.bloc + .bloc { border-top: 1px solid var(--trait); }
.bloc-feuille { background: var(--feuille); }

.bloc-grille { display: grid; gap: 1.75rem; }
.bloc-grille > .prose .actions { margin-top: 1.9rem; }

@media (min-width: 62rem) {
  .bloc-grille { grid-template-columns: 5fr 7fr; gap: 4.5rem; align-items: start; }
}

/* Liste réglée : une ligne par sujet, sans carte. */
.lignes { border-top: 1px solid var(--trait-fort); }
.lignes > li { padding-block: 1.25rem; border-bottom: 1px solid var(--trait); }
.lignes .intertitre { color: var(--encre); }
.lignes p { margin-top: 0.3rem; color: var(--texte-doux); max-width: 34rem; }

@media (min-width: 40rem) {
  .lignes-2 { display: grid; grid-template-columns: 1fr 1fr; column-gap: 3rem; }
}

/* Étapes : le contenu est une séquence, la numérotation porte un sens. */
.etapes { counter-reset: etape; display: grid; gap: 1.75rem; margin-top: 2.75rem; }
.etapes > li { counter-increment: etape; padding-top: 1.1rem; border-top: 2px solid var(--or); }
.etapes > li::before {
  content: counter(etape);
  display: block;
  font-family: var(--serif);
  font-size: 2.1rem;
  line-height: 1;
  color: var(--or-fonce);
  margin-bottom: 0.7rem;
}
.etapes p { margin-top: 0.3rem; color: var(--texte-doux); }

@media (min-width: 48rem) {
  .etapes { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
}

/* Liens de rubrique : grandes lignes cliquables. */
.rubriques { border-top: 1px solid var(--trait-fort); }
.rubriques a {
  display: grid;
  gap: 0.3rem;
  padding-block: 1.4rem;
  border-bottom: 1px solid var(--trait);
  text-decoration: none;
  transition: padding-left 160ms ease;
}
.rubriques a:hover { padding-left: 0.75rem; box-shadow: inset 3px 0 0 var(--or); }
.rubriques .rubrique-nom { font-family: var(--serif); font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.2; color: var(--encre); }
.rubriques .rubrique-note { color: var(--texte-doux); }

/* Repères : fiche d'identité issue du registre. */
.reperes { border-top: 1px solid var(--trait-fort); }
.reperes > div { display: grid; gap: 0.15rem 2rem; padding-block: 0.95rem; border-bottom: 1px solid var(--trait); }
.reperes dt { color: var(--texte-doux); font-size: 0.95rem; }
.reperes dd { font-weight: 600; }

@media (min-width: 36rem) {
  .reperes > div { grid-template-columns: 12rem 1fr; align-items: baseline; }
}

/* ---- Bandeau de contact ---- */

.bandeau { background: var(--marine); color: var(--sur-encre); padding-block: clamp(3rem, 7vw, 5rem); }
.bandeau-grille { display: grid; gap: 1.75rem; align-items: end; }
.bandeau p { margin-top: 0.9rem; color: var(--sur-encre-doux); max-width: 32rem; }
.bandeau .lien { color: var(--sur-encre); text-decoration-color: var(--or-clair); }

@media (min-width: 62rem) {
  .bandeau-grille { grid-template-columns: 7fr 5fr; gap: 4rem; }
  .bandeau .actions { justify-content: flex-end; }
}

/* ---- Pied de page ---- */

.pied { background: var(--encre); color: var(--sur-encre-doux); padding-block: 3rem 2.5rem; font-size: 0.92rem; }
.pied-grille { display: grid; gap: 2rem; }
.pied .brand { color: var(--sur-encre); }
.pied-identite { margin-top: 0.8rem; max-width: 30rem; }
.pied ul { display: grid; gap: 0.5rem; }
.pied a { color: var(--sur-encre); text-decoration-color: rgba(220, 183, 100, 0.6); text-underline-offset: 0.25em; }
.pied a:hover { text-decoration-color: var(--or-clair); }
.pied-titre { color: var(--sur-encre); font-weight: 600; margin-bottom: 0.8rem; }

@media (min-width: 48rem) {
  .pied-grille { grid-template-columns: 6fr 3fr 3fr; gap: 3rem; }
}

/* ---- Formulaire de contact ---- */

.contact-grille { display: grid; gap: 3rem; }

@media (min-width: 62rem) {
  .contact-grille { grid-template-columns: 7fr 4fr; gap: 5rem; align-items: start; }
}

.formulaire { background: var(--feuille); border: 1px solid var(--trait); border-top: 3px solid var(--marine); padding: clamp(1.4rem, 4vw, 2.5rem); }
.formulaire fieldset { border: none; margin: 0; padding: 0; min-width: 0; }

.champ { margin-bottom: 1.5rem; }
.champ-paire { display: grid; gap: 0 1.25rem; }

@media (min-width: 36rem) {
  .champ-paire { grid-template-columns: 1fr 1fr; }
}

.champ-label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 0.45rem; }
.facultatif { font-weight: 400; color: var(--texte-doux); }

.formulaire input[type="text"],
.formulaire input[type="email"],
.formulaire input[type="tel"],
.formulaire textarea {
  width: 100%;
  font: inherit;
  color: var(--texte);
  background: var(--calque);
  border: 1px solid var(--trait-fort);
  border-radius: 0;
  padding: 0.75rem 0.85rem;
}

.formulaire textarea { resize: vertical; min-height: 9rem; }
.formulaire input:focus, .formulaire textarea:focus { border-color: var(--marine); background: var(--feuille); }

.objets { display: grid; gap: 0.5rem; }

@media (min-width: 36rem) {
  .objets { grid-template-columns: 1fr 1fr; }
}

.objet { display: block; cursor: pointer; }
.objet input { position: absolute; opacity: 0; pointer-events: none; }
.objet span {
  display: block;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--trait-fort);
  background: var(--calque);
  font-size: 0.95rem;
  line-height: 1.35;
  transition: border-color 120ms ease, background-color 120ms ease;
}
.objet:hover span { border-color: var(--marine); }
.objet input:checked + span { border-color: var(--marine); background: #e9eef5; box-shadow: inset 3px 0 0 var(--or); font-weight: 600; }
.objet input:focus-visible + span { outline: 3px solid var(--or); outline-offset: 2px; }

.champ-erreur { margin-top: 0.45rem; font-size: 0.9rem; color: var(--err); }
.champ.invalide input, .champ.invalide textarea { border-color: var(--err); }
.champ-aide { margin-top: 0.45rem; font-size: 0.88rem; color: var(--texte-doux); }

/* Piège à robots : hors écran, jamais retiré du DOM. */
.leurre { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.accord { display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; cursor: pointer; font-size: 0.94rem; line-height: 1.5; }
.accord input { width: 1.15rem; height: 1.15rem; margin-top: 0.2rem; accent-color: var(--marine); }
.accord-lien { margin: 0.35rem 0 0 1.9rem; font-size: 0.9rem; }

.envoi-erreur { margin-top: 1.1rem; padding: 0.85rem 1rem; border-left: 3px solid var(--err); background: #faf1f0; color: var(--err); font-size: 0.94rem; }

.confirmation { background: var(--feuille); border: 1px solid var(--trait); border-top: 3px solid var(--ok); padding: clamp(1.6rem, 4vw, 2.75rem); }
.confirmation .titre { color: var(--ok); }
.confirmation p { margin-top: 0.9rem; max-width: 34rem; }
.confirmation code { font-family: var(--sans); font-weight: 600; letter-spacing: 0.04em; padding: 0.15rem 0.5rem; background: var(--calque); border: 1px solid var(--trait); }

.encart { border-top: 2px solid var(--or); padding-top: 1.1rem; }
.encart + .encart { margin-top: 2.5rem; }
.encart p { margin-top: 0.5rem; color: var(--texte-doux); }
.encart address { margin-top: 0.5rem; font-style: normal; color: var(--texte-doux); }
.encart .lien { display: inline-block; margin-top: 0.9rem; }

[hidden] { display: none !important; }

.formulaire-note { margin: 0 0 1.5rem; }

/* ---- Pages juridiques ---- */

.juridique { max-width: 44rem; }
.juridique-statut { padding-left: 0.85rem; border-left: 3px solid var(--or); color: var(--texte-doux); font-size: 0.94rem; }
.juridique h2 { margin-top: 2.4rem; font-family: var(--serif); font-weight: 400; font-size: 1.45rem; line-height: 1.25; }
.juridique p { margin-top: 0.8rem; }
.juridique a { text-decoration-color: var(--or); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
