/* =========================================================================
   GCA Après Sinistre : design system v4 « Précision »

   Un site d'entreprise technique pour des professionnels : sobre, précis, rassurant.

   COULEURS
   - Bleu GCA (--blue) pour la marque et les liens, bleu nuit (--navy) pour les surfaces sombres.
   - Jaune GCA (--signal) réservé à l'urgence : appeler, déclarer, barre mobile. Jamais décoratif.
   - Texte : --text (titres et corps), --muted (texte d'appui, 6:1 sur blanc), --line (filets),
     --line-strong (bordures de contrôles, 3,3:1 sur blanc).
   - Contrastes vérifiés AA : texte courant >= 4,5:1, contrôles et focus >= 3:1.

   TYPOGRAPHIE (valeurs à 390 / 1440 px)
   - Titres en Archivo élargi (108 %), texte en Hanken Grotesk.
   - --step-5  36 / 68  titre du hero d'accueil
   - --fs-page 30 / 48  h1 des pages internes
   - --step-4  29 / 44  h2 de section
   - --step-3  25 / 32  h2 secondaire (.h-sm), titre de carte mise en avant
   - --step-2  21 / 24  h3, titre de carte
   - --step-1  18 / 20  chapô (.lead), h4
   - --step-0  16 / 17  texte courant
   - --step--1 14 / 15  texte secondaire, navigation, méta
   - --step--2 13       surtitre (.eyebrow), mentions
   Titres : text-wrap balance, jamais de césure. Paragraphes : text-wrap pretty.
   Mesures : 24ch pour un titre de section, 60ch pour un chapô, 68ch pour un texte long.

   SURTITRE ET EN-TÊTE DE SECTION
       <div class="sec-head sec-head--split">
           <p class="eyebrow">Nos services</p>        (facultatif, enfant direct)
           <h2>Titre de la section</h2>
           <div><p class="lead">Texte d'appui.</p><a class="link" href="#">Lien</a></div>
       </div>
   À partir de 960 px, --split place le texte d'appui à droite, aligné sur le HAUT du titre ;
   le surtitre occupe sa propre ligne au-dessus des deux colonnes.

   ESPACEMENTS : base 4 / 8 px
   - --space-1 (4) à --space-32 (128) ; les alias historiques --sp-* pointent dessus :
     2xs 8, xs 12, s 16, m 24, l 40, xl 40/48/64, 2xl 64/80/112 (mobile / tablette / bureau).
   - --section-y (= --sp-2xl) : padding vertical de toutes les sections.

   RAYONS, OMBRE, FILETS
   - --r-s 6 px (boutons, champs), --r-m 12 px (cartes, médias, panneaux), --r-l 16 px (grands blocs),
     --r-pill pour les étiquettes.
   - Une seule ombre, --shadow-float, pour ce qui flotte (menu, panneau du hero).
   - Filets de 1 px : --line sur fond clair, --line-dark sur fond sombre.

   BOUTONS : .btn (bleu), --signal (urgence), --ghost (secondaire), --white, --ghost-light,
   tailles --sm / --lg ; .link pour les liens d'action avec flèche. États hover, focus-visible
   (anneau 2 px décalé de 2 px), active et disabled homogènes. Transitions 150 à 250 ms,
   neutralisées si prefers-reduced-motion.

   L'hexagone de la marque n'apparaît qu'en marqueur de carte et en puce d'étape.

   Sommaire : 1. Tokens  2. Base  3. Layout  4. Typographie  5. Boutons, liens  6. Header, navigation
   (accueil : home.css ; pages : pages.css ; contenus : content.css ; footer, barre mobile : chrome.css)
   ========================================================================= */

/* Les @font-face (assets/fonts/fonts.css) sont chargés par un <link> dans base.html.twig,
   en parallèle de cette feuille : un @import ajouterait une requête en chaîne bloquant le rendu. */

/* Polices de repli calées sur les métriques d'Archivo (700, largeur 108 %) et de Hanken Grotesk :
   avant le chargement des webfonts, les titres et la navigation occupent déjà la même place
   (pas de saut de mise en page au remplacement). Valeurs mesurées sur les fichiers woff2. */
@font-face {
    font-family: 'Archivo Fallback';
    src: local('Arial Bold'), local('Arial-BoldMT'), local('Liberation Sans Bold'), local('Arimo Bold');
    font-weight: 100 900;
    size-adjust: 107.3%;
    ascent-override: 81.8%;
    descent-override: 19.6%;
    line-gap-override: 0%;
}
@font-face {
    font-family: 'Hanken Fallback';
    src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('Arimo');
    font-weight: 100 900;
    size-adjust: 100.3%;
    ascent-override: 99.7%;
    descent-override: 30.2%;
    line-gap-override: 0%;
}

/* ---------------------------------------------------------------------------
   1. TOKENS
   --------------------------------------------------------------------------- */
:root {
    /* Couleurs */
    --navy: #0a2440;
    --navy-deep: #061729;
    --navy-soft: #13345a;
    --blue: #0058ab;
    --blue-hover: #004a91;
    --blue-light: #8cc1ff;
    --sky: #e8f1fb;
    --mist: #f3f6f9;
    --white: #ffffff;
    --text: #0d1f33;
    --text-soft: #26384c;
    --muted: #526477;
    --line: #d9e1ea;
    --line-strong: #7d8fa5;
    --line-dark: rgb(255 255 255 / 0.14);
    --signal: #fbd914;
    --signal-hover: #ffe54d;
    --success: #17784a;
    --error: #b3261e;
    --focus: var(--blue);
    --focus-on-dark: var(--blue-light);

    /* Polices */
    --font-display: 'Archivo', 'Archivo Fallback', system-ui, sans-serif;
    --font-body: 'Hanken Grotesk', 'Hanken Fallback', system-ui, sans-serif;

    /* Échelle typographique (voir l'en-tête du fichier) */
    --step--2: 0.8125rem;
    --step--1: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
    --step-0: clamp(1rem, 0.975rem + 0.1vw, 1.0625rem);
    --step-1: clamp(1.125rem, 1.075rem + 0.2vw, 1.25rem);
    --step-2: clamp(1.25rem, 1.15rem + 0.4vw, 1.5rem);
    --step-3: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
    --step-4: clamp(1.75rem, 1.35rem + 1.8vw, 2.75rem);
    --step-5: clamp(2.25rem, 1.5rem + 3.4vw, 4.25rem);
    --fs-page: clamp(1.75rem, 1.4rem + 2vw, 3rem);

    --lh-tight: 1.05;
    --lh-heading: 1.1;
    --lh-snug: 1.25;
    --lh-lead: 1.5;
    --lh-body: 1.6;
    --tracking-display: -0.025em;
    --tracking-heading: -0.02em;
    --tracking-eyebrow: 0.08em;
    --measure-title: 24ch;
    --measure-lead: 60ch;
    --measure: 68ch;
    --eyebrow-h: 1rem;

    /* Espacements, base 4 / 8 px */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-28: 7rem;
    --space-32: 8rem;

    /* Alias historiques (utilisés par toutes les feuilles) */
    --sp-2xs: var(--space-2);
    --sp-xs: var(--space-3);
    --sp-s: var(--space-4);
    --sp-m: var(--space-6);
    --sp-l: var(--space-10);
    --sp-xl: var(--space-10);
    --sp-2xl: var(--space-16);
    --section-y: var(--sp-2xl);

    /* Rayons */
    --r-xs: 4px;
    --r-s: 6px;
    --r-m: 12px;
    --r-l: 16px;
    --r-pill: 999px;

    /* Mise en page */
    --container: 1320px;
    --gutter: var(--space-4);
    --header-h: 64px;
    --mobile-bar-h: 64px;

    /* Élévation, mouvement, plans */
    --shadow-float: 0 1px 2px rgb(6 23 41 / 0.06), 0 16px 40px -12px rgb(6 23 41 / 0.28);
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    --dur-fast: 150ms;
    --dur: 200ms;
    --dur-slow: 250ms;
    --z-mobile-bar: 90;
    --z-header: 100;
    --z-skip: 1000;
    --hex: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);
}
@media (min-width: 600px) {
    :root { --gutter: var(--space-6); }
}
@media (min-width: 768px) {
    :root { --sp-xl: var(--space-12); --sp-2xl: var(--space-20); }
}
@media (min-width: 1024px) {
    :root { --gutter: var(--space-8); }
}
@media (min-width: 1200px) {
    :root { --sp-xl: var(--space-16); --sp-2xl: var(--space-28); }
}
@media (min-width: 1240px) {
    :root { --header-h: 72px; }
}
@media (min-width: 1440px) {
    :root { --gutter: var(--space-10); }
}

/* ---------------------------------------------------------------------------
   2. BASE
   --------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-h) + var(--space-4));
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
    margin: 0;
    overflow-x: clip;
    font-family: var(--font-body);
    font-size: var(--step-0);
    line-height: var(--lh-body);
    color: var(--text);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-kerning: normal;
    -webkit-tap-highlight-color: transparent;
}
@media (max-width: 959.98px) { body { padding-bottom: calc(var(--mobile-bar-h) + env(safe-area-inset-bottom)); } }

img, picture, svg, video { display: block; max-width: 100%; height: auto; }
/* Une <picture> remplit toujours son cadre photo (sinon une bande de fond apparaît sous l'image) */
:is(.hero__bg, .media, .page-hero__media, .page-head__media, .svc-panel__media, .svc-card__media, .post__media, .journey__media, .svc-row__media, .article__cover) > picture { width: 100%; height: 100%; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
p { margin: 0 0 var(--space-4); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; }
address { font-style: normal; }
strong, b { font-weight: 700; }
hr { height: 1px; margin: var(--space-10) 0; border: 0; background: var(--line); }
:where(.split, .grid, .hero__inner, .footer__main, .form__row, .svc-tabs, .journey, .dossier, .zone, .zone-page, .zone-cities, .city-cols, .faq-split, .cta-final__inner, .news, .page-hero__inner, .page-head__inner, .article-layout, .contact-layout, .toc-layout, .sec-head) > * { min-width: 0; }

/* Liens dans le texte */
a {
    color: var(--blue);
    text-decoration-line: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
    text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
    transition: color var(--dur-fast), text-decoration-color var(--dur-fast);
}
a:hover { color: var(--blue-hover); text-decoration-color: currentColor; }

/* Focus : anneau de 2 px décalé, bleu sur fond clair, bleu clair sur fond sombre (>= 3:1) */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-xs); }
.on-dark { --focus: var(--focus-on-dark); }
:focus:not(:focus-visible) { outline: none; }
::selection { background: var(--signal); color: var(--navy); }

/* Texte insécable posé par le filtre fr_typo (Haut-Rhin, Saint-Louis, 7j/7) : le <span> ne crée
   aucune boîte (pas d'élément de grille ou de flex en plus) et hérite de tout, sauf du retour à la ligne. */
.nowrap { all: inherit !important; display: contents !important; white-space: nowrap !important; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
    white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: var(--space-4); top: var(--space-2); z-index: var(--z-skip);
    padding: var(--space-3) var(--space-4);
    background: var(--navy); color: var(--white); border-radius: var(--r-s);
    font-weight: 700; text-decoration: none;
    transform: translateY(-200%);
}
.skip-link:focus { transform: none; color: var(--white); }

.icon { width: 1.25em; height: 1.25em; flex: none; }

/* ---------------------------------------------------------------------------
   3. LAYOUT
   --------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: calc(var(--container) + 2 * var(--gutter));
    margin-inline: auto;
    padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(820px + 2 * var(--gutter)); }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: var(--sp-xl); }
.section--mist { background: var(--mist); }
.section--sky { background: var(--sky); }
.section--navy { background: var(--navy); color: var(--white); --focus: var(--focus-on-dark); }
.section + .section--flush-top, .section--flush-top { padding-top: 0; }
/* Deux sections claires consécutives sur le même fond : un filet plutôt qu'un double vide */
.section:not([class*="section--"]) + .section:not([class*="section--"]) { border-top: 1px solid var(--line); }

.on-dark { color: var(--white); }
.on-dark a:not(.btn) { color: var(--white); }
.on-dark .lead, .on-dark .muted { color: rgb(255 255 255 / 0.76); }

/* En-tête de section : surtitre, titre, texte d'appui (voir l'en-tête du fichier) */
.sec-head {
    display: grid;
    gap: var(--space-4) var(--space-16);
    justify-items: start;
    margin-bottom: var(--sp-xl);
}
.sec-head > * { margin: 0; }
/* Surtitre à 12 px du titre, comme partout ailleurs (16 px d'écart de grille moins 4 px) */
.sec-head > .eyebrow { margin-bottom: calc(-1 * var(--space-1)); }
.sec-head :is(h2, h3) { max-width: var(--measure-title); }
.sec-head .lead { max-width: var(--measure-lead); }
.sec-head > div { display: grid; gap: var(--space-4); justify-items: start; }
.sec-head > div > * { margin: 0; }
.sec-head > div > .link { margin-top: var(--space-1); }
@media (min-width: 960px) {
    .sec-head--split {
        grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
        align-items: start;
    }
    .sec-head--split > .eyebrow { grid-column: 1 / -1; }
    /* Le texte d'appui démarre sur la première ligne du titre (calage mesuré : hauts de lettres alignés à 1 px près) */
    .sec-head--split > :is(h2, h3) + div > :first-child { margin-top: 0; }
    /* Titre et surtitre regroupés dans un même bloc : même calage */
    .sec-head--split > div:first-child:has(> .eyebrow:first-child) + * { padding-top: calc(var(--eyebrow-h) + var(--space-3)); }
}
.sec-head--center { justify-items: center; text-align: center; }
.sec-head--center :is(h2, h3) { max-width: 28ch; }
.sec-head--center .eyebrow { justify-content: center; }

.split { display: grid; gap: var(--sp-xl); align-items: start; }
@media (min-width: 960px) {
    .split { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-16); }
    .split--wide-text { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
    .split--reverse > :first-child { order: 2; }
    .split--top { align-items: start; }
    .split--center { align-items: center; }
}
@media (min-width: 1200px) { .split { gap: var(--space-20); } }

.grid { display: grid; gap: var(--space-6); }
@media (min-width: 700px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) {
    .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.stack > * + * { margin-top: var(--space-4); }
.mt-s { margin-top: var(--space-4); }
.mt-m { margin-top: var(--space-6); }
.mt-l { margin-top: var(--space-10); }
.mt-xl { margin-top: var(--sp-xl); }

/* Médias : un seul traitement pour toutes les photos de contenu */
.media { position: relative; overflow: hidden; border-radius: var(--r-m); background: var(--sky); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media--portrait { aspect-ratio: 4 / 5; }
.media--square { aspect-ratio: 1; }
.media--landscape { aspect-ratio: 3 / 2; }
.media--wide { aspect-ratio: 16 / 9; }
.media__caption {
    position: absolute; left: var(--space-4); bottom: var(--space-4); right: var(--space-4);
    display: flex; align-items: center; gap: var(--space-2);
    width: fit-content; max-width: calc(100% - 2 * var(--space-4));
    padding: var(--space-2) var(--space-3);
    background: rgb(255 255 255 / 0.94);
    border-radius: var(--r-s);
    font-size: var(--step--1); font-weight: 600; color: var(--navy);
    line-height: 1.35;
}
.media__caption .icon { color: var(--blue); width: 1.125rem; height: 1.125rem; }

/* ---------------------------------------------------------------------------
   4. TYPOGRAPHIE
   --------------------------------------------------------------------------- */
h1, h2, h3, h4, .display {
    margin: 0 0 var(--space-4);
    font-family: var(--font-display);
    font-stretch: 108%;
    font-weight: 700;
    line-height: var(--lh-heading);
    letter-spacing: var(--tracking-heading);
    color: inherit;
    text-wrap: balance;
    /* Jamais de césure dans un titre : coupure aux espaces seulement */
    hyphens: manual;
    overflow-wrap: normal;
}
h1 { font-size: var(--step-5); line-height: var(--lh-tight); letter-spacing: var(--tracking-display); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); line-height: var(--lh-snug); letter-spacing: -0.012em; }
h4 { font-size: var(--step-1); line-height: 1.3; letter-spacing: -0.005em; }
.h-sm { font-size: var(--step-3); line-height: 1.15; }
.h-sm-3 { font-size: var(--step-1); line-height: 1.3; letter-spacing: -0.005em; }

.lead { font-size: var(--step-1); line-height: var(--lh-lead); color: var(--muted); text-wrap: pretty; }
.muted { color: var(--muted); }
.small { font-size: var(--step--1); line-height: 1.5; }
.text-pretty { text-wrap: pretty; }
li, dd, blockquote, figcaption { text-wrap: pretty; }

/* Surtitre : petite capitale espacée qui annonce la section */
.eyebrow {
    display: flex; align-items: center; gap: var(--space-3);
    margin: 0 0 var(--space-3);
    font-family: var(--font-body);
    font-size: var(--step--2);
    font-weight: 700;
    line-height: var(--eyebrow-h);
    letter-spacing: var(--tracking-eyebrow);
    text-transform: uppercase;
    color: var(--blue);
}
.eyebrow::before { content: ""; flex: none; width: var(--space-6); height: 2px; background: currentColor; }
.on-dark .eyebrow, .section--navy .eyebrow { color: var(--blue-light); }

/* Pastille d'état : utilisée seulement là où l'information est un statut réel */
.status {
    display: inline-flex; align-items: center; gap: var(--space-2);
    padding: var(--space-1) var(--space-3) var(--space-1) var(--space-3);
    border-radius: var(--r-pill);
    font-size: var(--step--1); font-weight: 600; line-height: 1.5;
    background: rgb(255 255 255 / 0.1);
    border: 1px solid rgb(255 255 255 / 0.18);
    color: var(--white);
}
.status__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 0 rgb(61 220 132 / 0.6); }
@media (prefers-reduced-motion: no-preference) {
    .status__dot { animation: pulse 2.4s ease-out infinite; }
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgb(61 220 132 / 0.55); }
    70%, 100% { box-shadow: 0 0 0 8px rgb(61 220 132 / 0); }
}

/* Listes à coches */
.checklist { list-style: none; display: grid; gap: var(--space-3); }
.checklist li { position: relative; padding-left: var(--space-8); }
.checklist li::before {
    content: ""; position: absolute; left: 0; top: 0.2em;
    width: 1.25rem; height: 1.25rem; border-radius: 50%;
    background: var(--sky) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230058ab' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 0.75rem no-repeat;
}
.on-dark .checklist li::before, .section--navy .checklist li::before {
    background-color: rgb(255 255 255 / 0.12);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238cc1ff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E");
}
.checklist strong { color: inherit; }

/* Étiquettes (matériel, services liés) */
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.tags li, .tags a {
    display: inline-flex; align-items: center;
    min-height: 32px;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--r-pill);
    background: var(--white);
    border: 1px solid var(--line);
    font-size: var(--step--1); font-weight: 600; line-height: 1.3; color: var(--navy);
    text-decoration: none;
}
.tags li:has(a) { padding: 0; border: 0; background: none; min-height: 0; }
.tags a { transition: border-color var(--dur-fast), color var(--dur-fast); }
.tags a:hover { border-color: var(--blue); color: var(--blue); }
.section--mist .tags li:not(:has(a)) { background: var(--white); }
.on-dark .tags li, .on-dark .tags a { background: rgb(255 255 255 / 0.08); border-color: rgb(255 255 255 / 0.18); color: var(--white); }

/* Texte long */
.prose { max-width: var(--measure); }
.prose h2 { font-size: var(--step-3); line-height: 1.15; margin-top: var(--space-12); }
.prose h3 { margin-top: var(--space-8); }
.prose p, .prose li { color: var(--text-soft); }
.prose ul, .prose ol { padding-left: 1.25em; display: grid; gap: var(--space-2); margin-bottom: var(--space-4); }
.prose li::marker { color: var(--blue); }
.prose > :first-child { margin-top: 0; }

/* ---------------------------------------------------------------------------
   5. BOUTONS, LIENS
   --------------------------------------------------------------------------- */
.btn {
    --btn-bg: var(--blue); --btn-fg: var(--white); --btn-bd: var(--btn-bg);
    --btn-bg-h: var(--blue-hover); --btn-fg-h: var(--btn-fg); --btn-bd-h: var(--btn-bg-h);
    display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
    min-height: 48px;
    padding: var(--space-2) var(--space-6);
    border: 1px solid var(--btn-bd);
    border-radius: var(--r-s);
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-family: var(--font-body);
    font-size: 1rem; font-weight: 700; line-height: 1.25; letter-spacing: 0.005em;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur-fast) var(--ease);
}
.btn:hover { background: var(--btn-bg-h); border-color: var(--btn-bd-h); color: var(--btn-fg-h); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline-offset: 3px; border-radius: var(--r-s); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; pointer-events: none; transform: none; }
.btn .icon { width: 1.125rem; height: 1.125rem; }

.btn--signal { --btn-bg: var(--signal); --btn-fg: var(--navy); --btn-bg-h: var(--signal-hover); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--navy); --btn-bd: var(--line-strong); --btn-bg-h: rgb(10 36 64 / 0.04); --btn-bd-h: var(--navy); }
.section--mist .btn--ghost, .page-head .btn--ghost { --btn-bg-h: var(--white); }
.on-dark .btn--ghost, .section--navy .btn--ghost, .btn--ghost-light {
    --btn-bg: transparent; --btn-fg: var(--white); --btn-bd: rgb(255 255 255 / 0.5);
    --btn-bg-h: rgb(255 255 255 / 0.08); --btn-bd-h: var(--white);
}
.btn--white { --btn-bg: var(--white); --btn-fg: var(--navy); --btn-bg-h: var(--sky); }
.btn--sm { min-height: 40px; padding: var(--space-1) var(--space-4); font-size: var(--step--1); }
.btn--lg { min-height: 56px; padding: var(--space-3) var(--space-8); font-size: 1.0625rem; }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

/* Lien d'action : texte gras, flèche qui avance au survol */
.link {
    display: inline-flex; align-items: center; gap: var(--space-2);
    font-weight: 700; color: var(--blue);
    text-decoration: underline;
    text-decoration-color: transparent;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.25em;
}
.link .icon { width: 1.125rem; height: 1.125rem; transition: transform var(--dur) var(--ease); }
.link:hover { color: var(--blue-hover); text-decoration-color: currentColor; }
.link:hover .icon { transform: translateX(3px); }
.on-dark .link, .section--navy .link { color: var(--white); }
.on-dark .link .icon, .section--navy .link .icon { color: var(--blue-light); }
.on-dark .link:hover, .section--navy .link:hover { color: var(--white); }
/* Écran tactile étroit : cible de 44 px de haut pour chaque lien d'action isolé */
@media (max-width: 767.98px) { .link { min-height: 44px; } }

/* ---------------------------------------------------------------------------
   6. HEADER, NAVIGATION
   --------------------------------------------------------------------------- */
.topbar { background: var(--navy-deep); color: rgb(255 255 255 / 0.78); font-size: var(--step--1); line-height: 1.4; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 40px; }
.topbar__status { display: flex; align-items: center; gap: var(--space-2); min-width: 0; margin: 0; white-space: nowrap; }
.topbar__status > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.topbar__links { display: flex; align-items: stretch; align-self: stretch; gap: var(--space-6); flex: none; }
/* Les liens occupent toute la hauteur du bandeau : cible de 40 px, 44 px sur mobile */
.topbar a { display: inline-flex; align-items: center; color: var(--white); text-decoration: none; font-weight: 600; white-space: nowrap; }
.topbar a:hover { color: var(--white); text-decoration: underline; text-decoration-color: rgb(255 255 255 / 0.5); }
.topbar__phone { display: inline-flex; align-items: center; gap: var(--space-2); }
.topbar a.topbar__phone { color: var(--signal); }
.topbar a.topbar__phone:hover { color: var(--signal-hover); text-decoration-color: currentColor; }
.topbar__phone .icon { width: 1rem; height: 1rem; }
@media (max-width: 1023.98px) { .topbar__zone { display: none; } }
@media (max-width: 759.98px) {
    .topbar__inner { min-height: 44px; }
    .topbar__links a:not(.topbar__phone) { display: none; }
}

.header {
    position: sticky; top: 0; z-index: var(--z-header);
    background: var(--white);
    border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; gap: var(--space-4); min-height: var(--header-h); }
.header__logo { flex: none; display: flex; align-items: center; min-height: 44px; margin-right: auto; border-radius: var(--r-xs); }
.header__logo img { width: 136px; height: auto; }
@media (min-width: 1240px) { .header__logo img { width: 148px; } }
.header__cta { display: none; }
@media (min-width: 960px) and (max-width: 1239.98px) { .header__cta { display: inline-flex; min-height: 44px; } }

/* Bouton du menu (< 1240 px) */
.nav__toggle {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
    min-height: 44px; min-width: 44px; padding: 0 var(--space-4) 0 var(--space-3);
    border: 1px solid var(--line); border-radius: var(--r-s);
    background: var(--white); color: var(--navy);
    font-size: var(--step--1); font-weight: 700; line-height: 1;
    transition: border-color var(--dur-fast), background-color var(--dur-fast);
}
.nav__toggle:hover { border-color: var(--line-strong); }
.nav__toggle .icon { width: 20px; height: 20px; }
.nav__toggle .icon-close, .nav__toggle-close,
.nav__toggle[aria-expanded="true"] .icon-burger, .nav__toggle[aria-expanded="true"] .nav__toggle-open { display: none; }
.nav__toggle[aria-expanded="true"] .icon-close { display: block; }
.nav__toggle[aria-expanded="true"] .nav__toggle-close { display: inline; }

.nav__list, .nav__menu-list { list-style: none; }
.nav__link {
    position: relative;
    display: flex; align-items: center;
    color: var(--navy); font-weight: 600; text-decoration: none; white-space: nowrap;
    transition: color var(--dur-fast);
}
.nav__link:hover { color: var(--blue); }
.nav__link:is([aria-current="page"], .is-active) { color: var(--blue); }
.nav__split { display: flex; align-items: center; }
.nav__sub {
    display: grid; place-items: center; flex: none;
    padding: 0; border: 0; background: none; color: var(--navy);
    transition: color var(--dur-fast);
}
.nav__sub:hover, .nav__item--dropdown:hover .nav__sub { color: var(--blue); }
.nav__sub .icon { width: 16px; height: 16px; transition: transform var(--dur) var(--ease); }
.nav__sub[aria-expanded="true"] .icon { transform: rotate(180deg); }

.nav__menu-list a { display: grid; gap: 2px; text-decoration: none; color: var(--navy); }
.nav__menu-name { font-weight: 700; }
.nav__menu-list a:hover .nav__menu-name, .nav__menu-list a[aria-current="page"] .nav__menu-name { color: var(--blue); }
.nav__menu-list small { font-size: var(--step--1); font-weight: 400; line-height: 1.4; color: var(--muted); }
.nav__menu-all { margin-top: var(--space-2); }

.nav__actions { display: flex; gap: var(--space-3); align-items: center; }

/* Mobile et tablette : panneau plein écran sous le header */
@media (max-width: 1239.98px) {
    /* Défilement verrouillé sur <html> seulement : un overflow sur <body> en ferait un conteneur
       de défilement et le header collant (sticky) remonterait hors de l'écran, bouton « Fermer » compris. */
    .nav-open { overflow: hidden; scrollbar-gutter: stable; }
    .nav__panel {
        position: fixed; z-index: var(--z-header);
        top: var(--panel-top, var(--header-h)); left: 0; right: 0;
        height: calc(100vh - var(--panel-top, var(--header-h)));
        height: calc(100dvh - var(--panel-top, var(--header-h)));
        overflow-y: auto; overscroll-behavior: contain;
        display: flex; flex-direction: column;
        padding: var(--space-2) var(--gutter) calc(var(--space-6) + env(safe-area-inset-bottom));
        background: var(--white);
        border-top: 1px solid var(--line);
    }
    .nav__panel[hidden] { display: none; }
    .nav__list { display: grid; }
    .nav__list > li { border-bottom: 1px solid var(--line); }
    .nav__link { flex: 1; min-height: 56px; padding: var(--space-3) 0; font-size: var(--step-1); }
    .nav__link:is([aria-current="page"], .is-active)::before {
        content: ""; position: absolute; left: calc(-1 * var(--gutter)); top: var(--space-3); bottom: var(--space-3);
        width: 3px; background: var(--blue);
    }
    .nav__sub { width: 48px; height: 48px; margin-right: calc(-1 * var(--space-3)); border-radius: var(--r-s); }
    .nav__sub .icon { width: 20px; height: 20px; }
    .nav__menu { padding: 0 0 var(--space-4); }
    .nav__menu[hidden] { display: none; }
    .nav__menu-list { display: grid; gap: 0; padding-left: var(--space-4); border-left: 2px solid var(--line); }
    .nav__menu-list a { padding: var(--space-2) 0; min-height: 44px; align-content: center; }
    .nav__menu-list small { display: none; }
    .nav__menu-name { font-weight: 600; color: var(--text-soft); }
    .nav__menu-all { display: none; }
    .nav__actions { flex-direction: column; align-items: stretch; margin-top: auto; padding-top: var(--space-8); }
    .nav__actions .btn { width: 100%; min-height: 52px; }
    @media (prefers-reduced-motion: no-preference) {
        .nav__panel:not([hidden]) { transition: opacity var(--dur) var(--ease), translate var(--dur) var(--ease); }
        @starting-style { .nav__panel:not([hidden]) { opacity: 0; translate: 0 -8px; } }
    }
}

/* Grand écran : navigation complète, sous-menu au survol ou au clic */
@media (min-width: 1240px) {
    .nav__toggle { display: none; }
    .nav { align-self: stretch; display: flex; }
    .nav__panel, .nav__panel[hidden] { display: flex !important; align-items: stretch; gap: var(--space-6); }
    .nav__list { display: flex; align-items: stretch; }
    .nav__list > li { position: relative; display: flex; align-items: center; }
    .nav__list > li > .nav__split { align-self: stretch; }
    .nav__link { align-self: stretch; padding: 0 var(--space-3); font-size: 0.9375rem; }
    /* Indicateur : filet de 2 px posé sur la bordure basse du header */
    .nav__link::after {
        content: ""; position: absolute; left: var(--space-3); right: var(--space-3); bottom: -1px;
        height: 2px; background: var(--blue);
        transform: scaleX(0); transform-origin: left center;
        transition: transform var(--dur-slow) var(--ease);
    }
    .nav__link:is([aria-current="page"], .is-active)::after { transform: scaleX(1); }
    .nav__item--dropdown .nav__link { padding-right: var(--space-1); }
    .nav__item--dropdown .nav__link::after { right: calc(-1 * 24px); }
    .nav__sub { width: 24px; height: 40px; margin-right: var(--space-2); border-radius: var(--r-xs); }
    .nav__menu {
        position: absolute; left: calc(-1 * var(--space-2)); top: 100%; z-index: 1;
        width: 392px;
        padding: var(--space-2);
        background: var(--white);
        border: 1px solid var(--line);
        border-radius: 0 0 var(--r-m) var(--r-m);
        box-shadow: var(--shadow-float);
    }
    .nav__menu[hidden] { display: none; }
    .nav__menu-list a { padding: var(--space-3) var(--space-3); border-radius: var(--r-s); transition: background-color var(--dur-fast); }
    .nav__menu-list a:hover { background: var(--mist); }
    .nav__menu-all { margin: var(--space-1) 0 0; padding: var(--space-3) var(--space-3) var(--space-2); border-top: 1px solid var(--line); }
    .nav__menu-all .link { font-size: var(--step--1); }
    .nav__actions { align-self: center; }
    .nav__actions--mobile { display: none; }
    .nav__actions .btn { min-height: 44px; padding-inline: var(--space-5); font-size: 0.9375rem; }
    @media (prefers-reduced-motion: no-preference) {
        .nav__menu:not([hidden]) { transition: opacity var(--dur-fast) var(--ease), translate var(--dur-fast) var(--ease); }
        @starting-style { .nav__menu:not([hidden]) { opacity: 0; translate: 0 -4px; } }
    }
}
@media (min-width: 1240px) and (max-width: 1359.98px) {
    .nav__panel, .nav__panel[hidden] { gap: var(--space-4); }
    .nav__link { padding-inline: 10px; }
    .nav__link::after { left: 10px; right: 10px; }
    .nav__item--dropdown .nav__link { padding-right: var(--space-1); }
}

/* Sans JavaScript : panneau affiché dans le flux, sous-menu au survol */
@media (scripting: none) {
    .nav__sub { pointer-events: none; }
    .nav__item--dropdown:is(:hover, :focus-within) .nav__menu[hidden] { display: block; }
}
@media (scripting: none) and (max-width: 1239.98px) {
    .header { position: relative; }
    .header__inner { flex-wrap: wrap; }
    .nav__toggle, .header__cta, .nav__sub { display: none; }
    .nav { flex: 1 0 100%; border-top: 1px solid var(--line); }
    .nav__panel[hidden] { position: static; display: block; height: auto; padding: 0 0 var(--space-4); border: 0; }
    .nav__item--dropdown:is(:hover, :focus-within) .nav__menu[hidden] { display: none; }
}
