/* ==========================================================================
   laurentcornillet.fr — feuille de style unique
   Direction : « plan d’architecte » (cyanotype + calque), une seule famille
   typographique variable auto-hébergée, aucune ressource externe.

   Système de mise en page : chaque section suit la même grille
   (titre à gauche sur 1/3, contenu à droite sur 2/3), sauf la méthode
   dont la frise occupe toute la largeur. Espacements : multiples de 4 px.
   ========================================================================== */

/* Police auto-hébergée (aucun appel à Google Fonts : RGPD + performance) */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  src: url("../fonts/bricolage-grotesque-latin-standard.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --------------------------------------------------------------------------
   Jetons de design
   -------------------------------------------------------------------------- */
:root {
  color-scheme: light dark;

  /* Couleurs */
  --cyano: #12406e;        /* fond « plan » (cyanotype) */
  --nuit: #0d1b2b;         /* nuit : cadre sombre (en-tête et pied de page) */
  --trace: #cfe0f2;        /* traits et textes secondaires sur fond cyano */
  --paper: #ffffff;
  --calque: #eef3f8;       /* papier calque : fond d’attente de la photo */
  --ink: #172430;
  --ink-soft: #4b5c6c;
  --rule: #d5dee7;
  --link: #12406e;
  --signal: #ffd23f;       /* surligneur : action principale (aussi sélection et lien d’évitement) */
  --signal-hover: #ffe07a;
  --signal-ink: #172430;
  --focus: #0a66d1;

  /* Typographie : échelle ~1,25 à partir d’un corps de 17 px */
  --font: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: clamp(1.125rem, 1.05rem + 0.35vw, 1.25rem);
  --step-2: clamp(1.25rem, 1.15rem + 0.45vw, 1.5rem);
  --step-3: clamp(2rem, 1.5rem + 2vw, 3rem);
  --step-4: clamp(2.75rem, 1.5rem + 4.4vw, 5.75rem);  /* accroche du héro */

  /* Mise en page */
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --max: 74rem;
  --measure: 38rem;        /* ~75 caractères par ligne */
  --section: clamp(4.5rem, 3rem + 5vw, 7.5rem);
  --radius: 4px;
  --header-h: 0rem;        /* hauteur de l’en-tête quand il est collant */
}

@media (prefers-color-scheme: dark) {
  :root {
    --cyano: #0f365e;
    --nuit: #060d15;
    --paper: #121f2d;
    --calque: #1a2b3d;
    --ink: #e4ecf3;
    --ink-soft: #a3b4c4;
    --rule: #2a3f54;
    --link: #9cc4ef;
    --focus: #7fb6ff;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1.5rem);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p {
  margin: 0;
}

p,
li,
dd {
  text-wrap: pretty;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

::selection {
  background: var(--signal);
  color: var(--signal-ink);
}

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

.site-header :focus-visible,
.site-footer :focus-visible,
.section-night :focus-visible,
.on-plan :focus-visible {
  outline-color: var(--signal);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 30;
  padding: 0.5rem 1rem;
  background: var(--signal);
  color: var(--signal-ink);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* Le lien d’évitement est déjà jaune : contour blanc pour rester distinct */
.skip-link:focus-visible {
  outline-color: #ffffff;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Marqueur des contenus à compléter avant mise en ligne */
mark.todo {
  background: var(--signal);
  color: var(--signal-ink);
  padding: 0 0.25em;
  border-radius: 2px;
}

/* Ponctuation invisible mais lue par les lecteurs d’écran (pause dans le titre).
   Elle reste collée au mot, contrairement à un élément sorti du flux. */
.pause {
  opacity: 0;
}

/* --------------------------------------------------------------------------
   Fond « plan » : quadrillage majeur (120 px) et fin (24 px), volontairement discret
   -------------------------------------------------------------------------- */
.on-plan {
  --link: #ffffff;
  color: #ffffff;
  background-color: var(--cyano);
  background-image:
    linear-gradient(rgb(207 224 242 / 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgb(207 224 242 / 0.11) 1px, transparent 1px),
    linear-gradient(rgb(207 224 242 / 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgb(207 224 242 / 0.045) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  /* Lignes verticales centrées sur la page : à partir de 1 184 px, une ligne majeure
     longe le bord gauche du contenu et les lignes fines tombent sur ses deux bords */
  background-position: 0 -1px, calc(50% - 12px) 0, 0 -1px, calc(50% + 12px) 0;
}

/* --------------------------------------------------------------------------
   En-tête : bandeau nuit, collant à partir de la tablette
   -------------------------------------------------------------------------- */
.site-header {
  position: relative;
  z-index: 20;
  background: var(--nuit);
  border-bottom: 1px solid rgb(207 224 242 / 0.08);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  min-height: 4.5rem;
  padding-block: 0.75rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: #ffffff;
  font-weight: 650;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.wordmark svg {
  width: 2rem;
  height: 2rem;
  flex: none;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  color: var(--trace);
  font-size: 0.9375rem;
  text-decoration: none;
}

/* Zone cliquable de ~40 px de haut sans modifier la mise en page */
.site-nav a:not(.nav-cta) {
  padding-block: 0.5rem;
  margin-block: -0.5rem;
}

.site-nav a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.site-nav .nav-cta {
  padding: 0.5rem 1rem;
  border: 1px solid rgb(207 224 242 / 0.6);
  border-radius: var(--radius);
  color: #ffffff;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.site-nav .nav-cta:hover {
  border-color: #ffffff;
  background: rgb(255 255 255 / 0.06);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   Héro : une colonne typographique ; le cartouche se place en bas à droite,
   comme sur un plan
   -------------------------------------------------------------------------- */
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: clamp(2rem, 5vw, 5rem);
  padding-block: clamp(3rem, 2rem + 5vw, 7rem) clamp(3.5rem, 2rem + 5vw, 6.5rem);
}

.hero h1 {
  grid-column: 1 / -1;
}

/* Surtitre en capitales espacées, à la manière du lettrage technique des plans */
.hero .surtitre {
  display: block;
  color: var(--trace);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
}

/* L’accroche est l’élément fort de la page : grande, serrée, d’une seule graisse */
.hero .accroche {
  display: block;
  margin-top: 1.5rem;
  font-size: var(--step-4);
  font-stretch: 85%;
  font-weight: 720;
  line-height: 0.98;
}

.hero .lead {
  grid-column: 1;
  max-width: 34rem;
  margin-top: 1.75rem;
  color: var(--trace);
  font-size: var(--step-1);
  line-height: 1.55;
}

.hero .actions {
  grid-column: 1;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--signal);
  color: var(--signal-ink);
}

.btn-primary:hover {
  background: var(--signal-hover);
}

.btn-ghost {
  border-color: rgb(207 224 242 / 0.55);
  color: #ffffff;
}

.btn-ghost:hover {
  border-color: #ffffff;
  background: rgb(255 255 255 / 0.06);
}

/* Cartouche : bloc de titre d’un plan technique, ici les informations clés.
   Il occupe la colonne de droite et s’aligne sur le bas des boutons. */
.cartouche {
  grid-column: 2;
  grid-row: 2 / span 2;
  align-self: end;
  display: grid;
  grid-template-columns: auto 1fr;
  margin: 0;
  border: 1px solid rgb(207 224 242 / 0.55);
  background-color: var(--cyano);  /* opaque, comme un vrai cartouche : le quadrillage ne le traverse pas */
  font-size: var(--step--1);
  line-height: 1.4;
}

.cartouche dt,
.cartouche dd {
  margin: 0;
  padding: 0.5rem 0.75rem;
  border-top: 1px solid rgb(207 224 242 / 0.3);
}

.cartouche dt {
  border-right: 1px solid rgb(207 224 242 / 0.3);
  color: rgb(207 224 242 / 0.85);
}

.cartouche dt:first-of-type,
.cartouche dt:first-of-type + dd {
  border-top: 0;
}

/* --------------------------------------------------------------------------
   Sections : grille commune
   -------------------------------------------------------------------------- */
.section {
  padding-block: var(--section);
}

/* Section papier qui suit une autre section papier : un filet aligné sur le contenu
   marque la transition (trois fonds seulement : papier, plan, nuit) */
.section-follow {
  position: relative;
}

.section-follow::before {
  content: "";
  position: absolute;
  top: 0;
  left: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  right: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  border-top: 1px solid var(--rule);
}

/* Section nuit : les jetons de texte sont redéfinis localement, tout le contenu suit */
.section-night {
  --ink: #edf2f7;          /* blanc cassé : évite l'éblouissement sur fond très sombre */
  --ink-soft: rgb(207 224 242 / 0.78);
  --link: #ffffff;
  background: var(--nuit);
  color: var(--ink);
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 2.5rem clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.section-head {
  max-width: 40rem;
}

/* Titres de section dans la voix de l’accroche : chasse étroite, une seule graisse */
.section-head h2 {
  font-size: var(--step-3);
  font-stretch: 85%;
  font-weight: 720;
  letter-spacing: -0.01em;
}

.section-head p {
  max-width: 30rem;
  margin-top: 1rem;
  color: var(--ink-soft);
  font-size: var(--step-1);
  line-height: 1.5;
}

.on-plan .section-head p {
  color: var(--trace);
}

.is-sticky {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
}

/* Services */
.service-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.service {
  padding-block: 2rem;
  border-top: 1px solid var(--rule);
}

.service:first-child {
  padding-top: 0;
  border-top: 0;
}

.service:last-child {
  padding-bottom: 0;
}

.service h3 {
  font-size: var(--step-2);
  font-weight: 650;
}

.service p {
  max-width: var(--measure);
  margin-top: 0.5rem;
}

.service .examples {
  margin-top: 0.75rem;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

/* Méthode : une vraie séquence, donc numérotée, posée sur une ligne de cote
   (repères obliques à 45°, comme une cote d’architecte) */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

/* Repère de fin de la ligne de cote */
.steps::after {
  content: "";
  position: absolute;
  top: 0.25rem;
  right: 0;
  height: 1rem;
  border-left: 1px solid var(--ink-soft);
  transform: rotate(45deg);
}

.step {
  position: relative;
  padding: 2.75rem 2rem 0 0;
  counter-increment: step;
}

/* Segment de la ligne de cote */
.step::before {
  content: "";
  position: absolute;
  top: 0.75rem;
  left: 0;
  right: 0;
  border-top: 1px solid var(--ink-soft);
}

/* Repère au début de chaque étape */
.step::after {
  content: "";
  position: absolute;
  top: 0.25rem;
  left: 0;
  height: 1rem;
  border-left: 1px solid var(--ink-soft);
  transform: rotate(45deg);
}

.step h3 {
  font-size: var(--step-1);
  font-weight: 650;
}

.step h3::before {
  content: counter(step) ". ";
  content: counter(step) ". " / counter(step) ". ";  /* texte lu : sans lui, Chrome perd le numéro */
  color: var(--ink-soft);
  font-weight: 450;
}

.step p {
  margin-top: 0.5rem;
}

/* Appel vers le contact à la fin de la méthode */
.steps-cta {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  color: var(--ink-soft);
  font-size: var(--step-1);
}

/* À propos */
.prose > * + * {
  margin-top: 1rem;
}

.prose p {
  max-width: var(--measure);
}

.stack {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

.stack h3 {
  font-size: var(--step-1);
  font-weight: 650;
}

.stack dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 2rem;
  margin: 1.25rem 0 0;
}

.stack dt {
  color: var(--ink-soft);
  font-size: var(--step--1);
}

.stack dd {
  margin: 0.25rem 0 0;
}

/* Portrait (prêt à l’emploi : voir le commentaire dans la section À propos) */
.portrait {
  max-width: 18rem;
  margin: 2rem 0 0;
}

.portrait img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--calque);
}

/* FAQ */
.faq {
  border-top: 1px solid var(--rule);
}

.faq details {
  border-bottom: 1px solid var(--rule);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding-block: 1.25rem;
  font-size: var(--step-1);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  transition: color 0.15s ease;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  content: "+" / "";  /* décoratif : non lu par les lecteurs d’écran */
  flex: none;
  color: var(--ink-soft);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1;
  transition: transform 0.2s ease, color 0.15s ease;
}

/* Survol : un aplat « calque » qui déborde un peu de chaque côté */
.faq summary:hover {
  background: var(--calque);
  box-shadow: -0.75rem 0 0 var(--calque), 0.75rem 0 0 var(--calque);
}

.faq summary:hover,
.faq summary:hover::after {
  color: var(--link);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  max-width: var(--measure);
  padding-bottom: 1.5rem;
}

/* Contact */
.contact .wrap {
  padding-block: var(--section);
}

.contact .email {
  display: inline-block;
  font-size: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  font-weight: 600;
  font-stretch: 90%;
  line-height: 1.2;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

.contact .email:hover {
  text-decoration-color: var(--signal);
}

.contact-details p {
  max-width: 34rem;
  margin-top: 1.25rem;
  color: var(--trace);
  font-size: var(--step-1);
}

.contact-details .note {
  margin-top: 0.5rem;
  font-size: var(--step--1);
}

/* --------------------------------------------------------------------------
   Pied de page
   -------------------------------------------------------------------------- */
.site-footer {
  padding-block: 3.5rem 2rem;
  background: var(--nuit);
  color: rgb(207 224 242 / 0.75);
  font-size: var(--step--1);
}

.footer-main {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem 3rem;
}

.site-footer .wordmark {
  font-size: 1rem;
}

.site-footer .wordmark svg {
  width: 1.75rem;
  height: 1.75rem;
}

.footer-brand p {
  margin-top: 0.75rem;
}

.footer-brand p + p {
  margin-top: 0.25rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Zone cliquable agrandie sans modifier la mise en page */
.footer-links a {
  display: inline-block;
  padding-block: 0.375rem;
  margin-block: -0.375rem;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.site-footer a:not(.wordmark) {
  color: var(--trace);
}

.site-footer a:not(.wordmark):hover {
  color: #ffffff;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(207 224 242 / 0.14);
}

/* --------------------------------------------------------------------------
   Pages légales et 404
   -------------------------------------------------------------------------- */
.page-head .wrap {
  padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem);
}

.page-head h1 {
  font-size: var(--step-3);
  font-stretch: 85%;
  font-weight: 720;
  letter-spacing: -0.01em;
}

.page-head p {
  max-width: 40rem;
  margin-top: 0.75rem;
  color: var(--trace);
}

.legal-layout {
  padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem) var(--section);
}

/* 404 : le bandeau occupe tout l’écran sous l’en-tête */
.page-404 {
  display: flex;
  align-items: center;
  min-height: calc(100vh - 4.5rem);   /* navigateurs sans svh */
  min-height: calc(100svh - 4.5rem);
}

.page-404 > .page-head {
  width: 100%;
}

/* Page d’attente « site en construction » : le plan remplit l’écran entre
   l’en-tête et un pied de page réduit à une ligne */
.page-chantier {
  display: flex;
  flex-direction: column;
  min-height: 100vh;   /* navigateurs sans svh */
  min-height: 100svh;
}

.page-chantier main {
  flex: 1;
  display: flex;
  align-items: center;
}

.page-chantier .hero {
  width: 100%;
}

.page-chantier .site-footer {
  padding-block: 1.5rem;
}

.page-chantier .footer-bottom {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* Sommaire */
.toc {
  font-size: var(--step--1);
}

.toc-title {
  color: var(--ink-soft);
}

.toc ul {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--rule);
}

.toc a {
  display: block;
  padding: 0.25rem 0 0.25rem 1rem;
  color: var(--ink-soft);
  text-decoration: none;
}

.toc a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.legal {
  max-width: 44rem;
}

.legal h2 {
  margin-top: 2.75rem;
  font-size: var(--step-2);
  font-weight: 650;
}

.legal h2:first-child {
  margin-top: 0;
}

.legal h3 {
  margin-top: 1.75rem;
  font-size: var(--step-1);
  font-weight: 650;
}

.legal p,
.legal ul,
.legal dl {
  margin-top: 0.75rem;
}

.legal ul {
  padding-left: 1.25rem;
}

.legal li + li {
  margin-top: 0.25rem;
}

/* Blocs d’identité (éditeur, hébergeur, traitements) présentés en cartouche */
.legal dl {
  display: grid;
  grid-template-columns: minmax(9rem, auto) 1fr;
  border: 1px solid var(--rule);
}

.legal dt,
.legal dd {
  padding: 0.5rem 0.75rem;
  border-top: 1px solid var(--rule);
}

.legal dt {
  border-right: 1px solid var(--rule);
  color: var(--ink-soft);
}

.legal dt:first-of-type,
.legal dt:first-of-type + dd {
  border-top: 0;
}

.legal dd {
  margin: 0;
}

.legal .updated {
  margin-top: 2.75rem;
  color: var(--ink-soft);
  font-size: var(--step--1);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (min-width: 48rem) {
  :root {
    --header-h: 4.5rem;
  }

  .site-header {
    position: sticky;
    top: 0;
  }
}

@media (max-width: 60rem) {
  .hero .wrap,
  .section-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .is-sticky {
    position: static;
  }

  /* Le cartouche passe sous les boutons */
  .cartouche {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    margin-top: 2.5rem;
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 2.5rem;
  }
}

@media (max-width: 36rem) {
  /* Le menu occupe sa propre ligne, réparti sur toute la largeur */
  .site-nav {
    flex: 1 1 100%;
  }

  .site-nav ul {
    justify-content: space-between;
    gap: 0.25rem 0.5rem;
  }

  .site-nav .nav-cta {
    padding: 0.5rem 0.75rem;
  }

  .actions .btn {
    flex: 1 1 100%;
  }

  /* Le cartouche occupe toute la largeur sous les boutons */
  .cartouche {
    justify-self: stretch;
    margin-top: 2rem;
  }

  /* La ligne de cote devient verticale */
  .steps {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0;
  }

  .steps::after {
    display: none;
  }

  .step {
    padding: 0 0 2rem 1.75rem;
  }

  .step:last-child {
    padding-bottom: 0;
  }

  .step::before {
    top: 0.5rem;
    bottom: 0;
    left: 0.25rem;
    right: auto;
    border-top: 0;
    border-left: 1px solid var(--ink-soft);
  }

  .step:last-child::before {
    display: none;
  }

  .step::after {
    top: 0.5rem;
    left: 0;
    width: 0.5rem;
    height: 0;
    border-left: 0;
    border-top: 1px solid var(--ink-soft);
    transform: none;
  }

  .stack dl {
    grid-template-columns: minmax(0, 1fr);
  }

  .legal dl {
    grid-template-columns: minmax(0, 1fr);
  }

  .legal dt {
    border-right: 0;
    padding-bottom: 0;
  }

  .legal dd {
    border-top: 0;
    padding-top: 0.125rem;
  }
}

/* Très petits écrans : menu resserré pour tenir sur une seule ligne */
@media (max-width: 24rem) {
  .site-nav ul {
    column-gap: 0.25rem;  /* tient aussi avec une barre de défilement classique (navigateur de bureau) */
  }

  .site-nav a {
    font-size: 0.875rem;
  }
}

/* Réglage système « contraste élevé » : textes secondaires, filets et contours renforcés */
@media (prefers-contrast: more) {
  :root {
    --ink-soft: var(--ink);
    --rule: #7d8c9b;
  }

  .on-plan {
    background-image: none;
  }

  .cartouche dt {
    color: #ffffff;
  }

  .site-footer {
    color: var(--trace);
  }

  .section-night {
    --ink-soft: var(--trace);
  }

  .btn-ghost,
  .site-nav .nav-cta,
  .cartouche {
    border-color: #ffffff;
  }

  .cartouche dt,
  .cartouche dd {
    border-color: rgb(207 224 242 / 0.6);
  }

  .site-header,
  .footer-bottom {
    border-color: rgb(207 224 242 / 0.4);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

@media print {
  :root,
  .on-plan,
  .section-night {
    --paper: #fff;
    --ink: #000;
    --ink-soft: #333;
    --trace: #333;
    --link: #000;
    --rule: #999;
  }

  .site-header,
  .on-plan,
  .section-night,
  .site-footer,
  .cartouche {
    position: static;
    background: none;
    color: #000;
  }

  .site-header .wordmark,
  .site-footer .wordmark,
  .cartouche dt {
    color: #000;
  }

  .site-footer a {
    color: #000 !important;
  }

  .site-nav,
  .actions,
  .toc,
  .skip-link,
  .steps-cta {
    display: none;
  }

  .is-sticky {
    position: static;
  }

  /* Réponses de la FAQ imprimées même repliées (navigateurs récents) */
  details::details-content {
    content-visibility: visible;
  }

  .faq summary::after {
    content: none;
  }
}
