/* ==========================================================================
   KORRIGAN — feuille de style unique
   Identité A2 « Ancrage ». Polices auto-hébergées (aucun appel à un CDN tiers,
   donc aucun transfert d'adresse IP vers Google : conforme CNIL/RGPD).
   Licences des polices : /assets/fonts/OFL-Lato.txt et OFL-Noto.txt (SIL OFL).
   ========================================================================== */

/* ------------------------------------------------------------------ polices */
@font-face {
  font-family: "Lato";
  src: url("../fonts/lato-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("../fonts/lato-400i.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("../fonts/lato-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Noto Serif";
  src: url("../fonts/notoserif-var.woff2") format("woff2-variations");
  font-weight: 400 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Noto Sans Mono";
  src: url("../fonts/notosansmono-var.woff2") format("woff2-variations");
  font-weight: 400 700; font-style: normal; font-display: swap;
}

/* ------------------------------------------------------------------ jetons */
:root {
  --vert-profond: #123C34;
  --vert-noir:    #0D2923;
  --cuivre:       #8A4B32;
  --ivoire:       #F7F3EA;
  --pierre:       #D8D1C5;
  --encre:        #1C2522;
  --blanc:        #FFFFFF;

  /* Contrastes WCAG 2.2 calculés (luminance relative) — voir README.
     vert/ivoire 11.01:1 · cuivre/ivoire 6.05:1 · encre/ivoire 14.18:1
     ivoire/vert 11.01:1 · pierre = surfaces et bordures uniquement.        */

  --font-display: "Noto Serif", Georgia, "Times New Roman", serif;
  --font-body: "Lato", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-mono: "Noto Sans Mono", "SFMono-Regular", Consolas, monospace;

  --radius-sm: .35rem;
  --radius-md: .65rem;
  --shadow-soft: 0 8px 30px rgba(28, 37, 34, .08);
  --mesure: 68ch;
  --pas: clamp(3.5rem, 8vw, 6.5rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

body {
  margin: 0;
  background: var(--ivoire);
  color: var(--encre);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.14;
  color: var(--vert-profond);
  margin: 0 0 .6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.75rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }
h4 { font-size: 1.0625rem; }

p, li { max-width: var(--mesure); }
p { margin: 0 0 1.1em; }

a { color: var(--vert-profond); text-decoration-thickness: .07em; text-underline-offset: .2em; }
a:hover { color: var(--cuivre); }

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

img, svg { max-width: 100%; height: auto; }

strong { font-weight: 700; }

hr {
  border: 0;
  border-top: 1px solid var(--pierre);
  margin: var(--pas) 0;
}

/* ------------------------------------------------------------- structures */
.conteneur {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: clamp(1.15rem, 4vw, 2rem);
}
.conteneur--etroit { max-width: 48rem; }

.section { padding-block: var(--pas); }
.section--pierre { background: var(--blanc); border-block: 1px solid var(--pierre); }
.section--sombre { background: var(--vert-profond); color: var(--ivoire); }
.section--sombre h1, .section--sombre h2, .section--sombre h3 { color: var(--ivoire); }
.section--sombre a { color: var(--ivoire); }
.section--sombre a:hover { color: var(--pierre); }

.pile > * + * { margin-top: 1.15rem; }

/* ------------------------------------------------------------- signalétique
   Le losange est le point de repère de la marque : il marque un point de
   décision, jamais un ornement. Un seul accent par bloc.                    */
.losange {
  display: inline-block;
  width: .6rem; height: .6rem;
  background: var(--cuivre);
  transform: rotate(45deg);
  flex: none;
}
.surtitre {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 0 0 1.1rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--cuivre);
}
.section--sombre .surtitre { color: var(--pierre); }

/* ----------------------------------------------------------------- boutons */
.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 2.9rem;
  padding: .75rem 1.5rem;
  border: 1px solid var(--vert-profond);
  border-radius: 999px;
  background: var(--vert-profond);
  color: var(--ivoire);
  font: 700 .95rem/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.bouton:hover { background: var(--vert-noir); border-color: var(--vert-noir); color: var(--ivoire); }
.bouton--fantome { background: transparent; color: var(--vert-profond); }
.bouton--fantome:hover { background: var(--vert-profond); color: var(--ivoire); }
.section--sombre .bouton,
.bandeau .bouton { background: var(--ivoire); border-color: var(--ivoire); color: var(--vert-profond); }
.section--sombre .bouton:hover,
.bandeau .bouton:hover { background: var(--pierre); border-color: var(--pierre); color: var(--vert-noir); }
.section--sombre .bouton--fantome,
.bandeau .bouton--fantome { background: transparent; color: var(--ivoire); }
.section--sombre .bouton--fantome:hover,
.bandeau .bouton--fantome:hover { background: var(--ivoire); color: var(--vert-profond); }

.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }

/* ------------------------------------------------------------- navigation */
.saut-contenu {
  position: absolute; left: -9999px;
  background: var(--vert-profond); color: var(--ivoire);
  padding: .8rem 1.2rem; z-index: 100; border-radius: 0 0 var(--radius-sm) 0;
}
.saut-contenu:focus { left: 0; top: 0; }

.entete {
  position: sticky; top: 0; z-index: 40;
  background: rgba(247, 243, 234, .96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--pierre);
}
.entete__grille {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4.5rem;
}
.entete__logo { display: inline-flex; line-height: 0; }
.entete__logo img { width: 190px; }

.nav__bascule {
  display: none;
  align-items: center; gap: .5rem;
  border: 1px solid var(--pierre);
  background: transparent; color: var(--vert-profond);
  border-radius: var(--radius-sm);
  padding: .55rem .8rem;
  font: 700 .85rem/1 var(--font-body);
  cursor: pointer;
}
.nav__liste {
  display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 1.9rem);
  list-style: none; margin: 0; padding: 0;
}
.nav__liste li { max-width: none; }
.nav__liste a {
  text-decoration: none;
  font-weight: 700; font-size: .95rem;
  padding-block: .35rem;
  border-bottom: 2px solid transparent;
}
.nav__liste a:hover { border-bottom-color: var(--cuivre); }
.nav__liste a[aria-current="page"] { border-bottom-color: var(--cuivre); }
.nav__liste .bouton { color: var(--ivoire); border-bottom: 0; }
.nav__liste .bouton:hover { border-bottom: 0; }

@media (max-width: 60rem) {
  .nav__bascule { display: inline-flex; }
  .nav__liste {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ivoire);
    border-bottom: 1px solid var(--pierre);
    padding: .5rem clamp(1.15rem, 4vw, 2rem) 1.4rem;
  }
  .nav__liste[data-ouvert="true"] { display: flex; }
  .nav__liste li { border-top: 1px solid var(--pierre); }
  .nav__liste a { display: block; padding: .95rem 0; }
  .nav__liste .bouton { margin-top: 1rem; justify-content: center; }
  .nav__liste li:last-child { border-top: 0; }
}

/* ---------------------------------------------------------------- bandeau */
.bandeau {
  background: var(--vert-profond);
  color: var(--ivoire);
  padding-block: clamp(3.5rem, 9vw, 6rem);
}
.bandeau h1 { color: var(--ivoire); max-width: 20ch; }
.bandeau__accroche {
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  max-width: 56ch;
  color: var(--ivoire);
}
.bandeau .surtitre { color: var(--pierre); }
.bandeau .losange { background: var(--cuivre); }

/* signature de marque : la baseline en trois temps */
.tempo {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: .9rem 1.3rem;
  margin: 2.2rem 0 0; padding: 0;
  list-style: none;
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.7vw, 1.25rem);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ivoire);
}
.tempo li { max-width: none; display: flex; align-items: center; gap: 1.3rem; }
.tempo li::after {
  content: ""; width: .5rem; height: .5rem;
  background: var(--cuivre); transform: rotate(45deg);
}
.tempo li:last-child::after { display: none; }

/* ------------------------------------------------------------------ cartes */
.grille {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17.5rem), 1fr));
}
.carte {
  background: var(--blanc);
  border: 1px solid var(--pierre);
  border-radius: var(--radius-md);
  padding: 1.7rem 1.6rem;
  box-shadow: var(--shadow-soft);
  display: flex; flex-direction: column;
}
.carte h3 { margin-bottom: .5rem; }
.carte p { margin-bottom: .8rem; }
.carte p:last-child { margin-bottom: 0; }
.carte__lien { margin-top: auto; padding-top: .9rem; font-weight: 700; }
a.carte { text-decoration: none; color: inherit; transition: border-color .18s ease, transform .18s ease; }
a.carte:hover { border-color: var(--cuivre); transform: translateY(-2px); }
a.carte:hover h3 { color: var(--cuivre); }

/* --------------------------------------------------------------- listes */
.liste-marquee { list-style: none; margin: 0; padding: 0; }
.liste-marquee li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: .7rem;
}
.liste-marquee li::before {
  content: "";
  position: absolute; left: 0; top: .62em;
  width: .45rem; height: .45rem;
  background: var(--cuivre);
  transform: rotate(45deg);
}
.section--sombre .liste-marquee li::before { background: var(--pierre); }

.faits { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.faits li { display: flex; gap: .8rem; align-items: baseline; }
.faits dt, .faits .cle { font-weight: 700; }

/* -------------------------------------------------------------- chiffres */
.chiffre {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: -.02em;
}

/* ----------------------------------------------------------- formulaires */
.champ { margin-bottom: 1.3rem; max-width: 34rem; }
.champ label, .legende {
  display: block;
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: .35rem;
  color: var(--vert-profond);
}
.champ .aide {
  display: block;
  font-size: .875rem;
  color: #4A544F;
  margin-bottom: .45rem;
  max-width: 46ch;
}
input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="date"], select, textarea {
  width: 100%;
  font: 400 1rem/1.5 var(--font-body);
  color: var(--encre);
  background: var(--blanc);
  border: 1px solid #9AA39E;
  border-radius: var(--radius-sm);
  padding: .7rem .8rem;
}
input[type="number"] { font-family: var(--font-mono); }
textarea { min-height: 9rem; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--cuivre); outline-offset: 1px; border-color: var(--vert-profond);
}
fieldset { border: 0; padding: 0; margin: 0 0 1.3rem; }
legend { padding: 0; }
.pot-de-miel { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.champ__erreur { color: #8A1E12; font-size: .9rem; font-weight: 700; margin-top: .3rem; }

.alerte {
  border-left: 4px solid var(--cuivre);
  background: var(--blanc);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.2rem;
  margin-bottom: 1.6rem;
}
.alerte--ok { border-left-color: var(--vert-profond); }
.alerte p:last-child { margin-bottom: 0; }

/* ----------------------------------------------------------- simulateurs */
.outil {
  background: var(--blanc);
  border: 1px solid var(--pierre);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: clamp(1.5rem, 3.5vw, 2.4rem);
  margin-bottom: 2.5rem;
  scroll-margin-top: 6rem;
}
.outil__grille { display: grid; gap: clamp(1.5rem, 3vw, 2.6rem); }
@media (min-width: 52rem) { .outil__grille { grid-template-columns: 1fr 1fr; } }

.resultat {
  background: var(--vert-profond);
  color: var(--ivoire);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  align-self: start;
}
.resultat h3 { color: var(--ivoire); font-size: 1.05rem; margin-bottom: 1.1rem; }
.resultat dl { margin: 0; display: grid; gap: .9rem; }
.resultat dt {
  font-size: .78rem; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--pierre); margin-bottom: .1rem;
}
.resultat dd {
  margin: 0;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -.02em;
}
.resultat dd small { display: block; font-family: var(--font-body); font-size: .85rem; font-weight: 400; letter-spacing: 0; color: var(--pierre); margin-top: .2rem; }
/* le point de décision : un seul losange, sur le résultat principal */
.resultat__cle { position: relative; padding-left: 1.4rem; }
.resultat__cle::before {
  content: ""; position: absolute; left: 0; top: .55rem;
  width: .55rem; height: .55rem; background: var(--cuivre); transform: rotate(45deg);
}
.resultat__note { font-size: .85rem; color: var(--pierre); margin: 1.2rem 0 0; max-width: none; }

.note-bareme {
  font-size: .875rem;
  border-top: 1px solid var(--pierre);
  padding-top: 1rem;
  margin-top: 1.6rem;
  color: #414B46;
}

/* ---------------------------------------------------------------- tableau */
.tableau-enveloppe { overflow-x: auto; margin-bottom: 1.6rem; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
caption { text-align: left; font-weight: 700; margin-bottom: .6rem; color: var(--vert-profond); }
th, td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--pierre); vertical-align: top; }
thead th { background: var(--blanc); color: var(--vert-profond); border-bottom: 2px solid var(--vert-profond); }
td.nombre, th.nombre { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------- details */
details {
  border-bottom: 1px solid var(--pierre);
  padding: 1.1rem 0;
}
details summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--vert-profond);
  list-style: none;
  display: flex; align-items: baseline; gap: .8rem;
}
details summary::-webkit-details-marker { display: none; }
details summary::before {
  content: ""; width: .5rem; height: .5rem; flex: none;
  background: var(--cuivre); transform: rotate(45deg);
  transition: transform .2s ease;
}
details[open] summary::before { transform: rotate(135deg); }
details > *:not(summary) { margin-top: .9rem; }

/* ------------------------------------------------------------------- pied */
.pied {
  background: var(--vert-noir);
  color: var(--ivoire);
  padding-block: clamp(2.8rem, 6vw, 4rem);
  font-size: .95rem;
}
.pied a { color: var(--ivoire); }
.pied a:hover { color: var(--pierre); }
.pied h2 { color: var(--ivoire); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; font-family: var(--font-body); font-weight: 700; margin-bottom: 1rem; }
.pied__grille { display: grid; gap: 2.2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.pied ul { list-style: none; margin: 0; padding: 0; }
.pied li { margin-bottom: .5rem; }
.pied__logo { width: 200px; margin-bottom: 1.2rem; }
.pied__legal {
  margin-top: 2.6rem; padding-top: 1.4rem;
  border-top: 1px solid rgba(247, 243, 234, .22);
  font-size: .85rem; color: var(--pierre);
  display: flex; flex-wrap: wrap; gap: .5rem 1.4rem;
}
.pied__legal p { margin: 0; max-width: none; }

/* -------------------------------------------------------------- utilitaire */
.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;
}
.mesure { max-width: var(--mesure); }
.centre { text-align: center; }
.centre p, .centre h2 { margin-inline: auto; }

@media print {
  .entete, .pied, .actions, .nav__bascule { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  a::after { content: " (" attr(href) ")"; font-size: 9pt; }
}
