﻿/* ==========================================================================
   1. CONFIGURATION GÉNÉRALE & FONTS
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Passion+One:wght@400;700&display=swap');

:root {
    /* --- PALETTE OFFICIELLE --- */
    /* ROUGE (Principes) */
    --c-rouge: #E05A5A;
    /* BLEU CLAIR (Institutions) */
    --c-bleuclair: #5B8DBD;
    /* BLEU NUIT (Admin / Zone Interdite) */
    --c-bleunuit: #34495E;
    /* GRIS CLAIR (Droits / Neutre) */
    --c-grisclair: #D6D6D6;
    /* GRIS FONCÉ (Histoire / Textes) */
    --c-grisfonce: #788896;
    /* --- STRUCTURE --- */
    --c-bleufrance: #1743aa;
    --c-blue: #1A2B4C;
    --c-black: #111111;
    --c-white: #ffffff;
    --border-thick: 3px solid var(--c-black);
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Nunito', sans-serif;
    background-color: var(--c-white);
    background-image: radial-gradient(rgba(0,0,0, 0.05) 15%, transparent 15%);
    background-size: 10px 10px;
    overflow-x: hidden;
    color: var(--c-blue);
}

.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    width: 100%;
}

/* ==========================================================================
   2. NAVBAR (BARRE DE NAVIGATION)
   ========================================================================== */
.navbar-comic {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    gap: 8px;
    border-bottom: 4px solid var(--c-black);
}

/* LOGO : Drapeau Bleu Blanc Rouge */
.nav-logo-box {
    background: radial-gradient(rgba(0,0,0, 0.1) 20%, transparent 20%), linear-gradient(to right, var(--c-bleuclair) 33%, #ffffff 33%, #ffffff 66%, var(--c-rouge) 66%);
    background-size: 5px 5px, 100% 100%;
    padding: 0 20px;
    min-width: 220px;
    height: 60px;
    text-decoration: none;
    border: var(--border-thick);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text {
    font-family: 'Passion One', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 2rem;
    letter-spacing: 1px;
    line-height: 1;
    z-index: 2;
    margin: 0;
    color: var(--c-black);
    text-shadow: 2px 0 0 #fff, -2px 0 0 #fff, 0 2px 0 #fff, 0 -2px 0 #fff, 3px 3px 0 rgba(0,0,0,0.2);
}

.nav-menu {
    display: flex;
    flex-grow: 1;
    gap: 8px;
    height: 60px;
}

.nav-item {
    flex: 1;
    border: var(--border-thick);
    text-decoration: none;
    color: var(--c-white);
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 0.85rem;
    line-height: 1.1;
    text-align: center;
    text-shadow: 2px 2px 0 var(--c-black);
    transition: transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    background-image: radial-gradient(rgba(0,0,0, 0.15) 20%, transparent 20%);
    background-size: 5px 5px;
}

    .nav-item:hover {
        transform: translateY(-3px);
        box-shadow: 0 4px 0 var(--c-black);
    }

/* Couleurs Navbar */
.bg-pink {
    background-color: var(--c-rouge);
}

.bg-teal {
    background-color: var(--c-bleuclair);
}

.bg-purple {
    background-color: var(--c-bleunuit);
}

.bg-orange {
    background-color: var(--c-grisfonce);
}

.bg-blue {
    background-color: var(--c-blue);
}

.bg-yellow {
    background-color: var(--c-grisclair);
    color: var(--c-black) !important;
    text-shadow: none !important;
}

.nav-actions {
    background-color: var(--c-grisclair);
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 15px;
    border: var(--border-thick);
}

/* Modification de .btn-login pour empiler le texte */
.btn-login {
    background: none;
    border: none;
    color: var(--c-white);
    font-family: 'Passion One', sans-serif;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 0.9;
    font-size: 1.2rem;
}

    .btn-login:hover {
        color: var(--c-bleuclair);
    }

.btn-subtext {
    font-size: 0.8rem;
    opacity: 0.9;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    margin-top: 2px;
}

.btn-premium {
    background-color: var(--c-grisclair);
    color: var(--c-black);
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    font-family: 'Passion One', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    cursor: pointer;
    text-transform: uppercase;
}

/* ==========================================================================
   NOUVEAU : BLOC DRAPEAU (User Connecté)
   ========================================================================== */

/* Conteneur principal qui remplace .nav-actions quand connecté */
.nav-flag-container {
    display: flex;
    height: 60px;
    border: var(--border-thick); /* Bordure épaisse noire */
    box-shadow: 4px 4px 0 var(--c-black); /* Ombre portée */
    margin-left: 15px;
}

/* Style commun aux 3 zones (Bleu, Blanc, Rouge) */
.flag-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    height: 100%;
    /* --- LA TEXTURE À POINTS SUR TOUTES LES ZONES --- */
    background-image: radial-gradient(rgba(0,0,0, 0.15) 20%, transparent 20%);
    background-size: 5px 5px;
}

/* ZONE 1 : BLEU (Nom utilisateur) */
.fz-blue {
    background-color: #002654; /* Bleu Drapeau Foncé */
    color: white;
    border-right: var(--border-thick);
}

/* ZONE 2 : BLANC (Bouton Logout) */
.fz-white {
    background-color: #ffffff;
    border-right: var(--border-thick);
}

/* ZONE 3 : ROUGE (Lien Abonnement) */
.fz-red {
    background-color: #ED2939; /* Rouge Drapeau Vif */
    color: white;
}

/* --- STYLES INTERNES DU DRAPEAU --- */

/* Style du Nom */
.flag-user-name {
    font-family: 'Passion One', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    text-shadow: 2px 2px 0 var(--c-black);
    white-space: nowrap;
}

/* Style du Bouton Logout (Rouge sur fond Blanc) */
.btn-logout-flag {
    background-color: var(--c-rouge);
    color: white;
    border: 3px solid var(--c-black);
    font-family: 'Passion One', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 1rem;
    padding: 5px 15px;
    cursor: pointer;
    box-shadow: 3px 3px 0 var(--c-black);
    transition: transform 0.1s;
    /* Pas de texture ici pour garder le texte lisible, ou ajouter si souhaité */
}

    .btn-logout-flag:active {
        transform: translate(2px, 2px);
        box-shadow: 1px 1px 0 var(--c-black);
    }

/* Style du lien Abonnement (Sur fond Rouge) */
.flag-link-sub {
    color: white;
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    text-decoration: underline;
    font-size: 0.9rem;
    cursor: pointer;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.3);
    white-space: nowrap;
}

    .flag-link-sub:hover {
        color: #ffd700; /* Devient Or au survol */
    }

/* ==========================================================================
   3. SECTION HERO
   ========================================================================== */
.hero-section {
    position: relative;
    height: 550px;
    width: 100%;
    overflow: hidden;
    border-bottom: 4px solid var(--c-black);
}

.hero-bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    z-index: 0;
}

.hero-col {
    flex: 1;
    position: relative;
    border-right: 3px solid rgba(0,0,0,0.1);
}

.hero-col::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(0,0,0,0.15) 20%, transparent 20%);
    background-size: 8px 8px;
}

.hero-container {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.hero-img-wrapper {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.hero-img {
    height: 90%;
    width: auto;
    filter: drop-shadow(8px 8px 0px rgba(0,0,0,0.3));
    transform: translateX(-20px);
}

.hero-text-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-left: 40px;
}

.hero-headline {
    font-family: 'Passion One', sans-serif;
    font-weight: 900;
    font-size: 4.5rem;
    color: var(--c-white);
    line-height: 1;
    transform: rotate(-3deg);
    margin-bottom: 30px;
    letter-spacing: 1px;
    text-shadow: 3px 3px 0 var(--c-black), 6px 6px 0 rgba(0,0,0,0.3);
}

.btn-hero-cta {
    background: var(--c-white);
    color: var(--c-black);
    font-family: 'Passion One', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    padding: 15px 30px;
    border: 3px solid var(--c-black);
    box-shadow: 6px 6px 0px var(--c-black);
    transform: rotate(2deg);
    cursor: pointer;
    transition: transform 0.1s;
    text-decoration: none;
    display: inline-block;
}

.btn-hero-cta:active {
    transform: rotate(2deg) translate(3px, 3px);
    box-shadow: 3px 3px 0px var(--c-black);
}

/* ==========================================================================
   4. SECTION LEARNING PATH (PARCOURS)
   ========================================================================== */
.learning-path-section {
    background-color: #ffffff;
    background-image: radial-gradient(rgba(0,0,0, 0.15) 20%, transparent 20%);
    background-size: 8px 8px;
    padding: 60px 0;
    border-bottom: 8px solid #000000;
    position: relative;
    z-index: 5;
    overflow: hidden;
    box-shadow: inset 0px -4px 0px rgba(0,0,0,0.1);
}

.path-label {
    position: absolute;
    top: 10px;
    left: 20px;
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: 1.1rem;
    color: var(--c-black);
    text-transform: uppercase;
    z-index: 20;
}

/* Flexbox ajusté pour alignement et hauteur égale */
.path-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap; /* Permet le retour à la ligne si écran trop petit */
    justify-content: center;
    gap: 30px; /* Espace entre les cartes */
    align-items: stretch; /* FORCE LA HAUTEUR ÉGALE */
    padding: 0 10px 10px 10px;
}

/* ==========================================================================
   5. COMPOSANTS CARTES STATISTIQUES (Dashboard Accueil)
   ========================================================================== */
.stats-card-comic {
    background: white;
    border: 4px solid var(--c-black);
    box-shadow: 8px 8px 0 var(--c-black);
    width: 100%;
    flex: 1; /* S'étend pour remplir l'espace */
    min-width: 250px;
    max-width: 350px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
    overflow: hidden;
    height: 100%; /* Force la hauteur */
    margin-bottom: 20px;
}

.stats-card-comic:hover {
    transform: translate(-3px, -3px);
    box-shadow: 12px 12px 0 var(--c-black);
}

/* Header */
.stats-card-header {
    height: 85px;
    padding: 15px;
    border-bottom: 4px solid var(--c-black);
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
}

.stats-header-icon {
    font-size: 2.5rem;
    width: 50px;
    text-align: center;
}

.stats-header-text h3 {
    font-family: 'Passion One', sans-serif;
    text-transform: uppercase;
    margin: 0;
    font-size: 1.4rem;
    line-height: 1;
    text-shadow: 2px 2px 0 var(--c-black);
}

/* Barre globale */
.global-progress {
    background: rgba(0,0,0,0.3);
    height: 18px;
    border: 2px solid var(--c-black);
    margin-top: 8px;
    position: relative;
    border-radius: 4px;
}

.global-bar {
    height: 100%;
    background: #fff;
    width: 0%;
    transition: width 0.5s;
}

.global-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--c-black);
    text-shadow: none !important;
}

/* Body */
.stats-card-body {
    padding: 15px;
    background: #fff;
    flex: 1; /* Pousse le footer vers le bas */
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sub-stat-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--c-black);
}

.sub-label {
    flex: 1;
}

.sub-bar-container {
    width: 80px;
    height: 10px;
    background: #eee;
    border: 2px solid var(--c-black);
    border-radius: 5px;
    overflow: hidden;
}

.sub-bar-fill {
    height: 100%;
}

.sub-percent {
    font-size: 0.8rem;
    font-weight: 800;
    width: 35px;
    text-align: right;
}

/* Footer */
.stats-card-footer {
    background: var(--c-black);
    color: white;
    text-decoration: none;
    padding: 12px;
    text-align: center;
    font-family: 'Passion One';
    text-transform: uppercase;
    font-size: 1.2rem;
    transition: background 0.2s;
    display: block;
    margin-top: auto; /* Sécurité supplémentaire */
}

.stats-card-footer:hover {
    background: #333;
    color: gold;
}

/* --- THEMES COULEURS (Alignés sur Navbar) --- */

/* 1. PRINCIPES (ROUGE) */
.theme-red .stats-card-header {
    background-color: var(--c-rouge);
    color: white;
}

.theme-red .sub-bar-fill {
    background-color: var(--c-rouge);
}

/* 2. INSTITUTIONS (BLEU CLAIR) */
.theme-blue .stats-card-header {
    background-color: var(--c-bleuclair);
    color: white;
}

.theme-blue .sub-bar-fill {
    background-color: var(--c-bleuclair);
}

/* 3. DROITS (GRIS CLAIR - Texte Noir) */
.theme-grey .stats-card-header {
    background-color: var(--c-grisclair);
    color: var(--c-black);
}

.theme-grey .stats-header-text h3 {
    text-shadow: none;
}

.theme-grey .sub-bar-fill {
    background-color: #999;
}

/* 4. HISTOIRE (GRIS FONCÉ) */
.theme-dark .stats-card-header {
    background-color: var(--c-grisfonce);
    color: white;
}

.theme-dark .sub-bar-fill {
    background-color: var(--c-grisfonce);
}

/* 4. HISTOIRE (BLEU FONCÉ) */
.theme-darkblue .stats-card-header {
    background-color: var(--c-bleunuit);
    color: white;
}

.theme-darkblue .sub-bar-fill {
    background-color: var(--c-bleunuit);
}


/* ==========================================================================
   6. SECTION THÈMES SECONDAIRES (Bas de page accueil)
   ========================================================================== */
.theme-section {
    background-color: #ffffff;
    background-image: radial-gradient(rgba(0,0,0, 0.15) 20%, transparent 20%);
    background-size: 8px 8px;
    padding: 70px 0 80px 0;
    border-bottom: 8px solid var(--c-black);
    position: relative;
    z-index: 10;
}

.theme-label {
    position: absolute;
    top: 15px;
    left: 20px;
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: 1.1rem;
    color: var(--c-black);
    text-transform: uppercase;
    z-index: 20;
}

.theme-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    padding: 0 20px;
}

.theme-card {
    height: 160px;
    border: 3px solid #000000;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 5px 5px 0px #000000;
    transition: transform 0.2s;
    cursor: pointer;
}

.theme-card:hover {
    transform: translateY(-5px);
    box-shadow: 5px 9px 0px #000000;
}

.theme-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.theme-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    color: #ffffff;
    filter: drop-shadow(2px 2px 0px #000);
}

.theme-title {
    font-family: 'Passion One', sans-serif;
    font-weight: 700;
    color: #ffffff;
    font-size: 1.5rem;
    text-transform: uppercase;
    text-shadow: 2px 2px 0 #000;
    margin: 0;
}

/* ==========================================================================
   7. STYLES DES PAGES THÈMES (Header, Intro, Liste)
   ========================================================================== */
.theme-page-header {
    padding: 60px 20px 80px;
    position: relative;
    border-bottom: 5px solid var(--c-black);
    overflow: hidden;
    text-align: center;
    box-shadow: 0px 10px 0px rgba(0,0,0,0.1);
}

.theme-header-texture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(0,0,0, 0.15) 20%, transparent 20%);
    background-size: 8px 8px;
    z-index: 0;
}

.theme-header-content {
    position: relative;
    z-index: 2;
}

.theme-hero-title {
    font-family: 'Passion One', sans-serif;
    font-weight: 900;
    font-size: 4rem;
    color: var(--c-white);
    margin: 0;
    line-height: 1;
    letter-spacing: 1px;
    text-shadow: 4px 4px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000;
    transform: rotate(-2deg);
}

.theme-hero-subtitle {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--c-white);
    margin-top: 20px;
    text-shadow: 2px 2px 0 #000;
    display: inline-block;
    background: var(--c-black);
    padding: 5px 15px;
    transform: rotate(1deg);
}

.theme-main-section {
    padding: 60px 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.stats-panel {
    background: white;
    border: 4px solid var(--c-black);
    box-shadow: 10px 10px 0 var(--c-black);
    padding: 25px;
    margin-bottom: 60px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 30px;
    transform: rotate(-1deg);
}

.stats-progress-bar-container {
    height: 25px;
    background: var(--c-grisclair);
    border: 3px solid var(--c-black);
    position: relative;
}

.stats-progress-bar-fill {
    height: 100%;
    background: var(--c-rouge);
    border-right: 3px solid var(--c-black);
}

.comic-h2-intro {
    font-family: 'Passion One', sans-serif;
    font-weight: 700;
    font-size: 2.8rem;
    color: var(--c-black);
    display: inline-block;
    border-bottom: 5px solid;
    margin-bottom: 30px;
    letter-spacing: 0.5px;
}

.quiz-panel-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.quiz-panel-link {
    display: flex;
    text-decoration: none;
    color: var(--c-black);
    background: #fff;
    border: 4px solid var(--c-black);
    box-shadow: 6px 6px 0 var(--c-black);
    transform: skewX(-5deg);
    transition: all 0.2s ease-in-out;
    overflow: hidden;
}

.quiz-panel-link:hover {
    transform: skewX(-5deg) translate(-5px, -5px);
    box-shadow: 11px 11px 0 var(--c-black);
}

.panel-inner {
    display: flex;
    width: 100%;
    transform: skewX(5deg);
}

.panel-icon-col {
    width: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: white;
    border-right: 4px solid var(--c-black);
    position: relative;
}

.panel-icon-col::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(0,0,0,0.15) 20%, transparent 20%);
    background-size: 6px 6px;
}

.panel-info-col {
    flex-grow: 1;
    padding: 20px 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.panel-title {
    font-family: 'Passion One', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    margin: 0 0 8px 0;
    line-height: 1;
}

.panel-desc {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    margin: 0;
    color: #555;
}

.panel-action-col {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 30px;
    background-color: #f0f0f0;
    border-left: 4px solid var(--c-black);
}

.btn-panel-go {
    background: var(--c-grisclair);
    color: var(--c-black);
    font-family: 'Passion One', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    padding: 5px 20px;
    border: 3px solid var(--c-black);
    box-shadow: 3px 3px 0 var(--c-black);
    transform: rotate(-3deg);
    transition: background 0.2s;
}

.quiz-panel-link:hover .btn-panel-go {
    background: var(--c-white);
}

@media (max-width: 768px) {
    .panel-inner {
        flex-direction: column;
        transform: none;
    }

    .quiz-panel-link {
        transform: none;
    }

        .quiz-panel-link:hover {
            transform: translate(-5px, -5px);
        }

    .panel-icon-col {
        width: 100%;
        height: 80px;
        border-right: none;
        border-bottom: 4px solid var(--c-black);
    }

    .panel-action-col {
        width: 100%;
        padding: 20px;
        border-left: none;
        border-top: 4px solid var(--c-black);
    }
}

/* ==========================================================================
   8. COMPOSANTS CARTES STATISTIQUES (ACCUEIL)
   ========================================================================== */

.stats-card-comic {
    background: white;
    border: 4px solid var(--c-black);
    box-shadow: 8px 8px 0 var(--c-black);
    width: 100%;
    /* --- CORRECTION TAILLE --- */
    min-height: 380px; /* Force une hauteur minimale identique pour tous */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Répartit le contenu */

    flex: 1;
    min-width: 250px;
    max-width: 350px;
    transition: transform 0.2s;
    overflow: hidden;
    margin-bottom: 20px;
}

.stats-card-comic:hover {
    transform: translate(-3px, -3px);
    box-shadow: 12px 12px 0 var(--c-black);
}

/* --- Header --- */
.stats-card-header {
    padding: 15px;
    border-bottom: 4px solid var(--c-black);
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.stats-header-icon {
    font-size: 2.5rem;
    width: 50px;
    text-align: center;
}

.stats-header-text h3 {
    font-family: 'Passion One', sans-serif;
    text-transform: uppercase;
    margin: 0;
    font-size: 1.4rem;
    line-height: 1;
    text-shadow: 2px 2px 0 var(--c-black);
}

/* Barre globale */
.global-progress {
    background: rgba(0,0,0,0.3);
    height: 18px;
    border: 2px solid var(--c-black);
    margin-top: 8px;
    position: relative;
    border-radius: 4px;
}

.global-bar {
    height: 100%;
    background: #fff;
    width: 0%;
    transition: width 0.5s;
}

.global-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--c-black); /* Par défaut noir */
    text-shadow: none !important;
    z-index: 5;
}

/* --- Body --- */
.stats-card-body {
    padding: 15px;
    background: #fff;
    flex-grow: 1; /* Pousse le footer vers le bas */
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15px;
}

.sub-stat-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--c-black);
}

.sub-label {
    flex: 1;
}

.sub-bar-container {
    width: 80px;
    height: 10px;
    background: #eee;
    border: 2px solid var(--c-black);
    border-radius: 5px;
    overflow: hidden;
}

.sub-bar-fill {
    height: 100%;
}

.sub-percent {
    font-size: 0.8rem;
    font-weight: 800;
    width: 35px;
    text-align: right;
}

/* --- Footer --- */
.stats-card-footer {
    background: var(--c-black);
    color: white;
    text-decoration: none;
    padding: 12px;
    text-align: center;
    font-family: 'Passion One';
    text-transform: uppercase;
    font-size: 1.2rem;
    transition: background 0.2s;
    display: block;
    margin-top: auto;
    flex-shrink: 0;
}

.stats-card-footer:hover {
    background: #333;
    color: gold;
}

/* --- THEMES COULEURS --- */

/* 1. ROUGE */
.theme-red .stats-card-header {
    background-color: var(--c-rouge);
    color: white;
}

.theme-red .sub-bar-fill {
    background-color: var(--c-rouge);
}

/* 2. BLEU CLAIR */
.theme-blue .stats-card-header {
    background-color: var(--c-bleuclair);
    color: white;
}

.theme-blue .sub-bar-fill {
    background-color: var(--c-bleuclair);
}

/* 3. GRIS CLAIR (Droits) */
.theme-grey .stats-card-header {
    background-color: var(--c-grisclair);
    color: var(--c-black) !important; /* Titre NOIR */
}

.theme-grey .stats-header-text h3 {
    text-shadow: none !important;
}

/* Correction Spécifique : Texte BLANC dans la barre grise */
.theme-grey .global-text {
    color: #ffffff !important;
    text-shadow: 1px 1px 0 #000 !important; /* Petit contour pour lisibilité max */
}

.theme-grey .sub-bar-fill {
    background-color: #999;
}

/* 4. GRIS FONCÉ (Histoire) */
.theme-dark .stats-card-header {
    background-color: var(--c-grisfonce);
    color: white;
}

.theme-dark .sub-bar-fill {
    background-color: var(--c-grisfonce);
}
/* ==========================================================================
   8. LOGIN
   ========================================================================== */
.login-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 40px 20px;
    background-color: #fff;
    background-image: radial-gradient(rgba(26, 43, 76, 0.2) 15%, transparent 15%);
    background-size: 20px 20px;
}

.login-card {
    background: #ffffff;
    border: 4px solid var(--c-black);
    box-shadow: 12px 12px 0 var(--c-black);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 10;
}

.login-title {
    font-family: 'Passion One', sans-serif;
    font-weight: 900;
    font-size: 3rem;
    text-align: center;
    color: var(--c-blue);
    text-shadow: 3px 3px 0 rgba(0,0,0,0.1);
    margin-top: 0;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group {
    margin-bottom: 25px;
}

.comic-label {
    display: block;
    font-family: 'Passion One', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: var(--c-black);
    letter-spacing: 0.5px;
}

.comic-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 15px;
    border: 3px solid var(--c-black);
    border-radius: 0;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    background: #f9f9f9;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.comic-input:focus {
    outline: none;
    border-color: var(--c-rouge);
    background: #fff;
    box-shadow: 6px 6px 0 var(--c-rouge);
    transform: translate(-2px, -2px);
}

.login-links {
    text-align: center;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comic-link {
    color: var(--c-black);
    text-decoration: underline;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
}

.comic-link:hover {
    color: var(--c-blue);
}

.login-card::after {
    content: "★";
    position: absolute;
    top: -25px;
    right: -25px;
    font-size: 4rem;
    color: var(--c-grisclair);
    text-shadow: 2px 2px 0 var(--c-black);
    transform: rotate(15deg);
    z-index: 20;
}

/* ==========================================================================
   9. PAGE GO PREMIUM (PRIX)
   ========================================================================== */
.pricing-section {
    padding: 60px 20px 100px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.pricing-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.pricing-card {
    background: #ffffff;
    border: 4px solid var(--c-black);
    width: 320px;
    position: relative;
    box-shadow: 8px 8px 0 rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    text-align: left;
    transition: transform 0.2s;
}

.pricing-card.popular {
    transform: scale(1.1);
    z-index: 10;
    box-shadow: 12px 12px 0 rgba(0,0,0,0.2);
    border-width: 4px;
    padding-bottom: 10px;
}

.pricing-header {
    padding: 30px 20px;
    border-bottom: 4px solid var(--c-black);
    text-align: center;
    color: var(--c-black);
}

.plan-name {
    font-family: 'Passion One', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 0.5px;
}

.plan-price {
    font-family: 'Passion One', sans-serif;
    font-weight: 900;
    font-size: 3.5rem;
    margin: 10px 0 0 0;
    line-height: 1;
}

.plan-period {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    opacity: 0.8;
    margin-top: 5px;
}

.pricing-features {
    list-style: none;
    padding: 30px 25px;
    margin: 0;
    flex-grow: 1;
}

.pricing-features li {
    margin-bottom: 15px;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--c-black);
}

.check-icon {
    color: var(--c-bleuclair);
    font-size: 1.2rem;
}

.cross-icon {
    color: #ccc;
    font-size: 1.2rem;
}

.pricing-footer {
    padding: 0 20px 30px;
    text-align: center;
}

.btn-pricing {
    width: 100%;
    padding: 12px;
    border: 3px solid var(--c-black);
    font-family: 'Passion One', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 4px 4px 0 var(--c-black);
    transition: all 0.1s;
}

.btn-pricing:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--c-black);
}

.popular-badge {
    position: absolute;
    top: -55px;
    right: -20px;
    background: var(--c-rouge);
    color: white;
    width: 85px;
    height: 85px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: 'Passion One', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.1;
    border: 3px solid var(--c-black);
    box-shadow: 3px 3px 0 var(--c-black);
    transform: rotate(15deg);
    z-index: 20;
}

@media (max-width: 900px) {
    .pricing-grid {
        flex-direction: column;
        align-items: center;
        gap: 60px;
    }

    .pricing-card {
        width: 100%;
        max-width: 350px;
    }

    .pricing-card.popular {
        transform: scale(1);
    }
}

/* ==========================================================================
   10. FOOTER
   ========================================================================== */
.comic-footer {
    position: relative;
    width: 100%;
    border-top: none;
    margin-top: 0;
    overflow: hidden;
    padding: 60px 0;
}

.footer-bg-layer {
    position: absolute;
    top: 0;
    left: -5%;
    width: 110%;
    height: 100%;
    display: flex;
    justify-content: center;
    gap: 15px;
    z-index: 0;
}

.footer-col {
    height: 100%;
    position: relative;
    border: 3px solid var(--c-black);
    transform: skewX(-15deg);
    box-shadow: 5px 5px 0px rgba(0,0,0,0.1);
}

.f-pink {
    width: 32%;
    background-color: var(--c-rouge);
}

.f-teal {
    width: 32%;
    background-color: var(--c-bleuclair);
}

.f-orange {
    width: 32%;
    background-color: var(--c-grisfonce);
}

.f-pink::after, .f-orange::after, .f-teal::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(0,0,0,0.2) 20%, transparent 20%);
    background-size: 6px 6px;
}

.footer-content {
    position: relative;
    z-index: 10;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    padding: 0 10px;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.footer-btn {
    background: white;
    border: 2px solid var(--c-black);
    padding: 8px 15px;
    color: var(--c-black);
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 0.9rem;
    text-decoration: none;
    box-shadow: 4px 4px 0 var(--c-black);
    border-radius: 6px;
    transition: transform 0.1s;
    white-space: nowrap;
}

.footer-btn:hover {
    transform: translateY(-3px);
    box-shadow: 4px 7px 0 var(--c-black);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.copyright-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--c-black);
}

.blazor-badge {
    background-color: var(--c-grisclair);
    color: var(--c-black);
    border: 2px solid var(--c-black);
    padding: 5px 15px;
    font-family: 'Passion One', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 4px;
    box-shadow: 3px 3px 0 var(--c-black);
}
/* ==========================================================================
   11. PAGE D'ERREUR 404 (Style Bureaucratie)
   ========================================================================== */

/* FOND DE PAGE AVEC MOTIF */
.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    background-color: #f4f4f4;
    background-image: radial-gradient(var(--c-bleunuit) 15%, transparent 15%);
    background-size: 20px 20px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* BANDEAU JAUNE "POLICE" */
.caution-tape {
    background: #f1c40f; /* Jaune chantier */
    color: var(--c-black);
    font-family: 'Passion One', sans-serif;
    font-size: 1.5rem;
    padding: 10px 0;
    width: 120%;
    text-align: center;
    transform: rotate(-5deg);
    border-top: 4px solid var(--c-black);
    border-bottom: 4px solid var(--c-black);
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
    margin-bottom: 40px;
    white-space: nowrap;
    overflow: hidden;
    font-weight: 900;
}

/* LA CARTE CENTRALE */
.error-card {
    background: white;
    border: 4px solid var(--c-black);
    box-shadow: 15px 15px 0 var(--c-black);
    padding: 50px 30px;
    max-width: 600px;
    width: 100%;
    text-align: center;
    position: relative;
    transform: rotate(2deg); /* Légèrement de travers comme un dossier jeté */
}

/* TAMPON "DOSSIER PERDU" */
.stamp-box {
    position: absolute;
    top: -30px;
    right: -30px;
    border: 5px solid var(--c-rouge);
    color: var(--c-rouge);
    font-family: 'Passion One', sans-serif;
    font-size: 2rem;
    padding: 10px 20px;
    text-transform: uppercase;
    border-radius: 10px;
    transform: rotate(15deg);
    opacity: 0.8;
    mask-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC'); /* Texture grunge simulée simple */
    mix-blend-mode: multiply;
    line-height: 1;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
}

/* ICONE CENTRALE */
.error-icon {
    font-size: 5rem;
    color: var(--c-bleunuit);
    margin-bottom: 20px;
    filter: drop-shadow(4px 4px 0 var(--c-black));
}

/* TITRE */
.error-title {
    font-family: 'Passion One', sans-serif;
    font-size: 3.5rem;
    margin: 0;
    color: var(--c-black);
    text-transform: uppercase;
    line-height: 1;
}

/* TEXTE */
.error-message {
    font-family: 'Nunito', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #555;
    margin: 20px 0 40px 0;
}

/* BOUTONS D'ACTION */
.error-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-comic-primary {
    background-color: var(--c-bleuclair);
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    border: 3px solid var(--c-black);
    font-family: 'Passion One', sans-serif;
    font-size: 1.4rem;
    text-transform: uppercase;
    box-shadow: 5px 5px 0 var(--c-black);
    transition: transform 0.1s;
    display: inline-block;
}

.btn-comic-primary:hover {
    transform: translate(-3px, -3px);
    box-shadow: 8px 8px 0 var(--c-black);
}

.btn-comic-secondary {
    background-color: var(--c-grisclair);
    color: var(--c-black);
    text-decoration: none;
    padding: 12px 25px;
    border: 3px solid var(--c-black);
    font-family: 'Passion One', sans-serif;
    font-size: 1.4rem;
    text-transform: uppercase;
    box-shadow: 5px 5px 0 var(--c-black);
    transition: transform 0.1s;
    display: inline-block;
}

.btn-comic-secondary:hover {
    transform: translate(-3px, -3px);
    box-shadow: 8px 8px 0 var(--c-black);
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .error-title {
        font-size: 2.5rem;
    }

    .stamp-box {
        font-size: 1.5rem;
        top: -20px;
        right: -10px;
    }

    .caution-tape {
        font-size: 1rem;
    }
}

/* ==========================================================================
   12. QUIZ MODAL - STYLE ACCORDÉ AU THÈME GRIS
   ========================================================================== */

.modal-force-display {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.quiz-comic-card {
    background-color: #fff;
    border: 4px solid var(--c-black);
    border-radius: 25px;
    /* On utilise ici le gris clair pour l'ombre décalée */
    box-shadow: 12px 12px 0px var(--c-grisclair);
    overflow: hidden;
    width: 100%;
    max-width: 550px; /* Taille contenue et centrée */
    position: relative;
}

/* En-tête gris clair accordé au thème */
.quiz-comic-header-grey {
    background-color: var(--c-grisclair);
    padding: 20px;
    border-bottom: 4px solid var(--c-black);
    text-align: center;
}

.quiz-comic-title-dark {
    font-family: 'Passion One', sans-serif;
    font-size: 2.2rem;
    color: var(--c-black); /* Texte noir pour lisibilité sur fond gris */
    text-transform: uppercase;
    margin: 0;
    /* On garde un petit relief blanc pour le style BD */
    text-shadow: 2px 2px 0px #fff;
}

/* Validation des boutons */
.quiz-correct {
    background-color: #2ecc71 !important;
    color: white !important;
    border-color: var(--c-black) !important;
}

.quiz-wrong {
    background-color: var(--c-rouge) !important;
    color: white !important;
    border-color: var(--c-black) !important;
}

.quiz-selected {
    background-color: var(--c-bleuclair) !important;
    color: white !important;
    border-color: var(--c-black) !important;
}

/* Le conteneur : Flexbox Vertical */
.quiz-options-grid {
    display: flex; /* Active Flexbox */
    flex-direction: column; /* ⬇️ INDISPENSABLE : Empile les éléments verticalement */
    gap: 15px; /* Espace entre les boutons */
    padding: 10px 20px 20px 20px;
    width: 100%; /* Prend toute la largeur */
    box-sizing: border-box; /* Évite que le padding déborde */
}

/* Les boutons : Pleine largeur */
.quiz-comic-option {
    width: 100%; /* ↔️ S'étire sur toute la largeur */
    text-align: left; /* Texte à gauche */
    display: flex; /* Permet d'aligner l'icône et le texte */
    align-items: center; /* Centre verticalement le contenu du bouton */
    padding: 15px 20px;
    /* Style Visuel */
    background-color: white;
    border: 3px solid var(--c-black);
    border-radius: 12px;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.1s ease-in-out;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.1);
}

/* Effet au survol */
.quiz-comic-option:hover:not(:disabled) {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--c-black);
    background-color: #f8f9fa;
}

/* Styles pour les réponses (Vert/Rouge/Gris) */
.quiz-selected {
    border-color: var(--c-bleuclair);
    background-color: #e3f2fd;
}

.quiz-dimmed {
    opacity: 0.4; /* Grisé pour les autres réponses */
}

.btn-quiz-option {
    background: white;
    border: 3px solid var(--c-black);
    padding: 15px;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: all 0.1s;
    border-radius: 8px;
    width: 100%;
}

.btn-quiz-option:hover {
    background: var(--c-grisclair);
    transform: translate(-3px, -3px);
    box-shadow: 4px 4px 0 var(--c-black);
}

.btn-quiz-option:active {
    transform: translate(0, 0);
    box-shadow: none;
}

/* ==========================================================================
   13. CARDS POUR LA SAISIE DE QUESTIONS (ADMIN)
   ========================================================================== */

.comic-card {
    background: white;
    border: 4px solid var(--c-black);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 12px 12px 0 var(--c-black);
}

.comic-label {
    font-family: 'Passion One', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    text-transform: uppercase;
    color: var(--c-bleunuit);
    margin-bottom: 8px;
    display: block;
}

.comic-input {
    width: 100%;
    padding: 12px 15px;
    border: 3px solid var(--c-black);
    border-radius: 8px;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    background-color: #fdfdfd;
    transition: transform 0.1s;
}

    .comic-input:focus {
        outline: none;
        box-shadow: 4px 4px 0 var(--c-bleuclair);
        border-color: var(--c-bleuclair);
        transform: translate(-2px, -2px);
    }

.answer-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    background: #f4f4f4;
    padding: 10px;
    border-radius: 10px;
    border: 2px dashed #ccc;
    transition: all 0.2s;
}

    .answer-row.correct {
        background: #d4edda; /* Vert clair */
        border: 2px solid #28a745;
    }

/* Radio button personnalisé */
.radio-custom {
    width: 25px;
    height: 25px;
    cursor: pointer;
    accent-color: #28a745;
}
/* =========================================
   STYLE CONTENU TEXTE (CGU, Mentions, etc.)
   ========================================= */

/* Carte de contenu style BD */
.cgu-card {
    background: white;
    border: 4px solid var(--c-black, #111); /* Fallback si la variable n'existe pas */
    padding: 30px;
    border-radius: 0px; /* On reste carré pour le style comic */
    position: relative;
    margin-bottom: 2rem;
    transition: transform 0.2s;
}

    .cgu-card:hover {
        transform: translate(-2px, -2px); /* Petit effet au survol */
    }

/* Titres des sections */
.cgu-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

/* Listes à puces style BD */
.cgu-card ul {
    list-style: square; /* Carrés plutôt que ronds */
    padding-left: 20px;
}

.cgu-card li {
    margin-bottom: 8px;
    font-weight: 700;
}

/* Liens hypertextes */
.cgu-card a {
    color: var(--c-black, #111);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    font-weight: 800;
    transition: all 0.2s;
}

    .cgu-card a:hover {
        color: var(--c-rouge, #E05A5A);
        background-color: #ffeaea;
        box-shadow: 2px 2px 0 var(--c-black, #111);
    }

/* Bloc d'alerte / Note importante */
.alert-comic {
    background-color: #fff3cd;
    border: 3px solid var(--c-black, #111);
    padding: 15px;
    margin-top: 15px;
    font-weight: 700;
    box-shadow: 4px 4px 0 var(--c-black, #111);
}

/* --- UTILITAIRES COULEURS & OMBRES (Pop Art) --- */

/* Couleurs de texte */
.text-blue {
    color: var(--c-blue, #5B8DBD);
}

.text-teal {
    color: #1abc9c;
}

.text-red {
    color: var(--c-red, #E05A5A);
}

.text-pink {
    color: #e91e63;
}

.text-dark {
    color: var(--c-dark, #34495E);
}

/* Ombres décalées (Hard Shadows) */
.shadow-blue {
    box-shadow: 8px 8px 0 var(--c-blue, #5B8DBD);
}

.shadow-teal {
    box-shadow: 8px 8px 0 #1abc9c;
}

.shadow-red {
    box-shadow: 8px 8px 0 var(--c-red, #E05A5A);
}

.shadow-pink {
    box-shadow: 8px 8px 0 #e91e63;
}

.shadow-dark {
    box-shadow: 8px 8px 0 var(--c-dark, #34495E);
}

/* ==========================================================================
   15. ZONE UTILISATEUR (3 BLOCS DISTINCTS)
   ========================================================================== */

/* Conteneur pour aligner les 3 blocs */
.nav-user-menu {
    display: flex;
    gap: 8px; /* Même espacement que le menu principal */
    height: 60px; /* Même hauteur */
    margin-left: 15px;
}

/* Classe utilitaire pour le bloc BLANC (Logout) */
.bg-white {
    background-color: #ffffff;
    color: var(--c-black) !important; /* Texte noir pour lisibilité */
    text-shadow: none !important; /* Pas d'ombre portée sur fond blanc */
}

    .bg-white:hover {
        background-color: #f8f9fa; /* Léger gris au survol */
        box-shadow: 0 4px 0 var(--c-black);
    }

/* Force les boutons à ressembler exactement aux liens <a> du menu */
button.nav-item {
    appearance: none;
    border-radius: 0;
    cursor: pointer;
    font-family: 'Nunito', sans-serif; /* Réapplique la police */
    font-size: 0.85rem; /* Réapplique la taille */
}

/* Ajustement spécifique pour que les 3 blocs aient une belle largeur */
.user-block {
    min-width: 130px; /* Assez large pour le texte */
    padding: 0 10px;
}

/* Couleur Rouge Vif pour l'abonnement (si différent du rose standard) */
.bg-flag-red {
    background-color: #E05A5A; /* Rouge de la charte */
}
/* Couleur Bleu Nuit pour le nom */
.bg-flag-blue {
    background-color: #1A2B4C; /* Bleu foncé de la charte */
}

/* ==========================================================================
   16. CSS DU RAPPORT DE CORRECTION 
   ========================================================================== */
.review-container {
    max-height: 400px;
    overflow-y: auto; /* Scroll vertical */
    padding-right: 10px;
    margin-top: 20px;
    text-align: left;
}

.review-item {
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    background: #f9f9f9;
}

.review-question {
    font-weight: 900;
    margin-bottom: 10px;
    font-family: 'Nunito', sans-serif;
}

.review-option {
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 5px;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

/* Cas 1: L'utilisateur a bon (Vert vif) */
.review-user-correct {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
    font-weight: bold;
}

/* Cas 2: L'utilisateur a faux (Rouge) */
.review-user-wrong {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
    text-decoration: line-through;
}

/* Cas 3: C'était la bonne réponse (Vert pâle pour montrer la solution) */
.review-solution {
    background-color: #e2e6ea; /* Gris/Vert très léger */
    border: 2px solid #28a745;
    color: #28a745;
    font-weight: bold;
}

.review-explanation {
    margin-top: 10px;
    padding: 10px;
    background-color: #fff3cd; /* Jaune pâle pédagogique */
    border-left: 4px solid #ffc107;
    font-size: 0.9rem;
    color: #856404;
}

/* ==========================================================================
   17. CSS DU RÉSULTAT FINAL (HISTORIQUE + MODAL) 
   ========================================================================== */
/* Petit effet hover sur les lignes */
.history-row-hover:hover {
    transform: scale(1.02);
    border-color: var(--c-bleufrance) !important;
}
/* Classes pour le rapport (réutilisation du CSS existant si possible, sinon défini ici) */
.solution-correct {
    background-color: #d4edda;
    border-color: #c3e6cb !important;
    color: #155724;
}

.user-wrong {
    background-color: #f8d7da;
    border-color: #f5c6cb !important;
    color: #721c24;
    text-decoration: line-through;
}

.user-correct {
    background-color: #d4edda;
    border-color: #c3e6cb !important;
    color: #155724;
    font-weight: bold;
}

/* ==========================================================================
   18. CSS DE LA MODAL DE RÉSULTATS
   ========================================================================== */
@@keyframes popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.solution-correct {
    background-color: #d4edda;
    border-color: #c3e6cb !important;
    color: #155724;
}

.user-wrong {
    background-color: #f8d7da;
    border-color: #f5c6cb !important;
    color: #721c24;
    text-decoration: line-through;
}

.user-correct {
    background-color: #d4edda;
    border-color: #c3e6cb !important;
    color: #155724;
    font-weight: bold;
    border: 2px solid #28a745 !important;
}

/* ==========================================================================
   19. CSS DES DÉFINITIONS
   ========================================================================== */
.def-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.def-card {
    background: white;
    border: 3px solid var(--c-black);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 5px 5px 0 rgba(0,0,0,0.2);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.def-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 8px 8px 0 var(--c-black);
    border-color: var(--c-bleufrance);
}

/* Style Carte Verrouillée */
.def-card.locked {
    border-style: dashed;
    cursor: pointer;
    background: #f8f9fa;
}

.def-card.locked:hover {
    border-color: var(--c-rouge);
    background: #fff5f5;
}

.locked-body {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: #555;
}

.def-header {
    padding: 10px 15px;
    border-bottom: 3px solid var(--c-black);
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.def-number {
    font-family: 'Passion One';
    font-size: 1.5rem;
    background: rgba(0,0,0,0.2);
    padding: 2px 8px;
    border-radius: 5px;
    line-height: 1;
}

.def-title {
    font-weight: 900;
    text-transform: uppercase;
    font-size: 1.1rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.def-body {
    padding: 15px;
    font-size: 1rem;
    line-height: 1.4;
    color: #333;
    font-weight: 500;
    flex-grow: 1;
}

/* ==========================================================================
   20. CSS DE LA MISE EN SITUATION
   ========================================================================== */
.situation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.situation-card {
    background: white;
    border: 4px solid var(--c-black);
    border-radius: 15px;
    box-shadow: 8px 8px 0 var(--c-black);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
    min-height: 280px; /* Hauteur harmonisée */
    display: flex;
    flex-direction: column;
}

.situation-card:hover {
    transform: translateY(-5px);
}

/* Quand la carte est révélée, on change un peu le style */
.situation-card.revealed {
    border-color: var(--c-bleuclair);
    background-color: #f9fcff;
}

.card-front {
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--c-black);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 15px;
}

.card-title {
    font-family: 'Passion One';
    text-transform: uppercase;
    font-size: 1.4rem;
    margin: 0 0 10px 0;
}

.card-question {
    font-weight: 700;
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 20px;
}

.btn-reveal {
    margin-top: auto; /* Pousse le bouton vers le bas */
    background: var(--c-black);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.9rem;
}

/* PARTIE RÉPONSE (Animée en JS/Blazor ou simple display) */
.card-back {
    background-color: #fff9e6; /* Jaune pâle note */
    border-top: 3px dashed var(--c-black);
    padding: 20px;
    animation: slideDown 0.3s ease-out;
    text-align: center;
}

.answer-text {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--c-bleufrance);
    margin-bottom: 10px;
}

.answer-note {
    font-size: 0.9rem;
    color: #555;
    font-style: italic;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   21. CSS DES COOKIES
   ========================================================================== */
.cookie-banner-overlay {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #fff9e6; /* Jaune pâle */
    border-top: 4px solid var(--c-black);
    box-shadow: 0 -5px 15px rgba(0,0,0,0.2);
    z-index: 9999; /* Toujours au dessus */
    padding: 20px;
    animation: slideUp 0.5s ease-out;
}

.cookie-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-icon {
    font-size: 3rem;
    animation: bounce 2s infinite;
}

.cookie-text {
    flex: 1;
    min-width: 300px;
}

.cookie-text ul {
    margin: 5px 0;
    padding-left: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
}

.cookie-actions {
    display: flex;
    gap: 15px;
}

.btn-hero-cta.accept {
    background-color: var(--c-black); /* Vert validation */
    color: white;
    border: 3px solid var(--c-black);
    font-size: 1rem;
    padding: 10px 20px;
}

.btn-hero-cta.decline {
    background-color: transparent;
    color: var(--c-black);
    border: 3px solid var(--c-black);
    font-size: 0.9rem;
    padding: 10px 15px;
}

@@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

@@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Mobile : on empile */
@@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-text ul {
        text-align: left;
    }

    .cookie-actions {
        width: 100%;
        justify-content: center;
    }
}