/*-----------------------------------------------------------*/
/* Guide (article seul)                                        */
/*                                                             */
/* Hero fonce, puis le corps sur fond blanc avec son sommaire   */
/* a gauche, les autres guides et l'appel a contact.            */
/*-----------------------------------------------------------*/

.guide-hero,
.guide-enveloppe,
.guide-suite,
.guide-appel {
    --gu-navy: #002060;
    --gu-cyan: #4dc4ff;
    --gu-cyan-sombre: #0b6fa4;
    --gu-clair: #eff6fd;
    --gu-gris: #6b7a90;
    --gu-texte: #46536b;
    --gu-trait: #dde5ef;

    box-sizing: border-box;
    font-family: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
}

.guide-hero *,
.guide-enveloppe *,
.guide-suite *,
.guide-appel * { box-sizing: border-box; }

.guide-inner {
    max-width: 1080px;
    margin-inline: auto;
}

/* ── Hero ────────────────────────────────────────────────── */

.guide-hero {
    padding: 34px 20px 46px;
    background: var(--gu-navy);
    color: #fff;
}

.guide-fil {
    margin-bottom: 22px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.85rem;
    line-height: 1.6;
}

.guide-fil a {
    color: rgba(255, 255, 255, 0.62);
    text-decoration: none;
}

.guide-fil a:hover { color: #fff; text-decoration: underline; }
.guide-signature { margin: 0 0 16px; font-size: 0.8rem; }
.guide-signature a { color: #fff; text-underline-offset: 3px; }
.guide-fil-sep { margin: 0 8px; }

.guide-surtitre {
    margin: 0 0 12px;
    color: var(--gu-cyan);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.19em;
    line-height: 1.6;
    text-transform: uppercase;
}

.guide-titre {
    max-width: 22ch;
    margin: 0 0 18px;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(30px, 4.2vw, 52px);
    font-weight: 700;
    line-height: 1.13;
    letter-spacing: -0.025em;
    color: #fff;
    text-wrap: balance;
}

.guide-chapeau {
    max-width: 62ch;
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.05rem;
    line-height: 1.6;
}

/* ── Corps ───────────────────────────────────────────────── */

.guide-enveloppe {
    padding: 54px 20px 64px;
    background: #fff;
}

.guide-corps-grille {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 56px;
    align-items: start;
}

/* Le sommaire suit la lecture sans quitter l'ecran. */
.guide-sommaire {
    position: sticky;
    top: 130px;
}

.guide-sommaire-titre {
    margin: 0 0 18px;
    color: var(--gu-navy);
    font-size: 1.22rem;
    font-weight: 700;
    line-height: 1.3;
}

.guide-sommaire-liste {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: none;
}

.guide-sommaire-liste li { margin: 0; }

.guide-sommaire-lien {
    display: flex;
    gap: 6px;
    padding: 9px 0 9px 14px;
    /* Le filet actif remplace une bordure ajoutee : pas de decalage au clic. */
    border-left: 3px solid transparent;
    color: var(--gu-gris);
    font-size: 0.93rem;
    line-height: 1.5;
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.guide-sommaire-lien:hover { color: var(--gu-navy); }

.guide-sommaire-lien.est-actif {
    border-left-color: var(--gu-cyan);
    color: var(--gu-navy);
    font-weight: 600;
}

.guide-sommaire-rang { flex-shrink: 0; }

/* ── Texte de l'article ──────────────────────────────────── */

.guide-texte {
    color: var(--gu-texte);
    font-size: 1.02rem;
    line-height: 1.75;
}

.guide-texte > :first-child { margin-top: 0; }
.guide-texte p { margin: 0 0 16px; }
.guide-texte strong { color: var(--gu-navy); font-weight: 600; }

/* Les sections sont numerotees ici, pas dans le contenu : l'article reste
   lisible tel quel dans l'editeur et la numerotation suit les ajouts. */
.guide-texte { counter-reset: section; }

.guide-texte h2 {
    margin: 40px 0 14px;
    color: var(--gu-navy);
    font-family: 'Poppins', sans-serif;
    font-size: clamp(20px, 2.1vw, 26px);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    /* L'ancre s'arrete sous l'en-tete fixe. */
    scroll-margin-top: 130px;
}

.guide-texte h2::before {
    counter-increment: section;
    content: counter(section) '. ';
}

.guide-texte h3 {
    margin: 28px 0 10px;
    color: var(--gu-navy);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
}

.guide-texte a {
    color: var(--gu-cyan-sombre);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.guide-texte a:hover { color: var(--gu-navy); }

.guide-texte ul,
.guide-texte ol { margin: 0 0 16px; padding-left: 22px; }
.guide-texte li { margin-bottom: 7px; }

.guide-visuel {
    margin: 26px 0 34px;
}

/* Selecteur descendant : .guide-texte img vient plus bas et remettrait
   la hauteur en auto, donc l'image occuperait tout l'ecran. */
.guide-texte .guide-visuel img {
    display: block;
    width: 100%;
    height: 380px;
    max-height: 50vh;
    object-fit: cover;
    border-radius: 8px;
}

.guide-texte figure { margin: 30px 0; }

.guide-texte img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.guide-texte figcaption {
    margin-top: 10px;
    color: #8a94a6;
    font-size: 0.86rem;
    font-style: normal;
}

.guide-retour {
    margin: 38px 0 0;
    padding-top: 24px;
    border-top: 1px solid var(--gu-trait);
}

.guide-retour a {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--gu-navy);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
}

.guide-retour a span:last-child {
    text-decoration: underline;
    text-underline-offset: 5px;
    text-decoration-thickness: 1px;
}

.guide-retour a:hover { color: var(--gu-cyan-sombre); }

/* ── Fleches ─────────────────────────────────────────────── */

.guide-fleche {
    display: inline-block;
    flex-shrink: 0;
    width: 22px;
    height: 10px;
    transition: transform 200ms ease;
}

.guide-fleche svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.guide-suite-lien:hover .guide-fleche { transform: translateX(4px); }
.guide-retour a:hover .guide-fleche-gauche { transform: translateX(-4px); }

/* ── À lire aussi ────────────────────────────────────────── */

.guide-suite {
    padding: 58px 20px 64px;
    background: var(--gu-clair);
    color: var(--gu-navy);
}

.guide-suite-titre {
    margin: 0 0 8px;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(26px, 3vw, 38px);
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -0.02em;
}

.guide-suite-intro {
    margin: 0 0 32px;
    color: var(--gu-texte);
    font-size: 1rem;
    line-height: 1.7;
}

.guide-suite-liste {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Filets verticaux entre les colonnes, comme sur la maquette. */
.guide-suite-item + .guide-suite-item {
    padding-left: 32px;
    border-left: 1px solid #cfdcec;
}

.guide-suite-item-titre {
    margin: 0 0 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
}

.guide-suite-item-titre a {
    color: var(--gu-navy);
    text-decoration: none;
}

.guide-suite-item-titre a:hover { color: var(--gu-cyan-sombre); }

.guide-suite-resume {
    margin: 0 0 14px;
    color: var(--gu-texte);
    font-size: 0.92rem;
    line-height: 1.6;
}

.guide-suite-lien {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--gu-navy);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
}

.guide-suite-lien > span:first-child {
    text-decoration: underline;
    text-underline-offset: 5px;
    text-decoration-thickness: 1px;
}

.guide-suite-lien:hover { color: var(--gu-cyan-sombre); }

/* ── Appel a contact ─────────────────────────────────────── */

.guide-appel {
    padding: 44px 20px;
    background: var(--gu-navy);
    color: #fff;
}

.guide-appel-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.guide-appel-titre {
    margin: 0 0 6px;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(20px, 2.2vw, 28px);
    font-weight: 700;
    line-height: 1.25;
}

.guide-appel-sous-titre {
    margin: 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.98rem;
    line-height: 1.6;
}

.guide-appel-bouton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 14px 32px;
    border-radius: 8px;
    background: var(--gu-cyan);
    color: var(--gu-navy);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.15s ease;
}

.guide-appel-bouton:hover,
.guide-appel-bouton:focus-visible {
    background: #7bd6ff;
    color: var(--gu-navy);
    transform: translateY(-2px);
}

/* ── Ecrans intermediaires ───────────────────────────────── */

@media (max-width: 1023px) {
    .guide-corps-grille { grid-template-columns: 200px minmax(0, 1fr); gap: 36px; }
    .guide-suite-liste { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
    .guide-suite-item + .guide-suite-item { padding-left: 0; border-left: 0; }
}

/* ── Petits ecrans ───────────────────────────────────────── */

@media (max-width: 767px) {
    .guide-hero { padding: 26px 16px 38px; }
    .guide-surtitre { font-size: 0.84rem; letter-spacing: 0.15em; }
    .guide-titre { max-width: none; }
    .guide-chapeau { font-size: 1rem; }

    .guide-enveloppe { padding: 36px 16px 48px; }

    /* Le sommaire passe au-dessus du texte et cesse de suivre le defilement. */
    .guide-corps-grille {
        grid-template-columns: minmax(0, 1fr);
        gap: 30px;
    }

    .guide-sommaire {
        position: static;
        padding: 18px 18px 8px;
        border: 1px solid var(--gu-trait);
        border-radius: 10px;
        background: #f7fafd;
    }

    .guide-sommaire-titre { font-size: 1.05rem; margin-bottom: 10px; }
    .guide-sommaire-lien { padding-block: 7px; font-size: 0.9rem; }

    /* Seuls les liens d'action sont epaissis ; ceux du texte courant gardent
       leur interligne, sinon la lecture se disloque. */
    .guide-fil a { display: inline-block; padding-block: 5px; }
    .guide-retour a { padding-block: 8px; }
    .guide-suite-lien { padding-block: 10px; }
    .guide-suite-item-titre a { display: inline-block; padding-block: 3px; }

    .guide-texte { font-size: 1rem; }
    .guide-texte h2 { margin-top: 32px; }

    .guide-suite { padding: 44px 16px 52px; }
    .guide-suite-liste { grid-template-columns: minmax(0, 1fr); gap: 0; }

    .guide-suite-item {
        padding: 20px 0;
        border-top: 1px solid #cfdcec;
    }

    .guide-suite-item:first-child { padding-top: 0; border-top: 0; }

    .guide-appel { padding: 36px 16px; }

    .guide-appel-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 22px;
    }

    .guide-appel-bouton { width: 100%; }
}
