/* ============================================================================
   components.css — Composants réutilisables du portail LetsGo
   Référence : SRC/maquettes/homepage.html (extraction des styles communs)

   Scope : tout ce qui est susceptible d'être réutilisé sur plusieurs pages
   (header, navigation, recherche, boutons, containers, section-head,
   definition, listes de phases, footer, animations).
   ============================================================================ */


/* ============================================================================
   HEADER + LISERÉ TRICOLORE (en réalité 5 couleurs identitaires)
   ============================================================================ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--c-white);
    border-bottom: 1px solid var(--border-default);
    box-shadow: var(--shadow-sm);
}

.site-header::before {
    content: "";
    display: block;
    height: 4px;
    background: linear-gradient(90deg,
        var(--c-header-stripe-1) 0%,
        var(--c-header-stripe-2) 25%,
        var(--c-header-stripe-3) 50%,
        var(--c-header-stripe-4) 75%,
        var(--c-header-stripe-5) 100%);
}

.header-inner {
    max-width: var(--space-header);
    margin: 0 auto;
    padding: 14px 32px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 32px;
}

/* -------------------------- Bloc marque / logo ----------------------------- */

.brand {
    display: flex;
    align-items: center;
}

.letsgo-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    transition: opacity 0.15s;
}

.letsgo-logo:hover {
    opacity: 0.85;
}

.letsgo-symbole {
    height: 72px;
    width: 72px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.letsgo-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.letsgo-title {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    font-family: var(--font-identity);
    font-weight: var(--weight-bold);
    font-size: 1.625rem;
    letter-spacing: -0.02em;
    line-height: 1;
}

.letsgo-title-lets { color: var(--c-logo-lets); }
.letsgo-title-go   { color: var(--c-blue-am); }

.letsgo-baseline {
    font-family: var(--font-primary);
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
    line-height: 1.4;
    max-width: 440px;
}

.letsgo-baseline em {
    font-style: italic;
}

/* --------------------------- Navigation principale ------------------------- */

.main-nav {
    display: flex;
    gap: 4px;
    justify-self: center;
}

.main-nav a {
    padding: 10px 16px;
    font-size: var(--font-nav);
    font-weight: var(--weight-semibold);
    color: var(--text-secondary);
    border-radius: var(--radius-pill);
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.main-nav a:hover {
    background: var(--c-blue-am-l97);
    color: var(--c-blue-am);
}

.main-nav a.active {
    background: var(--c-blue-am-l90);
    color: var(--c-blue-am);
}

/* ------------------------------ Recherche ---------------------------------- */

.search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 280px;
    padding: 10px 64px 10px 40px;
    font-family: inherit;
    font-size: var(--font-body-s);
    color: var(--text-primary);
    background: var(--bg-page);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-pill);
    transition: border-color 0.15s, background 0.15s;
}

.search-input::placeholder { color: var(--text-tertiary); }
.search-input:hover        { border-color: var(--c-blue-am-l60); }
.search-input:focus        {
    outline: none;
    border-color: var(--c-blue-am);
    background: var(--c-white);
}

.search-icon {
    position: absolute;
    left: 14px;
    pointer-events: none;
    color: var(--text-tertiary);
    width: 16px;
    height: 16px;
}

.search-kbd {
    position: absolute;
    right: 10px;
    padding: 2px 6px;
    font-size: 0.6875rem;
    font-weight: var(--weight-semibold);
    color: var(--text-tertiary);
    background: var(--c-white);
    border: 1px solid var(--border-default);
    border-radius: 4px;
    font-family: ui-monospace, monospace;
}

/* -------------------------------- Dropdown résultats de recherche --------- */

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 440px;
    max-width: 90vw;
    max-height: 70vh;
    overflow-y: auto;
    background: var(--c-white);
    border: 1px solid var(--c-blue-am-l60, #99B7D2);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    z-index: 1000;
    padding: 6px;
}

.search-results-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.search-result-item {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 12px;
    row-gap: 2px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.12s ease;
    cursor: pointer;
}

.search-result-item:hover,
.search-result-item.is-active {
    background: var(--c-blue-am-l90, #E5EFFA);
}

.search-result-type {
    grid-column: 1;
    grid-row: 1;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--c-blue-am, #1A4E8A);
    padding: 2px 8px;
    background: var(--c-blue-am-l97, #F1F6FB);
    border-radius: 999px;
    align-self: start;
}

.search-result-title {
    grid-column: 2;
    grid-row: 1;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
}

.search-result-title mark {
    background: var(--c-yellow-l60, #F9E1A7);
    color: inherit;
    padding: 0 2px;
    border-radius: 3px;
}

.search-result-breadcrumb {
    grid-column: 2;
    grid-row: 2;
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.search-results-empty {
    padding: 16px;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    text-align: center;
}

.search-results-empty strong {
    color: var(--text-primary);
}

/* ============================================================================
   CONTAINER PRINCIPAL (page)
   ============================================================================ */

.page {
    max-width: var(--space-container);
    margin: 0 auto;
    padding: 48px 32px 96px;
}

/* ============================================================================
   BOUTONS
   ============================================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    font-size: var(--font-btn-l);
    font-weight: var(--weight-bold);
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
    text-decoration: none;
}

.btn svg {
    width: 16px;
    height: 16px;
}

.btn-primary {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    box-shadow: 0 8px 20px rgba(12, 65, 154, 0.22);
}

.btn-primary:hover {
    background: var(--btn-primary-bg-hover);
    color: var(--btn-primary-text);
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(12, 65, 154, 0.28);
}

.btn-secondary {
    background: var(--c-white);
    color: var(--c-blue-am);
    border-color: var(--border-default);
}

.btn-secondary:hover {
    background: var(--c-blue-am-l97);
    color: var(--c-blue-am);
    border-color: var(--c-blue-am-l60);
}

/* ============================================================================
   SECTION HEAD — titre de section avec kicker et description
   ============================================================================ */

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 32px;
    margin: 72px 0 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-default);
}

.section-head-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.section-kicker {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--font-eyebrow);
    font-weight: var(--weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
}

.kicker-line {
    width: 32px;
    height: 2px;
    background: var(--c-blue-am);
}

.section-head h2 {
    margin: 0;
    font-size: var(--font-h2);
    font-weight: var(--weight-bold);
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.section-head p {
    margin: 0;
    max-width: 480px;
    font-size: var(--font-body-s);
    color: var(--text-secondary);
    line-height: 1.55;
}

/* ============================================================================
   DEFINITION — encart définition accent mauve (composant "La démarche")
   ============================================================================ */

.definition {
    position: relative;
    padding: 20px 22px;
    background: var(--c-white);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
}

.definition::before {
    content: "";
    position: absolute;
    left: 0;
    top: 20px;
    bottom: 20px;
    width: 3px;
    background: var(--c-mauve);
    border-radius: 0 2px 2px 0;
}

.definition-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: var(--weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--c-mauve);
    margin-bottom: 6px;
}

.definition-text {
    margin: 0;
    font-size: var(--font-body-s);
    line-height: 1.5;
    color: var(--text-primary);
}

.definition-text strong {
    color: var(--c-mauve);
    font-weight: var(--weight-bold);
}

/* ============================================================================
   LISTES DE PHASES — compactes (accueil) et détaillées (hub cycle de vie)
   ============================================================================ */

.phase-list-compact {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
}

.phase-list-compact::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 14px;
    bottom: 14px;
    width: 2px;
    background: var(--border-default);
}

.phase-item-compact {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 2px;
    position: relative;
}

.phase-number-compact {
    position: relative;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    background: var(--c-white);
    border: 2px solid var(--c-blue-am);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: var(--font-identity);
    font-weight: var(--weight-semibold);
    font-size: 0.75rem;
    color: var(--c-blue-am);
    z-index: 1;
}

.phase-name-compact {
    font-size: 0.9375rem;
    font-weight: var(--weight-bold);
    color: var(--text-primary);
}

.phase-hint-compact {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.site-footer {
    margin-top: 96px;
    padding: 32px;
    background: var(--c-white);
    border-top: 1px solid var(--border-default);
}

.footer-inner {
    max-width: var(--space-header);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--font-caption);
    color: var(--text-secondary);
}

.footer-links {
    list-style: none;
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--c-blue-am);
}

/* ============================================================================
   ANIMATIONS TRANSVERSES
   Désactivées dès qu'un utilisateur a prefers-reduced-motion (RGAA, confort).
   ============================================================================ */

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}


/* ============================================================================
   PRINCIPLE — encart "Principe CPAM79", citation typographique mauve
   Référence : SRC/00_referentiel_structurel.md §21.17 et SRC/maquettes/
   composant_principle_demo.html.

   Usage : à l'intérieur d'un bloc de lecture (ex. section "Objet" d'une page
   de phase), en ponctuation conclusive d'un raisonnement éditorial. Rendu
   par le template phase.php via le champ "principle" du JSON.
   ============================================================================ */

.principle {
    position: relative;
    padding: 44px 56px 40px 88px;
    background: var(--c-white);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    box-shadow: 0 4px 16px rgba(12, 65, 154, 0.03);
    overflow: hidden;
    margin: 32px 0 0;
}

/* Grand guillemet ouvrant typographique en filigrane mauve, rappelle
   "La démarche" (couleur de la rubrique philosophique du portail). */
.principle::before {
    content: "\201C";                /* guillemet courbe ouvrant */
    position: absolute;
    top: -10px;
    left: 20px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 9rem;
    line-height: 1;
    font-weight: var(--weight-bold);
    color: var(--c-mauve);
    opacity: 0.18;
    user-select: none;
    pointer-events: none;
}

/* Halo mauve discret en bas à droite, renforce la signature colorée
   sans créer de "vignette" trop chargée. */
.principle::after {
    content: "";
    position: absolute;
    right: -60px;
    bottom: -60px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(160, 91, 182, 0.06) 0%,
        transparent 70%);
    pointer-events: none;
}

.principle-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--c-mauve-l90);
    color: var(--c-mauve-d20);
    border-radius: var(--radius-pill);
    font-size: 0.6875rem;
    font-weight: var(--weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 16px;
    position: relative;
    z-index: 1;
}

.principle-label-dot {
    width: 5px;
    height: 5px;
    background: var(--c-mauve);
    border-radius: 50%;
}

/* Texte du principe : Cabin SemiBold pour rappeler l'identité du portail
   (architecture de marque, règle des échelons locaux), taille généreuse
   pour donner du poids à la phrase. */
.principle-text {
    position: relative;
    z-index: 1;
    margin: 0;
    font-family: var(--font-identity);
    font-weight: var(--weight-semibold);
    font-size: 1.5rem;
    line-height: 1.5;
    letter-spacing: -0.015em;
    color: var(--text-primary);
    max-width: 640px;
    /* Un blockquote natif ajoute parfois des marges de citation ; on neutralise. */
    quotes: none;
}

.principle-text::before,
.principle-text::after {
    content: none;
}

/* Attribution optionnelle (ex : "Groupe de travail LetsGo, 2026"). */
.principle-attribution {
    display: block;
    margin-top: 18px;
    font-family: var(--font-primary);
    font-size: var(--font-body-s);
    font-weight: 500;
    font-style: normal;                   /* override italique par défaut de <cite> */
    color: var(--text-secondary);
}

/* Variante compacte pour blocs plus serrés (non utilisée V1, réservée pour
   des insertions en aside ou colonne étroite). */
.principle--compact {
    padding: 32px 40px 30px 72px;
}

.principle--compact::before {
    font-size: 7rem;
    top: -6px;
    left: 14px;
}

.principle--compact .principle-text {
    font-size: 1.25rem;
}


/* ============================================================================
   BREADCRUMB — fil d'Ariane horizontal
   Généré par includes/breadcrumb.php. Apparaît en haut des pages de détail
   (phase, cas d'usage, parcours, méthode, gouvernance), juste avant le hero.
   ============================================================================ */

.breadcrumb {
    margin-bottom: 24px;
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: var(--font-body-s);
    color: var(--text-secondary);
    line-height: 1.4;
}

.breadcrumb li {
    display: inline-flex;
    align-items: center;
}

/* Séparateur "›" entre items, jamais avant le premier. Le token
   --text-tertiary (gris clair) fournit un contraste discret. */
.breadcrumb li + li::before {
    content: "\203A";                /* › */
    margin: 0 10px;
    color: var(--text-tertiary);
    font-weight: var(--weight-semibold);
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s;
}

.breadcrumb a:hover {
    color: var(--c-blue-am);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.breadcrumb [aria-current="page"] {
    color: var(--text-primary);
    font-weight: var(--weight-semibold);
}


/* ============================================================================
   HERO COMPACT
   Utilisé par les pages de détail (phase, cas d'usage, fiche pratique, méthode,
   gouvernance). Structure : grid 2 colonnes (contenu + aside helps), liseré
   supérieur coloré, numéro monumental en filigrane (optionnel).

   Couleur d'accent : pilotée par la couleur de rubrique (var --accent-hero,
   surchargé au niveau body[data-page-type="..."] dans pages.css).
   ============================================================================ */

.hero-compact {
    position: relative;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 32px;
    padding: 40px 48px;
    background: var(--c-white);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: 56px;
    /* Couleur de rubrique par défaut (page sans rubrique explicite). */
    --accent-hero:       var(--c-blue-am);
    --accent-hero-tint:  var(--c-blue-am-l90);
    --accent-hero-soft:  var(--c-blue-am-l97);
    --accent-hero-on:    var(--c-blue-am);
}

.hero-compact::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-hero);
}

.hero-compact::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -80px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle,
        color-mix(in srgb, var(--accent-hero) 12%, transparent) 0%,
        color-mix(in srgb, var(--accent-hero) 3%, transparent) 50%,
        transparent 70%);
    pointer-events: none;
}

.hero-compact .hero-content {
    position: relative;
    z-index: 1;
}

.hero-number {
    position: absolute;
    right: 48px;
    top: 24px;
    font-family: var(--font-identity);
    font-weight: var(--weight-semibold);
    font-size: 7rem;
    line-height: 1;
    color: var(--accent-hero-tint);
    letter-spacing: -0.04em;
    user-select: none;
    z-index: 0;
}

.hero-compact h1 {
    margin: 20px 0 16px;
    font-size: var(--font-hero);
    font-weight: var(--weight-bold);
    line-height: var(--lh-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--text-primary);
}

.hero-compact .lead {
    margin: 0;
    font-size: var(--font-body-l);
    line-height: 1.55;
    color: var(--text-secondary);
    max-width: 520px;
}

.hero-meta {
    display: flex;
    gap: 24px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
}

.hero-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hero-meta-label {
    font-size: 0.6875rem;
    font-weight: var(--weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
}

.hero-meta-value {
    font-size: var(--font-body-s);
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
}

/* Aside "Sur cette page vous trouverez" à droite du hero. */
.hero-helps {
    background: var(--accent-hero-soft);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px 24px 20px;
    position: relative;
    z-index: 1;
}

.hero-helps-title {
    margin: 0 0 14px;
    font-size: var(--font-eyebrow);
    font-weight: var(--weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-hero-on);
}

.hero-helps-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hero-helps-list li {
    position: relative;
    padding-left: 24px;
    font-size: var(--font-body-s);
    line-height: 1.45;
    color: var(--text-primary);
}

.hero-helps-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 14px;
    height: 2px;
    background: var(--accent-hero-on);
}


/* ============================================================================
   SCROLL CUE — flèche "Explorer la phase/parcours/méthode/..." après le hero
   ============================================================================ */

.scroll-cue {
    display: flex;
    justify-content: center;
    margin: -24px 0 24px;
}

.scroll-cue-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: var(--c-white);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-pill);
    font-size: var(--font-body-s);
    font-weight: var(--weight-semibold);
    color: var(--accent-rubrique, var(--c-blue-am));
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
    text-decoration: none;
}

.scroll-cue-link:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-rubrique, var(--c-blue-am-l60));
    color: var(--accent-rubrique, var(--c-blue-am));
}

.scroll-cue-link svg {
    width: 16px;
    height: 16px;
    animation: bounce-down 1.8s ease-in-out infinite;
}

@keyframes bounce-down {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(3px); }
    60% { transform: translateY(1px); }
}


/* ============================================================================
   CONTENT-WITH-TOC — layout 2 colonnes : sommaire sticky à gauche + contenu
   Utilisé par pages phase, cas d'usage, fiches pratiques, méthodes.
   ============================================================================ */

.content-with-toc {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 48px;
    align-items: start;
}

/* Hub sans TOC (sobriété éditoriale, show_toc:false) : le contenu occupe
   toute la largeur, aligné sur la marge gauche du Hero. Cf. §13.24. */
.content-with-toc--no-toc {
    grid-template-columns: 1fr;
    gap: 0;
}

.toc {
    position: sticky;
    top: 96px;
    align-self: start;
    padding: 20px 18px;
    background: var(--c-white);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.toc-title {
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.6875rem;
    font-weight: var(--weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    counter-reset: toc-counter;
}

.toc-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    font-size: var(--font-body-s);
    font-weight: var(--weight-semibold);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: background 0.15s, color 0.15s;
    position: relative;
    counter-increment: toc-counter;
    text-decoration: none;
}

.toc-link::before {
    content: counter(toc-counter, decimal-leading-zero);
    font-family: var(--font-identity);
    font-size: 0.6875rem;
    color: var(--text-tertiary);
    font-weight: var(--weight-semibold);
    transition: color 0.15s;
}

/* Les hover/active utilisent l'accent rubrique (variable définie par page). */
.toc-link:hover,
.toc-link.active {
    background: var(--accent-rubrique-soft, var(--c-blue-am-l97));
    color: var(--accent-rubrique, var(--c-blue-am));
}

.toc-link.active {
    background: var(--accent-rubrique-tint, var(--c-blue-am-l90));
}

.toc-link.active::before,
.toc-link:hover::before {
    color: var(--accent-rubrique, var(--c-blue-am));
}

.main-content {
    min-width: 0;
}


/* ============================================================================
   RESOURCES-GRID — liste de cartes ressources (modèle, fiche, outil…)
   Réutilisée par phases, cas d'usage, fiches pratiques, méthodes.
   ============================================================================ */

.resources-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.resource {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px;
    background: var(--c-white);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
    text-decoration: none;
}

.resource:hover {
    border-color: var(--accent-rubrique-border, var(--c-blue-am-l60));
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.resource-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    background: var(--accent-rubrique-tint, var(--c-blue-am-l90));
    color: var(--accent-rubrique, var(--c-blue-am));
    display: grid;
    place-items: center;
}

.resource-icon svg {
    width: 20px;
    height: 20px;
}

.resource-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.resource-type {
    font-size: 0.6875rem;
    font-weight: var(--weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
}

.resource-title {
    font-size: var(--font-body);
    font-weight: var(--weight-bold);
    color: var(--text-primary);
    line-height: 1.3;
}


/* ============================================================================
   CONTINUE — 2 cartes de relance en bas de page (phase suivante + cas d'usage)
   ============================================================================ */

.continue {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 32px;
}

.continue-card {
    position: relative;
    padding: 28px 32px 24px;
    background: var(--c-white);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
    text-decoration: none;
    /* Chaque instance surcharge --continue-color selon sa cible. */
    --continue-color: var(--c-blue-am);
}

.continue-card:hover {
    border-color: var(--continue-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.continue-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--continue-color);
}

.continue-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: var(--weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--continue-color);
    margin-bottom: 8px;
}

.continue-card h3 {
    margin: 0 0 6px;
    font-size: var(--font-h4);
    font-weight: var(--weight-bold);
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.continue-card p {
    margin: 0 0 18px;
    font-size: var(--font-body-s);
    color: var(--text-secondary);
    line-height: 1.5;
}

.continue-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-body-s);
    font-weight: var(--weight-bold);
    color: var(--continue-color);
    transition: gap 0.15s;
}

.continue-card:hover .continue-cta {
    gap: 12px;
}

.continue-cta svg {
    width: 14px;
    height: 14px;
}

/* Variantes : navigation intra-rubrique Cycle de vie (cyan)
   ou vers la zone Cas d'usage (turquoise pour rappeler l'espace "action"). */
.continue-card--next { --continue-color: var(--c-cyan-d20); }
.continue-card--use  { --continue-color: var(--c-turquoise-d40); }


/* ============================================================================
   STEPS — timeline verticale des étapes d'un parcours
   Utilisée par les cas d'usage et (potentiellement) les fiches pratiques.
   Chaque step combine : numéro monumental + corps (titre, paragraphes,
   questions optionnelles, CTA ressource optionnel).
   ============================================================================ */

.steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
}

/* Ligne verticale qui relie les numéros entre eux. */
.steps::before {
    content: "";
    position: absolute;
    left: 27px;
    top: 28px;
    bottom: 28px;
    width: 2px;
    background: var(--c-blue-am-l80);
}

.step {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 24px;
    padding: 20px 0;
    position: relative;
}

.step-number {
    width: 56px;
    height: 56px;
    background: var(--c-white);
    border: 2px solid var(--c-blue-am);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: var(--font-identity);
    font-weight: var(--weight-semibold);
    font-size: 1.25rem;
    color: var(--c-blue-am);
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.step-body {
    background: var(--c-white);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.step-body:hover {
    border-color: var(--c-blue-am-l60);
    box-shadow: var(--shadow-sm);
}

.step h3 {
    margin: 0 0 10px;
    font-size: var(--font-h3);
    font-weight: var(--weight-bold);
    color: var(--text-primary);
    letter-spacing: -0.015em;
}

.step p {
    margin: 0 0 16px;
    font-size: var(--font-body);
    line-height: 1.6;
    color: var(--text-secondary);
}

.step p:last-child {
    margin-bottom: 0;
}

/* Encart "Quelques questions à se poser" — utilisé sur certaines étapes. */
.step-questions {
    margin: 12px 0 0;
    padding: 14px 18px;
    background: var(--c-blue-am-l97);
    border-left: 3px solid var(--c-blue-am);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-size: var(--font-body-s);
    line-height: 1.55;
    color: var(--text-primary);
}

.step-questions strong {
    display: block;
    margin-bottom: 6px;
    font-weight: var(--weight-bold);
    color: var(--c-blue-am);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.step-questions ul {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* CTA inline dans une étape (ex. "Utiliser le simulateur"). Accent turquoise
   pour signaler une action vers l'espace Ressources. */
.step-resource {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 8px 14px;
    background: var(--c-turquoise-l97);
    border: 1px solid var(--c-turquoise-l80);
    border-radius: var(--radius-pill);
    font-size: var(--font-caption);
    font-weight: var(--weight-semibold);
    color: var(--c-turquoise-d40);
    transition: background 0.15s;
    text-decoration: none;
}

.step-resource:hover {
    background: var(--c-turquoise-l90);
    color: var(--c-turquoise-d40);
}

.step-resource svg {
    width: 14px;
    height: 14px;
}


/* ============================================================================
   NEXT — bloc "Pour le cadre complet" (renvoi vers la phase correspondante).
   Utilisé par les cas d'usage, potentiellement par d'autres pages de parcours
   qui renvoient vers une page de référence méthodologique.
   Accent cyan : le renvoi pointe vers une page de phase (rubrique Cycle de vie).
   ============================================================================ */

.next {
    margin-top: 40px;
    padding: 32px 40px;
    background: var(--c-white);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 32px;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.next::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--c-cyan);
}

.next-text h3 {
    margin: 0 0 8px;
    font-size: var(--font-h3);
    font-weight: var(--weight-bold);
    color: var(--text-primary);
    letter-spacing: -0.015em;
}

.next-text p {
    margin: 0;
    font-size: var(--font-body);
    color: var(--text-secondary);
    line-height: 1.55;
    max-width: 640px;
}

.next-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    background: var(--c-cyan-d20);
    color: var(--c-white);
    font-weight: var(--weight-bold);
    border-radius: var(--radius-md);
    transition: background 0.15s, transform 0.15s;
    box-shadow: 0 8px 20px rgba(0, 132, 178, 0.22);
    text-decoration: none;
}

.next-btn:hover {
    background: var(--c-cyan-d40);
    color: var(--c-white);
    transform: translateY(-1px);
}

.next-btn svg {
    width: 16px;
    height: 16px;
}
