/* ==========================================================================
   Guides v2 — pages de contenu éditorial (index + articles)
   Mêmes noms de classe que guide.css : le contenu des articles (article_content,
   toc, other_guides) se porte sans changement, seul l'habillage change ici.
   ========================================================================== */

.guide-page {
    background: var(--v2-cream);
}

/* --- HERO article ------------------------------------------------------- */

.guide-hero {
    background: var(--v2-blue-deep);
    padding: 3.5rem 0 2.75rem;
    border-bottom: 3px solid var(--v2-red);
}

.guide-hero-inner {
    max-width: 860px;
}

.guide-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--v2-text-xs);
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: var(--v2-gap);
}

.guide-breadcrumb a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: color var(--v2-duration-fast) var(--v2-ease-out);
}

.guide-breadcrumb a:hover { color: var(--v2-white); }
.guide-breadcrumb span { color: rgba(255, 255, 255, 0.3); }

.guide-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: var(--v2-text-xs);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    margin-bottom: 1rem;
    padding: 0.375rem 0.75rem 0.375rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--v2-radius-pill);
    transition: color var(--v2-duration-fast) var(--v2-ease-out),
                border-color var(--v2-duration-fast) var(--v2-ease-out),
                background var(--v2-duration-fast) var(--v2-ease-out);
}

.guide-back-btn:hover {
    color: var(--v2-white);
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

.guide-back-btn svg { transition: transform var(--v2-duration-fast) var(--v2-ease-out); }
.guide-back-btn:hover svg { transform: translateX(-3px); }

/* Le hover ne déplace que le SVG (ligne ci-dessus) ; le lien lui-même n'a pas de
   transform, donc l'ombre interne ci-dessous ne rentre en conflit avec rien.
   Fond du bandeau très sombre (--v2-blue-deep) : noir pur, plus opaque que le
   token clair habituel, pour rester visible sur cette surface (même logique
   qu'en 2H-F pour .ppv2-back). */
.guide-back-btn:active {
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
}

.guide-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: rgba(163, 42, 46, 0.22);
    border: 1px solid rgba(163, 42, 46, 0.45);
    color: #ffb3b5;
    font-size: var(--v2-text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.75rem;
    border-radius: var(--v2-radius-pill);
    margin-bottom: 1rem;
}

.guide-hero h1 {
    font-family: var(--v2-font-title);
    font-weight: 700;
    font-size: clamp(1.9rem, 1.4rem + 2vw, 3rem);
    color: var(--v2-white);
    line-height: 1.15;
    margin-bottom: 1rem;
}

.guide-hero-intro {
    font-family: var(--v2-font-body);
    font-size: var(--v2-text-base);
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.7;
    max-width: 720px;
    margin-bottom: 1.5rem;
}

.guide-hero-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.guide-hero-meta span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: var(--v2-text-xs);
    color: rgba(255, 255, 255, 0.5);
}

/* --- HERO index ---------------------------------------------------------- */

.guide-index-hero {
    background: var(--v2-blue-deep);
    padding: 3.5rem 0 3rem;
    text-align: center;
    border-bottom: 3px solid var(--v2-red);
}

.guide-index-hero h1 {
    font-family: var(--v2-font-title);
    font-weight: 700;
    font-size: var(--v2-text-3xl);
    color: var(--v2-white);
    letter-spacing: 0.01em;
    margin: 1rem 0;
}

.guide-index-hero p {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--v2-text-base);
    max-width: 640px;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
}

.guide-index-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: var(--v2-text-sm);
    color: rgba(255, 255, 255, 0.55);
}

.guide-index-stats strong { color: var(--v2-white); }
.gi-sep { color: rgba(255, 255, 255, 0.3); }

/* --- Layout : sommaire + contenu ----------------------------------------- */

.guide-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: var(--v2-gap-xl);
    padding: var(--v2-gap-xl) var(--v2-pad-x);
    max-width: var(--v2-container);
    margin: 0 auto;
}

.guide-sidebar {
    position: sticky;
    top: 1.5rem;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: var(--v2-gap);
}

.guide-toc,
.guide-sidebar-cta,
.guide-other-guides {
    background: var(--v2-white);
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius);
    padding: var(--v2-gap-sm);
}

.guide-toc-title {
    font-family: var(--v2-font-title);
    font-weight: 700;
    font-size: var(--v2-text-sm);
    color: var(--v2-ink);
    margin-bottom: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.guide-toc a {
    display: block;
    font-size: var(--v2-text-sm);
    color: var(--v2-ink-2);
    text-decoration: none;
    padding: 0.375rem 0;
    border-left: 2px solid transparent;
    padding-left: 0.625rem;
    margin-left: -0.625rem;
    transition: color var(--v2-duration-fast) var(--v2-ease-out),
                border-color var(--v2-duration-fast) var(--v2-ease-out);
}

.guide-toc a:hover,
.guide-toc a.active {
    color: var(--v2-blue);
    border-left-color: var(--v2-blue);
}

.guide-sidebar-cta {
    background: var(--v2-blue);
    border-color: var(--v2-blue);
}

.guide-cta-label {
    font-size: var(--v2-text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.375rem;
}

.guide-sidebar-cta p {
    color: rgba(255, 255, 255, 0.85);
    font-size: var(--v2-text-sm);
    line-height: 1.5;
    margin-bottom: 0.875rem;
}

.guide-cta-btn,
.gis-cta-btn {
    display: inline-block;
    background: var(--v2-white);
    color: var(--v2-blue);
    font-weight: 700;
    font-size: var(--v2-text-sm);
    text-decoration: none;
    padding: 0.5rem 0.875rem;
    border-radius: var(--v2-radius-sm);
    transition: transform var(--v2-duration-fast) var(--v2-ease-out);
}

.guide-cta-btn:hover,
.gis-cta-btn:hover {
    transform: translateY(-1px);
}

.guide-cta-btn:active,
.gis-cta-btn:active {
    transform: translateY(0);
}

.guide-other-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--v2-text-sm);
    color: var(--v2-ink-2);
    text-decoration: none;
    padding: 0.375rem 0;
    transition: color var(--v2-duration-fast) var(--v2-ease-out);
}

.guide-other-link:hover { color: var(--v2-blue); }

.guide-other-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--v2-red);
    flex-shrink: 0;
}

/* --- Article -------------------------------------------------------------- */

.guide-article {
    min-width: 0;
    max-width: 760px;
}

.guide-section {
    margin-bottom: var(--v2-gap-lg);
}

.guide-section h2 {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    font-family: var(--v2-font-title);
    font-weight: 700;
    font-size: var(--v2-text-xl);
    color: var(--v2-ink);
    margin-bottom: 1rem;
}

.section-num {
    font-family: var(--v2-font-body);
    font-size: var(--v2-text-xs);
    font-weight: 700;
    color: var(--v2-white);
    background: var(--v2-blue);
    border-radius: var(--v2-radius-sm);
    padding: 0.125rem 0.5rem;
    flex-shrink: 0;
}

.guide-section h3 {
    font-family: var(--v2-font-title);
    font-weight: 700;
    font-size: var(--v2-text-lg);
    color: var(--v2-ink);
    margin: 1.25rem 0 0.625rem;
}

.guide-section p {
    color: var(--v2-ink-2);
    font-size: var(--v2-text-base);
    line-height: 1.75;
    margin-bottom: 0.875rem;
}

.guide-section strong { color: var(--v2-ink); }

.guide-section a {
    color: var(--v2-blue);
    font-weight: 600;
}

.guide-list {
    margin: 0 0 0.875rem;
    padding-left: 1.25rem;
    color: var(--v2-ink-2);
    line-height: 1.75;
}

.guide-list li { margin-bottom: 0.375rem; }

.guide-highlight {
    background: var(--v2-blue-tint);
    border-left: 3px solid var(--v2-blue);
    border-radius: 0 var(--v2-radius-sm) var(--v2-radius-sm) 0;
    padding: 0.875rem 1rem;
    margin: 1rem 0;
    font-size: var(--v2-text-sm);
    color: var(--v2-ink-2);
    line-height: 1.6;
}

.guide-highlight strong { color: var(--v2-ink); }

.guide-highlight.green {
    background: var(--v2-success-tint);
    border-left-color: var(--v2-success);
}

.guide-highlight.red {
    background: var(--v2-red-tint);
    border-left-color: var(--v2-red);
}

.guide-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.25rem;
    font-size: var(--v2-text-sm);
}

.guide-table th,
.guide-table td {
    text-align: left;
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid var(--v2-border);
}

.guide-table th {
    font-family: var(--v2-font-body);
    font-weight: 700;
    color: var(--v2-ink);
    background: var(--v2-blue-tint);
}

.guide-table td { color: var(--v2-ink-2); }

.exam-badge {
    display: inline-flex;
    align-items: center;
    font-family: var(--v2-font-body);
    font-weight: 700;
    font-size: var(--v2-text-xs);
    letter-spacing: 0.04em;
    padding: 0.125rem 0.5rem;
    border-radius: var(--v2-radius-sm);
}

.exam-badge.nat { background: var(--v2-blue-tint); color: var(--v2-blue); border: 1px solid rgba(var(--v2-blue-rgb), 0.25); }
.exam-badge.cr  { background: var(--v2-red-tint); color: var(--v2-red); border: 1px solid rgba(var(--v2-red-rgb), 0.25); }
.exam-badge.csp { background: var(--v2-sand); color: var(--v2-ink-2); border: 1px solid var(--v2-border-soft); }

.guide-faq-item {
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius-sm);
    margin-bottom: 0.625rem;
    overflow: hidden;
}

.guide-faq-q {
    display: block;
    width: 100%;
    margin: 0;
    border: none;
    background: var(--v2-white);
    font-family: inherit;
    font-size: inherit;
    text-align: left;
    padding: 0.875rem 1rem;
    font-weight: 700;
    color: var(--v2-ink);
    cursor: pointer;
    position: relative;
}

.guide-faq-q::after {
    content: '+';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--v2-blue);
    font-size: 1.25rem;
    line-height: 1;
    transition: transform var(--v2-duration-fast) var(--v2-ease-out);
}

.guide-faq-item.open .guide-faq-q::after { transform: translateY(-50%) rotate(45deg); }

.guide-faq-a {
    max-height: 0;
    overflow: hidden;
    color: var(--v2-ink-2);
    font-size: var(--v2-text-sm);
    line-height: 1.65;
    padding: 0 1rem;
    transition: max-height var(--v2-duration-slow) var(--v2-ease-in-out),
                padding var(--v2-duration-slow) var(--v2-ease-in-out);
}

.guide-faq-item.open .guide-faq-a {
    max-height: 400px;
    padding: 0 1rem 1rem;
}

@media (prefers-reduced-motion: reduce) {
    .guide-faq-a { transition: none; }
}

/* --- Footer article -------------------------------------------------------- */

.guide-article-footer {
    margin-top: var(--v2-gap-xl);
    padding-top: var(--v2-gap-lg);
    border-top: 1px solid var(--v2-border);
}

.guide-sources-block h3 {
    font-family: var(--v2-font-title);
    font-size: var(--v2-text-lg);
    color: var(--v2-ink);
    margin-bottom: 0.5rem;
}

.guide-sources-block p { color: var(--v2-ink-2); font-size: var(--v2-text-sm); margin-bottom: 0.5rem; }

.guide-sources-block ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

.guide-sources-block ul li { margin-bottom: 0.375rem; }
.guide-sources-block ul a { color: var(--v2-blue); font-size: var(--v2-text-sm); text-decoration: none; font-weight: 600; }
.guide-sources-block ul a:hover { text-decoration: underline; }

.guide-disclaimer {
    font-size: var(--v2-text-xs);
    color: var(--v2-ink-3);
    font-style: italic;
}

.guide-cta-final {
    background: var(--v2-blue-deep);
    border-radius: var(--v2-radius-lg);
    padding: var(--v2-gap-lg);
    margin-top: var(--v2-gap-lg);
    text-align: center;
}

.guide-cta-final h3 {
    font-family: var(--v2-font-title);
    font-size: var(--v2-text-xl);
    color: var(--v2-white);
    margin-bottom: 0.5rem;
}

.guide-cta-final p {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--v2-text-sm);
    margin-bottom: 1.25rem;
}

.guide-cta-btns {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-cyan,
.btn-outline {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--v2-radius-sm);
    font-weight: 700;
    font-size: var(--v2-text-sm);
    text-decoration: none;
    transition: transform var(--v2-duration-fast) var(--v2-ease-out);
}

.btn-cyan {
    background: var(--v2-red);
    color: var(--v2-white);
}

.btn-outline {
    background: transparent;
    color: var(--v2-white);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-cyan:hover,
.btn-outline:hover { transform: translateY(-1px); }

.btn-cyan:active,
.btn-outline:active { transform: translateY(0); }

/* --- Index : liste des guides --------------------------------------------- */

.guide-list-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--v2-gap-xl);
    padding: var(--v2-gap-xl) 0;
    align-items: start;
}

.guide-list-item {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    padding: var(--v2-gap);
    background: var(--v2-white);
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius);
    text-decoration: none;
    margin-bottom: var(--v2-gap-sm);
    transition: border-color var(--v2-duration-fast) var(--v2-ease-out),
                box-shadow var(--v2-duration-fast) var(--v2-ease-out);
}

.guide-list-item:hover {
    border-color: var(--v2-blue);
    box-shadow: var(--v2-shadow-lift);
}

.gli-num {
    font-family: var(--v2-font-title);
    font-weight: 700;
    font-size: var(--v2-text-xl);
    color: var(--v2-blue-tint-2);
    flex-shrink: 0;
}

.gli-meta {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.5rem;
}

.gli-tag {
    font-size: var(--v2-text-xs);
    font-weight: 700;
    color: var(--v2-blue);
    background: var(--v2-blue-tint);
    padding: 0.125rem 0.5rem;
    border-radius: var(--v2-radius-pill);
}

.gli-tag-red {
    color: var(--v2-red);
    background: var(--v2-red-tint);
}

.gli-time {
    font-size: var(--v2-text-xs);
    color: var(--v2-ink-3);
}

.guide-list-item h2 {
    font-family: var(--v2-font-title);
    font-weight: 700;
    font-size: var(--v2-text-lg);
    color: var(--v2-ink);
    margin-bottom: 0.375rem;
}

.guide-list-item p {
    color: var(--v2-ink-2);
    font-size: var(--v2-text-sm);
    line-height: 1.55;
    margin-bottom: 0.625rem;
}

.gli-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--v2-blue);
    font-weight: 700;
    font-size: var(--v2-text-sm);
}

.guide-index-sidebar {
    position: sticky;
    top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: var(--v2-gap);
}

.gis-cta {
    background: var(--v2-blue);
    border-radius: var(--v2-radius);
    padding: var(--v2-gap);
}

.gis-cta-label {
    font-size: var(--v2-text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.375rem;
}

.gis-cta h3 {
    font-family: var(--v2-font-title);
    font-size: var(--v2-text-lg);
    color: var(--v2-white);
    margin-bottom: 0.5rem;
}

.gis-cta p {
    color: rgba(255, 255, 255, 0.8);
    font-size: var(--v2-text-sm);
    line-height: 1.5;
    margin-bottom: 0.875rem;
}

.gis-info {
    background: var(--v2-white);
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius);
    padding: var(--v2-gap);
}

.gis-info-title {
    font-family: var(--v2-font-title);
    font-weight: 700;
    font-size: var(--v2-text-sm);
    color: var(--v2-ink);
    margin-bottom: 0.5rem;
}

.gis-info p {
    font-size: var(--v2-text-xs);
    color: var(--v2-ink-2);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.gis-sources {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.gis-sources a {
    font-size: var(--v2-text-xs);
    color: var(--v2-blue);
    font-weight: 600;
    text-decoration: none;
}

.gis-sources a:hover { text-decoration: underline; }

/* --- Responsive ------------------------------------------------------------ */

@media (max-width: 900px) {
    .guide-layout {
        grid-template-columns: 1fr;
        padding: var(--v2-gap-lg) var(--v2-pad-x);
    }

    .guide-sidebar {
        position: static;
        flex-direction: column;
    }

    .guide-toc { display: none; }

    .guide-list-layout {
        grid-template-columns: 1fr;
    }

    .guide-index-sidebar {
        position: static;
    }
}

@media (max-width: 600px) {
    .guide-hero { padding: 2.5rem 0 2rem; }
    .guide-index-hero { padding: 2.5rem 0 2rem; }
    .guide-cta-btns { flex-direction: column; }
    .guide-cta-btns a { width: 100%; text-align: center; }
    .gli-num { display: none; }
}
