/* Valgent · pages « automatisation » (une tâche par page). Charte v3 : ouverture et appel sur fond encre,
   contenu sur porcelaine. Menthe = étape automatisée, cuivre = validation humaine. Sans JavaScript et
   indépendant du moteur Scroll Craft. Les chemins sont absolus : les pages vivent aussi dans /automatisation/. */

@font-face { font-family: "Instrument Sans"; font-weight: 400; font-display: swap; src: url("/fonts/InstrumentSans-Regular.ttf") format("truetype"); }
@font-face { font-family: "Instrument Sans"; font-weight: 700; font-display: swap; src: url("/fonts/InstrumentSans-Bold.ttf") format("truetype"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("/fonts/IBMPlexMono-Regular.ttf") format("truetype"); }

:root {
  --v-encre: #0B1F24;
  --v-encre-2: #112A30;
  --v-porcelaine: #F3F1EA;
  --v-cuivre: #D96F4B;
  --v-cuivre-texte: #A84A2A; /* cuivre assombri : 5,05:1 sur porcelaine, pour les liens */
  --v-menthe: #9CC8B7;
  --v-menthe-trait: #4F8F7A; /* menthe assombrie pour les traits sur porcelaine */
  --v-ardoise: #526568;
  --v-brume: #D7E0DC;
  --v-voile: #B9C4C0;       /* texte secondaire sur encre : 9,6:1 */
  --texte: "Instrument Sans", Arial, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --gouttiere: clamp(1rem, 5vw, 4rem);
  --largeur: 72rem;
  --lecture: 44rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--v-porcelaine); color: var(--v-encre);
  font: 400 clamp(1rem, 0.96rem + 0.22vw, 1.0625rem)/1.6 var(--texte);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
h1, h2, h3 { text-wrap: balance; }
p, li, dd, summary { text-wrap: pretty; }

a { color: var(--v-cuivre-texte); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--v-cuivre); outline-offset: 3px; border-radius: 2px; }

.evitement {
  position: absolute; left: var(--gouttiere); top: 0.75rem; z-index: 5; transform: translateY(-200%);
  padding: 0.5rem 0.9rem; border-radius: 6px; background: var(--v-porcelaine); color: var(--v-encre);
}
.evitement:focus-visible { transform: none; }

.cadre { width: 100%; max-width: var(--largeur); margin-inline: auto; padding-inline: var(--gouttiere); }

.bouton {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.9rem; padding: 0.7rem 1.2rem; border-radius: 6px;
  background: var(--v-cuivre); color: var(--v-encre);
  font: 700 0.95rem/1.1 var(--texte); text-decoration: none; white-space: nowrap;
  transition: background-color 160ms ease-out, transform 120ms ease-out;
}
.bouton:hover { background: color-mix(in oklab, var(--v-cuivre) 88%, var(--v-porcelaine)); }
.bouton:active { transform: scale(0.97); }
.bouton:focus-visible { outline-color: var(--v-porcelaine); }
.bouton--petit { min-height: 2.5rem; padding: 0.55rem 0.9rem; font-size: 0.85rem; }

/* ------------------------------------------------------------ bandeau -- */
.bandeau { background: var(--v-encre); color: var(--v-porcelaine); }
.bandeau .cadre { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.1rem; }
.bandeau__logo img { display: block; width: clamp(7.5rem, 14vw, 9.5rem); }
.bandeau__nav { display: flex; align-items: center; gap: clamp(0.75rem, 2.5vw, 1.75rem); }
.bandeau__nav a:not(.bouton) { color: var(--v-porcelaine); text-decoration: none; font-size: 0.95rem; }
.bandeau__nav a:not(.bouton):hover { text-decoration: underline; text-decoration-color: var(--v-cuivre); }
.bandeau :focus-visible { outline-color: var(--v-porcelaine); }

/* ---------------------------------------------------------- ouverture -- */
.ouverture { position: relative; overflow: clip; background: var(--v-encre); color: var(--v-porcelaine); }
/* Trait des agents qui traverse le bas de l'ouverture, point cuivre de validation à son extrémité. */
.ouverture::after {
  content: ""; position: absolute; left: var(--gouttiere); right: 0; bottom: 0; height: 2px;
  background: linear-gradient(to right, var(--v-menthe), color-mix(in oklab, var(--v-menthe) 30%, transparent));
}
.ouverture .cadre { padding-block: clamp(1.5rem, 4vw, 2.5rem) clamp(3rem, 8vw, 5.5rem); }
.ariane ol { display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; margin: 0; padding: 0; list-style: none; font: 400 0.8rem/1.4 var(--mono); color: var(--v-voile); }
.ariane li + li::before { content: "/"; margin-right: 0.5rem; color: color-mix(in oklab, var(--v-voile) 60%, transparent); }
.ariane a { color: var(--v-voile); }
.ariane a:hover { color: var(--v-porcelaine); }
.ariane [aria-current] { color: var(--v-porcelaine); }
.surtitre { margin: clamp(2rem, 6vw, 3.5rem) 0 0.9rem; font: 400 0.82rem/1.4 var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--v-menthe); }
.ouverture h1 { margin: 0; max-width: 22ch; font-size: clamp(2.1rem, 1.3rem + 3.4vw, 4rem); line-height: 1.04; letter-spacing: -0.025em; }
.chapeau { margin: 1.4rem 0 0; max-width: 58ch; font-size: clamp(1.08rem, 1rem + 0.35vw, 1.3rem); line-height: 1.5; color: color-mix(in oklab, var(--v-porcelaine) 90%, var(--v-encre)); }
.ouverture__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin: 2rem 0 0; }
.ouverture__actions span { font: 400 0.85rem/1.4 var(--mono); color: var(--v-menthe); }

/* -------------------------------------------------------------- blocs -- */
.bloc { padding-block: clamp(2.75rem, 7vw, 4.5rem) 0; }
.bloc h2 {
  margin: 0; max-width: 26ch;
  font-size: clamp(1.55rem, 1.2rem + 1.4vw, 2.25rem); line-height: 1.12; letter-spacing: -0.015em;
}
.bloc > .cadre > p, .bloc__texte { max-width: var(--lecture); margin: 1rem 0 0; }

/* Irritants : les blocs gris de tâches répétitives de la page d'accueil. */
.irritants { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 0.9rem 2.5rem; margin: 1.75rem 0 0; padding: 0; list-style: none; }
.irritants li { display: grid; grid-template-columns: auto 1fr; gap: 0.8rem; align-items: baseline; }
.irritants li::before { content: ""; width: 0.85rem; height: 0.55rem; border-radius: 2px; background: color-mix(in oklab, var(--v-brume) 45%, var(--v-ardoise)); transform: translateY(-0.05em); }

/* Flux : trait vertical, nœuds menthe pour les étapes automatisées, cuivre pour la vôtre. */
.legende { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin: 1rem 0 0; font: 400 0.8rem/1.4 var(--mono); color: var(--v-ardoise); }
.legende span { display: inline-flex; align-items: center; gap: 0.5rem; }
.legende span::before { content: ""; width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--v-menthe); box-shadow: inset 0 0 0 2px var(--v-menthe-trait); }
.legende .legende__humain::before { background: var(--v-cuivre); box-shadow: none; }
.flux { position: relative; max-width: var(--lecture); margin: 1.75rem 0 0; padding: 0; list-style: none; counter-reset: etape; }
.flux::before { content: ""; position: absolute; left: 0.6rem; top: 0.9rem; bottom: 0.9rem; width: 2px; background: color-mix(in oklab, var(--v-menthe) 75%, var(--v-menthe-trait)); }
.flux li { position: relative; padding: 0.55rem 0 0.55rem 2.6rem; counter-increment: etape; }
.flux li::before {
  content: ""; position: absolute; left: 0.2rem; top: 0.95rem; width: 0.85rem; height: 0.85rem; border-radius: 50%;
  background: var(--v-porcelaine); box-shadow: inset 0 0 0 2.5px var(--v-menthe-trait);
}
.flux__qui { display: block; font: 400 0.75rem/1.4 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--v-ardoise); }
.flux .flux--humain::before { left: 0; top: 0.8rem; width: 1.25rem; height: 1.25rem; background: var(--v-cuivre); box-shadow: 0 0 0 4px var(--v-porcelaine); }
.flux .flux--humain { font-weight: 700; }
.flux__lien { display: inline-block; margin-top: 0.3rem; font: 400 0.8rem/1.4 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; }
.flux .flux--humain .flux__qui { color: var(--v-cuivre-texte); }

/* Ce qui reste entre vos mains : l'encart cuivre de la validation humaine. */
.mains {
  margin-top: 1.5rem; max-width: var(--lecture); padding: 1.25rem 1.4rem;
  border-left: 4px solid var(--v-cuivre); border-radius: 0 8px 8px 0;
  background: color-mix(in oklab, var(--v-cuivre) 9%, var(--v-porcelaine));
  font-size: 1.08em;
}
.mains p { margin: 0; }

.deux { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: clamp(2.75rem, 7vw, 4.5rem) clamp(2rem, 6vw, 5rem); }
.non { margin: 1.25rem 0 0; padding: 0; list-style: none; }
.non li { position: relative; padding-left: 1.6rem; }
.non li + li { margin-top: 0.6rem; }
.non li::before { content: ""; position: absolute; left: 0; top: 0.75em; width: 0.9rem; height: 2px; background: var(--v-ardoise); }

.encart { margin-top: 1.5rem; max-width: var(--lecture); padding: 1.25rem 1.4rem; border-radius: 8px; background: color-mix(in oklab, var(--v-menthe) 24%, var(--v-porcelaine)); }
.encart h2 { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem); }
.encart p { margin: 0.6rem 0 0; }

/* Comment on démarre : les trois temps de la méthode MVA. */
.demarrage { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1.5rem clamp(1.5rem, 4vw, 3rem); margin: 1.75rem 0 0; padding: 0; list-style: none; counter-reset: temps; }
.demarrage li { padding-top: 1rem; border-top: 1px solid color-mix(in oklab, var(--v-encre) 18%, transparent); counter-increment: temps; }
.demarrage h3 { margin: 0; font-size: 1.2rem; }
.demarrage h3::before { content: "0" counter(temps); display: block; margin-bottom: 0.35rem; font: 400 0.8rem/1.4 var(--mono); color: var(--v-ardoise); }
.demarrage p { margin: 0.4rem 0 0; color: var(--v-ardoise); }

/* Questions fréquentes : dépliables, lisibles sans JavaScript. */
.questions { max-width: var(--lecture); margin-top: 1.25rem; border-top: 1px solid var(--v-brume); }
.questions details { border-bottom: 1px solid var(--v-brume); }
.questions summary {
  display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0; cursor: pointer;
  font-weight: 700; list-style: none;
}
.questions summary::-webkit-details-marker { display: none; }
.questions summary::after { content: "+"; flex: none; font: 400 1.3rem/1 var(--mono); color: var(--v-cuivre-texte); }
.questions details[open] summary::after { content: "−"; }
.questions details p { margin: 0 0 1.1rem; color: color-mix(in oklab, var(--v-encre) 82%, var(--v-ardoise)); }
.questions .source { font-size: 0.9em; }

/* Appel : même promesse que le formulaire de la page d'accueil. */
.appel { margin-top: clamp(3.5rem, 9vw, 6rem); background: var(--v-encre); color: var(--v-porcelaine); }
.appel .cadre { position: relative; display: grid; gap: 1.25rem; justify-items: start; padding-block: clamp(3rem, 8vw, 5rem); }
.appel .cadre::before { content: ""; position: absolute; left: var(--gouttiere); top: 0; width: 4rem; height: 4px; border-radius: 0 0 2px 2px; background: var(--v-cuivre); }
.appel h2 { margin: 0; max-width: 20ch; font-size: clamp(1.8rem, 1.3rem + 2.2vw, 3rem); line-height: 1.06; letter-spacing: -0.02em; }
.appel p { margin: 0; max-width: 48ch; font-size: 1.08em; color: color-mix(in oklab, var(--v-porcelaine) 90%, var(--v-encre)); }
.appel .appel__fait { font: 400 0.85rem/1.5 var(--mono); color: var(--v-menthe); }

/* D'autres tâches : cartes vers les pages voisines. */
.cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 1rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.cartes a {
  display: grid; align-content: start; gap: 0.35rem; height: 100%; padding: 1.15rem 1.25rem 1.3rem; border-radius: 10px;
  background: #FBFAF6; box-shadow: inset 0 0 0 1px var(--v-brume); color: var(--v-encre); text-decoration: none;
  transition: box-shadow 160ms ease-out, transform 160ms ease-out;
}
.cartes a:hover { box-shadow: inset 0 0 0 1px var(--v-cuivre); transform: translateY(-2px); }
.cartes__famille { font: 400 0.75rem/1.4 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--v-ardoise); }
.cartes__nom { font-size: 1.2rem; font-weight: 700; }
.cartes__nom::after { content: " →"; color: var(--v-cuivre-texte); }
.cartes__accroche { color: var(--v-ardoise); }
.cartes__tout { margin: 1.25rem 0 0; }

/* ---------------------------------------------------------------- pied -- */
.pied { font-size: 0.9rem; color: var(--v-ardoise); }
.pied .cadre { display: grid; gap: 0.6rem; padding-block: 1.75rem 2.5rem; }
.pied p { margin: 0; max-width: 70ch; }
.pied__marque { display: flex; align-items: center; gap: 0.6rem; color: var(--v-encre); }
.pied__marque img { width: 1.5rem; height: 1.5rem; }
.pied__liens { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.pied a { color: var(--v-ardoise); }

@media (max-width: 560px) {
  .bandeau__nav > a:not(.bouton) { display: none; }
  .ouverture__actions .bouton { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .bouton, .cartes a { transition: none; }
  .cartes a:hover { transform: none; }
}
