/* =========================================================================
   UStudyGuide — Design System v3 « Guide »
   Le site se lit comme un guide imprimé : typographie sérif de publication,
   sommaire collant, chapitres numérotés (§), listes réglées et marginalia.
   Palette strictement issue du logo (bleu #0072B0, rouge #CC1C1B) ; les fonds
   sombres sont des bleus profonds, jamais du noir.
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. Tokens
   ------------------------------------------------------------------------- */
:root {
    /* Marque — échantillonnée sur le logo */
    --c-blue: #0072b0;
    --c-blue-700: #005a8d;
    --c-blue-900: #084a6d;
    --c-blue-400: #55b3e2;
    --c-blue-200: #bde3f5;
    --c-blue-50: #eaf5fb;

    --c-red: #cc1c1b;
    --c-red-700: #a51513;
    --c-red-50: #fdecea;

    /* Vert réservé au statut « disponible ». */
    --c-ok: #12a87a;

    /* Fonds profonds : bleu ciel soutenu, pas de noir */
    --ink: #0f5074;
    --ink-2: #14648f;
    --ink-line: rgba(255, 255, 255, 0.2);
    --on-ink: #f4fafe;
    --on-ink-soft: rgba(240, 250, 255, 0.82);
    --on-ink-faint: rgba(240, 250, 255, 0.6);

    --paper: #faf8f3;
    --paper-2: #f2eee4;
    --paper-3: #e9e3d5;
    --white: #ffffff;

    --text: #123243;
    --text-soft: #4a6675;
    --text-faint: #839aa6;
    --rule: #ded7c8;
    --rule-soft: #ece7dc;

    /* Typographie */
    --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
    --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    --r-xs: 6px;
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-pill: 999px;

    --sh-xs: 0 1px 2px rgba(18, 50, 67, 0.05);
    --sh-sm: 0 2px 10px rgba(18, 50, 67, 0.07);
    --sh-md: 0 12px 30px -12px rgba(18, 50, 67, 0.22);
    --sh-lg: 0 30px 60px -24px rgba(12, 60, 90, 0.45);

    --container: 1180px;
    --container-wide: 1320px;
    --measure: 66ch;
    --header-h: 78px;
    --gutter: 1.5rem;
    --rail: 186px;
    --hang: 5.25rem;

    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --t-fast: 0.16s var(--ease);
    --t: 0.28s var(--ease);

    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

/* -------------------------------------------------------------------------
   2. Reset & base
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
body.is-locked { overflow: hidden; }

img, svg, video { max-width: 100%; display: block; }
img { height: auto; }
svg { width: 1.25em; height: 1.25em; flex: none; }
svg use { pointer-events: none; }

button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }

h1, h2, h3, h4 {
    margin: 0 0 0.4em;
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.018em;
    color: inherit;
    text-wrap: balance;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--c-blue); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--c-blue-700); }

ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 0; }

::selection { background: var(--c-blue); color: #fff; }

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

.skip-link {
    position: absolute;
    left: 1rem; top: -100px;
    z-index: 999;
    background: var(--white);
    color: var(--text);
    padding: 0.75rem 1.25rem;
    border-radius: var(--r-sm);
    box-shadow: var(--sh-md);
    font-weight: 600;
    transition: top var(--t);
}
.skip-link:focus { top: 1rem; }

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

/* -------------------------------------------------------------------------
   3. Typographie éditoriale
   ------------------------------------------------------------------------- */
.display-xl {
    font-size: clamp(2.6rem, 7vw, 5.6rem);
    font-weight: 600;
    line-height: 0.98;
    letter-spacing: -0.028em;
}
.display-lg { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 600; line-height: 1.04; letter-spacing: -0.024em; }
.display-md { font-size: clamp(1.75rem, 3.1vw, 2.55rem); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; }
.display-sm { font-size: clamp(1.35rem, 2.1vw, 1.75rem); font-weight: 600; line-height: 1.18; letter-spacing: -0.016em; }

.lede {
    font-family: var(--font-display);
    font-size: clamp(1.12rem, 1.5vw, 1.32rem);
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: -0.006em;
    color: var(--text-soft);
    max-width: var(--measure);
}
.lede--wide { max-width: 74ch; }

/* Micro-étiquette monospace, omniprésente dans le système */
.label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-faint);
}
.label--blue { color: var(--c-blue); }
.label--red { color: var(--c-red); }
.label--light { color: var(--c-blue-200); }

/* Trait tracé à la main, rouge de la charte */
.hl { font-style: normal; position: relative; display: inline-block; color: inherit; }
.hl::after {
    content: '';
    position: absolute;
    left: -0.05em; right: -0.05em;
    bottom: -0.09em;
    height: 0.28em;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 20' preserveAspectRatio='none'%3E%3Cpath d='M4 13.5C58 6 105 15.5 152 10.5 199 5.5 245 12 296 6.5' fill='none' stroke='%23CC1C1B' stroke-width='7' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
    pointer-events: none;
}
.hl--blue::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 20' preserveAspectRatio='none'%3E%3Cpath d='M4 13.5C58 6 105 15.5 152 10.5 199 5.5 245 12 296 6.5' fill='none' stroke='%230072B0' stroke-width='7' stroke-linecap='round'/%3E%3C/svg%3E");
}
.hl--light::after { filter: saturate(1.4) brightness(1.35); }

.mono { font-family: var(--font-mono); font-size: 0.92em; }
.serif { font-family: var(--font-display); }
.text-center { text-align: center; }

/* Lettrine */
.dropcap::first-letter {
    float: left;
    font-family: var(--font-display);
    font-size: 3.5em;
    line-height: 0.82;
    font-weight: 600;
    padding: 0.06em 0.12em 0 0;
    color: var(--c-blue);
}

/* -------------------------------------------------------------------------
   4. Layout du document
   ------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}
.container--wide { max-width: var(--container-wide); }
.container--prose { max-width: 720px; }

/* Grille maîtresse : rail de sommaire + corps du document */
.docgrid {
    display: grid;
    grid-template-columns: var(--rail) minmax(0, 1fr);
    gap: clamp(2rem, 4vw, 4rem);
    align-items: start;
}

.sommaire {
    position: sticky;
    top: calc(var(--header-h) + 2.5rem);
    padding-top: clamp(3rem, 5vw, 4.5rem);
}
.sommaire__t {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-faint);
    padding-bottom: 0.75rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--rule);
}
.sommaire__list { list-style: none; margin: 0; padding: 0; }
.sommaire__link {
    display: grid;
    grid-template-columns: 2.1rem 1fr;
    gap: 0.4rem;
    align-items: baseline;
    padding: 0.42rem 0;
    font-size: 0.82rem;
    line-height: 1.35;
    color: var(--text-faint);
    transition: color var(--t-fast);
}
.sommaire__link i {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-style: normal;
    letter-spacing: 0.04em;
}
.sommaire__link:hover { color: var(--text); }
.sommaire__link.is-active { color: var(--c-red); }
.sommaire__foot { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--rule); }

/* Chapitre */
.chapter {
    padding-block: clamp(3rem, 5.5vw, 5rem);
    border-top: 1px solid var(--rule);
    scroll-margin-top: calc(var(--header-h) + 1rem);
}
.chapter:first-child { border-top: 0; padding-top: clamp(2.5rem, 4vw, 3.5rem); }

.chapter__head {
    display: grid;
    grid-template-columns: var(--hang) minmax(0, 1fr);
    gap: 1.5rem;
    margin-bottom: clamp(2rem, 3.5vw, 3rem);
}
.chapter__num {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    color: var(--c-red);
    padding-top: 0.55rem;
    margin: 0;
}
.chapter__title { margin: 0 0 0.5rem; }
.chapter__kicker {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 0.9rem;
}

/* Bloc suspendu générique : contenu aligné sur la colonne principale */
.hang { display: grid; grid-template-columns: var(--hang) minmax(0, 1fr); gap: 1.5rem; }
.hang__side { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; color: var(--text-faint); }

.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; }
.stack > * + * { margin-top: 1.25rem; }

/* Encart en marge */
.note {
    border-left: 2px solid var(--c-red);
    padding-left: 0.9rem;
    font-size: 0.79rem;
    line-height: 1.5;
    color: var(--text-soft);
}
.note b {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--c-red);
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.callout {
    background: var(--white);
    border: 1px solid var(--rule);
    border-left: 3px solid var(--c-blue);
    padding: 1.15rem 1.35rem;
    font-size: 0.96rem;
    color: var(--text-soft);
}
.callout strong { color: var(--text); }

/* -------------------------------------------------------------------------
   5. Boutons
   ------------------------------------------------------------------------- */
.btn {
    --btn-bg: var(--text);
    --btn-fg: var(--white);
    --btn-bd: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.74rem 1.4rem;
    border: 1px solid var(--btn-bd);
    border-radius: var(--r-pill);
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-family: var(--font-sans);
    font-size: 0.93rem;
    font-weight: 600;
    letter-spacing: -0.008em;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: transform var(--t-fast), box-shadow var(--t), background var(--t-fast),
                color var(--t-fast), border-color var(--t-fast);
}
.btn:hover { color: var(--btn-fg); transform: translateY(-2px); box-shadow: var(--sh-md); }
.btn:active { transform: translateY(0); }
.btn__ico { width: 1.05em; height: 1.05em; transition: transform var(--t); }
.btn:hover .btn__ico { transform: translateX(3px); }

.btn--primary { --btn-bg: var(--c-blue); --btn-fg: #fff; }
.btn--primary:hover { --btn-bg: var(--c-blue-700); }
.btn--accent { --btn-bg: var(--c-red); --btn-fg: #fff; }
.btn--accent:hover { --btn-bg: var(--c-red-700); }
.btn--light { --btn-bg: var(--white); --btn-fg: var(--text); }
.btn--light:hover { --btn-fg: var(--c-blue); }
.btn--outline { --btn-bg: transparent; --btn-fg: var(--text); --btn-bd: var(--rule); }
.btn--outline:hover { --btn-bd: var(--text); --btn-bg: var(--white); }
.btn--outline-light { --btn-bg: transparent; --btn-fg: var(--on-ink); --btn-bd: rgba(255,255,255,0.4); }
.btn--outline-light:hover { --btn-bg: rgba(255,255,255,0.14); --btn-bd: rgba(255,255,255,0.75); --btn-fg: #fff; }
.btn--lg { padding: 0.92rem 1.75rem; font-size: 1rem; }
.btn--sm { padding: 0.52rem 1rem; font-size: 0.85rem; }
.btn--block { width: 100%; }

.arrowlink {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--c-blue);
}
.arrowlink svg { width: 1.05em; height: 1.05em; transition: transform var(--t); }
.arrowlink:hover svg { transform: translateX(4px); }
.arrowlink--light { color: var(--c-blue-200); }
.arrowlink--light:hover { color: #fff; }
.arrowlink--red { color: var(--c-red); }
.arrowlink--red:hover { color: var(--c-red-700); }

/* -------------------------------------------------------------------------
   6. Pastilles d'état
   ------------------------------------------------------------------------- */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.22rem 0.6rem;
    border: 1px solid var(--rule);
    border-radius: var(--r-pill);
    background: var(--white);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-soft);
    white-space: nowrap;
}
.pill--glass {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--on-ink);
}
.pill--live { border-color: rgba(18, 168, 122, 0.4); color: #0b7d5b; }
.pill__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c-ok); }
.pill__dot--soon { background: var(--c-red); }
.pill__dot--live { box-shadow: 0 0 0 3px rgba(18, 168, 122, 0.22); }

/* -------------------------------------------------------------------------
   7. En-tête
   Filet de marque en bord haut, logo « sticker » incliné, capsule flottante
   au défilement, index mono + soulignement rouge.
   ------------------------------------------------------------------------- */
.topline {
    position: fixed;
    inset: 0 0 auto 0;
    height: 3px;
    z-index: 210;
    background: linear-gradient(90deg, var(--c-blue-900), var(--c-blue) 30%, var(--c-blue-400) 52%, var(--c-red) 76%, var(--c-red-700));
}

.site-header {
    position: fixed;
    inset: 3px 0 auto 0;
    z-index: 200;
    padding-inline: var(--gutter);
    pointer-events: none;
}
.site-header > * { pointer-events: auto; }

.site-header__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    width: 100%;
    max-width: var(--container-wide);
    margin: 13px auto 0;
    height: 62px;
    padding-right: 0.4rem;
    border: 1px solid transparent;
    border-radius: var(--r-pill);
    background: transparent;
    transition: max-width var(--t), background var(--t), border-color var(--t),
                box-shadow var(--t), padding var(--t);
}
.site-header.is-scrolled .site-header__bar {
    max-width: 1080px;
    padding-left: 0.4rem;
    background: rgba(13, 74, 108, 0.97);
    border-color: rgba(189, 227, 245, 0.3);
    box-shadow: 0 18px 40px -22px rgba(9, 48, 71, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.brand { display: inline-flex; align-items: center; flex: none; }
.brand__plate {
    display: block;
    background: var(--white);
    border-radius: 12px;
    padding: 0.4rem 0.62rem;
    box-shadow: 0 10px 24px -12px rgba(9, 48, 71, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.5);
    transform: rotate(-2.5deg);
    transition: transform var(--t);
}
.brand:hover .brand__plate { transform: rotate(0deg) scale(1.03); }
.brand__plate img { height: 26px; width: auto; }

.mainnav { display: flex; }
.mainnav__list { display: flex; align-items: center; gap: 0.1rem; list-style: none; margin: 0; padding: 0; }
.mainnav__item { position: relative; }
.mainnav__link {
    position: relative;
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    padding: 0.55rem 0.8rem 0.6rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--on-ink-soft);
    border-radius: var(--r-sm);
    transition: color var(--t-fast);
}
.mainnav__idx {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.06em;
    color: var(--c-blue-200);
    opacity: 0.9;
    transition: color var(--t-fast), opacity var(--t-fast);
}
.mainnav__link::after {
    content: '';
    position: absolute;
    left: 0.8rem; right: 0.8rem;
    bottom: 0.3rem;
    height: 2px;
    border-radius: 2px;
    background: var(--c-red);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform var(--t);
}
.mainnav__link:hover,
.mainnav__item.is-open > .mainnav__link,
.mainnav__link[aria-current="page"] { color: #fff; }
.mainnav__link:hover .mainnav__idx,
.mainnav__item.is-open > .mainnav__link .mainnav__idx { color: #ffd7d5; opacity: 1; }
.mainnav__link:hover::after,
.mainnav__item.is-open > .mainnav__link::after,
.mainnav__link[aria-current="page"]::after { transform: scaleX(1); }
.mainnav__caret { width: 11px; height: 11px; align-self: center; transition: transform var(--t); opacity: 0.7; }
.mainnav__item.is-open .mainnav__caret { transform: rotate(180deg); }

.header-actions { display: flex; align-items: center; gap: 0.5rem; flex: none; }

/* Méga-panneau : mini-sommaire de l'écosystème */
.megapanel {
    position: absolute;
    top: calc(100% + 16px);
    left: 50%;
    width: min(92vw, 780px);
    transform: translate(-50%, 12px);
    background: var(--white);
    border-radius: var(--r-lg);
    box-shadow: 0 40px 80px -36px rgba(12, 60, 90, 0.5), 0 0 0 1px var(--rule-soft);
    padding: 1.15rem 1rem 1rem;
    display: grid;
    grid-template-columns: 1.65fr 1fr;
    gap: 0.85rem;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--t), transform var(--t), visibility var(--t);
}
.megapanel::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--c-blue), var(--c-blue-400) 55%, var(--c-red));
}
.mainnav__item.is-open .megapanel,
.mainnav__item:focus-within .megapanel {
    opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0);
}
@media (hover: hover) and (min-width: 981px) {
    .mainnav__item:hover .megapanel { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, 0); }
    .mainnav__item:hover > .mainnav__link { color: #fff; }
    .mainnav__item:hover > .mainnav__link::after { transform: scaleX(1); }
    .mainnav__item:hover .mainnav__caret { transform: rotate(180deg); }
    .mainnav__item[data-dropdown]::after { content: ''; position: absolute; top: 100%; left: 0; right: 0; height: 20px; }
}

.megapanel__list { display: grid; }
.megaitem {
    display: grid;
    grid-template-columns: 2.2rem 1fr auto;
    gap: 0.75rem;
    align-items: baseline;
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid var(--rule-soft);
    color: var(--text);
    transition: background var(--t-fast), padding var(--t-fast);
}
.megaitem:last-child { border-bottom: 0; }
.megaitem:hover { background: var(--paper); color: var(--text); padding-left: 0.85rem; }
.megaitem__n { font-family: var(--font-mono); font-size: 0.66rem; color: var(--c-blue); }
.megaitem:hover .megaitem__n { color: var(--c-red); }
.megaitem__t { font-family: var(--font-display); font-weight: 600; font-size: 1rem; line-height: 1.25; }
.megaitem__d { display: block; font-size: 0.76rem; color: var(--text-faint); line-height: 1.45; margin-top: 0.1rem; }
.megaitem__flag {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-faint);
    white-space: nowrap;
}
.megaitem__flag--live { color: #0b7d5b; }

.megapanel__aside {
    background: var(--ink);
    color: var(--on-ink);
    border-radius: var(--r-md);
    padding: 1.3rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.6rem;
    background-image: radial-gradient(125% 95% at 100% 0%, rgba(85, 179, 226, 0.55), transparent 62%),
                      radial-gradient(90% 70% at 0% 100%, rgba(204, 28, 27, 0.3), transparent 65%);
}
.megapanel__aside h4 { font-size: 1.1rem; margin: 0; color: #fff; }
.megapanel__aside p { font-size: 0.79rem; color: var(--on-ink-soft); margin: 0; }

.burger {
    display: none;
    width: 44px; height: 44px;
    border-radius: var(--r-pill);
    background: var(--c-red);
    cursor: pointer;
    place-items: center;
    box-shadow: 0 10px 22px -12px rgba(204, 28, 27, 0.9);
    transition: background var(--t-fast);
}
.burger:hover { background: var(--c-red-700); }
.burger span { display: block; width: 16px; height: 2px; background: #fff; border-radius: 2px; transition: transform var(--t), opacity var(--t-fast); }
.burger span + span { margin-top: 4px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.drawer {
    position: fixed;
    inset: 0;
    z-index: 190;
    background: var(--ink);
    background-image:
        radial-gradient(90% 55% at 85% 0%, rgba(85, 179, 226, 0.45), transparent 62%),
        radial-gradient(70% 45% at 0% 100%, rgba(204, 28, 27, 0.28), transparent 66%);
    padding: calc(var(--header-h) + 1.5rem) var(--gutter) 2.5rem;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity var(--t), transform var(--t), visibility var(--t);
}
.drawer.is-open { opacity: 1; visibility: visible; transform: none; }
.drawer__group + .drawer__group { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--ink-line); }
.drawer__label {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--c-blue-200);
    margin-bottom: 0.8rem;
}
.drawer__link {
    display: flex;
    align-items: baseline;
    gap: 0.7rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--ink-line);
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 6.5vw, 1.9rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--on-ink);
}
.drawer__link .idx { font-family: var(--font-mono); font-size: 0.64rem; font-weight: 400; color: #ffd7d5; }
.drawer__link:hover { color: var(--c-blue-200); }
.drawer__link small {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 0.56rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--on-ink-faint);
    font-weight: 400;
}
.drawer__actions { display: grid; gap: 0.6rem; margin-top: 1.75rem; }

/* -------------------------------------------------------------------------
   8. Masthead — couverture de publication
   ------------------------------------------------------------------------- */
.masthead {
    position: relative;
    background-color: var(--ink);
    background-image:
        radial-gradient(90% 130% at 88% -25%, rgba(140, 214, 245, 0.34), transparent 62%),
        radial-gradient(70% 95% at -12% 118%, rgba(204, 28, 27, 0.2), transparent 64%),
        linear-gradient(168deg, #1b6b95 0%, #0f5074 46%, #0c4364 100%);
    color: var(--on-ink);
    padding-top: calc(var(--header-h) + clamp(2rem, 4vw, 3.5rem));
    padding-bottom: clamp(2.5rem, 5vw, 4rem);
    overflow: hidden;
    isolation: isolate;
    border-style: solid;
    border-width: 0 0 4px;
    border-image: linear-gradient(90deg, var(--c-blue-900), var(--c-blue) 28%, var(--c-blue-400) 55%, var(--c-red) 82%, var(--c-red-700)) 1;
}
.masthead__grid {
    position: absolute;
    inset: 0;
    z-index: -3;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 64px 64px;
    opacity: 0.75;
}
.masthead__noise {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: var(--grain);
    opacity: 0.03;
}
.masthead h1 { color: #fff; }
.masthead .lede { color: var(--on-ink-soft); }

/* Ours : la ligne de métadonnées de la « publication » */
.runhead {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 1.1rem;
    padding-bottom: 1rem;
    margin-bottom: clamp(1.75rem, 3vw, 2.75rem);
    border-bottom: 1px solid var(--ink-line);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--on-ink-faint);
}
.runhead b { color: var(--c-blue-200); font-weight: 500; }
.runhead__sep { opacity: 0.4; }
.runhead__end { margin-left: auto; display: inline-flex; align-items: center; gap: 0.45rem; color: var(--on-ink-soft); }
.runhead__end .dot { width: 6px; height: 6px; border-radius: 50%; background: #4ce0b0; }

/* Titre de couverture */
.cover__title { margin: 0 0 clamp(1.5rem, 3vw, 2.25rem); max-width: 20ch; }
.cover__rule { border-top: 1px solid var(--ink-line); margin-bottom: clamp(1.75rem, 3vw, 2.5rem); }
.cover__body {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: clamp(2rem, 4vw, 4rem);
    align-items: start;
}
.cover__aside { display: grid; gap: 1.5rem; }

.masthead--page .cover__title { max-width: 22ch; }
.masthead--page .cover__body { grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); align-items: end; }

.speclist { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.speclist li {
    display: grid;
    grid-template-columns: 1.4rem 1fr;
    gap: 0.7rem;
    align-items: start;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--ink-line);
    font-size: 0.86rem;
    color: var(--on-ink-soft);
}
.speclist li:first-child { border-top: 1px solid var(--ink-line); }
.speclist svg { width: 15px; height: 15px; color: var(--c-blue-200); margin-top: 0.22rem; }

/* Cadre « application » */
.appframe {
    position: relative;
    border-radius: var(--r-md);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.24);
    padding: 9px;
    box-shadow: 0 40px 70px -34px rgba(6, 40, 60, 0.9);
}
.appframe__bar { display: flex; align-items: center; gap: 6px; padding: 3px 5px 9px; }
.appframe__bar i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.32); }
.appframe__url {
    margin-left: 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.64rem;
    color: var(--on-ink-soft);
    background: rgba(255, 255, 255, 0.14);
    border-radius: var(--r-pill);
    padding: 0.12rem 0.6rem;
}
.appframe img { border-radius: var(--r-xs); width: 100%; }
.appframe__caption {
    margin-top: 0.7rem;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--on-ink-faint);
}

/* -------------------------------------------------------------------------
   9. Bandeau d'édition (mots-clés réglés)
   ------------------------------------------------------------------------- */
.editionband {
    background: var(--paper-2);
    border-bottom: 1px solid var(--rule);
    padding: 0.85rem 0;
}
.editionband__track {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem 1.4rem;
}
.editionband__item {
    display: inline-flex;
    align-items: center;
    gap: 1.4rem;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-soft);
    white-space: nowrap;
}
.editionband__item:not(:last-child)::after { content: '·'; color: var(--c-red); }

/* -------------------------------------------------------------------------
   10. Entrées éditoriales (les briques de l'écosystème)
   ------------------------------------------------------------------------- */
.entries { border-top: 1px solid var(--rule); }

.entry {
    display: grid;
    grid-template-columns: var(--hang) minmax(0, 1fr) minmax(0, 16rem);
    gap: 1.25rem clamp(1.25rem, 2.5vw, 2.25rem);
    align-items: start;
    padding: clamp(1.5rem, 2.6vw, 2.25rem) 0;
    border-bottom: 1px solid var(--rule);
    color: var(--text);
    position: relative;
    transition: background var(--t-fast);
}
.entry::before {
    content: '';
    position: absolute;
    inset: 0 -1.25rem;
    background: var(--white);
    opacity: 0;
    z-index: -1;
    transition: opacity var(--t-fast);
}
.entry:hover { color: var(--text); }
.entry:hover::before { opacity: 1; }

.entry__n {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    color: var(--c-blue);
    padding-top: 0.5rem;
    transition: color var(--t-fast);
}
.entry:hover .entry__n { color: var(--c-red); }
.entry__title { font-size: clamp(1.3rem, 2vw, 1.7rem); margin: 0 0 0.45rem; }
.entry__body { font-size: 0.96rem; color: var(--text-soft); margin: 0 0 0.9rem; max-width: 56ch; }
.entry__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.entry__side { display: grid; gap: 0.75rem; justify-items: start; padding-top: 0.35rem; }
.entry__tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.entry__tag {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-faint);
    border: 1px solid var(--rule);
    border-radius: var(--r-pill);
    padding: 0.15rem 0.55rem;
}

/* -------------------------------------------------------------------------
   11. Index réglé (modules, listes de contenu)
   ------------------------------------------------------------------------- */
.idx { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.idx__row {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr) minmax(0, 20rem);
    gap: 0.6rem clamp(1rem, 2vw, 2rem);
    align-items: baseline;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--rule-soft);
    position: relative;
    transition: padding var(--t-fast);
}
.idx__row:hover { padding-left: 0.6rem; }
.idx__row:hover .idx__n { color: var(--c-red); }
.idx__n { font-family: var(--font-mono); font-size: 0.72rem; color: var(--c-blue); transition: color var(--t-fast); }
.idx__label {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-size: 1.08rem;
    font-weight: 600;
    letter-spacing: -0.012em;
}
.idx__label::after {
    content: '';
    flex: 1 1 auto;
    min-width: 1.5rem;
    border-bottom: 1px dotted var(--rule);
    transform: translateY(-0.28em);
}
.idx__desc { font-size: 0.86rem; color: var(--text-soft); }
.idx__row--accent .idx__label, .idx__row--accent .idx__n { color: var(--c-red); }
a.idx__row { color: var(--text); }
a.idx__row:hover { color: var(--c-blue); }

/* -------------------------------------------------------------------------
   12. Figures
   ------------------------------------------------------------------------- */
.figure { margin: 0; }
.figure img { width: 100%; }
.figure--bleed img { max-height: 60vh; object-fit: cover; }
.figcaption {
    display: grid;
    grid-template-columns: var(--hang) minmax(0, 1fr);
    gap: 1.5rem;
    padding-top: 0.85rem;
    margin-top: 0.85rem;
    border-top: 1px solid var(--rule);
    font-size: 0.84rem;
    color: var(--text-soft);
}
.figcaption b {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--c-red);
    font-weight: 500;
}
.figcaption p { max-width: 62ch; margin: 0; }

/* Pleine largeur, hors grille */
.bleed { width: 100vw; margin-left: 50%; transform: translateX(-50%); }

/* Blocs graphiques réutilisables */
.plate {
    background: var(--white);
    border: 1px solid var(--rule);
    padding: clamp(1.25rem, 2.4vw, 2rem);
    display: grid;
    place-items: center;
    min-height: 240px;
}
.plate--blue { background: linear-gradient(160deg, #eaf5fb, #dceefa); }
.plate--ink { background: var(--ink); border-color: transparent; color: var(--on-ink); }

.codeblock {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 2;
    background: var(--ink-2);
    color: var(--on-ink);
    border: 1px solid var(--ink-line);
    border-radius: var(--r-sm);
    padding: 1.3rem 1.5rem;
    width: 100%;
    overflow-x: auto;
    margin: 0;
}
.codeblock .m { color: #b8ecff; }
.codeblock .c { color: var(--on-ink-faint); }

.domainlist { display: grid; gap: 0.5rem; width: 100%; max-width: 330px; }
.domainlist div {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    background: var(--white);
    border: 1px solid var(--rule);
    border-radius: var(--r-xs);
    padding: 0.62rem 0.85rem;
    color: var(--c-blue-700);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.domainlist div::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c-ok); flex: none; }
.domainlist div:last-child { color: var(--text-faint); background: transparent; border-style: dashed; }
.domainlist div:last-child::before { background: var(--rule); }

.idcard {
    width: min(320px, 100%);
    aspect-ratio: 1.6 / 1;
    border-radius: var(--r-sm);
    padding: 1.35rem;
    color: #fff;
    background: linear-gradient(135deg, #2c9bd4, var(--c-blue-900) 78%);
    box-shadow: var(--sh-lg);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transform: rotate(-3deg);
}
.idcard::before {
    content: '';
    position: absolute;
    inset: -40% -20% auto auto;
    width: 230px; height: 230px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
}
.idcard__label { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.8; }
.idcard__name { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; }
.idcard__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; position: relative; }
.idcard__id { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; }
.idcard__qr { width: 50px; height: 50px; border-radius: 6px; background: #fff; padding: 5px; flex: none; }
.idcard__qr span {
    display: block; width: 100%; height: 100%;
    background-image:
        repeating-linear-gradient(0deg, #0d4a6b 0 3px, transparent 3px 6px),
        repeating-linear-gradient(90deg, #0d4a6b 0 3px, transparent 3px 6px);
}

.phone {
    width: 248px;
    max-width: 100%;
    aspect-ratio: 1 / 2;
    background: var(--ink);
    border-radius: 34px;
    padding: 10px;
    box-shadow: var(--sh-lg), 0 0 0 1px rgba(255, 255, 255, 0.15);
    flex: none;
}
.phone__screen {
    height: 100%;
    background: var(--paper);
    border-radius: 25px;
    padding: 1.4rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    overflow: hidden;
}
.phone__brand { font-family: var(--font-display); font-weight: 700; color: var(--c-blue); text-align: center; font-size: 0.98rem; margin-bottom: 0.3rem; }
.phone__row {
    background: var(--white);
    border: 1px solid var(--rule-soft);
    border-radius: var(--r-xs);
    padding: 0.55rem 0.65rem;
    font-size: 0.74rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.phone__row b { font-weight: 600; }
.phone__row span { color: var(--text-faint); }
.phone__av { width: 22px; height: 22px; border-radius: 50%; background: var(--c-blue-50); color: var(--c-blue); display: grid; place-items: center; font-size: 0.58rem; font-weight: 700; flex: none; }
.phone__label { font-family: var(--font-mono); font-size: 0.55rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-faint); margin: 0.25rem 0 0; }

.shelf { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; width: 100%; }
.shelf__item { background: var(--white); border: 1px solid var(--rule); padding: 0.7rem; }
.shelf__item:nth-child(even) { transform: translateY(1.5rem); }
.shelf__cover { height: 86px; margin-bottom: 0.55rem; background: var(--c-blue-50); }
.shelf__cover--red { background: var(--c-red-50); }
.shelf__cover--sand { background: var(--paper-3); }
.shelf__cover--sky { background: #ddeffa; }
.shelf__t { font-family: var(--font-display); font-size: 0.9rem; font-weight: 600; }
.shelf__p { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-faint); }

.post { background: var(--white); border: 1px solid var(--rule); padding: 1.15rem; width: 100%; max-width: 380px; }
.post__head { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.8rem; }
.post__av { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, #3ea9dd, var(--c-blue-900)); flex: none; }
.post__name { font-family: var(--font-display); font-size: 0.95rem; font-weight: 600; }
.post__meta { font-family: var(--font-mono); font-size: 0.64rem; color: var(--text-faint); }
.post__body { font-size: 0.88rem; margin-bottom: 0.8rem; }
.post__img { height: 118px; background: linear-gradient(135deg, var(--c-blue-50), #e6f0e7); margin-bottom: 0.6rem; }
.post__stats { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-faint); display: flex; gap: 1rem; }

.paylogos { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.paylogo { padding: 0.8rem 1.25rem; font-weight: 700; font-size: 0.92rem; border-radius: var(--r-xs); }
.paylogo--mtn { background: #ffcc00; color: #1a1a1a; }
.paylogo--orange { background: #ff6600; color: #fff; }
.paylogo--bank { background: var(--white); color: var(--text); border: 1px solid var(--rule); }

.flowsteps { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.flowstep {
    display: inline-flex; align-items: center; gap: 0.55rem;
    background: var(--white); border: 1px solid var(--rule);
    padding: 0.75rem 1.1rem; font-weight: 600; font-size: 0.9rem;
}
.flowstep svg { width: 17px; height: 17px; color: var(--c-blue); }
.flowarrow { color: var(--c-red); }

/* -------------------------------------------------------------------------
   13. Ligne de chiffres
   ------------------------------------------------------------------------- */
.figures {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}
.figures > div { padding: clamp(1.25rem, 2.2vw, 1.9rem) clamp(0.75rem, 1.5vw, 1.4rem); border-left: 1px solid var(--rule-soft); }
.figures > div:first-child { border-left: 0; padding-left: 0; }
.figures__v {
    font-family: var(--font-display);
    font-size: clamp(2.1rem, 4vw, 3.1rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--c-blue);
    margin-bottom: 0.5rem;
}
.figures__l { font-size: 0.85rem; color: var(--text-soft); margin: 0; }
.section--dark .figures { border-color: var(--ink-line); }
.section--dark .figures > div { border-left-color: var(--ink-line); }
.section--dark .figures__v { color: #fff; }
.section--dark .figures__l { color: var(--on-ink-soft); }

/* -------------------------------------------------------------------------
   14. Sections particulières
   ------------------------------------------------------------------------- */
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section--tight { padding: clamp(2rem, 3.5vw, 3rem) 0; }
.section--dark {
    background: var(--ink);
    background-image: linear-gradient(168deg, #1b6b95 0%, var(--ink) 55%, #0c4364 100%);
    color: var(--on-ink);
}
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark p { color: var(--on-ink-soft); }
.section--paper2 { background: var(--paper-2); }

.pullquote {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.8vw, 2.1rem);
    font-weight: 400;
    line-height: 1.28;
    letter-spacing: -0.015em;
    color: var(--text);
    margin: 0;
    max-width: 28ch;
}
.section--dark .pullquote { color: #fff; }
.pullquote em { font-style: italic; color: var(--c-blue); }
.section--dark .pullquote em { color: var(--c-blue-200); }

/* -------------------------------------------------------------------------
   15. Tarifs — tableau comparatif réglé
   ------------------------------------------------------------------------- */
.ratetable { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.ratetable th, .ratetable td { text-align: left; padding: 0.7rem 1rem; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
.ratetable thead th { border-bottom: 1px solid var(--rule); vertical-align: bottom; }
.ratetable tbody th { font-weight: 500; color: var(--text-soft); font-size: 0.9rem; }
.ratetable td { text-align: center; width: 20%; }
.ratetable th:first-child { width: 40%; }
.ratetable .col-hot { background: var(--white); }
.ratetable thead .col-hot { border-top: 3px solid var(--c-red); }
.ratetable tbody tr:last-child td, .ratetable tbody tr:last-child th { border-bottom: 0; }

.rate__name { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; margin: 0 0 0.15rem; }
.rate__pitch { font-size: 0.78rem; color: var(--text-faint); margin: 0 0 0.9rem; }
.rate__price { font-family: var(--font-display); font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.rate__unit { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.12em; color: var(--text-faint); display: block; margin-top: 0.4rem; }
.rate__flag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--c-red);
    margin-bottom: 0.35rem;
}
.yes { color: var(--c-ok); }
.no { color: var(--text-faint); }
.yes svg, .no svg { width: 17px; height: 17px; margin-inline: auto; }
.ratecards { display: none; }

/* -------------------------------------------------------------------------
   16. FAQ
   ------------------------------------------------------------------------- */
.faq { border-top: 1px solid var(--rule); }
.faq__item { border-bottom: 1px solid var(--rule); }
.faq__q {
    display: grid;
    grid-template-columns: var(--hang) minmax(0, 1fr) 1.5rem;
    gap: 1.5rem;
    align-items: baseline;
    padding: 1.1rem 0;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: clamp(1.05rem, 1.5vw, 1.2rem);
    font-weight: 600;
    list-style: none;
    transition: color var(--t-fast);
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q:hover { color: var(--c-blue); }
.faq__q .n { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 400; color: var(--c-red); }
.faq__q .sign { justify-self: end; font-family: var(--font-mono); font-size: 1rem; color: var(--text-faint); transition: transform var(--t); }
.faq__item[open] .faq__q .sign { transform: rotate(45deg); color: var(--c-red); }
.faq__a {
    display: grid;
    grid-template-columns: var(--hang) minmax(0, 1fr);
    gap: 1.5rem;
    padding-bottom: 1.4rem;
}
.faq__a p { grid-column: 2; color: var(--text-soft); font-size: 0.95rem; max-width: 62ch; margin: 0; }

/* -------------------------------------------------------------------------
   17. Colophon (appel à l'action)
   ------------------------------------------------------------------------- */
.colophon {
    background-color: var(--ink);
    background-image:
        radial-gradient(75% 130% at 90% -20%, rgba(140, 214, 245, 0.3), transparent 62%),
        linear-gradient(168deg, #1b6b95 0%, var(--ink) 55%, #0c4364 100%);
    color: var(--on-ink);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border-top: 4px solid transparent;
    border-image: linear-gradient(90deg, var(--c-blue-900), var(--c-blue) 28%, var(--c-blue-400) 55%, var(--c-red) 82%, var(--c-red-700)) 1;
}
.colophon__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
    gap: clamp(1.75rem, 4vw, 3.5rem);
    align-items: end;
    padding-block: clamp(2.75rem, 5.5vw, 4.5rem);
}
.colophon h2 { color: #fff; margin: 0 0 0.6rem; max-width: 18ch; }
.colophon p { color: var(--on-ink-soft); max-width: 46ch; margin: 0; }
.colophon__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 0.7rem; }
.colophon__note { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-ink-faint); }

/* -------------------------------------------------------------------------
   18. Pied de page
   ------------------------------------------------------------------------- */
.site-footer {
    background: var(--ink);
    background-image: linear-gradient(168deg, #17638d 0%, var(--ink) 55%, #0b3f5e 100%);
    color: var(--on-ink-soft);
    padding-top: clamp(2.5rem, 5vw, 4rem);
    overflow: hidden;
}
.footer__grid {
    display: grid;
    grid-template-columns: 1.6fr repeat(3, 1fr);
    gap: clamp(1.75rem, 3.5vw, 3rem);
    padding-bottom: 2.5rem;
}
.footer__logo { display: inline-block; padding: 0.45rem 0.7rem; border-radius: var(--r-sm); background: rgba(255, 255, 255, 0.96); margin-bottom: 1.1rem; }
.footer__logo img { width: auto; height: 32px; display: block; }
.footer__brand p { font-size: 0.88rem; color: var(--on-ink-soft); max-width: 34ch; }
.footer__social { display: flex; gap: 0.5rem; margin-top: 1.25rem; }
.footer__social a {
    width: 36px; height: 36px;
    display: grid; place-items: center;
    border-radius: 50%;
    border: 1px solid var(--ink-line);
    color: var(--on-ink-soft);
    transition: background var(--t-fast), color var(--t-fast);
}
.footer__social a:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
.footer__social svg { width: 16px; height: 16px; }
.footer__col h4 {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--on-ink-faint);
    padding-bottom: 0.6rem;
    margin-bottom: 0.85rem;
    border-bottom: 1px solid var(--ink-line);
}
.footer__col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.55rem; }
.footer__col a { font-size: 0.88rem; color: var(--on-ink-soft); }
.footer__col a:hover { color: #fff; }
.footer__bottom {
    border-top: 1px solid var(--ink-line);
    padding: 1.25rem 0 1.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.5rem;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--on-ink-faint);
}
.footer__wordmark {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.045em;
    font-size: clamp(3.5rem, 15vw, 13rem);
    line-height: 0.8;
    text-align: center;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.22);
    user-select: none;
    padding-bottom: 0.12em;
    pointer-events: none;
}

/* -------------------------------------------------------------------------
   19. Prose (pages légales)
   ------------------------------------------------------------------------- */
.prose { max-width: 68ch; font-size: 1.02rem; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 {
    font-size: clamp(1.3rem, 2vw, 1.65rem);
    margin-top: 2.4em;
    margin-bottom: 0.45em;
    padding-top: 1.4rem;
    border-top: 1px solid var(--rule);
}
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 { font-size: 1.12rem; margin-top: 1.8em; margin-bottom: 0.35em; }
.prose p, .prose li { color: var(--text-soft); }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: 0.35em; }
.prose strong { color: var(--text); }
.prose a { text-decoration: underline; text-underline-offset: 3px; }

/* -------------------------------------------------------------------------
   20. Contact
   ------------------------------------------------------------------------- */
.contact-card {
    display: grid;
    grid-template-columns: var(--hang) minmax(0, 1fr);
    gap: 1.5rem;
    padding: clamp(1.5rem, 2.6vw, 2.1rem) 0;
    border-bottom: 1px solid var(--rule);
}
.contact-card:first-of-type { border-top: 1px solid var(--rule); }
.contact-card h3 { font-size: 1.25rem; margin: 0 0 0.4rem; }
.contact-card p { font-size: 0.94rem; color: var(--text-soft); margin-bottom: 1.1rem; max-width: 56ch; }
.contact-card__n { font-family: var(--font-mono); font-size: 0.72rem; color: var(--c-red); padding-top: 0.4rem; }

.contact-panel {
    background: var(--ink);
    background-image: linear-gradient(168deg, #1b6b95 0%, var(--ink) 60%, #0c4364 100%);
    color: var(--on-ink);
    padding: clamp(1.5rem, 2.6vw, 2rem);
    position: sticky;
    top: calc(var(--header-h) + 2.5rem);
}
.contact-panel h3 { color: #fff; font-size: 1.2rem; margin: 0.9rem 0 0.5rem; }
.contact-panel > p { color: var(--on-ink-soft); font-size: 0.9rem; }
.contact-line { padding-top: 1.1rem; margin-top: 1.1rem; border-top: 1px solid var(--ink-line); }
.contact-line dt {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--on-ink-faint);
    margin-bottom: 0.3rem;
}
.contact-line dd { margin: 0; font-size: 1rem; font-weight: 600; color: #fff; display: flex; align-items: center; gap: 0.5rem; }
.contact-line dd a { color: #fff; display: inline-flex; align-items: center; gap: 0.5rem; }
.contact-line dd a:hover { color: var(--c-blue-200); }
.contact-line svg { width: 16px; height: 16px; opacity: 0.75; }

/* -------------------------------------------------------------------------
   21. Page d'erreur
   ------------------------------------------------------------------------- */
.errorcode {
    font-family: var(--font-mono);
    font-size: clamp(3rem, 12vw, 8rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--c-blue-200);
    margin: 0 0 1rem;
}

/* -------------------------------------------------------------------------
   22. Révélation au scroll
   ------------------------------------------------------------------------- */
[data-reveal] {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
    transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }
.no-js [data-reveal] { opacity: 1; transform: none; }

/* -------------------------------------------------------------------------
   23. Responsive
   ------------------------------------------------------------------------- */
@media (max-width: 1180px) {
    :root { --rail: 160px; }
    .entry { grid-template-columns: var(--hang) minmax(0, 1fr); }
    .entry__side { grid-column: 2; }
}

@media (max-width: 1080px) {
    .docgrid { grid-template-columns: 1fr; gap: 0; }
    .sommaire { display: none; }
    .footer__grid { grid-template-columns: 1fr 1fr 1fr; }
    .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 980px) {
    :root { --header-h: 70px; --hang: 3.25rem; }

    .site-header__bar { height: 54px; margin-top: 10px; padding-right: 0.3rem; }
    .site-header.is-scrolled .site-header__bar { padding-left: 0.3rem; }
    .brand__plate { padding: 0.32rem 0.5rem; }
    .brand__plate img { height: 22px; }
    .mainnav, .header-actions .btn--outline-light { display: none; }
    .burger { display: grid; }

    .megapanel { width: min(94vw, 620px); grid-template-columns: 1fr; }
    .megapanel__aside { display: none; }

    .cover__body { grid-template-columns: 1fr; gap: 2rem; }
    .masthead--page .cover__body { grid-template-columns: 1fr; }
    .colophon__inner { grid-template-columns: 1fr; align-items: start; }
    .contact-panel { position: static; }
    .figures { grid-template-columns: 1fr 1fr; }
    .figures > div:nth-child(3) { border-left: 0; padding-left: 0; }
    .figures > div:nth-child(-n+2) { border-bottom: 1px solid var(--rule-soft); }
}

@media (max-width: 720px) {
    :root { --gutter: 1.15rem; --hang: 0px; }

    .chapter__head, .hang, .figcaption, .faq__a { grid-template-columns: 1fr; gap: 0.5rem; }
    .chapter__num { padding-top: 0; }
    .faq__q { grid-template-columns: 1fr 1.5rem; gap: 0.75rem; }
    .faq__q .n { display: none; }
    .faq__a p { grid-column: 1; }

    .entry { grid-template-columns: 1fr; gap: 0.75rem; }
    .entry__n { padding-top: 0; }
    .entry__side { grid-column: 1; }

    .idx__row { grid-template-columns: 2.4rem 1fr; }
    .idx__desc { grid-column: 2; }
    .idx__label::after { display: none; }

    .contact-card { grid-template-columns: 1fr; gap: 0.5rem; }
    .contact-card__n { padding-top: 0; }

    .figures { grid-template-columns: 1fr; }
    .figures > div { border-left: 0; padding-left: 0; border-bottom: 1px solid var(--rule-soft); }
    .figures > div:last-child { border-bottom: 0; }

    .footer__grid { grid-template-columns: 1fr 1fr; }
    .footer__brand { grid-column: 1 / -1; }

    .actions .btn { flex: 1 1 auto; }
    .shelf__item:nth-child(even) { transform: none; }

    /* Le tableau de tarifs devient une pile de fiches */
    .ratetable { display: none; }
    .ratecards { display: grid; gap: 1.75rem; }
    .ratecard { border-top: 2px solid var(--text); padding-top: 1.1rem; }
    .ratecard--hot { border-top-color: var(--c-red); }
    .ratecard ul { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 0.45rem; }
    .ratecard li { display: grid; grid-template-columns: 1.2rem 1fr; gap: 0.6rem; font-size: 0.9rem; color: var(--text-soft); }
    .ratecard li svg { width: 15px; height: 15px; margin-top: 0.25rem; }
}

/* -------------------------------------------------------------------------
   24. Préférences & impression
   ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    [data-reveal] { opacity: 1; transform: none; }
}

@media print {
    .site-header, .topline, .drawer, .editionband, .colophon, .site-footer, .sommaire { display: none !important; }
    body { background: #fff; color: #000; }
    .masthead { background: #fff; background-image: none; color: #000; padding-top: 1rem; }
    .masthead h1, .masthead .lede, .runhead { color: #000; }
    .docgrid { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------------------------
   25. Jeu de règles (blocs suspendus séparés par des filets)
   ------------------------------------------------------------------------- */
.ruleset { border-bottom: 1px solid var(--rule); }
.ruleset > .hang {
    border-top: 1px solid var(--rule);
    padding-block: clamp(1.25rem, 2.2vw, 1.9rem);
}
.ruleset > .hang h3 { margin: 0 0 0.4rem; }
.ruleset > .hang p { color: var(--text-soft); max-width: 62ch; margin: 0; }
.ruleset > .hang .hang__side { color: var(--c-blue); padding-top: 0.35rem; }

/* Deux colonnes éditoriales (texte + figure) */
.spread {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
    gap: clamp(1.5rem, 3vw, 3rem);
    align-items: center;
}
.spread + .spread { margin-top: clamp(2.5rem, 4.5vw, 4rem); padding-top: clamp(2.5rem, 4.5vw, 4rem); border-top: 1px solid var(--rule); }
.spread--flip > *:first-child { order: 2; }
@media (max-width: 860px) {
    .spread { grid-template-columns: 1fr; }
    .spread--flip > *:first-child { order: 0; }
}

/* -------------------------------------------------------------------------
   26. Détails structurels
   ------------------------------------------------------------------------- */
.docbody { min-width: 0; }

.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tablewrap .ratetable { min-width: 620px; }
@media (max-width: 720px) { .tablewrap { overflow-x: visible; } }
