/* ============================================
   VARIABLES GLOBALES
   ============================================ */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #a855f7;
    --accent: #ec4899;
    --bg-light: #f0f4ff;
    --bg-gradient-start: #e0e7ff;
    --bg-gradient-end: #ddd6fe;
    --footer-bg: #a8c6fa;
    --text-dark: #1e1b4b;
    --text-light: #64748b;
    --white: #ffffff;
    --success-bg: rgba(34, 197, 94, 0.25);
    --success-text: #065f46;
    --success-border: rgba(34, 197, 94, 0.5);
    --success-shadow: rgba(34, 197, 94, 0.35);

    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ============================================
   EDUCATIONAL ARTICLE & QUIZ
   ============================================ */
.ia-article-content {
    color: var(--text-dark);
    line-height: 1.8;
    padding: 20px;
    background: white;
}

.ia-article-content h2 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 2.2rem;
    font-weight: 700;
}

.ia-article-content h3 {
    color: var(--secondary);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.ia-article-content p {
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
}

.ia-article-content ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.ia-article-content li {
    margin-bottom: 0.8rem;
}

.ia-article-content strong {
    color: var(--primary-dark);
}

.quiz-section {
    background-color: var(--bg-light);
    padding: 30px;
    border-radius: 20px;
    margin-top: 40px;
    border: 2px solid var(--primary);
    box-shadow: var(--shadow-lg);
}

.quiz-section h3 {
    margin-bottom: 1.5rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
}

#quiz-container p {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

#quiz-container button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 14px 20px;
    margin-bottom: 12px;
    background: white;
    border: 2px solid var(--primary);
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.25s ease;
    font-size: 1rem;
}

#quiz-container button:hover:not(:disabled) {
    background: var(--bg-light);
    transform: translateX(8px);
    border-color: var(--secondary);
}

#quiz-container button:disabled {
    cursor: default;
    opacity: 0.8;
}

#total-xp-display {
    margin-top: 20px;
    padding: 10px 16px;
    background: rgba(34, 197, 94, 0.1);
    border-radius: 8px;
    display: inline-block;
    font-weight: 600;
    color: var(--success-text);
}

/* Quiz per-question feedback */
.quiz-feedback.correct { color: #16a34a; font-weight: 600; }
.quiz-feedback.wrong   { color: #dc2626; font-weight: 600; }

/* ── IA Featured Wide Card — same as article-card but full width ── */
.ia-featured-wide {
    width: 100%;
    max-width: 100%;
    cursor: default !important;    /* override clickable style on body */
    transform: none !important;    /* disable 3D tilt from JS */
}

/* Override article-image height for the wide card */
.ia-featured-wide .article-image {
    height: 260px;
    border-radius: 20px 20px 0 0;
}
.ia-featured-wide .article-image img {
    border-radius: 20px 20px 0 0;
    object-position: center 40%;
}

/* Make article-content padding more generous */
.ia-featured-wide .article-content {
    padding: 24px 28px 28px;
}

.ia-featured-wide .article-title {
    font-size: 1.6rem;
    margin-bottom: 6px;
}

.ia-card-subtitle {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 12px;
}


/* ════════════════════════════════════════════════════════
   IA CARD — Premium card with native details/summary
   ════════════════════════════════════════════════════════ */
/* ════════════════════════════════════════════════════════
   IA ZOOM CARD — Expansion Modal Design
   ════════════════════════════════════════════════════════ */
.ia-trigger-card-container {
    padding: 20px 0;
}

.ia-teaser-card {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease !important;
}

.ia-teaser-card:hover {
    transform: scale(1.03);
    box-shadow: 0 12px 32px rgba(99,102,241,0.2) !important;
}

/* Modal Overlay base */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Expanded card inside the modal */
.modal-card-expanded {
    background-color: var(--bg-color, #ffffff);
    width: 95%;
    max-width: 850px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    position: relative;
    max-height: 85vh !important;
    overflow-y: auto !important;
    animation: zoomIn 0.3s ease-out;
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Scrollbar for the expanded card */
.modal-card-expanded::-webkit-scrollbar {
    width: 8px;
}
.modal-card-expanded::-webkit-scrollbar-track {
    background: transparent;
}
.modal-card-expanded::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 10px;
}

/* Close button */
.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    cursor: pointer;
    color: #999;
    z-index: 10;
    line-height: 1;
    transition: color 0.2s;
}

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

/* Base Modern Card (reused for both trigger and modal) */
.modern-card {
    background-color: var(--bg-color, #ffffff);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    margin: 0 auto;
    border: 1px solid rgba(0,0,0,0.05);
}

.card-image-top img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.card-body-content {
    padding: 24px;
}

.badge-status {
    background-color: #e0e0eb;
    color: #4b4b6b;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.82em;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 12px;
}

.modern-card h3 {
    font-size: 1.7rem;
    color: var(--primary);
    margin: 0 0 8px;
}

.modern-card p {
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 0px;
}

.card-meta {
    margin-top: 20px;
    display: flex; gap: 20px; color: #666; font-size: 0.95em;
    padding-top: 15px; border-top: 1px solid rgba(0,0,0,0.05);
    cursor: default !important;
}

.card-meta .stat { 
    display: flex; 
    align-items: center; 
    gap: 6px; 
    cursor: default !important;
    pointer-events: none !important;
}

.card-meta .stat { display: flex; align-items: center; gap: 6px; }

/* Internal Article Styles (inside modal) */
.ia-article-content {
    line-height: 1.7;
    color: var(--text-dark);
}
.ia-article-content p { margin-bottom: 1.2rem; }
.ia-article-content h3 { font-size: 1.3rem; margin-top: 20px; }

.ia-quiz {
    background: rgba(99, 102, 241, 0.03);
    border-radius: 12px;
    padding: 20px !important;
}

/* Comparison table */
.ia-table-wrap { overflow-x: auto; margin: 12px 0 20px; }
.ia-compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.93rem;
}
.ia-compare-table thead tr {
    background: var(--primary);
    color: #fff;
}
.ia-compare-table th,
.ia-compare-table td {
    padding: 10px 14px;
    text-align: left;
    border: 1px solid rgba(99,102,241,0.2);
}
.ia-compare-table tbody tr:nth-child(even) {
    background: rgba(99,102,241,0.04);
}

/* ── IA Quiz ── */
.ia-quiz {
    background: var(--bg-light);
    border-radius: 16px;
    padding: 24px;
    border: 2px solid rgba(99,102,241,0.2);
    margin-top: 12px;
}
.ia-quiz-title {
    color: var(--primary);
    font-size: 1.15rem;
    margin: 0 0 20px;
}

/* Quiz questions */
.quiz-question { margin-bottom: 20px; }
.quiz-question-label {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-dark);
}
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Real styled buttons — NOT plain text */
.quiz-btn {
    display: block;
    width: 100%;
    padding: 13px 18px;
    text-align: left;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--primary);
    background: var(--white);
    border: 2px solid rgba(99,102,241,0.35);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.22s ease;
}
.quiz-btn:hover:not(:disabled) {
    background: rgba(99,102,241,0.08);
    border-color: var(--primary);
    transform: translateX(4px);
}
.quiz-btn:disabled { cursor: default; opacity: 0.85; }



/* ── Header XP Display ── */
.header-xp-display {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #7c3aed;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 999px;
    padding: 4px 12px;
    white-space: nowrap;
}

.header-xp-display strong {
    color: #6d28d9;
    font-size: 1rem;
}

/* ── Accordion IA Card ── */
.ia-accordion-card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(99, 102, 241, 0.2);
    overflow: hidden;
    margin: 20px 0 40px;
    transition: box-shadow 0.3s ease;
}

.ia-accordion-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
}

.ia-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    cursor: pointer;
    user-select: none;
    gap: 16px;
}

.ia-accordion-header-content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.ia-accordion-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
}

.ia-accordion-header h2 {
    color: var(--primary);
    margin: 4px 0;
    font-size: 1.6rem;
}

.ia-teaser-desc {
    color: var(--text-light);
    margin: 0;
    font-size: 0.95rem;
}

.ia-accordion-arrow {
    font-size: 1.2rem;
    color: var(--primary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

/* Body collapsed by default */
.ia-accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s ease;
    padding: 0 28px;
}

/* When card has .ia-accordion-open, body expands (height set by JS) */
.ia-accordion-card.ia-accordion-open .ia-accordion-body {
    padding: 0 28px 28px;
}


/* Modal IA */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--white);
    padding: 40px;
    border-radius: 24px;
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: modalFadeIn 0.3s ease-out;
}

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

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 32px;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.2s;
    line-height: 1;
}

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

.ia-teaser {
    background: var(--white);
    padding: 30px;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(99, 102, 241, 0.2);
    display: block;
    margin: 20px 0 40px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ia-teaser h2 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.ia-teaser p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.ia-teaser:hover {
    transform: scale(1.03) translateY(-5px) !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--primary);
}

/* ============================================
   THÈMES DALTONIENS
   ============================================ */

/* Protanopie (Bleu / Jaune) */
body.theme-protanopia {
    --primary: #1e3a8a;       /* Blue 800 - Contrast OK */
    --primary-dark: #172554;
    --secondary: #a16207;     /* Yellow 800 - Contraste WCAG AA respecté */
    --accent: #713f12;        /* Yellow 900 */
    --bg-light: #eff6ff;
    --bg-gradient-start: #dbeafe;
    --bg-gradient-end: #bfdbfe;
    --footer-bg: #93c5fd;
    --text-dark: #0f172a;
    --text-light: #475569;
    
    --success-bg: rgba(30, 58, 138, 0.25);
    --success-text: #1e3a8a;
    --success-border: rgba(30, 58, 138, 0.5);
    --success-shadow: rgba(30, 58, 138, 0.35);
}

/* Deutéranopie (Bleu / Jaune) */
body.theme-deuteranopia {
    --primary: #1d4ed8;       /* Blue 700 - Contrast OK */
    --primary-dark: #1e40af;
    --secondary: #b45309;     /* Amber 700 - Contraste WCAG AA respecté */
    --accent: #78350f;        /* Amber 900 */
    --bg-light: #f0f9ff;
    --bg-gradient-start: #e0f2fe;
    --bg-gradient-end: #bae6fd;
    --footer-bg: #7dd3fc;
    --text-dark: #0f172a;
    --text-light: #475569;
    
    --success-bg: rgba(29, 78, 216, 0.25);
    --success-text: #1e40af;
    --success-border: rgba(29, 78, 216, 0.5);
    --success-shadow: rgba(29, 78, 216, 0.35);
}

/* Tritanopie (Rouge / Cyan) */
body.theme-tritanopia {
    --primary: #b91c1c;       /* Red 700 - Contrast OK */
    --primary-dark: #991b1b;
    --secondary: #0f766e;     /* Teal 700 - Contraste WCAG AA respecté */
    --accent: #115e59;        /* Teal 800 */
    --bg-light: #fef2f2;
    --bg-gradient-start: #fee2e2;
    --bg-gradient-end: #fecaca;
    --footer-bg: #fca5a5;
    --text-dark: #450a0a;
    --text-light: #7f1d1d;
    
    --success-bg: rgba(185, 28, 28, 0.25);
    --success-text: #7f1d1d;
    --success-border: rgba(185, 28, 28, 0.5);
    --success-shadow: rgba(185, 28, 28, 0.35);
}

/* ============================================
   ICÔNES
   ============================================ */
svg[class^="icon-"], svg[class*=" icon-"], .logo-svg, .social-icon, .btn-icon {
    fill: currentColor;
    display: inline-block;
    vertical-align: middle;
}

.logo-svg { width: 60px; height: 60px; }
.social-icon { width: 24px; height: 24px; }
.btn-icon { width: 18px; height: 18px; margin-right: 8px; }
.icon-stat { width: 16px; height: 16px; margin-right: 4px; }

/* ============================================
   RESET ET BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(180deg, var(--bg-gradient-end) 0%, var(--bg-gradient-start) 50%, var(--footer-bg) 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   NAVIGATION
   ============================================ */
/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    width: 100%;
    background: linear-gradient(135deg, rgba(224, 231, 255, 0.9) 0%, rgba(221, 214, 254, 0.9) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 90%;
    margin: 0 auto;
    padding: 0.5rem 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-dark);
}

.logo-icon {
    width: 200px;
    height: 80px;
    color: var(--secondary);
    overflow: hidden;
}

.logo-img {
    width: 100%;
    height: 120%;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 4rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    pointer-events: auto !important;
}

.nav-link-mobile-account {
    display: none;
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary);
}

/* Burger Icon (Mobile) */
.burger-icon {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 18px;
    cursor: pointer;
    z-index: 10001; /* Toujours au-dessus du tiroir */
    padding: 0;
    background: transparent;
    border: none;
    outline: none;
}

.burger-icon span {
    width: 100%;
    height: 3px;
    background-color: var(--text-dark);
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animation Burger */
.burger-icon.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.burger-icon.open span:nth-child(2) { opacity: 0; }
.burger-icon.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* Close Button Fallback (Optionnel mais propre) */
.close-btn {
    display: none;
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2.5rem;
    cursor: pointer;
    color: var(--text-dark);
    z-index: 10002;
}

/* Dropdown Menu Desktop */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    min-width: 220px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-radius: 12px;
    z-index: 1000;
    overflow: hidden;
    flex-direction: column;
    padding: 8px 0;
    margin-top: 10px;
    border: 1px solid rgba(0,0,0,0.05);
}

.nav-dropdown:hover .dropdown-menu {
    display: flex;
}

.dropdown-item {
    color: var(--text-dark);
    padding: 10px 20px;
    text-decoration: none;
    display: block;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
    pointer-events: auto !important;
}

.dropdown-item:hover {
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary);
    padding-left: 25px;
}

@media (max-width: 992px) {
    .nav-links { gap: 2rem; }
}

@media (max-width: 768px) {
    .burger-icon {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -320px; /* Caché par défaut à droite */
        width: 300px;
        height: 100vh;
        background-color: var(--white) !important;
        background: #ffffff !important; /* Force opacité */
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 100px 30px;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        z-index: 10000;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        pointer-events: auto !important;
        display: flex; /* Toujours flex en mobile */
    }

    .nav-links.active {
        right: 0;
    }

    .nav-link {
        font-size: 1.2rem;
        font-weight: 600;
        margin-bottom: 25px;
        text-align: left;
        width: 100%;
        padding: 5px 0;
        pointer-events: auto !important;
    }

    .nav-actions {
        display: none;
    }

    /* Accordéon Dropdown Mobile */
    .nav-dropdown { width: 100%; }
    .dropdown-menu {
        position: static;
        display: none;
        width: 100%;
        background-color: rgba(0, 0, 0, 0.04);
        box-shadow: none;
        transform: none;
        margin-top: 5px;
        border: none;
        padding: 0;
    }

    .nav-dropdown.active .dropdown-menu {
        display: flex;
        padding: 8px 0;
    }

    /* Boutons Auth Mobile */
    .mobile-auth-container {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: 2rem;
        padding-top: 20px;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        width: 100%;
    }

    .btn-mobile-outline, .btn-mobile-primary {
        display: block;
        width: 100%;
        padding: 14px 20px;
        border-radius: 12px;
        text-align: center;
        font-weight: 600;
        text-decoration: none;
        transition: all 0.3s ease;
        font-size: 1rem;
    }

    .btn-mobile-outline {
        border: 2px solid var(--primary);
        color: var(--primary);
        background: transparent;
    }

    .btn-mobile-primary {
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        color: white;
        border: none;
        box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
    }

    /* Overlay grisé */
    .mobile-nav-overlay {
        position: fixed;
        inset: 0;
        background-color: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(3px);
        display: block;
        z-index: 9998;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        pointer-events: auto;
    }

    .mobile-nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

/* ============================================
   FIX DESKTOP (ECRANS > 768px)
   ============================================ */
@media (min-width: 769px) {
    .navbar {
        padding: 10px 5% !important; /* Ajusté pour laisser respirer sans être trop haut */
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    .burger-icon, .close-btn, .mobile-auth-container, .nav-link-mobile-auth {
        display: none !important;
    }

    .nav-container {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 20px !important;
        max-width: 1400px; /* Augmenté pour donner plus d'espace */
        width: 100%;
        padding: 0 !important; /* On gère le padding via .navbar */
    }

    .nav-links {
        display: flex !important;
        position: static !important;
        flex-direction: row !important;
        background: transparent !important;
        width: auto !important;
        height: auto !important;
        padding: 0 !important;
        box-shadow: none !important;
        gap: 30px !important; /* Gap de 30px demandé */
        justify-content: center !important;
        align-items: center !important;
    }

    .nav-link {
        margin-bottom: 0 !important;
        padding: 0 !important;
        width: auto !important;
        white-space: nowrap !important; /* Empêche le passage à la ligne */
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.btn-icon {
    width: 18px;
    height: 18px;
}

.btn-text {
    background: transparent;
    color: var(--secondary);
    font-weight: 500;
    text-decoration: underline;
    padding: 0;
}

.btn-text:hover {
    color: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--secondary);
    color: var(--secondary);
}

.btn-outline:hover {
    background: var(--secondary);
    color: white;
}

.btn-outline-nav {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 9999px;
    padding: 0.5rem 1.2rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-outline-nav:hover {
    background: var(--primary);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(100, 116, 139, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(100, 116, 139, 0.4);
}

.btn-full {
    width: 100%;
    justify-content: center;
    margin-top: 10px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-actions a, .header-session-badge {
    white-space: nowrap;
}

.header-session-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.22);
    color: #3730a3;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    transition: all 0.3s ease;
}

/* ============================================
   ARRIÈRE-PLAN DE LA PAGE
   ============================================ */
.page-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.bg-circuit {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.08;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    padding: 310px 0 260px;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    transform: scale(1.18);
}

.hero-bg::before {
    content: '';
    position: absolute;
    width: min(72vw, 760px);
    height: min(72vw, 760px);
    border-radius: 50%;
    filter: blur(12px);
    animation: heroGlowPulse 5.5s ease-in-out infinite;
}

.hero-title {
    font-size: clamp(3rem, 7vw, 5rem);
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
    text-shadow:
        0 1px 0 #c7c7f0,
        0 2px 0 #b8b8e8,
        0 3px 0 #a9a9e0,
        0 4px 0 #9a9ad8,
        0 5px 0 #8b8bd0,
        0 8px 15px rgba(0, 0, 0, 0.3);
}

.hero .container {
    position: relative;
    z-index: 10;
}

.bg-gamepad, .hero-circuit {
    max-width: 680px;
    width: min(96%, 680px);
    opacity: 1;
    filter: brightness(1.75) contrast(1.2) saturate(1.15)
        drop-shadow(0 0 28px rgba(99, 102, 241, 0.45))
        drop-shadow(0 0 56px rgba(168, 85, 247, 0.28))
        drop-shadow(0 0 86px rgba(99, 102, 241, 0.38));
    animation: heroBrainPulse 4.2s ease-in-out infinite;
}

@keyframes heroGlowPulse {
    0%, 100% {
        opacity: 0.68;
        transform: scale(0.94);
    }
    50% {
        opacity: 1;
        transform: scale(1.08);
    }
}

@keyframes heroBrainPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.06);
    }
}

/* ============================================
   HERO SECTION JEUX
   ============================================ */
.hero-games {
    padding: 185px 0 60px;
    min-height: auto;
}

.gamepad-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 400px;
    opacity: 0.8;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(-50%, -50%) translateY(0px); }
    50% { transform: translate(-50%, -50%) translateY(-20px); }
}

/* ============================================
   FEATURED SECTION
   ============================================ */
.featured-section {
    padding: 20px 0 40px;
}

.featured-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: transform 0.3s ease;
}

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

.featured-image {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-card:hover .featured-image img {
    transform: scale(1.05);
}

.featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
}

.featured-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    color: var(--white);
}

.article-read-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 10px;
    width: fit-content;
}

.article-read-badge.is-read {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid var(--success-border);
}

.article-read-badge.is-unread {
    background: rgba(0, 0, 0, 0.08);
    color: var(--text-dark);
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.featured-card.article-state-read,
.article-card.article-state-read {
    box-shadow: 0 0 0 2px var(--success-shadow), var(--shadow-lg);
}

.featured-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.featured-stats {
    display: flex;
    gap: 20px;
}

/* ============================================
   ARTICLES GRID
   ============================================ */
.articles-section {
    padding: 40px 0 80px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.article-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    animation: fadeInUp 0.6s ease forwards;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.article-card:nth-child(1) { animation-delay: 0.1s; }
.article-card:nth-child(2) { animation-delay: 0.2s; }
.article-card:nth-child(3) { animation-delay: 0.3s; }
.article-card:nth-child(4) { animation-delay: 0.4s; }
.article-card:nth-child(5) { animation-delay: 0.5s; }
.article-card:nth-child(6) { animation-delay: 0.6s; }
.article-card:nth-child(7) { animation-delay: 0.7s; }
.article-card:nth-child(8) { animation-delay: 0.8s; }
.article-card:nth-child(9) { animation-delay: 0.9s; }

.article-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.1);
}

/* Visuel de secours quand un article n'a pas d'image_url (ou qu'elle ne
   charge plus) : dégradé aux couleurs du site + logo, plutôt qu'une photo
   générique hors-sujet ou une icône d'image cassée. */
.article-image .article-image-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.article-image .article-image-fallback img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    opacity: 0.9;
}

.article-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.article-title {
    color: var(--text-dark);
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 15px;
    min-height: calc(1.5em * 2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-stats {
    display: flex;
    gap: 15px;
    margin-top: auto;
}

.stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.stat:hover { color: var(--accent); }

.stat svg {
    width: 16px;
    height: 16px;
    opacity: 0.8;
    transition: all 0.3s;
}

.stat.liked svg {
    fill: var(--accent);
    color: var(--accent);
}

/* ============================================
   SECTION JEUX
   ============================================ */
.games-section {
    padding: 40px 0 80px;
}

.games-section .container {
    max-width: 1280px;
}

/* Refonte de la page mini-jeux : mêmes codes visuels que les cartes
   d'articles de l'accueil (.article-card) plutôt qu'un style générique
   "carte blanche + icône" qui ne correspondait pas à la DA du site —
   même grille responsive, même radius/ombre/hover, même animation
   d'entrée fadeInUp échelonnée. Comme les jeux n'ont pas de vraie photo
   de couverture, la zone image est remplacée par un bandeau dégradé aux
   couleurs de la marque + une grande icône (au lieu d'un simple badge
   d'icône). Le moteur de chaque jeu (dans .game-preview) n'est pas
   modifié ci-dessous. */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 25px;
    align-items: start;
}

.game-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease forwards;
    text-align: left;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.games-grid .game-card:nth-child(1) { animation-delay: 0.1s; }
.games-grid .game-card:nth-child(2) { animation-delay: 0.2s; }
.games-grid .game-card:nth-child(3) { animation-delay: 0.3s; }
.games-grid .game-card:nth-child(4) { animation-delay: 0.4s; }
.games-grid .game-card:nth-child(5) { animation-delay: 0.5s; }
.games-grid .game-card:nth-child(6) { animation-delay: 0.6s; }

.game-card-banner {
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.game-card-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.3), transparent 60%);
}

.game-card-banner--1 { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.game-card-banner--2 { background: linear-gradient(135deg, #a855f7, #6366f1); }
.game-card-banner--3 { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.game-card-banner--4 { background: linear-gradient(135deg, #10b981, #06b6d4); }
.game-card-banner--5 { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.game-card-banner--6 { background: linear-gradient(135deg, #ec4899, #a855f7); }

.game-icon {
    position: relative;
    z-index: 1;
    font-size: 2.6rem;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.25));
}

.game-card-body {
    padding: 20px;
}

.game-card-head-text {
    margin-bottom: 16px;
}

.game-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 4px;
}

.game-subtitle {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
    font-weight: 400;
}

.game-preview {
    background: #1a1a2e;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
    position: relative;
    margin: 0 auto;
    max-width: 100%;
}

.image-quiz-preview {
    background: linear-gradient(180deg, #2d2d44 0%, #1a1a2e 100%);
}

.quiz-header {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.3);
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.close-btn:hover { background: rgba(255, 255, 255, 0.1); }

.quiz-header h3 {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    flex: 1;
    text-align: center;
    margin: 0 10px;
}

.timer {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    transition: transform 0.2s;
}

.quiz-image-container {
    position: relative;
    height: 280px;
    overflow: hidden;
}

.quiz-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quiz-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.progress-bar {
    background: rgba(255, 255, 255, 0.2);
    height: 6px;
    border-radius: 3px;
    position: relative;
    margin-bottom: 10px;
}

.progress-fill {
    background: linear-gradient(90deg, #a855f7, #6366f1);
    height: 100%;
    width: 10%;
    border-radius: 3px;
    transition: width 0.3s;
}

.progress-bar span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    position: absolute;
    right: 0;
    top: -20px;
}

.quiz-buttons {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
}

.quiz-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.btn-ai {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}

.btn-ai:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.4);
}

.btn-real {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: white;
}

.btn-real:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(16, 185, 129, 0.4);
}

.timeline-preview {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 18px;
    min-height: 220px;
    position: relative;
    overflow: hidden;
}

.timeline-preview::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(168, 85, 247, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
}

.timeline-title {
    color: white;
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.timeline-container {
    position: relative;
    height: 170px;
    z-index: 1;
}

.timeline-line {
    position: absolute;
    top: 50%;
    left: 5%;
    right: 5%;
    height: 4px;
    background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899);
    border-radius: 2px;
    transform: translateY(-50%);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
}

.timeline-point {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s;
}

.timeline-point:hover { transform: scale(1.2); }

.point-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    margin-bottom: 6px;
}

.point-year {
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.5);
    padding: 3px 8px;
    border-radius: 12px;
}

.ball-blast-preview {
    background: #231F20;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: min(95vw, calc(70vh * (9/10)));
    aspect-ratio: 9 / 10;
    min-height: 0;
    margin: 0 auto;
    border-radius: 12px;
}

.ball-blast-frame {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    border: 0;
    display: block;
    background: #0f172a;
    transition: filter 0.25s ease;
}

.ball-blast-frame.is-blurred {
    filter: blur(8px);
}

.ball-blast-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(2, 6, 23, 0.28);
    backdrop-filter: blur(2px);
    z-index: 2;
}

.ball-blast-play-btn {
    border: 0;
    border-radius: 999px;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: #0f172a;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.35);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ball-blast-play-btn:hover {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 14px 36px rgba(245, 158, 11, 0.45);
}

.game-launch-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(2, 6, 23, 0.3);
    backdrop-filter: blur(2px);
    z-index: 4;
}

.game-launch-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}


/* ============================================
   MINI-JEUX : REEL VS IA & QUIZ HISTOIRE DE L'IA
   ============================================ */
.rvi-mount {
    position: relative;
    min-height: 340px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.rvi-mount.is-active {
    padding: 20px;
    color: white;
    display: block;
    min-height: 340px;
}

.rvi-header,
.quiz-header-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.85rem;
}

.rvi-progress {
    color: rgba(255, 255, 255, 0.7);
}

.rvi-score {
    color: #fbbf24;
    font-weight: 700;
}

.rvi-image-wrap {
    width: 100%;
    max-height: 260px;
    overflow: hidden;
    border-radius: 14px;
    margin-bottom: 18px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.rvi-image {
    width: 100%;
    max-height: 260px;
    object-fit: contain;
    display: block;
}

.rvi-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
}

.quiz-question {
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 18px;
    line-height: 1.4;
}

.quiz-buttons-vertical {
    flex-direction: column;
    padding: 0;
    background: none;
}

.quiz-buttons-vertical .quiz-btn {
    width: 100%;
    text-align: left;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.quiz-buttons-vertical .quiz-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

.rvi-feedback {
    border-radius: 14px;
    padding: 16px 18px;
    margin-top: 5px;
}

.rvi-feedback.is-correct {
    background: var(--success-bg);
    border: 1px solid var(--success-border);
}

.rvi-feedback.is-wrong {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
}

.rvi-verdict {
    color: white;
    font-weight: 700;
    margin-bottom: 8px;
}

.rvi-explanation {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 14px;
}

.rvi-feedback .btn-next {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    width: 100%;
}

.rvi-result {
    text-align: center;
    padding: 20px 10px;
}

.rvi-result h3 {
    color: white;
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.rvi-result p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 18px;
}

.rvi-result .btn-restart {
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    color: white;
    padding: 12px 30px;
    border-radius: 999px;
}

.rvi-xp-status {
    margin-top: 14px;
    font-size: 0.85rem;
    color: #fbbf24;
    font-weight: 600;
}

.deepfake-image-display {
    font-size: 6rem;
    text-align: center;
    padding: 30px 0;
    line-height: 1;
}

.quiz-buttons-vertical .quiz-btn.is-correct {
    background: var(--success-bg) !important;
    border-color: var(--success-border) !important;
    color: white;
}

.quiz-buttons-vertical .quiz-btn.is-wrong {
    background: rgba(239, 68, 68, 0.25) !important;
    border-color: rgba(239, 68, 68, 0.6) !important;
    color: white;
}

.quiz-difficulty-picker {
    text-align: center;
    padding: 10px;
}

.quiz-difficulty-picker h3 {
    color: white;
    font-weight: 600;
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.3);
}

.score {
    color: #fbbf24;
    font-weight: 700;
    font-size: 0.9rem;
}

.game-title {
    color: white;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.pause-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.pause-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.game-area {
    position: relative;
    height: 380px;
    padding: 20px;
}

.ball {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    color: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3), inset 0 -5px 10px rgba(0, 0, 0, 0.2);
    animation: bounce 2s ease-in-out infinite;
    cursor: pointer;
    transition: transform 0.2s;
    user-select: none;
}

.ball:hover { transform: scale(1.1); }
.ball span:first-child { font-size: 1.4rem; }
.ball-sub { font-size: 0.7rem !important; font-weight: 500; opacity: 0.9; }
.ball-bonus { font-size: 2rem !important; color: #fbbf24; }

.ball-red {
    background: radial-gradient(circle at 30% 30%, #ef4444, #b91c1c);
    border: 3px solid #fca5a5;
}

.ball-blue {
    background: radial-gradient(circle at 30% 30%, #3b82f6, #1d4ed8);
    border: 3px solid #93c5fd;
    width: 70px; height: 70px;
}

.ball-yellow {
    background: radial-gradient(circle at 30% 30%, #fbbf24, #d97706);
    border: 3px solid #fde68a;
    width: 60px; height: 60px;
    animation-delay: 0.5s;
}

.ball-orange {
    background: radial-gradient(circle at 30% 30%, #f97316, #c2410c);
    border: 3px solid #fdba74;
    width: 65px; height: 65px;
    animation-delay: 1s;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.cannon {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 80px;
}

.cannon-barrel {
    width: 20px;
    height: 50px;
    background: linear-gradient(90deg, #64748b, #94a3b8);
    margin: 0 auto;
    border-radius: 10px 10px 0 0;
    position: relative;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.5);
}

.cannon-barrel::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 15px;
    background: radial-gradient(circle, #38bdf8, #0ea5e9);
    border-radius: 50%;
    box-shadow: 0 0 30px #38bdf8, 0 0 60px #0ea5e9;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

.cannon-base {
    width: 60px;
    height: 30px;
    background: linear-gradient(180deg, #475569, #1e293b);
    border-radius: 10px 10px 0 0;
    margin-top: -5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.projectile {
    position: absolute;
    width: 8px;
    height: 20px;
    background: linear-gradient(180deg, #38bdf8, #0ea5e9);
    border-radius: 4px;
    box-shadow: 0 0 10px #38bdf8;
    animation: shoot 1s linear infinite;
}

@keyframes shoot {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-200px); opacity: 0; }
}

.ground {
    height: 60px;
    background: linear-gradient(180deg, #0ea5e9 0%, #0284c7 50%, #0369a1 100%);
    position: relative;
    overflow: hidden;
}

.ground::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 10px;
    background: repeating-linear-gradient(90deg, #38bdf8 0px, #38bdf8 20px, transparent 20px, transparent 40px);
    opacity: 0.5;
    animation: slide 2s linear infinite;
}

@keyframes slide {
    0% { transform: translateX(0); }
    100% { transform: translateX(-40px); }
}

/* ============================================
   PAGE À PROPOS
   ============================================ */

/* Hero */
.apropos-hero {
    padding: 160px 0 80px;
    text-align: center;
    position: relative;
}

.apropos-hero-content {
    max-width: 700px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease forwards;
}

.apropos-tag {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 6px 18px;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.apropos-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 20px;
    text-shadow:
        0 1px 0 #c7c7f0,
        0 2px 0 #b8b8e8,
        0 3px 0 #a9a9e0,
        0 4px 0 #9a9ad8,
        0 5px 0 #8b8bd0,
        0 8px 15px rgba(0, 0, 0, 0.2);
}

.apropos-subtitle {
    font-size: 1.15rem;
    color: var(--text-light);
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto;
}

/* Sections */
.apropos-section {
    padding: 80px 0;
}

.apropos-mission {
    background: transparent;
    backdrop-filter: none;
}

.section-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 50px;
}

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

/* Présentation projet */
.apropos-project {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    align-items: center;
}

.apropos-project-text p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 16px;
    font-size: 1rem;
}

.apropos-project-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; 
    gap: 20px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.15);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

/* Valeurs */
.valeurs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-top: 50px;
}

.valeur-card {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    padding: 30px 24px;
    text-align: center;
    transition: transform 0.3s ease;
}

.valeur-card.visible {
    animation: fadeInUp 0.6s ease forwards;
}

.valeur-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.15);
}

.valeur-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    display: block;
}

.valeur-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.valeur-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* À Propos Hero */
.apropos-hero {
    padding: 160px 0 100px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(168, 85, 247, 0.05) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.apropos-hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.apropos-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 20px;
    line-height: 1.2;
}

.apropos-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.apropos-section {
    padding: 100px 0;
    position: relative;
}

/* Équipe */
.equipe-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.membre-card {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 20px 15px;
    text-align: center;
    transition: transform 0.3s ease;
}

.membre-card.visible {
    animation: fadeInUp 0.6s ease forwards;
}

.membre-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.15);
}

.membre-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
    transition: transform 0.3s ease;
}


.membre-photo {
    width: 150px;
    height: 150px;
    border-radius: 10%;
    margin: 0 auto 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
    position: relative;
}

.membre-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top; /* cadre sur le visage */
}


.membre-card:hover .membre-avatar {
    transform: scale(1.1);
}

.membre-nom {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.membre-role {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 14px;
}

.membre-bio {
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 968px) {
    .valeurs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
.equipe-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 40px;
}

    .apropos-project {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .apropos-hero {
        padding: 120px 0 60px;
    }

    .apropos-title {
        font-size: 2rem;
    }

    .valeurs-grid {
        grid-template-columns: 1fr;
    }

    .equipe-grid {
        grid-template-columns: 1fr;
    }

    .apropos-project-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   MODALE ARTICLE IA
   ============================================ */
.ia-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 15, 35, 0.75);
    backdrop-filter: blur(6px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.ia-modal {
    width: min(1040px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    border-radius: 20px;
    background: linear-gradient(155deg, #fcfcff 0%, #eef2ff 100%);
    color: var(--text-dark);
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.45);
    position: relative;
    padding: 30px;
    text-wrap: pretty;
    -webkit-overflow-scrolling: touch;
}

.ia-modal,
.ia-modal * {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.ia-modal-close {
    position: sticky;
    top: 0;
    margin-left: auto;
    display: block;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
}

.ia-modal-image-wrap,
.ia-modal-image-fallback {
    border-radius: 16px;
    overflow: hidden;
    height: 220px;
    margin-bottom: 20px;
}

.ia-modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ia-modal-image-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.ia-modal-image-fallback img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    opacity: 0.9;
}

.ia-modal-header {
    margin-top: 8px;
    margin-bottom: 24px;
    padding: 26px;
    border-radius: 16px;
    background: linear-gradient(140deg, #e0e7ff 0%, #ddd6fe 100%);
}

.ia-modal-header h2 {
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    margin-bottom: 14px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.ia-modal-header p {
    color: #312e81;
    margin-top: 10px;
    font-size: clamp(0.98rem, 1.2vw, 1.08rem);
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.ia-modal-body {
    display: grid;
    gap: 18px;
}

.ia-section {
    background: #ffffff;
    border-radius: 14px;
    padding: 22px;
    border: 1px solid #e2e8f0;
}

.ia-section h3 {
    font-size: clamp(1.02rem, 1.5vw, 1.2rem);
    margin-bottom: 10px;
    color: #312e81;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.ia-section p {
    color: #334155;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.ia-list {
    margin: 10px 0 0 18px;
    color: #334155;
}

.ia-list li {
    margin-bottom: 8px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.ia-note-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.ia-note {
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #dbeafe;
}

.ia-note h4 {
    margin-bottom: 8px;
    color: #1d4ed8;
}

.ia-note-old {
    background: linear-gradient(160deg, #f8fafc 0%, #eff6ff 100%);
}

.ia-note-new {
    background: linear-gradient(160deg, #f5f3ff 0%, #ede9fe 100%);
}

.ia-highlight {
    margin: 12px 0;
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 12px 14px;
    border-radius: 8px;
}

.ia-table-wrap {
    margin-top: 12px;
    overflow-x: auto;
}

.ia-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

.ia-table th,
.ia-table td {
    border: 1px solid #cbd5e1;
    text-align: left;
    vertical-align: top;
    padding: 12px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.ia-table th {
    background: #eef2ff;
    color: #312e81;
}

.ia-summary {
    background: linear-gradient(150deg, #111827 0%, #1f2937 100%);
    border: none;
}

.ia-summary h3,
.ia-summary p {
    color: #e2e8f0;
}

.ia-sources {
    border-top: 1px dashed rgba(0, 0, 0, 0.15);
    margin-top: 20px;
    padding-top: 20px;
}

.ia-sources h3 {
    font-size: 1rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ia-sources-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
}

.ia-sources-list li {
    font-size: 0.9rem;
    margin-bottom: 8px;
    line-height: 1.5;
}

.ia-sources-list a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
}

.ia-sources-list a:hover {
    color: var(--primary-dark);
}

.ia-source-note {
    color: var(--text-light);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    position: relative;
    margin-top: auto;
}

.footer-wave {
    position: relative;
    height: 60px; /* réduit la hauteur de la vague */
    overflow: hidden;
}

.footer-wave svg {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100%;
}

.footer-content {
    background: var(--footer-bg);
    padding: 10px 0 15px; /* réduit considérablement le padding */
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    align-items: start;
}

.footer-brand .logo { color: var(--text-dark); }

.footer-links h4,
.footer-social h4,
.footer-newsletter h4 {
    color: var(--text-dark);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 8px; }

.footer-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-links a:hover { opacity: 1; }

/* Newsletter */
.newsletter-desc {
    font-size: 0.85rem;
    color: var(--text-dark);
    opacity: 0.8;
    margin-bottom: 12px;
}

.newsletter-form {
    display: flex;
    gap: 8px;
    margin-bottom: 5px;
}

.newsletter-input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid rgba(168, 85, 247, 0.2);
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-dark);
    font-size: 0.85rem;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

.newsletter-input:focus {
    border-color: var(--secondary);
    background: white;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

.newsletter-btn {
    padding: 10px 18px;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Réseaux sociaux */
.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 36px;
    height: 36px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.social-links svg { width: 18px; height: 18px; }

/* Bas du footer */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px; /* réduit */
    padding-top: 15px;
    border-top: 1px solid rgba(30, 27, 75, 0.15);
    flex-wrap: wrap;
    gap: 15px;
}

.footer-copyright {
    font-size: 0.85rem;
    color: var(--text-dark);
    opacity: 0.7;
}

.footer-legal {
    display: flex;
    gap: 20px;
}

.footer-legal a {
    font-size: 0.8rem;
    color: var(--text-dark);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.footer-legal a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ============================================
   PAGE CERTIFICAT
   ============================================ */
.certif-page {
    padding: 120px 20px 80px;
    min-height: calc(100vh - 300px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.certif-formulaire {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
    text-align: center;
}

.certif-main-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.certif-subtitle {
    color: var(--text-light);
    margin-bottom: 25px;
    font-size: 1rem;
}

.certif-progress-text {
    color: var(--primary-dark);
    font-weight: 700;
    margin-top: -15px;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.certif-inputs {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.certif-inputs .form-input {
    flex: 1;
    min-width: 180px;
}

#zone-certificat {
    display: none;
    width: 100%;
    overflow: visible;
    text-align: center;
}

#bouton-pdf { display: none; }

.certificat-design {
    background-color: #ffffff;
    color: #1e1b4b;
    width: 262mm;
    min-height: 178mm;
    margin: 0 auto;
    padding: 5mm;
    border: 4mm solid #1e1b4b;
    box-sizing: border-box;
    display: flex;
    align-items: stretch;
    overflow: visible;
    transform-origin: top center;
}

.certificat-design.export-pdf {
    padding: 0;
    width: 250mm;
    min-height: 160mm;
}

.certificat-design.export-pdf .bordure-interieure {
    padding: 6mm 8mm;
    gap: 2mm;
}

.certificat-design.export-pdf .titre-certif {
    font-size: 10.5mm;
    margin-bottom: 1.5mm;
}

.certificat-design.export-pdf .sous-titre {
    font-size: 5.2mm;
    margin-bottom: 2.5mm;
}

.certificat-design.export-pdf .texte-intro,
.certificat-design.export-pdf .texte-felicitations,
.certificat-design.export-pdf .logo-brainhack {
    font-size: 4.1mm;
}

.certificat-design.export-pdf .nom-joueur {
    font-size: 8.8mm;
    margin: 2mm 0;
}

.certificat-design.export-pdf .score-box {
    padding: 2.5mm 8mm;
    font-size: 5mm;
}

.bordure-interieure {
    border: 1.5mm double var(--secondary);
    padding: 9mm 11mm;
    position: relative;
    width: 100%;
    min-height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 4mm;
    overflow: visible;
}

.certificat-corps {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

.certificat-footer {
    width: 100%;
    margin-top: 5mm;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
}

.titre-certif {
    font-size: 12.5mm;
    color: #1e1b4b;
    margin: 0 0 2mm;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sous-titre {
    font-size: 6.2mm;
    color: var(--text-light);
    margin-bottom: 4mm;
}

.texte-intro {
    font-size: 4.6mm;
    margin: 2.5mm 0 0;
    color: #1e1b4b;
}

.nom-joueur {
    font-size: 10.5mm;
    color: var(--secondary);
    font-weight: bold;
    margin: 3mm 0;
    text-transform: uppercase;
}

.texte-felicitations {
    font-size: 4.8mm;
    line-height: 1.35;
    margin: 4mm 0;
    color: #1e1b4b;
}

.score-box {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    display: inline-block;
    padding: 3mm 10mm;
    border-radius: 999px;
    font-size: 5.8mm;
    font-weight: bold;
}

.logo-brainhack {
    font-size: 4.8mm;
    font-weight: bold;
    color: var(--secondary);
    text-align: right;
    border-top: 0.6mm solid var(--text-light);
    padding-top: 2mm;
    width: 60mm;
}

/* ============================================
   PAGE MON COMPTE
   ============================================ */
.account-page {
    padding: 120px 0 60px;
    min-height: calc(100vh - 300px);
}

.hidden { display: none !important; }

.profile-section {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 0.6s ease;
}

#professorSection {
    max-width: 1120px;
}

.profile-section.hidden,
.auth-section.hidden { display: none; }

.welcome-title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 40px;
    line-height: 1.3;
}

.user-role { color: var(--secondary); }
.user-name { color: var(--primary-dark); }

.profile-avatar { margin-bottom: 40px; }

.avatar-circle {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #c4b5fd 0%, #a78bfa 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 40px rgba(168, 85, 247, 0.3);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.avatar-circle:hover { transform: scale(1.05); }

.avatar-circle:focus-visible {
    outline: 3px solid rgba(99, 102, 241, 0.7);
    outline-offset: 4px;
}

.avatar-circle svg {
    width: 80px;
    height: 80px;
    color: white;
    opacity: 0.9;
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.avatar-input-hidden {
    display: none;
}

.avatar-help-text {
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.pseudo-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
}

.medals-section { margin-bottom: 40px; }

.medals-section h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 25px;
}

.medals-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 180px));
    justify-content: center;
    gap: 18px;
}

.medal-item {
    position: relative;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 12px;
    box-shadow: 0 6px 18px rgba(49, 46, 129, 0.12);
    transition: all 0.3s ease;
    cursor: pointer;
}

.medal-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(49, 46, 129, 0.2);
}

.medal-visual {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.medal-visual::before {
    content: attr(data-fallback-icon);
    font-size: 2rem;
    line-height: 1;
    opacity: 0.85;
}

.medal-item.has-medal .medal-visual::before {
    opacity: 0;
}

.medal-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 82%;
    height: 82%;
    object-fit: contain;
    object-position: center;
    display: none;
}

.medal-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: #312e81;
    text-align: center;
}

.medal-tier-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #64748b;
}

.medal-item.unlocked {
    border-color: rgba(251, 191, 36, 0.4);
}

.medal-item.tier-bronze .medal-visual {
    background: linear-gradient(135deg, #f8c18f 0%, #cd7f32 100%);
}

.medal-item.tier-silver .medal-visual {
    background: linear-gradient(135deg, #e8eef7 0%, #b8c2d3 100%);
}

.medal-item.tier-gold .medal-visual {
    background: linear-gradient(135deg, #fde68a 0%, #f59e0b 100%);
}

.medal-item.tier-bronze .medal-tier-label { color: #9a5f2f; }
.medal-item.tier-silver .medal-tier-label { color: #64748b; }
.medal-item.tier-gold .medal-tier-label { color: #b45309; }

.medal-item::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);
    width: max-content;
    max-width: 260px;
    background: rgba(15, 23, 42, 0.92);
    color: #fff;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.78rem;
    line-height: 1.4;
    opacity: 0;
    pointer-events: none;
    white-space: pre-line;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 20;
}

.medal-item:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

.student-dashboard {
    margin: 0 auto 34px;
    max-width: 920px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 14px 36px rgba(79, 70, 229, 0.14);
}

.student-dashboard h2 {
    font-size: 1.25rem;
    margin-bottom: 16px;
    color: #312e81;
}

.student-class-label {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.14);
    color: #1e40af;
    font-size: 0.86rem;
    font-weight: 700;
    margin-bottom: 14px;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.dashboard-card {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 14px;
    padding: 14px;
}

.dashboard-card h3 {
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: #4338ca;
}

.dashboard-card p {
    font-size: 1rem;
    color: #1f2937;
}

.dashboard-progress {
    margin-bottom: 14px;
}

.dashboard-progress-head {
    display: flex;
    justify-content: space-between;
    font-size: 0.92rem;
    color: #334155;
    margin-bottom: 8px;
}

.dashboard-progress-track {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.35);
    overflow: hidden;
}

.dashboard-progress-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #14b8a6 0%, #22c55e 100%);
    transition: width 0.4s ease;
}

.dashboard-certification {
    margin-bottom: 14px;
    text-align: left;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 14px;
    padding: 14px;
}

.dashboard-certification h3 {
    font-size: 0.95rem;
    margin-bottom: 6px;
    color: #065f46;
}

.dashboard-certification p {
    margin-bottom: 10px;
    color: #0f172a;
    font-size: 0.9rem;
}

.dashboard-certification-btn {
    display: inline-flex;
}

.dashboard-certification-btn.is-disabled {
    pointer-events: none;
    opacity: 0.55;
    filter: grayscale(25%);
}

.dashboard-articles-compare {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.dashboard-articles-column {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(99, 102, 241, 0.14);
    border-radius: 12px;
    padding: 10px 12px;
}

.dashboard-articles-title {
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: #312e81;
}

.dashboard-articles-list {
    display: grid;
    gap: 8px;
}

.dashboard-article-item {
    font-size: 0.9rem;
    color: #475569;
}

.dashboard-article-item.done {
    color: #0f766e;
    font-weight: 600;
}

.dashboard-article-item.empty {
    color: #64748b;
    font-style: italic;
}

.student-custom-articles {
    margin-top: 18px;
    text-align: left;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(99, 102, 241, 0.16);
    border-radius: 14px;
    padding: 14px;
}

.student-custom-articles h3 {
    font-size: 0.95rem;
    color: #312e81;
    margin-bottom: 10px;
}

.student-custom-article-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(148, 163, 184, 0.35);
}

.student-custom-article-item:last-child {
    border-bottom: 0;
}

.student-custom-article-item a {
    color: #1d4ed8;
    text-decoration: none;
    font-weight: 600;
}

.student-custom-article-item a:hover {
    text-decoration: underline;
}

.professor-panel {
    text-align: left;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 12px 32px rgba(67, 56, 202, 0.12);
    margin-bottom: 28px;
}

.professor-badge-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.professor-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
}

.professor-email {
    color: var(--text-dark);
    font-size: 0.95rem;
    font-weight: 500;
}

.professor-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.professor-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: 16px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.professor-card h3 {
    font-size: 1.05rem;
    color: #312e81;
}

.professor-subtitle {
    font-size: 0.92rem;
    color: #312e81;
    margin-top: 8px;
}

.professor-card p {
    font-size: 0.92rem;
    color: var(--text-dark);
    line-height: 1.45;
    min-height: 62px;
}

.professor-card .btn {
    align-self: flex-start;
}

.professor-form-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
}

.professor-form-row .form-input {
    flex: 1;
}

.professor-label {
    display: block;
    font-size: 0.85rem;
    color: #334155;
    margin-bottom: 6px;
    font-weight: 600;
}

.professor-meta {
    font-size: 0.85rem;
    color: #475569;
    margin-top: 6px;
    margin-bottom: 10px;
}

.professor-students-list,
.professor-articles-list,
.professor-custom-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.professor-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.08);
    color: #1f2937;
    font-size: 0.88rem;
}

.professor-item-row small {
    color: #64748b;
}

.professor-remove-btn {
    border: 0;
    background: rgba(239, 68, 68, 0.16);
    color: #b91c1c;
    border-radius: 8px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
}

.professor-custom-article {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(99, 102, 241, 0.2);
}

.professor-article-checkbox {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.05);
    font-size: 0.86rem;
    color: #1f2937;
}

.professor-article-checkbox input {
    margin-top: 3px;
}

.professor-article-checkbox.is-disabled {
    opacity: 0.55;
}

.professor-ranking-wrap {
    overflow-x: auto;
    border: 1px solid rgba(99, 102, 241, 0.14);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
}

.professor-ranking-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.professor-ranking-table th,
.professor-ranking-table td {
    text-align: left;
    padding: 9px 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.24);
}

.professor-ranking-table th {
    color: #312e81;
    font-weight: 700;
    background: rgba(224, 231, 255, 0.45);
}

.professor-ranking-table td {
    color: #1f2937;
}

.game-card-disabled {
    opacity: 0.55;
    filter: grayscale(0.2);
    pointer-events: none;
}

/* Ball Blast overlay et bouton Play doivent toujours être cliquables */
.ball-blast-overlay,
.ball-blast-play-btn {
    pointer-events: auto !important;
}

.auth-section {
    max-width: 450px;
    margin: 0 auto;
    animation: fadeInUp 0.6s ease;
}

.auth-toggle { text-align: center; margin-bottom: 20px; }
.auth-toggle-question { text-align: center; margin-bottom: 40px; }

.auth-form-container {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 35px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.auth-form-container.hidden { display: none; }

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 30px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group { width: 100%; }

.form-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid rgba(168, 85, 247, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-dark);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-input::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

.form-input:focus {
    outline: none;
    border-color: var(--secondary);
    background: white;
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.1);
}

.role-selection {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 500;
}

.radio-label input[type="radio"] { display: none; }

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--secondary);
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
}

.radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 10px;
    height: 10px;
    background: var(--secondary);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    transform: translate(-50%, -50%) scale(1);
}

.forgot-password {
    text-align: center;
    color: var(--secondary);
    text-decoration: none;
    font-size: 0.9rem;
    margin-top: 15px;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Ajout responsive header mobile */
@media (max-width: 900px) {
    .nav-links,
    .nav-actions {
        display: none;
    }
    .mobile-menu-btn {
        display: flex;
    }
    .navbar.open .nav-links,
    .navbar.open .nav-actions {
        display: flex;
        flex-direction: column;
        background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%);
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 999;
        padding: 1.5rem 0 1rem 0;
        gap: 1.5rem;
        box-shadow: 0 8px 32px rgba(99,102,241,0.08);
    }
    .navbar.open .nav-actions {
        flex-direction: column;
        gap: 1rem;
        margin-top: 0.5rem;
    }
}
@media (max-width: 968px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        padding: 20px;
        flex-direction: column;
        gap: 15px;
        box-shadow: var(--shadow-lg);
    }

    .nav-links.active { display: flex; }
    .mobile-menu-btn { display: flex; }
    .nav-link-mobile-account {
        display: inline-flex;
        margin-top: 6px;
        padding-top: 10px;
        border-top: 1px solid rgba(99, 102, 241, 0.2);
    }

    .mobile-menu-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
    .mobile-menu-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

    .nav-actions { display: none; }
    .nav-actions.active {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 10px 20px;
    }

    .hero { padding: 100px 0 40px; }
    .hero-title { font-size: 1.75rem; }
    .hero-games { padding: 150px 0 40px; }
    .gamepad-bg { width: 300px; height: 250px; }
    .featured-image { height: 220px; }
    .featured-title { font-size: 1.25rem; }
    .articles-grid { grid-template-columns: 1fr; }
    .article-title { font-size: 0.92rem; -webkit-line-clamp: 3; line-clamp: 3; }
    .quiz-image-container { height: 200px; }
    .quiz-buttons { flex-direction: column; }
    .timeline-container { height: 250px; }
    .point-icon { width: 40px; height: 40px; font-size: 18px; }
    .ball { width: 60px; height: 60px; font-size: 1rem; }
    .ball-blue, .ball-orange, .ball-yellow { width: 50px; height: 50px; }

    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
        text-align: left;
    }
    .footer-brand {
        grid-column: 1 / -1;
        justify-content: center;
        display: flex;
    }
    .footer-grid > .footer-links:nth-child(2) { grid-column: 1; }
    .footer-grid > .footer-links:nth-child(3) { grid-column: 2; }
    .footer-newsletter {
        grid-column: 1 / -1;
        text-align: center;
    }
    .social-links { justify-content: center; }
    .newsletter-form { flex-direction: column; }
    .newsletter-btn { width: 100%; justify-content: center; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .footer-legal { flex-wrap: wrap; justify-content: center; }

    .certif-formulaire { padding: 25px 20px; }
    .certif-inputs { flex-direction: column; }
    .certif-inputs .form-input { min-width: unset; width: 100%; }

    .account-page { padding: 100px 20px 40px; }
    .avatar-circle { width: 120px; height: 120px; }
    .avatar-circle svg { width: 60px; height: 60px; }
    .medals-grid { grid-template-columns: 1fr; gap: 12px; }
    .medal-item { max-width: 320px; width: 100%; justify-self: center; }
    .medal-visual { width: 64px; height: 64px; }
    .dashboard-cards { grid-template-columns: 1fr; }
    .dashboard-articles-compare { grid-template-columns: 1fr; }
    .professor-grid { grid-template-columns: 1fr; }
    .auth-form-container { padding: 25px 20px; }
    .role-selection { flex-direction: column; gap: 12px; }

    .ia-modal-overlay { padding: 0; align-items: flex-end; }
    .ia-modal { width: 100%; max-height: 100svh; padding: 16px; border-radius: 16px 16px 0 0; }
    .ia-modal-header { padding: 16px; margin-bottom: 14px; }
    .ia-modal-header h2 { font-size: clamp(1.3rem, 6.2vw, 1.65rem); }
    .ia-modal-header p, .ia-section p, .ia-list li, .ia-table th, .ia-table td { font-size: 1rem; }
    .ia-section { padding: 16px; }
    .ia-section h3 { font-size: 1.06rem; }
    .ia-note-grid { grid-template-columns: 1fr; }
    .ia-table-wrap { overflow-x: visible; }
    .ia-table, .ia-table thead, .ia-table tbody, .ia-table tr, .ia-table th, .ia-table td { display: block; width: 100%; }
    .ia-table { min-width: 0; border: none; }
    .ia-table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
    .ia-table tr { border: 1px solid #cbd5e1; border-radius: 10px; margin-bottom: 10px; background: #fff; }
    .ia-table td { border: 0; border-bottom: 1px dashed #dbe2ef; padding: 10px 12px; }
    .ia-table tr td:last-child { border-bottom: 0; }
}

@media (max-width: 480px) {
    .btn-primary span { display: none; }
    .btn-primary { padding: 0.625rem; }
    .featured-content { padding: 20px; }
    .article-title { font-size: 0.9rem; -webkit-line-clamp: 4; line-clamp: 4; }
    .welcome-title { font-size: 1.3rem; }
    .auth-title { font-size: 1.3rem; }
    .form-input { padding: 12px 15px; font-size: 0.9rem; }
    .ia-section { padding: 14px; }
    .ia-modal-header { padding: 14px; }
    .ia-modal-header p, .ia-section p, .ia-list li, .ia-table td { font-size: 0.98rem; }
}

.professor-game-settings {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 6px;
}

.ia-modal-footer {
    background: var(--white);
    padding: 20px 30px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0 0 16px 16px;
}

.ia-likes {
    margin-bottom: 20px;
}

.ia-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-light);
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: var(--text-dark);
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.ia-like-btn:hover {
    background: var(--bg-gradient-start);
}

.ia-like-btn.liked {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(236, 72, 153, 0.08);
}

.ia-like-btn.liked svg {
    fill: var(--accent);
}

.ia-like-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ia-comments-title {
    color: var(--text-dark);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 14px;
}

.ia-comments-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 260px;
    overflow-y: auto;
    margin-bottom: 14px;
}

.ia-comment {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 12px 14px;
    border-left: 3px solid var(--primary);
}

.ia-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.ia-comment-header strong {
    color: var(--text-dark);
    font-size: 13px;
}

.ia-comment-date {
    color: var(--text-light);
    font-size: 12px;
}

.ia-comment-content {
    color: var(--text-dark);
    font-size: 14px;
    line-height: 1.5;
}

.ia-comments-empty {
    color: var(--text-light);
    font-size: 14px;
    font-style: italic;
}

.ia-comment-form {
    display: flex;
    gap: 10px;
}

.ia-comment-input {
    flex: 1;
    background: var(--bg-light);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-dark);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.ia-comment-input:focus {
    border-color: var(--primary);
}

.ia-comment-input::placeholder {
    color: var(--text-light);
}

.ia-comment-submit {
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.ia-comment-submit:hover {
    background: var(--primary-dark);
}

/* ============================================
   AVATAR HEADER — Icône circulaire de profil
   ============================================ */

.nav-avatar-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.nav-avatar-link:hover {
    transform: scale(1.08);
}

.nav-avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    background: var(--bg-light);
    display: block;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-avatar-img:hover {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.nav-logout-btn {
    margin-left: 8px;
}

/* Sur mobile, réduire le gap du header */
@media (max-width: 768px) {
    .nav-actions {
        gap: 8px;
    }
    .nav-avatar-img {
        width: 34px;
        height: 34px;
    }
}

/* ============================================
   AVATAR PROFIL — Correction image coupée
   ============================================ */

.avatar-circle {
    overflow: hidden !important;
    border-radius: 50%;
}

.avatar-circle img,
.profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}
/* KPI Easter Egg */
.secret-admin-link {
    text-decoration: none !important;
    color: inherit !important;
    cursor: default !important;
}

/* Fat Footer Pro Styles - Extra Compact version */
.footer-grid-pro {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 1.5rem;
    padding-bottom: 0.8rem;
    max-width: 800px;
    margin: 0 auto;
}

.footer-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-tagline {
    color: var(--text-dark);
    opacity: 0.8;
    line-height: 1.4;
    font-size: 0.9rem;
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary);
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col ul li a {
    text-decoration: none;
    color: var(--text-dark);
    transition: color 0.3s ease;
    opacity: 0.7;
    font-size: 0.9rem;
}

.footer-col ul li a:hover {
    color: var(--primary);
    opacity: 1;
}

.footer-divider {
    height: 1px;
    background: rgba(0,0,0,0.1);
    margin: 1rem 0;
}

.footer-bottom-pro {
    text-align: center;
    padding-bottom: 2rem;
}

@media (max-width: 768px) {
    .footer-grid-pro {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
}



/* --- Interactions: Likes & Commentaires --- */
.action-btn {
    background: white;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 6px 16px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    color: #444;
}

.action-btn:hover {
    border-color: var(--primary);
    background-color: #f8f9ff;
    transform: translateY(-1px);
}

.action-btn.liked {
    background: #fff5f5;
    color: #e91e63;
    border-color: #ffc1c1;
}

.action-btn.liked:hover {
    background: #ffe9e9;
}

.comment-item {
    background: #f8f9fc;
    padding: 15px;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    font-size: 0.95rem;
    animation: slideIn 0.3s ease-out;
}

.comment-author {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--primary);
    font-size: 0.9rem;
}

.comment-date {
    font-size: 0.75rem;
    color: #888;
    margin-left: 8px;
    font-weight: 400;
}

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