/* ===========================================
   SIGNIFICANT — Design System v14
   Direction : Revue académique / journal
   Palette : Crème (#F5F2EC), Bordeaux (#6B2D3E),
             Encre (#1A1410), Sable (#D4C5A9)
   Typographie : DM Serif Display (titres)
                 Source Serif 4 (corps)
   =========================================== */

:root {
    /* Palette */
    --bg:           #F5F2EC;      /* Crème chaud */
    --surface:      #EDE8DF;      /* Crème légèrement plus sombre */
    --surface-2:    #E2DAD0;      /* Ligne, séparateurs */
    --ink:          #1A1410;      /* Noir encre */
    --ink-2:        #4A3F35;      /* Corps de texte */
    --ink-3:        #7A6E64;      /* Secondaire, captions */
    --bordeaux:     #6B2D3E;      /* Accent principal */
    --bordeaux-2:   #8B3D52;      /* Accent survolé */
    --bordeaux-soft:#F0E6EA;      /* Fond teinté bordeaux */
    --sable:        #D4C5A9;      /* Sable / neutre chaud */
    --code-bg:      #2A2420;      /* Fond blocs de code */
    --code-text:    #E8D5B7;      /* Texte code */

    /* Typographie */
    --font-serif:    'DM Serif Display', Georgia, 'Times New Roman', serif;
    --font-body:     'Source Serif 4', Georgia, 'Times New Roman', serif;
    --font-mono:     'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

    /* Rayons — sobres, jamais trop ronds */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 10px;

    /* Transition standard */
    --transition: 0.2s ease;

    /* Largeur max */
    --max-width: 1100px;
    --content-width: 780px;
}

/* ===========================================
   RESET & BASE
   =========================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--ink-2);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===========================================
   LOADER
   =========================================== */
#page-loader {
    position: fixed;
    inset: 0;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.4s ease;
}

#page-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-inner {
    text-align: center;
}

.loader-wordmark {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    letter-spacing: 0.06em;
    margin-bottom: 0.35rem;
    display: inline-block;
    background: linear-gradient(
        110deg,
        #6B2D3E 0%,
        #6B2D3E 35%,
        #D4C5A9 50%,
        #6B2D3E 65%,
        #6B2D3E 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShimmer 2s linear infinite;
}

.loader-shimmer-text {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    letter-spacing: 0.05em;
    margin-bottom: 1.1rem;
    display: block;
}

.text-shimmer {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    background: linear-gradient(
        110deg,
        #6B2D3E 0%,
        #6B2D3E 35%,
        #D4C5A9 50%,
        #6B2D3E 65%,
        #6B2D3E 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShimmer 1.5s linear infinite;
}

@keyframes textShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.loader-bar-track {
    width: 180px;
    height: 2px;
    background: var(--surface-2);
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    border-radius: 2px;
}

.loader-bar-fill {
    position: absolute;
    left: -100%;
    top: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(
        to right,
        transparent 0%,
        var(--bordeaux) 70%,
        #8B3D52 100%
    );
    box-shadow: 0 0 6px rgba(107, 45, 62, 0.4);
    animation: loaderSlide 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes loaderSlide {
    0%   { left: -100%; }
    50%  { left: 0%; }
    100% { left: 100%; }
}

/* ===========================================
   SÉLECTION
   =========================================== */
::selection {
    background: var(--bordeaux);
    color: #fff;
}

/* ===========================================
   SCROLLBAR
   =========================================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--sable); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--bordeaux); }

/* ===========================================
   TYPOGRAPHIE GLOBALE
   =========================================== */
h1, h2, h3, h4 {
    font-family: var(--font-serif);
    color: var(--ink);
    line-height: 1.2;
    font-weight: 400; /* DM Serif Display n'a qu'un seul poids */
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.1rem; }

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

strong { font-weight: 600; color: var(--ink); }
em { font-style: italic; }

a {
    color: var(--bordeaux);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color var(--transition);
}

a:hover { color: var(--bordeaux-2); }

ul, ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

li { margin-bottom: 0.3rem; }

/* ===========================================
   MISE EN PAGE
   =========================================== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 5%;
}

.content-narrow {
    max-width: var(--content-width);
    margin: 0 auto;
}

/* ===========================================
   NAVIGATION
   =========================================== */
nav.site-nav {
    position: sticky;
    top: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--surface-2);
    z-index: 100;
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.site-wordmark {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    color: var(--bordeaux);
    text-decoration: none;
    letter-spacing: 0.03em;
}

.site-wordmark:hover {
    color: var(--bordeaux-2);
}

.nav-links {
    list-style: none;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem;
    margin: 0;
    border-radius: 8px;
    background: rgba(226, 218, 208, 0.4);
    border: 1px solid var(--surface-2);
}

.nav-links li {
    list-style: none;
    margin: 0;
    display: inline-flex;
}

.nav-links a,
.nav-links button.lang-btn {
    position: relative;
    z-index: 2;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--ink-2);
    text-decoration: none;
    letter-spacing: 0.02em;
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    border: none;
    background: transparent;
    transition: color 0.22s ease;
    white-space: nowrap;
}

.nav-links a.active {
    color: var(--bordeaux);
    font-weight: 600;
}

.nav-links a:hover,
.nav-links button.lang-btn:hover {
    color: var(--ink);
}

/* Floating Animated Pill Background */
.nav-hover-pill {
    position: absolute;
    top: 0;
    left: 0;
    height: 0;
    width: 0;
    background: #FAF8F5;
    border: 1px solid rgba(107, 45, 62, 0.15);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(26, 20, 16, 0.08);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transform: translate3d(0, 0, 0);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1),
                width 0.3s cubic-bezier(0.25, 1, 0.5, 1),
                height 0.3s cubic-bezier(0.25, 1, 0.5, 1),
                opacity 0.2s ease;
}

/* Bouton langue */
.lang-btn {
    background: transparent;
    border: none;
    color: var(--ink-3);
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    z-index: 2;
    transition: color var(--transition);
}

.lang-btn:hover {
    color: var(--bordeaux);
}

/* Hamburger mobile */
.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0.45rem;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    transition: all 0.2s ease;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
    background: var(--surface);
    border-color: var(--surface-2);
    color: var(--bordeaux);
}

.nav-toggle.is-active {
    background: var(--bordeaux-soft);
    color: var(--bordeaux);
    border-color: rgba(107, 45, 62, 0.2);
}

.nav-toggle svg {
    display: block;
    transition: transform 0.25s ease;
}

.nav-toggle.is-active svg {
    transform: rotate(90deg);
}

/* ===========================================
   HERO
   =========================================== */
.hero {
    padding: 5rem 5% 4rem;
    border-bottom: 1px solid var(--surface-2);
    max-width: var(--max-width);
    margin: 0 auto;
}

.hero-kicker {
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--bordeaux);
    font-weight: 600;
    margin-bottom: 1.2rem;
    display: block;
}

.hero h1 {
    max-width: 700px;
    margin-bottom: 1.5rem;
    color: var(--ink);
}

.hero .subtitle {
    font-size: 1.15rem;
    color: var(--ink-3);
    max-width: 560px;
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

/* Bouton CTA — sobre, carré */
.btn-primary {
    display: inline-block;
    background: var(--bordeaux);
    color: #fff;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: background var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--bordeaux-2);
    color: #fff;
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--ink-3);
    padding: 0.7rem 1.8rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: 1px solid var(--sable);
    transition: all var(--transition);
    cursor: pointer;
    margin-left: 1rem;
}

.btn-secondary:hover {
    border-color: var(--bordeaux);
    color: var(--bordeaux);
}

/* Lien discret */
.discrete-link {
    font-size: 0.85rem;
    color: var(--ink-3);
    text-decoration: none;
    border-bottom: 1px dotted var(--sable);
    transition: all var(--transition);
}

.discrete-link:hover {
    color: var(--bordeaux);
    border-bottom-color: var(--bordeaux);
}

/* ===========================================
   SECTIONS / CHAPITRES
   =========================================== */
.section {
    padding: 4rem 0;
    border-bottom: 1px solid var(--surface-2);
}

.section:last-of-type {
    border-bottom: none;
}

/* En-tête de chapitre */
.chapter-header {
    display: flex;
    align-items: baseline;
    gap: 1.2rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--bordeaux);
}

.chapter-number {
    font-family: var(--font-serif);
    font-size: 3rem;
    color: var(--surface-2);
    line-height: 1;
    user-select: none;
}

.chapter-header h2 {
    font-size: clamp(1.4rem, 2.5vw, 1.9rem);
    color: var(--ink);
}

/* Boîte de contenu */
.content-box {
    background: var(--surface);
    border: 1px solid var(--surface-2);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
}

/* ===========================================
   GRILLES — plus jamais 3 cartes alignées
   On utilise soit 2 colonnes soit liste
   =========================================== */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

/* Grille de 3 transformée en liste verticale alternée */
.list-3 {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem 0;
}

.list-3 .item {
    padding: 1.5rem;
    border-left: 3px solid var(--bordeaux);
    background: var(--surface);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* ===========================================
   CARTES / PANNEAUX
   =========================================== */
.card, .stat-card, .test-card {
    background: var(--surface);
    border: 1px solid var(--surface-2);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: border-color var(--transition);
}

.card:hover, .stat-card:hover {
    border-color: var(--bordeaux);
}

.card h3, .stat-card h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--bordeaux);
    font-family: var(--font-body);
    font-weight: 700;
}

/* Test card avec bordure gauche colorée */
.test-card {
    border-left-width: 3px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin-bottom: 1.5rem;
    border-color: var(--bordeaux);
    border-left-color: var(--bordeaux);
}

/* ===========================================
   EXAMPLE BOX / TIP BOX
   =========================================== */
.example-box {
    background: var(--bordeaux-soft);
    border-left: 3px solid var(--bordeaux);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.example-box h4 {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--bordeaux);
    margin-bottom: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tip-box {
    background: var(--surface);
    border-left: 3px solid var(--sable);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-size: 0.95rem;
    color: var(--ink-3);
}

.highlight-box {
    background: var(--bordeaux-soft);
    border-left: 3px solid var(--bordeaux);
    padding: 1.5rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* Comparaison gauche/droite */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.comparison-item {
    background: var(--surface);
    border: 1px solid var(--surface-2);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.comparison-item h3 {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.5rem;
}

.comparison-item.option-a { border-left: 3px solid var(--bordeaux); }
.comparison-item.option-b { border-left: 3px solid var(--ink-3); }
.comparison-item.option-c { border-left: 3px solid var(--sable); }

.comparison-item h5 {
    font-family: var(--font-body);
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--ink);
}

.ex-tag {
    font-size: 0.82rem;
    color: var(--ink-3);
    font-style: italic;
    margin-top: 0.5rem;
    display: block;
}

/* ===========================================
   QUIZ
   =========================================== */
.quiz-section {
    padding: 4rem 0;
}

.quiz-container {
    max-width: 780px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--surface-2);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

/* ===========================================
   SCROLL PROGRESS (Lecture & Quiz)
   =========================================== */
.reading-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 10000;
    pointer-events: none;
    background: transparent;
}

.reading-scroll-progress .scroll-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(
        to right,
        rgba(107, 45, 62, 0) 0%,
        var(--bordeaux) 75%,
        #8B3D52 100%
    );
    box-shadow: 0 0 10px rgba(107, 45, 62, 0.45);
    transition: width 0.15s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Barre de progression Quiz */
.progress-container {
    width: 100%;
    height: 4px;
    background: var(--surface-2);
    border-radius: 2px;
    margin-bottom: 2rem;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(107, 45, 62, 0.1) 0%,
        var(--bordeaux) 75%,
        #8B3D52 100%
    );
    box-shadow: 0 0 8px rgba(107, 45, 62, 0.4);
    width: 0%;
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Breadcrumbs */
.quiz-breadcrumbs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 0.3rem;
}

.quiz-breadcrumbs::-webkit-scrollbar { display: none; }

.breadcrumb-step {
    padding: 0.35rem 0.85rem;
    background: var(--surface);
    border: 1px solid var(--surface-2);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: var(--ink-2);
    white-space: nowrap;
    font-family: var(--font-body);
    font-weight: 500;
    transition: all var(--transition);
}

.breadcrumb-step.active,
.breadcrumb-step.active span {
    border-color: var(--bordeaux);
    color: #FFFFFF !important;
    font-weight: 600;
    background: var(--bordeaux);
    box-shadow: 0 2px 6px rgba(107, 45, 62, 0.2);
}

/* Question */
.question-card h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--ink);
    margin-bottom: 1.8rem;
    text-align: left;
}

/* Options du quiz */
.options-grid {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.start-options-grid {
    display: grid;
    grid-template-columns: 1fr;
}

.quiz-btn {
    padding: 1.1rem 1.5rem;
    background: #FAF8F5;
    border: 1px solid var(--surface-2);
    color: var(--ink);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 1.02rem;
    font-weight: 500;
    text-align: left;
    transition: all var(--transition);
    line-height: 1.5;
}

.quiz-btn:hover {
    background: var(--bordeaux-soft);
    border-color: var(--bordeaux);
    color: var(--bordeaux);
    transform: translateX(2px);
}

/* Bouton aide */
.help-btn {
    background: var(--surface-2) !important;
    border: 1px solid var(--sable) !important;
    color: var(--ink) !important;
    font-size: 0.9rem !important;
    font-weight: 600;
}

.help-btn:hover {
    border-color: var(--bordeaux) !important;
    color: var(--bordeaux) !important;
}

/* Bouton expert / fiches */
.expert-btn {
    background: var(--bordeaux) !important;
    border: 1px solid var(--bordeaux) !important;
    color: #FFFFFF !important;
    font-size: 0.92rem;
    font-weight: 600;
}

.expert-btn:hover {
    background: var(--bordeaux-2) !important;
    box-shadow: 0 4px 12px rgba(107, 45, 62, 0.25);
}

/* Bouton retour */
.back-btn {
    background: transparent;
    border: none;
    color: var(--ink-2);
    font-size: 0.9rem;
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 1.2rem;
    padding: 0.4rem 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color var(--transition);
}

.back-btn:hover { color: var(--bordeaux); }

/* ===========================================
   BOOSTER CARD (Résultat du Quiz : Carte Réversible Recto/Verso avec 3D Tilt)
   =========================================== */
.booster-scene-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 1.5rem auto 3rem;
}

.booster-flip-scene {
    perspective: 1200px;
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.booster-card-3d-tilt {
    position: relative;
    width: 100%;
    transform-style: preserve-3d;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.booster-flipper {
    position: relative;
    width: 100%;
    height: 560px;
    transform-style: preserve-3d;
    transition: transform 0.65s cubic-bezier(0.34, 1.3, 0.64, 1);
}

.booster-flipper.is-flipped {
    transform: rotateY(180deg);
}

.booster-face {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 14px;
    overflow: hidden;
    background: #FAF8F5;
    border: 2px solid var(--bordeaux);
    box-shadow: 0 16px 40px -10px rgba(26, 20, 16, 0.18),
                0 0 0 1px rgba(107, 45, 62, 0.15),
                inset 0 0 0 1px rgba(255, 255, 255, 0.9);
}

.booster-card-glare {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.25s ease;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.45) 0%, transparent 65%);
    mix-blend-mode: overlay;
}

/* -------------------------------------------
   FACE 1 : RECTO (ART ILLUSTRATION)
   ------------------------------------------- */
.booster-face-front {
    transform: rotateY(0deg);
    cursor: pointer;
    user-select: none;
    display: flex;
    flex-direction: column;
}

.booster-shimmer-sweep {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    opacity: 0.2;
    background: linear-gradient(
        115deg,
        transparent 20%,
        rgba(255, 255, 255, 0.6) 45%,
        rgba(255, 255, 255, 0.85) 50%,
        rgba(255, 255, 255, 0.6) 55%,
        transparent 80%
    );
    background-size: 200% 200%;
    transition: opacity 0.3s ease;
}

.booster-face-front:hover .booster-shimmer-sweep {
    opacity: 0.4;
    animation: cardShimmerSweep 2.4s infinite;
}

@keyframes cardShimmerSweep {
    0%   { background-position: 200% 0%; }
    100% { background-position: -200% 0%; }
}

.booster-front-inner {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    z-index: 2;
}

.booster-front-topbar {
    display: none !important;
}

.booster-front-wordmark {
    display: none !important;
}

.booster-art-frame {
    flex-grow: 1;
    border: 1.5px solid var(--surface-2);
    border-radius: 8px;
    overflow: hidden;
    background: #EFECE6;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.06);
}

.booster-art-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.booster-face-front:hover .booster-art-img {
    transform: scale(1.02);
}

/* -------------------------------------------
   FACE 2 : VERSO (RÉSULTAT TECHNIQUE DU TEST)
   ------------------------------------------- */
.booster-face-back {
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
}

.booster-back-inner {
    padding: 1.2rem 1.4rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    z-index: 2;
}

.booster-back-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    border-bottom: 1px solid var(--surface-2);
    padding-bottom: 0.8rem;
    margin-bottom: 1.1rem;
}

.booster-topbar-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.booster-rarity-badge,
.code-card-rarity {
    display: none !important;
}

.rarity-commune {
    background: #F5F2EC;
    color: #44403C;
    border: 1px solid #D6D3D1;
}

.rarity-peu_commune {
    background: #ECFDF5;
    color: #047857;
    border: 1px solid #A7F3D0;
}

.rarity-rare {
    background: #EFF6FF;
    color: #1D4ED8;
    border: 1px solid #BFDBFE;
}

.rarity-super_rare {
    background: #FAF5FF;
    color: #7E22CE;
    border: 1px solid #E9D5FF;
}

.rarity-mythique {
    background: #FFFBEB;
    color: #B45309;
    border: 1px solid #FDE68A;
}

.booster-actions-inline {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.booster-action-pill {
    padding: 0.28rem 0.7rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.18s ease;
    display: inline-flex;
    align-items: center;
    border: 1px solid transparent;
}

.booster-action-pill.btn-cours {
    background: var(--surface);
    color: var(--bordeaux);
    border-color: var(--bordeaux);
}

.booster-action-pill.btn-cours:hover {
    background: var(--bordeaux);
    color: #FFFFFF !important;
}

.booster-action-pill.btn-methodo {
    background: var(--bordeaux);
    color: #FFFFFF !important;
    border-color: var(--bordeaux);
}

.booster-action-pill.btn-methodo:hover {
    background: var(--bordeaux-2);
}

.booster-flip-back-btn {
    background: transparent;
    border: 1px solid var(--surface-2);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--ink-2);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.booster-flip-back-btn:hover {
    background: var(--surface-2);
    color: var(--bordeaux);
    transform: rotate(-45deg);
}

.booster-title-box {
    background: #F5EFEB !important;
    border: 1.5px solid #DCD4CB !important;
    border-left: 3.5px solid var(--bordeaux) !important;
    border-radius: 6px;
    padding: 0.85rem 1.1rem;
    text-align: left;
    margin-bottom: 1.1rem;
}

.booster-test-title {
    font-family: var(--font-serif);
    font-size: 1.45rem;
    color: #1A1410 !important;
    margin: 0;
    line-height: 1.25;
}

/* Chemin du Quiz (Breadcrumbs sur la carte Verso) */
.booster-quiz-path-box {
    background: #F4ECE8 !important;
    border: 1px dashed #D6CEC5 !important;
    border-radius: 6px;
    padding: 0.45rem 0.65rem;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 2;
}

.booster-quiz-path-trail {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.35rem;
    line-height: 1.4;
}

.path-step-pill {
    background: #FFFFFF !important;
    border: 1px solid #D6CEC5 !important;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.74rem;
    color: #2D241E !important;
    font-weight: 600;
}

.path-step-pill.is-final {
    background: #F5EBF0 !important;
    color: var(--bordeaux) !important;
    border-color: rgba(107, 45, 62, 0.4) !important;
    font-weight: 700;
}

.path-sep-arrow {
    color: #7A6E64 !important;
    font-size: 0.72rem;
    user-select: none;
}

.booster-desc-box {
    position: relative;
    z-index: 2;
    flex-grow: 1;
    margin-bottom: 0.5rem;
    overflow-y: auto;
    padding-bottom: 1rem;
    padding-right: 0.2rem;
}

.booster-test-desc {
    font-size: 0.96rem;
    line-height: 1.65;
    color: #382F28 !important;
    margin: 0;
}

/* -------------------------------------------
   ILLUSTRATION FILIGRANÉE TRANSPARENTE (VERSO EN BAS À DROITE)
   Prend environ 1/3 de la hauteur et s'étend jusqu'au tiers gauche
   en restant subtile sous le texte
   ------------------------------------------- */
.booster-deco-corner {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 68%;
    height: 36%;
    z-index: 1;
    pointer-events: none;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    user-select: none;
}

.booster-deco-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom right;
    opacity: 0.18;
    mix-blend-mode: multiply;
    pointer-events: none;
    display: block;
    transition: opacity 0.3s ease;
}

.booster-face-back:hover .booster-deco-img {
    opacity: 0.26;
}

[data-theme="dark"] .booster-deco-img {
    opacity: 0.15;
    mix-blend-mode: screen;
}

/* -------------------------------------------
   TIROIR MÉTHODOLOGIE & CODE (SLIDE-UP DRAWER)
   ------------------------------------------- */
.booster-methodo-drawer {
    position: absolute;
    inset: 0;
    background: #FAF8F5;
    z-index: 25;
    border-radius: 12px;
    padding: 1.2rem 1.4rem;
    display: flex;
    flex-direction: column;
    transform: translateY(102%);
    transition: transform 0.35s cubic-bezier(0.32, 1, 0.32, 1);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.15);
}

.booster-methodo-drawer.is-open {
    transform: translateY(0);
}

.methodo-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--surface-2);
    padding-bottom: 0.55rem;
    margin-bottom: 0.8rem;
}

.methodo-drawer-header h4 {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    color: var(--ink);
    margin: 0;
}

.methodo-drawer-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--ink-3);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    line-height: 1;
    transition: color 0.15s ease;
}

.methodo-drawer-close:hover {
    color: var(--bordeaux);
}

.methodo-drawer-body {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding-right: 0.2rem;
}

.methodo-usage-text {
    font-size: 0.86rem;
    color: var(--ink-2);
    line-height: 1.5;
    margin: 0;
    background: var(--surface);
    padding: 0.8rem 0.95rem;
    border-radius: 6px;
    border: 1px solid var(--surface-2);
}

.methodo-code-tabs {
    display: flex;
    gap: 0.3rem;
    border-bottom: 1px solid var(--surface-2);
}

.code-tab-btn {
    padding: 0.4rem 0.85rem;
    background: transparent;
    border: 1px solid var(--surface-2);
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--ink-3);
    transition: all 0.15s ease;
}

.code-tab-btn:hover {
    color: var(--bordeaux);
}

.code-tab-btn.active {
    background: var(--code-bg, #1A1410);
    color: #FFFFFF;
    border-color: var(--code-bg, #1A1410);
}

.code-pane {
    display: none;
}

.code-pane.active {
    display: block;
}

.code-box-wrapper {
    position: relative;
}

.code-box-wrapper pre {
    background: var(--code-bg, #1A1410);
    color: #E2DAD0;
    padding: 0.95rem 1rem;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.45;
    overflow-x: auto;
    margin: 0;
    max-height: 180px;
}

.code-copy-btn {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #FFFFFF;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.code-copy-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.code-copy-btn.copied {
    background: #059669;
    border-color: #059669;
    color: #FFFFFF;
}

.jamovi-path-card {
    background: var(--surface);
    border: 1px solid var(--surface-2);
    border-left: 3px solid var(--bordeaux);
    border-radius: 6px;
    padding: 0.95rem 1rem;
}

.jamovi-badge {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--bordeaux);
    font-weight: 700;
    display: block;
    margin-bottom: 0.35rem;
}

.jamovi-path-text {
    font-size: 0.88rem;
    color: var(--ink);
    line-height: 1.55;
    margin: 0;
    font-weight: 500;
}

.methodo-drawer-back-action {
    margin-top: auto;
    padding: 0.6rem;
    background: transparent;
    border: 1px dashed var(--surface-2);
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--bordeaux);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

.methodo-drawer-back-action:hover {
    background: var(--surface-2);
}

/* -------------------------------------------
   BOUTON RECOMMENCER EN DESSOUS DE LA CARTE
   ------------------------------------------- */
.booster-restart-wrapper {
    margin-top: 1.6rem;
    text-align: center;
}

.booster-btn-restart-main {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface);
    border: 1.5px solid var(--bordeaux);
    color: var(--bordeaux);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.7rem 1.6rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(107, 45, 62, 0.08);
}

.booster-btn-restart-main:hover {
    background: var(--bordeaux);
    color: #FFFFFF !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(107, 45, 62, 0.22);
}

.restart-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.recap-box h5 {
    font-family: var(--font-body);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--bordeaux);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* ===========================================
   GALERIE DES CARTES DE TESTS DANS THÉORIE
   =========================================== */
.theory-deck-section {
    margin: 1.5rem 0 3.5rem;
    padding: 2.2rem 2rem 2.5rem;
    background: #FAF8F5;
    border: 1px solid var(--surface-2);
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.theory-deck-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 1.4rem;
}

.theory-deck-title {
    font-family: var(--font-serif);
    font-size: 2.1rem;
    color: var(--ink);
    margin: 0 0 1.2rem;
    font-weight: 700;
}

.theory-deck-filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.deck-filter-btn {
    background: #FFFFFF;
    border: 1px solid var(--surface-2);
    color: var(--ink-2);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.deck-filter-btn:hover {
    border-color: var(--bordeaux);
    color: var(--bordeaux);
}

.deck-filter-btn.active {
    background: var(--bordeaux);
    color: #FFFFFF !important;
    border-color: var(--bordeaux);
    box-shadow: 0 2px 8px rgba(107, 45, 62, 0.25);
}

/* ===========================================
   DECK DE CARTES : LAYOUT 2 VOLETS (INDEX + RUBAN HORIZONTAL)
   =========================================== */
.theory-deck-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.3rem;
    align-items: stretch;
    margin-top: 1rem;
}

@media (max-width: 960px) {
    .theory-deck-layout {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
}

/* Volet latéral gauche : Index alphabétique */
.theory-deck-sidebar {
    background: #FFFFFF;
    border: 1px solid var(--surface-2);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    height: 242px;
}

.deck-sidebar-header {
    padding: 0.55rem 0.85rem;
    background: var(--surface);
    border-bottom: 1px solid var(--surface-2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.deck-sidebar-title {
    font-family: var(--font-serif);
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: 0.02em;
}

.deck-sidebar-count {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--bordeaux);
    background: var(--bordeaux-soft);
    padding: 0.12rem 0.45rem;
    border-radius: 10px;
}

.deck-alphabetical-list {
    overflow-y: auto;
    padding: 0.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
}

.deck-alphabetical-list::-webkit-scrollbar {
    width: 5px;
}
.deck-alphabetical-list::-webkit-scrollbar-thumb {
    background: var(--surface-2);
    border-radius: 3px;
}
.deck-alphabetical-list::-webkit-scrollbar-thumb:hover {
    background: var(--bordeaux);
}

.deck-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.38rem 0.6rem;
    border-radius: 5px;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-body);
    font-size: 0.82rem;
    color: var(--ink-2);
    transition: all 0.15s ease;
    width: 100%;
}

.deck-list-item:hover {
    background: #FFF7F8;
    border-color: rgba(107, 45, 62, 0.2);
    color: var(--bordeaux);
}

.deck-list-item.is-active {
    background: var(--bordeaux);
    color: #FFFFFF !important;
    border-color: var(--bordeaux);
}

.deck-list-item-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.deck-list-item.is-active .deck-list-item-title {
    font-weight: 600;
    color: #FFFFFF !important;
}

.deck-list-item-arrow {
    font-size: 0.75rem;
    opacity: 0.5;
    transition: transform 0.15s ease;
}

.deck-list-item:hover .deck-list-item-arrow {
    opacity: 1;
    transform: translateX(2px);
}

/* Volet principal : Carrousel horizontal avec flèches */
.theory-deck-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
    background: #FFFFFF;
    border: 1px solid var(--surface-2);
    border-radius: 10px;
    padding: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    height: 242px;
}

.deck-ribbon-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 1.5px solid var(--surface-2);
    color: var(--ink-2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.deck-ribbon-arrow:hover {
    background: var(--bordeaux);
    border-color: var(--bordeaux);
    color: #FFFFFF;
    box-shadow: 0 6px 16px rgba(107, 45, 62, 0.3);
    transform: translateY(-50%) scale(1.08);
}

.deck-ribbon-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.deck-ribbon-arrow.prev {
    left: 8px;
}

.deck-ribbon-arrow.next {
    right: 8px;
}

.theory-cards-ribbon {
    display: flex;
    flex-direction: row;
    gap: 0.85rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 0.35rem 2.6rem;
    scrollbar-width: thin;
    scrollbar-color: var(--surface-2) transparent;
    width: 100%;
    height: 100%;
    align-items: center;
}

.theory-cards-ribbon::-webkit-scrollbar {
    height: 5px;
}
.theory-cards-ribbon::-webkit-scrollbar-thumb {
    background: var(--surface-2);
    border-radius: 3px;
}
.theory-cards-ribbon::-webkit-scrollbar-thumb:hover {
    background: var(--bordeaux);
}

/* Vraies MINI-CARTES COMPACTES */
.deck-mini-card {
    flex: 0 0 138px;
    width: 138px;
    height: 206px;
    min-height: 206px;
    background: #FFFFFF;
    border: 1.5px solid var(--surface-2);
    border-radius: 9px;
    padding: 0.5rem;
    cursor: pointer;
    user-select: none;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: transform 0.22s cubic-bezier(0.34, 1.4, 0.64, 1),
                border-color 0.2s ease,
                box-shadow 0.22s ease;
}

.deck-mini-card:hover {
    transform: translateY(-4px);
    border-color: var(--bordeaux);
    box-shadow: 0 8px 18px rgba(107, 45, 62, 0.18);
}

.deck-mini-card.highlight-focus {
    border-color: var(--bordeaux);
    box-shadow: 0 0 0 3px rgba(107, 45, 62, 0.35);
    transform: translateY(-4px) scale(1.03);
}

.deck-mini-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.deck-mini-topbar {
    display: none !important;
}

.deck-mini-wordmark {
    display: none !important;
}

.deck-mini-topbar .booster-rarity-badge {
    display: none !important;
}

.deck-mini-art-frame {
    height: 112px;
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--surface-2);
    background: #EFECE6;
}

.deck-mini-art-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.deck-mini-card:hover .deck-mini-art-img {
    transform: scale(1.05);
}

.deck-mini-glint {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.7) 50%, transparent 70%);
    transition: opacity 0.3s;
}

.deck-mini-card:hover .deck-mini-glint {
    opacity: 0.5;
}

.deck-mini-footer {
    margin-top: 0.35rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
    gap: 0.15rem;
}

.deck-mini-title {
    font-family: var(--font-serif);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ink);
    margin: 0;
    line-height: 1.22;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
}

.deck-mini-hint {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--bordeaux);
    font-weight: 600;
}

/* ===========================================
   MODALE D'INSPECTION DE LA CARTE BOOSTER (3D)
   =========================================== */
.booster-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.booster-modal-overlay.is-active {
    opacity: 1;
    pointer-events: auto;
}

.booster-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(26, 20, 16, 0.72);
    backdrop-filter: blur(8px);
}

.booster-modal-window {
    position: relative;
    z-index: 1001;
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: boosterModalPop 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
}

@keyframes boosterModalPop {
    0% { opacity: 0; transform: scale(0.92) translateY(16px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.booster-modal-close-btn {
    position: absolute;
    top: -46px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #FFFFFF;
    font-size: 1.2rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.booster-modal-close-btn:hover {
    background: var(--bordeaux);
    border-color: var(--bordeaux);
    transform: rotate(90deg);
}

.booster-modal-body {
    width: 100%;
}

/* ===========================================
   AIDE / HELP CONTAINER
   =========================================== */
.help-container {
    background: var(--surface);
    border: 1px solid var(--surface-2);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-top: 1rem;
}

.help-container h4 {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--ink);
    margin-bottom: 1rem;
    text-align: left;
}

.help-tabs-header {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--surface-2);
    padding-bottom: 0.5rem;
    overflow-x: auto;
}

.help-tab-btn {
    padding: 0.4rem 0.9rem;
    background: transparent;
    border: 1px solid var(--surface-2);
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    color: var(--ink-3);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all var(--transition);
    white-space: nowrap;
}

.help-tab-btn:hover { color: var(--bordeaux); }

.help-tab-btn.active {
    background: var(--bg);
    border-color: var(--surface-2);
    border-bottom-color: var(--bg);
    color: var(--bordeaux);
    margin-bottom: -1px;
}

.help-tab-pane {
    display: none;
    font-size: 0.9rem;
    line-height: 1.6;
}

.help-tab-pane.active { display: block; }

.help-footer {
    border-top: 1px solid var(--surface-2);
    margin-top: 1rem;
    padding-top: 0.8rem;
    font-size: 0.82rem;
    color: var(--ink-3);
    font-style: italic;
}

/* ===========================================
   EXPERT CONTAINER
   =========================================== */
.expert-container {
    background: var(--code-bg);
    border-left: 3px solid var(--bordeaux);
    padding: 1.5rem;
    margin-top: 1rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.expert-container h4 {
    font-family: var(--font-body);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sable);
    font-weight: 700;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 0.5rem;
}

.expert-content p {
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
    color: var(--code-text);
}

.expert-content code {
    background: rgba(255,255,255,0.08);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--sable);
}

/* ===========================================
   BLOCS DE CODE
   =========================================== */
.code-wrapper {
    margin: 1.5rem 0;
    background: var(--code-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.06);
}

.code-tabs {
    display: flex;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.tab-btn {
    padding: 0.6rem 1.2rem;
    background: transparent;
    border: none;
    color: var(--code-text);
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    transition: all var(--transition);
    opacity: 0.6;
}

.tab-btn:hover { opacity: 1; }

.tab-btn.active {
    opacity: 1;
    border-bottom: 2px solid var(--bordeaux);
    color: #fff;
}

.code-content {
    padding: 1.5rem;
    position: relative;
    display: none;
}

.code-content.active { display: block; }

.code-content pre {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    color: var(--code-text);
    overflow-x: auto;
    line-height: 1.6;
}

.copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--code-text);
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-family: var(--font-body);
    cursor: pointer;
    transition: background var(--transition);
}

.copy-btn:hover { background: rgba(255,255,255,0.12); }

.code-snippet {
    font-family: var(--font-mono);
    background: var(--code-bg);
    padding: 0.7rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--code-text);
    display: block;
    margin: 0.8rem 0;
    font-size: 0.88rem;
    overflow-x: auto;
}

/* ===========================================
   TIMELINE
   =========================================== */
.timeline {
    margin-top: 2rem;
    position: relative;
    padding-left: 2rem;
    border-left: 2px solid var(--surface-2);
}

.timeline-item {
    margin-bottom: 2.5rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.5rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background: var(--bordeaux);
    border-radius: 50%;
    border: 3px solid var(--bg);
}

.timeline-item h3 {
    margin-bottom: 0.4rem;
    font-size: 1.1rem;
}

/* ===========================================
   SECTIONS DU GRIMOIRE / THEORY
   =========================================== */
.step-card {
    background: var(--bg);
    border-left: 4px solid var(--bordeaux);
    border-top: 1px solid var(--surface-2);
    border-right: 1px solid var(--surface-2);
    border-bottom: 1px solid var(--surface-2);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    position: relative;
}

.step-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--surface-2);
    position: absolute;
    right: 1.2rem;
    top: 1rem;
    font-family: var(--font-serif);
    user-select: none;
}

.var-list {
    margin: 1.5rem 0;
    list-style: none;
    padding: 0;
}

.var-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--surface-2);
    font-size: 0.95rem;
}

.var-list li:last-child { border-bottom: none; }

.formula-box {
    background: var(--surface);
    border: 1px solid var(--surface-2);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    margin: 1.5rem 0;
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--ink);
}

/* ===========================================
   GLOSSAIRE — Liens vers fiches
   =========================================== */
.glossary-link {
    color: var(--bordeaux);
    font-weight: 600;
    text-decoration: underline dotted;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: color var(--transition);
}

.glossary-link:hover { color: var(--bordeaux-2); }

/* ===========================================
   MODAL
   =========================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26,20,16,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
}

.modal-content {
    background: var(--bg);
    padding: 2.5rem;
    max-width: 480px;
    width: 90%;
    border-radius: var(--radius-lg);
    position: relative;
    border: 1px solid var(--surface-2);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--ink-3);
    line-height: 1;
    transition: color var(--transition);
}

.modal-close:hover { color: var(--bordeaux); }

/* ===========================================
   MINDMAP / G*POWER — Nouveau Wizard Interactif
   =========================================== */

/* Liens techniques cliquables vers le glossaire */
.glossary-term-link {
    display: inline;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    font-weight: 600;
    color: var(--bordeaux);
    text-decoration: underline dotted 1.5px;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
    border-radius: 2px;
}

.glossary-term-link:hover {
    color: #4A1423;
    background-color: rgba(107, 45, 62, 0.08);
}

/* Carte de présentation & téléchargement G*Power */
.gpower-welcome-card {
    display: grid;
    grid-template-columns: 1fr 310px;
    gap: 2rem;
    align-items: stretch;
    background: #FAF8F5;
    border: 1.5px solid var(--surface-2);
    border-left: 4px solid var(--bordeaux);
    border-radius: var(--radius-md);
    padding: 1.8rem 2rem;
    margin-bottom: 2rem;
}

.gpower-welcome-main h2 {
    font-family: var(--font-serif);
    font-size: 1.55rem;
    color: var(--ink);
    margin: 0 0 0.8rem;
    line-height: 1.25;
}

.gpower-welcome-desc {
    font-size: 0.96rem;
    color: var(--ink-2);
    line-height: 1.65;
    margin: 0 0 0.8rem;
}

.gpower-welcome-helper {
    font-size: 0.92rem;
    color: var(--ink-2);
    line-height: 1.55;
    margin: 0;
    background: rgba(107, 45, 62, 0.04);
    border: 1px dashed rgba(107, 45, 62, 0.25);
    border-radius: 6px;
    padding: 0.75rem 1rem;
}

.gpower-welcome-aside {
    display: flex;
    align-items: center;
}

.gpower-dl-box {
    width: 100%;
    background: #FFFFFF;
    border: 1.5px solid #E2DACF;
    border-radius: 8px;
    padding: 1.4rem 1.2rem;
    text-align: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

.gpower-dl-tag {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--bordeaux);
    background: rgba(107, 45, 62, 0.08);
    padding: 0.2rem 0.55rem;
    border-radius: 12px;
    letter-spacing: 0.05em;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.gpower-dl-box h4 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--ink);
    margin: 0 0 0.3rem;
}

.gpower-dl-box p {
    font-size: 0.82rem;
    color: var(--ink-3);
    margin: 0 0 0.9rem;
}

.gpower-dl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: var(--bordeaux);
    color: #FFFFFF !important;
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.65rem 1.2rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(107, 45, 62, 0.2);
}

.gpower-dl-btn:hover {
    background: #501F2D;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 45, 62, 0.3);
}

.gpower-dl-sub {
    font-size: 0.72rem;
    color: var(--ink-3);
    display: block;
    margin-top: 0.55rem;
}

/* Panneau du Wizard G*Power */
.gpower-wizard-panel {
    background: #FAF8F5;
    border: 1px solid var(--surface-2);
    border-radius: var(--radius-md);
    padding: 1.8rem 2rem;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.gpower-wizard-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-bottom: 1.2rem;
    margin-bottom: 1.6rem;
    border-bottom: 1px solid var(--surface-2);
}

.gpower-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #FFFFFF;
    border: 1px solid #D6CEC5;
    border-radius: 6px;
    padding: 0.45rem 0.9rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--ink-2);
    cursor: pointer;
    transition: all 0.2s ease;
}

.gpower-nav-btn:hover {
    border-color: var(--bordeaux);
    color: var(--bordeaux);
    background: #FFF7F8;
}

.gpower-nav-btn.gpower-nav-back:hover {
    transform: translateX(-2px);
}

.gpower-breadcrumbs {
    font-size: 0.88rem;
    color: var(--ink-2);
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.gpower-breadcrumbs .breadcrumb-step {
    display: inline-flex;
    align-items: center;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    padding: 0.35rem 0.85rem;
    line-height: 1.2;
}

.gpower-breadcrumbs .breadcrumb-step.active {
    font-weight: 600;
    color: #FFFFFF !important;
    background: var(--bordeaux);
    border: 1px solid var(--bordeaux);
    box-shadow: 0 2px 6px rgba(107, 45, 62, 0.2);
}

.gpower-breadcrumbs .breadcrumb-step.linkable {
    background: var(--surface);
    border: 1px solid var(--surface-2);
    font-family: inherit;
    font-weight: 500;
    color: var(--ink-2);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.gpower-breadcrumbs .breadcrumb-step.linkable:hover {
    border-color: var(--bordeaux);
    color: var(--bordeaux);
    background: #FFF7F8;
}

.breadcrumb-sep {
    color: var(--ink-3);
    margin: 0 0.15rem;
    font-size: 0.85rem;
}

/* Grilles de cartes de choix */
.gpower-cards-container {
    display: grid;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.gpower-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.4rem;
}

.gpower-grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.2rem;
}

/* Carte de choix avec variantes de couleurs thématiques */
.gpower-choice-card {
    position: relative;
    background: #FAF8F5;
    border-radius: 8px;
    padding: 1.6rem 1.5rem;
    cursor: pointer;
    text-align: left;
    display: flex;
    flex-direction: column;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.gpower-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.85rem;
}

.gpower-card-badge {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    letter-spacing: 0.04em;
    display: inline-block;
}

.gpower-card-arrow {
    font-size: 0.84rem;
    font-weight: 700;
    transition: transform 0.2s ease;
}

.gpower-choice-card:hover .gpower-card-arrow {
    transform: translateX(3px);
}

.gpower-card-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.gpower-card-desc {
    font-size: 0.9rem;
    color: var(--ink-2);
    line-height: 1.55;
    margin-top: 0.2rem;
}

/* Variantes de couleurs */
.gpower-choice-card.theme-emerald {
    background: #F1F8F4;
    border: 1.5px solid #A8D8BA;
}
.gpower-choice-card.theme-emerald:hover {
    border-color: #1E6B3E;
    box-shadow: 0 8px 24px rgba(30, 107, 62, 0.12);
    transform: translateY(-2px);
}
.gpower-choice-card.theme-emerald .gpower-card-badge { background: #1E6B3E; color: #FFFFFF; }
.gpower-choice-card.theme-emerald .gpower-card-title { color: #154D2C; }
.gpower-choice-card.theme-emerald .gpower-card-arrow { color: #1E6B3E; }

.gpower-choice-card.theme-navy {
    background: #F1F5F9;
    border: 1.5px solid #AFC5DC;
}
.gpower-choice-card.theme-navy:hover {
    border-color: #244B7A;
    box-shadow: 0 8px 24px rgba(36, 75, 122, 0.12);
    transform: translateY(-2px);
}
.gpower-choice-card.theme-navy .gpower-card-badge { background: #244B7A; color: #FFFFFF; }
.gpower-choice-card.theme-navy .gpower-card-title { color: #183354; }
.gpower-choice-card.theme-navy .gpower-card-arrow { color: #244B7A; }

.gpower-choice-card.theme-bordeaux {
    background: #FAF2F4;
    border: 1.5px solid #E6BAC2;
}
.gpower-choice-card.theme-bordeaux:hover {
    border-color: #6B2D3E;
    box-shadow: 0 8px 24px rgba(107, 45, 62, 0.12);
    transform: translateY(-2px);
}
.gpower-choice-card.theme-bordeaux .gpower-card-badge { background: #6B2D3E; color: #FFFFFF; }
.gpower-choice-card.theme-bordeaux .gpower-card-title { color: #4A1423; }
.gpower-choice-card.theme-bordeaux .gpower-card-arrow { color: #6B2D3E; }

.gpower-choice-card.theme-amber {
    background: #FAF5ED;
    border: 1.5px solid #E8D0AA;
}
.gpower-choice-card.theme-amber:hover {
    border-color: #8C531B;
    box-shadow: 0 8px 24px rgba(140, 83, 27, 0.12);
    transform: translateY(-2px);
}
.gpower-choice-card.theme-amber .gpower-card-badge { background: #8C531B; color: #FFFFFF; }
.gpower-choice-card.theme-amber .gpower-card-title { color: #5C330B; }
.gpower-choice-card.theme-amber .gpower-card-arrow { color: #8C531B; }

.gpower-choice-card.theme-terracotta {
    background: #FAF2EF;
    border: 1.5px solid #ECC4B8;
}
.gpower-choice-card.theme-terracotta:hover {
    border-color: #A03D24;
    box-shadow: 0 8px 24px rgba(160, 61, 36, 0.12);
    transform: translateY(-2px);
}
.gpower-choice-card.theme-terracotta .gpower-card-badge { background: #A03D24; color: #FFFFFF; }
.gpower-choice-card.theme-terracotta .gpower-card-title { color: #6B2412; }
.gpower-choice-card.theme-terracotta .gpower-card-arrow { color: #A03D24; }

.gpower-choice-card.theme-slate {
    background: #F1F6F8;
    border: 1.5px solid #B8D3DD;
}
.gpower-choice-card.theme-slate:hover {
    border-color: #24586B;
    box-shadow: 0 8px 24px rgba(36, 88, 107, 0.12);
    transform: translateY(-2px);
}
.gpower-choice-card.theme-slate .gpower-card-badge { background: #24586B; color: #FFFFFF; }
.gpower-choice-card.theme-slate .gpower-card-title { color: #163743; }
.gpower-choice-card.theme-slate .gpower-card-arrow { color: #24586B; }

/* Fiche Recette finale G*Power */
.gpower-recipe-sheet {
    background: #FFFFFF;
    border: 1.5px solid #DCD4CA;
    border-radius: 8px;
    padding: 2.2rem 2.4rem;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.05);
}

.gpower-recipe-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    border-bottom: 1.5px solid var(--surface-2);
    padding-bottom: 1.4rem;
    margin-bottom: 1.8rem;
}

.gpower-recipe-kicker {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--bordeaux);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    display: block;
    margin-bottom: 0.35rem;
}

.gpower-recipe-title {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    color: var(--ink);
    margin: 0 0 0.5rem;
    line-height: 1.25;
}

.gpower-recipe-situation {
    font-size: 0.96rem;
    color: var(--ink-2);
    line-height: 1.55;
    margin: 0;
}

.gpower-recipe-close-btn {
    background: #FAF8F5;
    border: 1px solid var(--surface-2);
    border-radius: 6px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--ink-3);
    cursor: pointer;
    transition: all 0.2s ease;
}

.gpower-recipe-close-btn:hover {
    color: var(--bordeaux);
    border-color: var(--bordeaux);
    background: #FFF5F7;
}

.gpower-recipe-section {
    margin-bottom: 2rem;
}

.recipe-section-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.recipe-step-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bordeaux);
    color: #FFFFFF;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recipe-section-title h3 {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0;
}

/* Grille des menus déroulants */
.gpower-dropdowns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.gpower-dropdown-card {
    background: #FAF8F5;
    border: 1px solid #DCD4CA;
    border-radius: 6px;
    padding: 1rem 1.2rem;
}

.dropdown-label {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 0.4rem;
}

.dropdown-value {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.4;
}

.dropdown-value.highlight-type {
    color: var(--bordeaux);
}

/* Tableau des paramètres */
.gpower-table-wrapper {
    overflow-x: auto;
    border: 1px solid #DCD4CA;
    border-radius: 6px;
    background: #FAF8F5;
}

.gpower-params-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.gpower-params-table th {
    background: #EFE9E0;
    color: var(--ink);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.85rem;
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #D6CEC5;
}

.gpower-params-table td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #EAE3D9;
    color: var(--ink-2);
    line-height: 1.5;
}

.gpower-params-table tr:last-child td {
    border-bottom: none;
}

.gpower-code-pill {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.88rem;
    background: #211A15;
    color: #FAF5EF;
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
    display: inline-block;
}

/* Zone d'action Calculate et Résultat */
.gpower-result-action-box {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.5rem;
    align-items: center;
    background: #FAF8F5;
    border: 1px solid #DCD4CA;
    border-radius: 8px;
    padding: 1.5rem;
}

.gpower-calc-button-preview {
    text-align: center;
    padding-right: 1.5rem;
    border-right: 1px dashed #D6CEC5;
}

.calc-btn-mock {
    display: inline-block;
    background: #2563EB;
    color: #FFFFFF;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.6rem 1.4rem;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
    margin-bottom: 0.4rem;
}

.calc-hint {
    font-size: 0.76rem;
    color: var(--ink-3);
    display: block;
    line-height: 1.35;
}

.output-notice-text {
    font-size: 0.94rem;
    color: var(--ink-2);
    line-height: 1.55;
    margin-bottom: 0.6rem;
}

.gpower-benchmark-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(107, 45, 62, 0.08);
    border: 1px solid rgba(107, 45, 62, 0.25);
    border-radius: 6px;
    padding: 0.5rem 0.9rem;
    font-size: 0.92rem;
    color: var(--ink);
}

.gpower-benchmark-badge strong {
    color: var(--bordeaux);
}

.gpower-benchmark-badge span {
    font-family: var(--font-mono);
    font-weight: 700;
    color: #4A1423;
}

/* Phrase de justification */
.gpower-justification-box {
    background: #FAF8F5;
    border: 1.5px solid #DCD4CA;
    border-left: 4px solid var(--bordeaux);
    border-radius: 6px;
    padding: 1.4rem 1.6rem;
    position: relative;
}

.gpower-justification-box blockquote {
    margin: 0 0 1rem;
    font-family: var(--font-serif);
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--ink);
    font-style: italic;
}

.gpower-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--bordeaux);
    color: #FFFFFF;
    border: none;
    border-radius: 5px;
    padding: 0.5rem 1rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gpower-copy-btn:hover {
    background: #501F2D;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(107, 45, 62, 0.25);
}

.gpower-copy-btn.copied {
    background: #15803D !important;
}

.gpower-recipe-footer {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--surface-2);
}

.gpower-footer-nav-btn {
    background: #FFFFFF;
    border: 1.5px solid #D6CEC5;
    border-radius: 6px;
    padding: 0.6rem 1.2rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    transition: all 0.2s ease;
}

.gpower-footer-nav-btn:hover {
    border-color: var(--bordeaux);
    color: var(--bordeaux);
    background: #FFF7F8;
}

.gpower-footer-nav-btn.secondary {
    color: var(--ink-3);
    border-color: #E2DACF;
}

@media (max-width: 860px) {
    .gpower-welcome-card { grid-template-columns: 1fr; }
    .gpower-result-action-box { grid-template-columns: 1fr; }
    .gpower-calc-button-preview { border-right: none; border-bottom: 1px dashed #D6CEC5; padding-right: 0; padding-bottom: 1.2rem; }
    .gpower-recipe-sheet { padding: 1.5rem 1.4rem; }
}

/* ===========================================
   NAVIGATION SECONDAIRE (MOBILE BOTTOM)
   =========================================== */
.mobile-bottom-nav {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.mobile-bottom-nav a {
    color: var(--ink-3);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.6rem 1rem;
    border: 1px solid var(--surface-2);
    border-radius: var(--radius-sm);
    background: var(--bg);
    transition: all var(--transition);
}

.mobile-bottom-nav a:hover {
    color: var(--bordeaux);
    border-color: var(--bordeaux);
}

/* ===========================================
   ÉLÉMENTS SPÉCIAUX — Theory characters
   =========================================== */
.char-container {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.char-body {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.char-eyes { display: flex; gap: 12px; position: absolute; top: 40%; }

.eye {
    width: 10px;
    height: 10px;
    background: var(--ink);
    border-radius: 50%;
    position: relative;
}

.eye.happy::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: -3px;
    width: 16px;
    height: 8px;
    border-bottom: 2px solid var(--ink);
    border-radius: 0 0 8px 8px;
}

.shape-bell {
    width: 90px;
    height: 70px;
    border-radius: 50% 50% 5px 5px / 100% 100% 5px 5px;
    background: var(--bordeaux);
}

.shape-star {
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    background: var(--sable);
}

.shape-cloud {
    border-radius: 40% 40% 30% 30%;
    background: var(--ink-3);
}

.shape-mirror {
    width: 90px;
    height: 90px;
    border-radius: 50% 50% 0 0;
    background: var(--surface-2);
    border: 4px solid var(--bordeaux);
}

.shape-bubble {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid var(--bordeaux);
    background: var(--bordeaux-soft);
}

.shape-marmite {
    width: 90px;
    height: 70px;
    background: var(--ink);
    border-radius: var(--radius-sm) var(--radius-sm) 30px 30px;
    position: relative;
}

.shape-bins {
    width: 90px;
    height: 70px;
    display: flex;
    align-items: flex-end;
    gap: 4px;
}

/* Section layout theory */
.section-layout-highlight {
    background: var(--bordeaux-soft);
    border-left: 3px solid var(--bordeaux);
    border-radius: var(--radius-md);
    padding: 2rem;
    margin: 1.5rem 0;
}

.section-layout-alert {
    background: #FDF3F0;
    border: 1px solid #E8C4B8;
    border-left: 4px solid #B5451B;
    border-radius: var(--radius-md);
    padding: 2rem;
    margin: 1.5rem 0;
}

.section-layout-standard { padding: 1rem 0; }

.flexible-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 1.5rem;
}

.flexible-content h2 {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--bordeaux);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}

.rich-content ul {
    margin-top: 0.8rem;
    list-style: none;
    padding: 0;
}

.rich-content li {
    padding-left: 1.2rem;
    margin-bottom: 0.6rem;
    position: relative;
}

.rich-content li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--bordeaux);
    font-weight: bold;
}

/* Classes communes */
.clean-list { list-style: none; padding: 0; }
.clean-list dt { font-weight: 600; color: var(--bordeaux); margin-top: 0.8rem; }
.clean-list dd { margin-bottom: 0.4rem; color: var(--ink-2); }

.small { font-size: 0.85rem; color: var(--ink-3); }
.relative { position: relative; }

.intro-text {
    font-size: 1.1rem;
    color: var(--ink-2);
    margin-bottom: 1.5rem;
}

/* ===========================================
   HIGHLIGHT ANIMATION (quiz result scroll)
   =========================================== */
.highlight-pulse {
    animation: highlightPulse 2s ease;
}

@keyframes highlightPulse {
    0%   { outline: 2px solid var(--bordeaux); outline-offset: 4px; }
    100% { outline: 2px solid transparent; outline-offset: 4px; }
}

/* ===========================================
   FOOTER
   =========================================== */
footer.site-footer {
    border-top: 1px solid var(--surface-2);
    padding: 2rem 5%;
    text-align: center;
    font-size: 0.82rem;
    color: var(--ink-3);
    font-family: var(--font-body);
}

footer.site-footer a {
    color: var(--ink-3);
    text-decoration: underline;
    transition: color var(--transition);
}

footer.site-footer a:hover { color: var(--bordeaux); }

footer.site-footer .footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 0;
}

/* ===========================================
   MENTIONS LÉGALES / CGU / POLITIQUE
   =========================================== */
.legal-content {
    max-width: 700px;
    margin: 3rem auto;
    padding: 0 5%;
}

.legal-content h1 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--bordeaux);
}

.legal-content h2 {
    font-size: 1.2rem;
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--ink);
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    color: var(--bordeaux);
}

.legal-content p, .legal-content li {
    font-size: 0.95rem;
    color: var(--ink-2);
    line-height: 1.8;
}

/* ===========================================
   SECTION TITRE
   =========================================== */
.section-title {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--ink);
    text-align: left;
    margin-bottom: 2rem;
}

/* ===========================================
   HERO SMALL (pages internes)
   =========================================== */
.small-hero {
    padding: 3rem 5% 2.5rem;
    border-bottom: 1px solid var(--surface-2);
    max-width: var(--max-width);
    margin: 0 auto;
}

.small-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.small-hero p {
    font-size: 1.05rem;
    color: var(--ink-3);
    margin-top: 0.5rem;
}

/* ===========================================
   NAVBAR interne (gpower, theory, glossary)
   =========================================== */
.navbar {
    background: var(--bg);
    border-bottom: 1px solid var(--surface-2);
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .logo {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--bordeaux);
    text-decoration: none;
    letter-spacing: 0.02em;
}

.navbar .logo span {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--ink-3);
    font-weight: 400;
    margin-left: 0.4rem;
}

.navbar .nav-links {
    list-style: none;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem;
    margin: 0;
    border-radius: 8px;
    background: rgba(226, 218, 208, 0.4);
    border: 1px solid var(--surface-2);
}

.navbar .nav-links a {
    position: relative;
    z-index: 2;
    font-size: 0.88rem;
    color: var(--ink-2);
    text-decoration: none;
    font-weight: 500;
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    transition: color 0.22s ease;
    white-space: nowrap;
}

.navbar .nav-links a:hover {
    color: var(--ink);
}

.navbar .nav-links a.active {
    color: var(--bordeaux);
    font-weight: 600;
}

/* Dark mode overrides for navbar, pill and scroll progress */
body.theme-fiche-dark .nav-links,
body.theme-midnight .nav-links {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

body.theme-fiche-dark .nav-links a,
body.theme-midnight .nav-links a {
    color: #CBD5E1;
}

body.theme-fiche-dark .nav-links a:hover,
body.theme-midnight .nav-links a:hover {
    color: #FFFFFF;
}

body.theme-fiche-dark .nav-links a.active,
body.theme-midnight .nav-links a.active {
    color: #FFFFFF;
}

body.theme-fiche-dark .nav-hover-pill,
body.theme-midnight .nav-hover-pill {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

body.theme-fiche-dark .reading-scroll-progress .scroll-progress-fill,
body.theme-midnight .reading-scroll-progress .scroll-progress-fill {
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0.1) 0%,
        #FAF8F5 75%,
        #FFFFFF 100%
    );
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

/* ===========================================
   GLOSSAIRE PAGE
   =========================================== */
.glossary-header {
    text-align: left;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--surface-2);
}

.glossary-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 0.5rem;
}

.glossary-subtitle {
    font-size: 1rem;
    color: var(--ink-3);
    max-width: 500px;
    line-height: 1.6;
}

.controls-wrapper {
    max-width: 800px;
    margin: 0 auto 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0;
}

.search-container { position: relative; }

.glossary-search-bar {
    width: 100%;
    padding: 0.9rem 1.2rem 0.9rem 3rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--surface-2);
    background: var(--surface);
    color: var(--ink);
    font-size: 1rem;
    font-family: var(--font-body);
    outline: none;
    transition: border-color var(--transition);
}

.glossary-search-bar:focus { border-color: var(--bordeaux); }

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-3);
    pointer-events: none;
}

.sort-controls {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.sort-btn {
    padding: 0.5rem 1.1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--surface-2);
    background: var(--surface);
    color: var(--ink-3);
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.sort-btn:hover {
    border-color: var(--bordeaux);
    color: var(--bordeaux);
}

.sort-btn.active {
    background: var(--bordeaux);
    color: #fff;
    border-color: var(--bordeaux);
}

.glossary-grid {
    max-width: 1000px;
    margin: 0 auto 4rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.term-card {
    background: var(--surface);
    border: 1px solid var(--surface-2);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: border-color var(--transition);
}

.term-card:hover { border-color: var(--bordeaux); }

.term-title {
    font-family: var(--font-body);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--bordeaux);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.term-definition {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--ink-2);
}

.theory-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--bordeaux);
    text-decoration: underline;
    text-underline-offset: 3px;
    margin-top: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.theory-link:hover { color: var(--bordeaux-2); }

.term-badge {
    font-size: 0.68rem;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.badge-chrono {
    background: var(--bordeaux-soft);
    color: var(--bordeaux);
}

.badge-diff {
    background: var(--surface-2);
    color: var(--ink-3);
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    font-size: 1.1rem;
    color: var(--ink-3);
    display: none;
}

/* ===========================================
   FADE IN ANIMATION (minimaliste)
   =========================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

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

.fade-in { animation: fadeIn 0.3s ease; }

/* ===========================================
   CREATOR BADGE BANNER (Hero QR Recruiter CTA)
   =========================================== */
.creator-badge-banner {
    display: flex;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.creator-badge-link {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.4rem 0.95rem;
    background: #FAF8F5;
    border: 1px solid rgba(107, 45, 62, 0.25);
    border-radius: 999px;
    text-decoration: none;
    color: var(--ink);
    font-size: 0.86rem;
    box-shadow: 0 2px 8px rgba(107, 45, 62, 0.06);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.creator-badge-link:hover {
    border-color: var(--bordeaux);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(107, 45, 62, 0.12);
    color: var(--bordeaux);
}

.creator-badge-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bordeaux);
    color: #FFFFFF;
    font-size: 0.68rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: -0.02em;
}

.creator-badge-text {
    font-family: var(--font-body);
}

.creator-badge-text strong {
    color: var(--bordeaux);
    font-weight: 600;
}

.creator-badge-arrow {
    font-size: 0.8rem;
    color: var(--bordeaux);
    font-weight: 600;
}

/* ===========================================
   RESPONSIVE DESIGN SYSTEM (MOBILE & TABLET)
   =========================================== */
@media (max-width: 768px) {
    /* 1. NAVIGATION MOBILE UNIFIÉE */
    .nav-toggle {
        display: flex;
    }

    .nav-hover-pill {
        display: none !important;
    }

    .nav-links,
    .navbar .nav-links {
        display: none;
    }

    .nav-links.nav-open,
    .nav-links.open,
    .navbar .nav-links.nav-open,
    .navbar .nav-links.open {
        display: flex !important;
        flex-direction: column;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        width: 100%;
        background: #FAF8F5;
        border-bottom: 2px solid var(--bordeaux);
        box-shadow: 0 16px 36px -4px rgba(26, 20, 16, 0.18);
        padding: 0.9rem 5% 1.4rem;
        gap: 0.4rem;
        z-index: 99999;
        animation: navSlideDown 0.24s cubic-bezier(0.16, 1, 0.3, 1);
        max-height: calc(100vh - 56px);
        overflow-y: auto;
    }

    @keyframes navSlideDown {
        from {
            opacity: 0;
            transform: translateY(-8px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .nav-links.nav-open li,
    .nav-links.open li,
    .navbar .nav-links.nav-open li,
    .navbar .nav-links.open li {
        width: 100%;
        display: block;
        margin: 0;
    }

    .nav-links.nav-open a,
    .nav-links.open a,
    .navbar .nav-links.nav-open a,
    .navbar .nav-links.open a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 1.05rem;
        font-weight: 500;
        color: var(--ink);
        border-radius: 8px;
        background: transparent;
        transition: all 0.16s ease;
        border: 1px solid transparent;
        min-height: 48px;
    }

    .nav-links.nav-open a:hover,
    .nav-links.nav-open a:active,
    .nav-links.open a:hover,
    .nav-links.open a:active,
    .navbar .nav-links.nav-open a:hover,
    .navbar .nav-links.nav-open a:active,
    .navbar .nav-links.open a:hover,
    .navbar .nav-links.open a:active {
        background: var(--surface);
        color: var(--bordeaux);
        border-color: var(--surface-2);
        padding-left: 1.25rem;
    }

    .nav-links.nav-open a.active,
    .nav-links.open a.active,
    .navbar .nav-links.nav-open a.active,
    .navbar .nav-links.open a.active {
        background: var(--bordeaux-soft);
        color: var(--bordeaux);
        font-weight: 600;
        border-color: rgba(107, 45, 62, 0.25);
    }

    .nav-links.nav-open a.active::after,
    .nav-links.open a.active::after,
    .navbar .nav-links.nav-open a.active::after,
    .navbar .nav-links.open a.active::after {
        content: "•";
        font-size: 1.4rem;
        color: var(--bordeaux);
        line-height: 1;
    }


    .nav-links.nav-open .lang-btn,
    .nav-links.open .lang-btn,
    .navbar .nav-links.nav-open .lang-btn,
    .navbar .nav-links.open .lang-btn {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: 0.6rem;
        padding: 0.75rem;
        border: 1px solid var(--surface-2);
        background: var(--surface);
        border-radius: 8px;
        font-size: 0.95rem;
        font-weight: 600;
        color: var(--ink-2);
        min-height: 44px;
    }

    /* 2. HERO & DECISION CARD SUR MOBILE */
    .hell-hero {
        padding: 2rem 1rem 1.8rem;
    }

    .creator-badge-banner {
        margin-bottom: 1.1rem;
    }

    .creator-badge-link {
        font-size: 0.8rem;
        padding: 0.35rem 0.8rem;
        gap: 0.5rem;
    }

    .hell-title-lead {
        font-size: clamp(1.4rem, 4.8vw, 2.2rem);
    }

    .hell-word-flame {
        font-size: clamp(2.3rem, 9.5vw, 4.2rem);
        max-width: 100%;
        word-break: break-word;
    }

    .hell-subtitle {
        font-size: 1rem;
        margin: 0.8rem auto 1.8rem;
        padding: 0 0.5rem;
    }

    .hell-decision-card {
        padding: 0.9rem 0.75rem;
        border-radius: 10px;
        gap: 0.6rem;
    }

    .hell-choice-btn {
        padding: 0.9rem 0.8rem;
        font-size: 0.95rem;
        min-height: 48px;
    }

    .hell-subchoice-panel {
        padding: 0.4rem 0.5rem 0.8rem;
    }

    .hell-subchoice-link {
        padding: 0.7rem 0.75rem;
    }

    /* 3. QUIZ & PROGRESSION SUR MOBILE */
    .quiz-main-section {
        padding: 1rem 0 3rem;
    }

    .quiz-container {
        padding: 1.2rem 1rem;
        border-radius: 10px;
        min-height: auto;
    }

    .progress-container {
        margin-bottom: 1.2rem;
    }

    .quiz-breadcrumbs {
        gap: 0.35rem;
        margin-bottom: 1.4rem;
        padding-bottom: 0.4rem;
        -webkit-overflow-scrolling: touch;
    }

    .breadcrumb-step {
        padding: 0.28rem 0.65rem;
        font-size: 0.76rem;
    }

    .question-card h3 {
        font-size: 1.25rem;
        margin-bottom: 1.2rem;
        line-height: 1.35;
    }

    .options-grid {
        gap: 0.65rem;
    }

    .quiz-btn {
        padding: 0.95rem 1.1rem;
        font-size: 0.96rem;
        min-height: 50px;
        line-height: 1.45;
        border-radius: 8px;
    }

    .back-btn {
        font-size: 0.86rem;
        margin-bottom: 1rem;
        padding: 0.3rem 0;
    }

    /* 4. CARTE BOOSTER (RÉSULTAT 3D FLIP) SUR MOBILE */
    .booster-scene-wrapper {
        margin: 1rem auto 2rem;
    }

    .booster-flip-scene {
        max-width: 100%;
        padding: 0;
    }

    .booster-flipper {
        height: min(560px, 82vh);
        min-height: 480px;
    }

    .booster-face {
        border-radius: 12px;
    }

    .booster-back-inner {
        padding: 1rem 1.1rem;
    }

    .booster-back-topbar {
        padding-bottom: 0.6rem;
        margin-bottom: 0.8rem;
    }

    .booster-title-box {
        padding: 0.7rem 0.9rem;
        margin-bottom: 0.8rem;
    }

    .booster-test-title {
        font-size: 1.25rem;
    }

    .booster-test-desc {
        font-size: 0.9rem;
        line-height: 1.55;
    }

    .booster-flip-back-btn {
        width: 42px;
        height: 42px;
        min-width: 42px;
        min-height: 42px;
    }

    .booster-action-pill {
        padding: 0.38rem 0.8rem;
        font-size: 0.84rem;
        min-height: 36px;
    }

    .booster-btn-restart-main {
        width: 100%;
        justify-content: center;
        padding: 0.85rem 1.2rem;
        font-size: 0.95rem;
    }

    /* 5. G*POWER & METHODO & GLOSSAIRE */
    .gpower-wizard-topbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
    }

    .gpower-nav-btn {
        justify-content: center;
        width: 100%;
        min-height: 42px;
    }

    .controls-wrapper {
        flex-direction: column;
        gap: 0.8rem;
    }

    .sort-controls {
        width: 100%;
        display: flex;
        justify-content: space-between;
        gap: 0.4rem;
    }

    .sort-btn {
        flex: 1;
        justify-content: center;
        min-height: 42px;
        font-size: 0.84rem;
        padding: 0.5rem 0.4rem;
    }

    .theory-card {
        padding: 1.2rem;
    }

    .methodo-modal-box {
        padding: 1.4rem 1.2rem;
    }

    .methodo-modal-box h2 {
        font-size: 1.35rem;
    }

    .hero { padding: 3rem 5% 2.5rem; }
    .chapter-number { font-size: 2rem; }
    .content-box { padding: 1.2rem; }

    .comparison-grid { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .winner-banner { flex-direction: column; text-align: left; }
    .hero h1 { font-size: 1.8rem; }
    .hell-title-lead { font-size: 1.35rem; }
    .hell-word-flame { font-size: 2.2rem; }
}

/* ===========================================
   HUB SECTION — Les 4 Piliers méthodologiques
   =========================================== */
.hub-section {
    padding: 3.5rem 0 3rem;
    background: var(--bg);
}

.hub-header {
    margin-bottom: 2.2rem;
    max-width: 720px;
}

.hub-kicker {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--bordeaux);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 0.4rem;
}

.hub-header h2 {
    font-family: var(--font-serif);
    font-size: clamp(1.6rem, 2.8vw, 2.2rem);
    color: var(--ink);
    margin: 0 0 0.6rem;
    line-height: 1.2;
}

.hub-header p {
    font-size: 1.02rem;
    color: var(--ink-3);
    line-height: 1.6;
    margin: 0;
}

.hub-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.hub-card {
    display: flex;
    gap: 1.25rem;
    padding: 1.8rem;
    background: var(--surface);
    border: 1px solid var(--surface-2);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: inherit;
    transition: border-color var(--transition), transform var(--transition);
}

.hub-card:hover {
    border-color: var(--bordeaux);
}

.hub-card-primary {
    border-left: 3px solid var(--bordeaux);
}

.hub-card-num {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--surface-2);
    line-height: 1;
    user-select: none;
    font-style: italic;
}

.hub-card:hover .hub-card-num {
    color: var(--bordeaux);
}

.hub-card-body {
    flex: 1;
}

.hub-card-tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 0.35rem;
}

.hub-card h3 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--ink);
    margin: 0 0 0.5rem;
    line-height: 1.25;
}

.hub-card p {
    font-size: 0.9rem;
    color: var(--ink-2);
    line-height: 1.55;
    margin: 0 0 0.9rem;
}

.hub-card-cta {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bordeaux);
    letter-spacing: 0.02em;
}

@media (max-width: 768px) {
    .hub-grid {
        grid-template-columns: 1fr;
    }
}

/* ===========================================
   ACCORDÉON PRÉPARATION DES DONNÉES
   =========================================== */
.prep-accordion {
    margin-bottom: 2rem;
    background: var(--surface);
    border: 1px solid var(--surface-2);
    border-radius: var(--radius-sm);
    padding: 0;
}

.prep-accordion summary {
    padding: 0.9rem 1.2rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--ink-2);
    cursor: pointer;
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.prep-accordion summary::-webkit-details-marker {
    display: none;
}

.prep-accordion summary::after {
    content: "+";
    font-family: var(--font-mono);
    font-size: 1.2rem;
    color: var(--bordeaux);
    font-weight: normal;
}

.prep-accordion[open] summary::after {
    content: "−";
}

.prep-accordion-content {
    padding: 0 1.2rem 1.4rem;
    border-top: 1px dashed var(--surface-2);
}

.prep-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    margin-top: 1rem;
}

.prep-col strong {
    font-size: 0.92rem;
    color: var(--ink);
    display: block;
    margin-bottom: 0.3rem;
}

.prep-col p {
    font-size: 0.85rem;
    color: var(--ink-3);
    margin: 0 0 0.4rem;
}

.prep-col ul {
    margin: 0;
    padding-left: 1.2rem;
    font-size: 0.85rem;
    color: var(--ink-2);
    line-height: 1.5;
}

@media (max-width: 768px) {
    .prep-columns {
        grid-template-columns: 1fr;
    }
}

/* ===========================================
   WORKFLOW OVERVIEW SECTION
   =========================================== */
.workflow-overview-section {
    padding: 3.5rem 0 4rem;
    background: var(--bg);
}

.workflow-box {
    background: var(--surface);
    border: 1px solid var(--surface-2);
    border-radius: var(--radius-sm);
    padding: 2.5rem;
}

.workflow-kicker {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--bordeaux);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 0.4rem;
}

.workflow-box h2 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    color: var(--ink);
    margin: 0 0 0.5rem;
}

.workflow-intro {
    font-size: 0.98rem;
    color: var(--ink-3);
    margin-bottom: 2rem;
    max-width: 680px;
    line-height: 1.6;
}

.workflow-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
}

.workflow-step {
    background: var(--bg);
    border: 1px solid var(--surface-2);
    border-radius: var(--radius-sm);
    padding: 1.2rem;
}

.workflow-step .step-num {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    color: var(--bordeaux);
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 0.4rem;
}

.workflow-step strong {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    color: var(--ink);
    display: block;
    margin-bottom: 0.4rem;
}

.workflow-step p {
    font-size: 0.85rem;
    color: var(--ink-2);
    line-height: 1.5;
    margin: 0;
}

.workflow-step p a {
    color: var(--bordeaux);
    text-decoration: underline;
    text-underline-offset: 2px;
}

@media (max-width: 900px) {
    .workflow-steps {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 550px) {
    .workflow-steps {
        grid-template-columns: 1fr;
    }
}

/* ===========================================
   PROPOSITION 3 — QUIZ FIRST & RESOURCES
   =========================================== */
.quiz-first-hero {
    padding: 3rem 0 1rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.quiz-first-hero h1 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 3.4vw, 2.6rem);
    color: var(--ink);
    margin: 0 0 0.5rem;
    line-height: 1.15;
}

.quiz-first-subtitle {
    font-size: 1.05rem;
    color: var(--ink-3);
    max-width: 640px;
    line-height: 1.6;
    margin: 0;
}

.quiz-main-section {
    padding: 1.5rem 0 4rem;
}

.resources-explore-section {
    padding: 4rem 0;
    background: var(--surface);
    border-top: 1px solid var(--surface-2);
}

.section-header-compact {
    margin-bottom: 2.2rem;
    max-width: 700px;
}

.section-header-compact h2 {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    color: var(--ink);
    margin: 0 0 0.4rem;
}

.section-header-compact p {
    font-size: 0.98rem;
    color: var(--ink-3);
    margin: 0;
    line-height: 1.55;
}

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

.resource-card {
    display: flex;
    flex-direction: column;
    padding: 2rem 1.8rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background-color var(--transition);
    min-height: 180px;
}

.resource-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(107, 45, 62, 0.08);
}

/* Variante 1 : Fiches Théorie (Bordeaux Rosé Poudré) */
.resource-card.card-theory {
    background: #F6EDEE;
    border: 1px solid rgba(107, 45, 62, 0.22);
}
.resource-card.card-theory:hover {
    border-color: #6B2D3E;
    background: #F1E4E6;
}
.resource-card.card-theory .resource-content h3 {
    color: #5A1E2F;
}
.resource-card.card-theory .resource-link {
    color: #6B2D3E;
}

/* Variante 2 : Guide G*Power (Bordeaux Amarante Chaud) */
.resource-card.card-gpower {
    background: #F8EFEA;
    border: 1px solid rgba(139, 61, 82, 0.22);
}
.resource-card.card-gpower:hover {
    border-color: #8B3D52;
    background: #F2E4DC;
}
.resource-card.card-gpower .resource-content h3 {
    color: #6B2D3E;
}
.resource-card.card-gpower .resource-link {
    color: #8B3D52;
}

/* Variante 3 : Glossaire (Bordeaux Lin Mûre Doux) */
.resource-card.card-glossary {
    background: #EDE6EA;
    border: 1px solid rgba(90, 30, 47, 0.2);
}
.resource-card.card-glossary:hover {
    border-color: #5A1E2F;
    background: #E4D9E0;
}
.resource-card.card-glossary .resource-content h3 {
    color: #4A1423;
}
.resource-card.card-glossary .resource-link {
    color: #5A1E2F;
}

.resource-num {
    display: none;
}

.resource-content h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: var(--ink);
    margin: 0 0 0.6rem;
}

.resource-content p {
    font-size: 0.9rem;
    color: var(--ink-2);
    line-height: 1.55;
    margin: 0 0 1.2rem;
    flex-grow: 1;
}

.resource-link {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--bordeaux);
    display: inline-block;
    margin-top: auto;
}

@media (max-width: 860px) {
    .resources-grid {
        grid-template-columns: 1fr;
    }
}

/* ===========================================
   PAGE D'ERREUR (Inspiré de Watermelon error-1)
   =========================================== */
.error-page-main {
    position: relative;
    min-height: calc(100vh - 180px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    overflow: hidden;
}

.error-bg-pattern {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.12;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 19px, var(--bordeaux) 19px, var(--bordeaux) 20px, transparent 20px, transparent 39px, var(--bordeaux) 39px, var(--bordeaux) 40px),
        repeating-linear-gradient(90deg, transparent, transparent 19px, var(--bordeaux) 19px, var(--bordeaux) 20px, transparent 20px, transparent 39px, var(--bordeaux) 39px, var(--bordeaux) 40px);
    background-size: 40px 40px, 40px 40px;
    -webkit-mask-image: radial-gradient(circle at center, black 30%, transparent 75%);
    mask-image: radial-gradient(circle at center, black 30%, transparent 75%);
}

.error-container {
    position: relative;
    z-index: 1;
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.error-code-svg {
    width: 100%;
    max-width: 22rem;
    height: auto;
    margin-bottom: 0.5rem;
    user-select: none;
}

.error-code-text {
    font-family: var(--font-serif);
    font-size: 19rem;
    font-weight: 900;
    letter-spacing: -0.06em;
    fill: rgba(107, 45, 62, 0.08);
    stroke: var(--bordeaux);
    stroke-width: 2.2;
    stroke-dasharray: 40 20;
}

.error-title {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    color: var(--ink);
    margin: 0 0 0.6rem;
    line-height: 1.2;
}

.error-description {
    font-family: var(--font-body);
    font-size: 1.05rem;
    color: var(--ink-3);
    line-height: 1.6;
    max-width: 420px;
    margin: 0 auto 1.8rem;
}

.error-pill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    height: 44px;
    padding: 0 1.8rem;
    border-radius: 999px;
    background: var(--bordeaux);
    color: #FFFFFF !important;
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid var(--bordeaux);
    box-shadow: inset 0 2px 4px 0 rgba(255, 255, 255, 0.35),
                inset 0 -2px 4px 0 rgba(0, 0, 0, 0.25),
                0 4px 14px rgba(107, 45, 62, 0.25);
    transition: all 0.22s ease;
}

.error-pill-btn:hover {
    background: var(--bordeaux-2);
    box-shadow: inset 0 2px 4px 0 rgba(255, 255, 255, 0.45),
                inset 0 -2px 4px 0 rgba(0, 0, 0, 0.3),
                0 6px 18px rgba(107, 45, 62, 0.35);
    transform: translateY(-1px);
}

.error-pill-btn svg {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.error-pill-btn:hover svg {
    transform: scale(1.1);
}

/* ===========================================
   HERO : BIENVENUE DANS L'ENFER DES STATISTIQUES
   =========================================== */
.hell-hero {
    padding: 3rem 1rem 2.5rem;
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.hell-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.8rem;
}

.hell-title-lead {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 3.8vw, 2.7rem);
    color: var(--ink);
    font-weight: 400;
    line-height: 1.15;
}

.hell-word-container {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin-top: 0.2rem;
    cursor: default;
}

.hell-word-flame {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 6.5vw, 4.8rem);
    font-weight: 700;
    font-style: italic;
    letter-spacing: 0.015em;
    line-height: 1.05;
    display: inline-block;
    /* Dégradé braise & cuivre incandescent fondu dans la matière de la lettre */
    background: linear-gradient(120deg, #6B1D2F 0%, #991B1B 25%, #C2410C 55%, #EA580C 80%, #F59E0B 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: emberBreathe 6s ease-in-out infinite alternate;
    transition: filter 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Ligne de braise dorée calligraphique subtile sous le mot */
.hell-word-container::after {
    content: '';
    display: block;
    width: 92%;
    height: 3px;
    margin-top: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(153, 27, 27, 0.4) 20%, 
        rgba(234, 88, 12, 0.85) 50%, 
        rgba(245, 158, 11, 0.95) 65%, 
        rgba(194, 65, 12, 0.5) 85%, 
        transparent 100%
    );
    opacity: 0.75;
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
}

.hell-word-container:hover .hell-word-flame {
    transform: translateY(-1px) scale(1.015);
    filter: drop-shadow(0 4px 16px rgba(234, 88, 12, 0.3));
}

.hell-word-container:hover::after {
    opacity: 1;
    transform: scaleX(1.06);
    filter: drop-shadow(0 2px 6px rgba(234, 88, 12, 0.5));
}

@keyframes emberBreathe {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hell-word-flame {
        animation: none;
    }
}

.hell-subtitle {
    font-family: var(--font-body);
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    color: var(--ink-2);
    max-width: 640px;
    margin: 1rem auto 2.4rem;
    line-height: 1.6;
}

/* ===========================================
   CARTE D'ORIENTATION INTERACTIVE (LES 3 CHOIX)
   =========================================== */
.hell-decision-card {
    max-width: 680px;
    margin: 0 auto;
    background: #FAF8F5;
    border: 1.5px solid var(--bordeaux);
    border-radius: 12px;
    padding: 1.4rem 1.6rem;
    box-shadow: 0 10px 28px -6px rgba(26, 20, 16, 0.08),
                inset 0 0 0 1px rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
}

.hell-choice-item {
    background: var(--surface);
    border: 1px solid var(--surface-2);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color var(--transition);
}

.hell-choice-item:hover {
    border-color: var(--bordeaux);
}

.hell-choice-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.3rem;
    background: transparent;
    border: none;
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    text-decoration: none;
    line-height: 1.4;
    transition: background 0.2s ease, color 0.2s ease;
}

.hell-choice-btn:hover {
    background: var(--bordeaux-soft);
    color: var(--bordeaux);
}

.hell-choice-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hell-chevron {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--bordeaux);
    line-height: 1;
    display: inline-block;
    transition: transform 0.25s ease;
}

.hell-choice-item.is-open .hell-chevron {
    transform: rotate(90deg);
}

.hell-expand-icon {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    color: var(--ink-3);
    font-weight: 600;
    line-height: 1;
    transition: transform 0.25s ease;
}

.hell-choice-item.is-open .hell-expand-icon {
    transform: rotate(45deg);
}

.hell-arrow {
    font-size: 1.15rem;
    color: var(--bordeaux);
    font-weight: 700;
}

/* Panneau sous-choix accordéon (Récolte des données) */
.hell-subchoice-panel {
    max-height: 0;
    overflow: hidden;
    padding: 0 1.2rem;
    background: #FAF8F5;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    transition: max-height 0.35s cubic-bezier(0.25, 1, 0.5, 1),
                padding 0.3s ease;
}

.hell-choice-item.is-open .hell-subchoice-panel {
    max-height: 320px;
    padding: 0.8rem 1.2rem 1.2rem;
    border-top: 1px solid var(--surface-2);
}

.hell-subchoice-link {
    display: block;
    padding: 0.85rem 1.1rem;
    border-radius: 6px;
    background: var(--surface);
    border: 1px solid var(--surface-2);
    text-decoration: none;
    transition: all 0.2s ease;
}

.hell-subchoice-link:hover {
    background: #FFFFFF;
    border-color: var(--bordeaux);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(107, 45, 62, 0.1);
}

.hell-subchoice-title {
    font-family: var(--font-body);
    font-size: 0.96rem;
    font-weight: 700;
    color: var(--bordeaux);
    display: block;
    line-height: 1.4;
}

.hell-subchoice-title:not(:last-child) {
    margin-bottom: 0.25rem;
}

.hell-subchoice-desc {
    font-size: 0.86rem;
    color: var(--ink-2);
    line-height: 1.45;
    display: block;
    margin: 0;
}

/* ===========================================
   PAGE MÉTHODOLOGIE (methodo.html)
   =========================================== */
.hero-subtitle-centered {
    font-size: 1.05rem;
    color: var(--ink-3);
    max-width: 640px;
    margin: 0.5rem auto 1.5rem;
    line-height: 1.6;
}

.methodo-tab-selector {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    max-width: 960px;
    margin: 1.5rem auto 0;
}

.methodo-tab-btn {
    flex: 1;
    padding: 1.2rem 1.4rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-align: left;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background-color var(--transition);
}

.methodo-tab-btn:hover {
    transform: translateY(-2px);
}

/* Onglet 1 : Conception & Réflexion (Bordeaux Rosé Doux) */
.methodo-tab-btn.tab-btn-conception {
    background: #F7EEF0;
    border: 1.5px solid rgba(107, 45, 62, 0.28);
}
.methodo-tab-btn.tab-btn-conception:hover {
    background: #F2E3E6;
    border-color: #6B2D3E;
}
.methodo-tab-btn.tab-btn-conception.active {
    background: #EFE0E4;
    border: 2px solid #6B2D3E;
    box-shadow: 0 6px 18px rgba(107, 45, 62, 0.14);
}
.methodo-tab-btn.tab-btn-conception strong {
    color: #5A1E2F;
}

/* Onglet 2 : Taille d'échantillon & G*Power (Bordeaux Terracotta Chaud) */
.methodo-tab-btn.tab-btn-gpower {
    background: #FAF0E9;
    border: 1.5px solid rgba(139, 61, 82, 0.28);
}
.methodo-tab-btn.tab-btn-gpower:hover {
    background: #F4E4DA;
    border-color: #8B3D52;
}
.methodo-tab-btn.tab-btn-gpower.active {
    background: #F2E1D6;
    border: 2px solid #8B3D52;
    box-shadow: 0 6px 18px rgba(139, 61, 82, 0.14);
}
.methodo-tab-btn.tab-btn-gpower strong {
    color: #6B2D3E;
}

/* Onglet 3 : Scripts & Codes (Bordeaux Violet Mûre) */
.methodo-tab-btn.tab-btn-codes {
    background: #EFE7EC;
    border: 1.5px solid rgba(90, 30, 47, 0.25);
}
.methodo-tab-btn.tab-btn-codes:hover {
    background: #E6D9E2;
    border-color: #5A1E2F;
}
.methodo-tab-btn.tab-btn-codes.active {
    background: #E3D4DE;
    border: 2px solid #5A1E2F;
    box-shadow: 0 6px 18px rgba(90, 30, 47, 0.14);
}
.methodo-tab-btn.tab-btn-codes strong {
    color: #4A1423;
}

.methodo-tab-btn strong {
    font-size: 1rem;
    font-family: var(--font-serif);
    display: block;
    line-height: 1.35;
}

.methodo-intro-box {
    background: var(--surface);
    border: 1px solid var(--surface-2);
    border-left: 3px solid var(--bordeaux);
    border-radius: var(--radius-sm);
    padding: 1.8rem 2rem;
    margin-bottom: 2rem;
}

.methodo-lead-kicker {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--bordeaux);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 0.4rem;
}

.methodo-intro-box h2 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    color: var(--ink);
}

.methodo-intro-box p {
    font-size: 0.98rem;
    color: var(--ink-2);
    line-height: 1.6;
    margin: 0;
}

/* ===========================================
   FRISE CHRONOLOGIQUE DES ÉTAPES (TIMELINE)
   =========================================== */
.methodo-timeline {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    margin-bottom: 2.5rem;
}

.timeline-step-card {
    position: relative;
    background: #FAF8F5;
    border: 1.5px solid var(--surface-2);
    border-radius: var(--radius-md);
    padding: 1.6rem 1.4rem;
    cursor: pointer;
    text-align: left;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.timeline-step-card:hover {
    transform: translateY(-3px);
    border-color: var(--bordeaux);
    box-shadow: 0 8px 20px rgba(107, 45, 62, 0.1);
}

.timeline-step-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.8rem;
}

.timeline-step-pill {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    color: #FFFFFF;
    background: var(--bordeaux);
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    letter-spacing: 0.05em;
}

.timeline-step-hint {
    font-size: 0.75rem;
    color: var(--ink-3);
    font-weight: 500;
}

.timeline-step-card h3 {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    color: var(--ink);
    margin: 0 0 0.5rem;
    line-height: 1.35;
}

.timeline-step-card p {
    font-size: 0.88rem;
    color: var(--ink-2);
    line-height: 1.5;
    margin: 0 0 1rem;
    flex-grow: 1;
}

.timeline-step-action {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--bordeaux);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: auto;
}

/* Modale / Pop-in pour les détails d'étape */
.methodo-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 20, 16, 0.55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.methodo-modal-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

.methodo-modal-box {
    background: #FAF8F5;
    border: 1px solid var(--surface-2);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
    max-width: 680px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 2.2rem 2.4rem;
    position: relative;
    transform: scale(0.96);
    transition: transform 0.25s ease;
}

.methodo-modal-backdrop.is-open .methodo-modal-box {
    transform: scale(1);
}

.methodo-modal-close-btn {
    position: absolute;
    top: 1.2rem;
    right: 1.4rem;
    background: transparent;
    border: none;
    font-size: 1.6rem;
    color: var(--ink-3);
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition);
}

.methodo-modal-close-btn:hover {
    color: var(--bordeaux);
}

.methodo-modal-kicker {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--bordeaux);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 0.35rem;
}

.methodo-modal-box h2 {
    font-family: var(--font-serif);
    font-size: 1.7rem;
    color: var(--ink);
    margin: 0 0 1rem;
    line-height: 1.25;
}

.methodo-modal-body p {
    font-size: 0.96rem;
    color: var(--ink-2);
    line-height: 1.65;
    margin-bottom: 1.2rem;
}

.methodo-modal-body ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.methodo-modal-body ul li {
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.94rem;
    color: var(--ink-2);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.methodo-modal-body ul li::before {
    content: "•";
    position: absolute;
    left: 0.3rem;
    color: var(--bordeaux);
    font-size: 1.2rem;
    line-height: 1;
}

/* Liens soulignés vers les fiches théoriques */
.methodo-concept-link {
    color: var(--bordeaux);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
    transition: color var(--transition), background-color var(--transition);
    border-radius: 2px;
    padding: 0 2px;
}

.methodo-concept-link:hover {
    color: #4A1423;
    background: #F2E3E6;
}

@media (max-width: 900px) {
    .methodo-timeline {
        grid-template-columns: 1fr;
    }
}

.methodo-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.methodo-card {
    background: #FAF8F5;
    border: 1px solid var(--surface-2);
    border-left: 3px solid var(--bordeaux);
    border-radius: 6px;
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
}

.methodo-card-num {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--bordeaux);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
    display: block;
}

.methodo-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.6rem;
    color: var(--ink);
}

.methodo-card-desc {
    font-size: 0.92rem;
    color: var(--ink-3);
    margin-bottom: 1rem;
    font-style: italic;
}

.methodo-card-points {
    list-style: disc;
    padding-left: 1.2rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.methodo-card-points li {
    font-size: 0.9rem;
    color: var(--ink-2);
    line-height: 1.55;
    margin-bottom: 0.4rem;
}

.methodo-card-footer {
    border-top: 1px solid var(--surface-2);
    padding-top: 0.8rem;
    margin-top: auto;
}

.methodo-card-link {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--bordeaux);
    text-decoration: none;
    display: inline-block;
}

.methodo-card-link:hover {
    text-decoration: underline;
}

.methodo-switch-callout {
    background: #FAF8F5;
    border: 1.5px solid var(--bordeaux);
    border-radius: 8px;
    padding: 1.8rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: 2rem;
}

.methodo-switch-text h4 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--ink);
    margin-bottom: 0.35rem;
}

.methodo-switch-text p {
    font-size: 0.92rem;
    color: var(--ink-2);
    margin: 0;
}

.methodo-cta-btn {
    background: var(--bordeaux);
    color: #FFFFFF;
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 600;
    padding: 0.85rem 1.4rem;
    border: 1px solid var(--bordeaux);
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition);
}

.methodo-cta-btn:hover {
    background: var(--bordeaux-2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 45, 62, 0.25);
}

/* Grille explicative G*Power */
.gpower-primer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.gpower-primer-card {
    background: #FAF8F5;
    border: 1px solid var(--surface-2);
    border-radius: 6px;
    padding: 1.2rem 1.4rem;
}

.gpower-primer-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--bordeaux);
    margin-bottom: 0.4rem;
}

.gpower-primer-card p {
    font-size: 0.88rem;
    color: var(--ink-2);
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 768px) {
    .methodo-tab-selector { flex-direction: column; }
    .methodo-switch-callout { flex-direction: column; text-align: center; }
    .gpower-primer-grid { grid-template-columns: 1fr; }
}

/* ===========================================
   VOLET 3 : SCRIPTS & CODES D'ANALYSE
   =========================================== */
.codes-search-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
    background: var(--surface);
    border: 1px solid var(--surface-2);
    border-radius: 8px;
    padding: 0.85rem 1.2rem;
}

.codes-search-box {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 320px;
}

.codes-search-box svg {
    position: absolute;
    left: 12px;
    color: var(--ink-3);
    pointer-events: none;
}

.codes-search-box input {
    width: 100%;
    padding: 0.65rem 2.2rem 0.65rem 2.4rem;
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    background: #FAF8F5;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--ink);
    transition: all 0.2s ease;
}

.codes-search-box input:focus {
    outline: none;
    border-color: var(--bordeaux);
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(107, 45, 62, 0.12);
}

.codes-search-clear {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--ink-3);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px;
}

.codes-lang-global-toggles {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.codes-toggle-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--ink-2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 0.3rem;
}

.codes-lang-pill {
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    background: #FAF8F5;
    color: var(--ink-2);
    cursor: pointer;
    transition: all 0.2s ease;
}

.codes-lang-pill:hover {
    border-color: var(--bordeaux);
    color: var(--bordeaux);
}

.codes-lang-pill.active {
    background: var(--bordeaux);
    color: #FFFFFF;
    border-color: var(--bordeaux);
}

/* ===========================================
   VOLET 3 : DECK DE CARTES & MODALE DE CODES
   =========================================== */
.codes-deck-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1.4rem;
    margin-bottom: 3rem;
}

.code-deck-card {
    background: #FAF8F5;
    border: 1.5px solid var(--surface-2);
    border-radius: var(--radius-md);
    padding: 1.5rem 1.6rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    text-align: left;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    position: relative;
}

.code-deck-card:hover {
    transform: translateY(-3px);
    border-color: var(--bordeaux);
    box-shadow: 0 8px 24px rgba(107, 45, 62, 0.12);
}

.code-deck-card:focus-visible {
    outline: 2px solid var(--bordeaux);
    outline-offset: 2px;
}

.code-deck-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.code-deck-arrow {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--bordeaux);
    transition: transform 0.2s ease;
}

.code-deck-card:hover .code-deck-arrow {
    transform: translateX(3px);
}

.code-deck-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: var(--ink);
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.code-deck-desc {
    font-size: 0.88rem;
    color: var(--ink-2);
    line-height: 1.55;
    margin: 0 0 1.2rem;
    flex-grow: 1;
}

.code-deck-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.8rem;
    border-top: 1px dashed var(--surface-2);
    margin-top: auto;
}

.code-deck-badges {
    display: flex;
    gap: 0.35rem;
}

.code-deck-badge {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    letter-spacing: 0.03em;
}

.code-deck-badge.badge-py {
    background: #F4E8EE;
    color: #6B2D3E;
}

.code-deck-badge.badge-r {
    background: #E8F1F6;
    color: #24586B;
}

.code-deck-badge.badge-jamovi {
    background: #F7EFE6;
    color: #8C531B;
}

.code-deck-view-hint {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--bordeaux);
}

/* Modale détaillée de code */
.code-modal-box {
    max-width: 820px;
    width: 94%;
    max-height: 88vh;
    overflow-y: auto;
    padding: 2.2rem 2.5rem;
}

.code-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
    padding-right: 2rem;
}

.code-modal-title-group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.code-modal-title {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    color: var(--ink);
    margin: 0;
    line-height: 1.25;
}

.code-modal-desc {
    font-size: 0.96rem;
    line-height: 1.6;
    color: var(--ink-2);
    margin: 0 0 1rem;
}

.code-modal-usage-box {
    background: #FAF8F5;
    border: 1px dashed #D6CEC5;
    border-radius: 6px;
    padding: 0.85rem 1.1rem;
    margin-bottom: 1.4rem;
}

.code-usage-label {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--bordeaux);
    margin-bottom: 0.25rem;
}

.code-usage-text {
    font-size: 0.9rem;
    line-height: 1.55;
    color: #4A3E36;
    margin: 0;
}

.code-modal-lang-tabs-bar {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: -1px;
    flex-wrap: wrap;
}

.code-tabs-intro-label {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--ink-2);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.code-card-lang-tabs {
    display: flex;
    gap: 0.35rem;
}

.code-card-lang-tabs .code-tab-btn {
    padding: 0.45rem 1rem;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    border: 1px solid #D6CEC5;
    border-bottom: none;
    background: #EAE3D9;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
    color: #5C4F44;
    cursor: pointer;
    transition: all 0.2s ease;
}

.code-card-lang-tabs .code-tab-btn:hover {
    background: #F2ECE3;
    color: var(--bordeaux);
}

.code-card-lang-tabs .code-tab-btn.active {
    background: #211A15;
    color: #FAF8F5;
    border-color: #211A15;
}

.code-card-pane {
    background: #1A1410;
    border-radius: 0 6px 6px 6px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.code-card-pane-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 1rem;
    background: #261F1A;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.code-lib-tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: #C2B8AD;
    text-transform: lowercase;
    letter-spacing: 0.04em;
}

.code-copy-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255, 255, 255, 0.1);
    color: #FAF8F5;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 0.35rem 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.code-copy-action-btn:hover {
    background: var(--bordeaux);
    border-color: var(--bordeaux);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(107, 45, 62, 0.4);
}

.code-copy-action-btn.copied {
    background: #15803D !important;
    border-color: #15803D !important;
    color: #FFFFFF !important;
}

.code-card-pane pre {
    margin: 0;
    padding: 1.2rem;
    overflow-x: auto;
    background: transparent;
}

.code-card-pane code {
    font-family: var(--font-mono), 'JetBrains Mono', monospace;
    font-size: 0.88rem;
    line-height: 1.6;
    color: #F8F5F1;
    white-space: pre;
    display: block;
}

.jamovi-instruction-box {
    padding: 1.4rem;
    background: #211A15;
}

.jamovi-instruction-path {
    font-family: var(--font-mono), 'JetBrains Mono', monospace;
    font-size: 0.92rem;
    line-height: 1.7;
    color: #F8D9A8;
    background: rgba(0, 0, 0, 0.3);
    border: 1px dashed rgba(248, 217, 168, 0.35);
    border-radius: 6px;
    padding: 1rem 1.2rem;
}


