@import url('https://fonts.googleapis.com/css2?family=Exo+2:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* PALETTE : Noir & Blanc (Monochrome Precision) */
    --bg-deep: #000000;
    /* Noir Pur */
    --bg-page: #050505;
    /* Noir */

    --bg-panel: rgba(20, 20, 20, 0.9);
    /* Verre Gris Sombre */
    --bg-panel-hover: rgba(40, 40, 40, 0.95);

    /* ACCENTS : Monochrome */
    --primary: #ffffff;
    /* Blanc Pur */
    --primary-color: var(--primary);
    --accent-primary: var(--primary);
    --primary-dim: #cccccc;
    /* Gris Clair */
    --primary-glow: rgba(255, 255, 255, 0.15);

    --secondary: #808080;
    /* Gris */
    --secondary-dim: #666666;
    --secondary-glow: rgba(128, 128, 128, 0.2);

    --accent: #ffffff;
    /* Blanc */
    --accent-color: var(--accent);

    --success: #ffffff;
    /* Blanc (avec distinction d'icône) */
    --warning: #dddddd;
    /* Très Gris Clair */
    --danger: #ef4444;
    /* Rouge pour les alertes */

    /* ACCENTS VIBRANTS */
    --accent-cyan: #06b6d4;
    --accent-cyan-glow: rgba(6, 182, 212, 0.15);

    --accent-green: #10b981;
    --accent-green-glow: rgba(16, 185, 129, 0.15);

    --accent-orange: #f59e0b;
    --accent-orange-glow: rgba(245, 158, 11, 0.15);

    --accent-red: #ef4444;
    --accent-red-glow: rgba(239, 68, 68, 0.15);

    --accent-purple: #8b5cf6;
    --accent-purple-glow: rgba(139, 92, 246, 0.15);

    /* TEXTE */
    --text-main: #ffffff;
    --text-muted: #999999;
    --text-dim: #666666;

    /* BORDURES & VERRE */
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-border-hover: rgba(255, 255, 255, 0.3);
    --glass-highlight: rgba(255, 255, 255, 0.08);
    --backdrop-blur: 12px;

    /* OMBRES */
    --shadow-glow: 0 0 30px rgba(255, 255, 255, 0.1);
    --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.9);

    /* TYPOGRAPHIE */
    --font-heading: 'Exo 2', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* MISE EN PAGE */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --sidebar-width: 280px;

    /* TRANSITIONS */
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s var(--ease-out-expo);
}

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

html {
    scroll-behavior: smooth;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

/* Cacher la barre de défilement pour Chrome, Safari et Opera */
::-webkit-scrollbar {
    display: none;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-deep);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Effets de fond */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    background:
        radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -2;
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

/* TYPOGRAPHIE */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
    line-height: 1.1;
    letter-spacing: 0.02em;
}

h1 {
    font-size: 2.8rem;
    font-weight: 800;
    text-transform: uppercase;
    background: linear-gradient(135deg, #fff 40%, #888 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.2));
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* CONTENEUR DE MISE EN PAGE */
.app-container {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    padding: 3rem;
    margin-left: var(--sidebar-width);
    /* Si la barre latérale est fixe */
    position: relative;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    padding-left: calc(var(--sidebar-width) + 3rem);
}

/* BARRE LATÉRALE (Panneau Futuriste) */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - 2rem);
    margin: 1rem;
    background: rgba(5, 5, 8, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem 1.25rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transition: all 0.4s var(--ease-out-expo);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    padding: 0 0.75rem;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    box-shadow: 0 0 20px var(--primary-glow);
    flex-shrink: 0;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--text-main);
    text-transform: uppercase;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    overflow-y: auto;
    overflow-x: visible;
    /* Essayer de permettre le défilement horizontal */
    padding: 0 5px;
    /* Ajouter un petit padding pour éviter la coupure */
    margin: 0 -5px;
    /* Marge négative pour compenser le padding pour l'alignement */
    /* Scrollbar invisible */
    scrollbar-width: none;
}

.nav-menu::-webkit-scrollbar {
    display: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    border: 1px solid transparent;
    font-family: var(--font-heading);
    font-weight: 500;
    letter-spacing: 0.02em;
    position: relative;

}

.nav-item i {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
    color: var(--primary);
    border: 1px solid var(--glass-border);
    border-left: 3px solid var(--primary);
    /* Indicateur plus fort */
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
}

.nav-item.active i {
    filter: drop-shadow(0 0 5px var(--primary));
    transform: scale(1.1);
}

.nav-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
    margin: 1rem 0;
    opacity: 0.5;
}

/* L'utilisateur de la barre latérale est interactif -> a besoin d'affordance */
.sidebar-user {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: auto;
    transition: 0.3s;
    cursor: pointer;
}



.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--primary);
    color: #000;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.sidebar-user-name {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
}

.sidebar-user-role {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* COMPOSANTS UI (Cartes, Boutons) */

/* Cartes en Verre Premium */
.card,
.stat-card,
.scenario-card,
.resource-card,
.badge-item {
    background: #000000;
    /* Fond noir */
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 20px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Rebond subtil */
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
    opacity: 1;
    z-index: 0;
}

/* Effet de brillance au survol - DESACTIVE pour les cartes statiques */
.card::after,
.scenario-card::after,
.resource-card::after {
    display: none;
}

/* On ne garde l'effet de survol QUE pour les éléments explicitement interactifs */
a.card:hover,
button.card:hover,
.card.interactive:hover,
.scenario-card.interactive:hover,
.resource-card.interactive:hover {
    border-color: var(--glass-border-hover);
    background: rgba(20, 20, 26, 0.6);
    transform: translateY(-2px);
    cursor: pointer;
}

/* Contenu au-dessus de l'effet */
.card>*,
.stat-card>*,
.scenario-card>*,
.resource-card>* {
    position: relative;
    z-index: 2;
}

/* Boutons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.btn-primary:hover {
    background: #fff;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.6), 0 0 10px rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: var(--text-main);
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.btn-danger:hover {
    background: var(--danger);
    color: #fff;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
    border-color: var(--danger);
}

.floating-actions {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    /* Empiler vers le bas */
    gap: 1rem;
    z-index: 900;
}

.floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: var(--bg-panel);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: 0.3s;
}

.floating-btn:hover {
    transform: scale(1.1);
    border-color: var(--primary);
    box-shadow: 0 0 30px var(--primary-glow);
    background: var(--bg-panel-hover);
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background: var(--danger);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-panel);
    transform: translate(25%, -25%);
}

/* Formulaires */
.form-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: var(--radius-md);
    color: var(--text-main);
    outline: none;
    transition: 0.3s;
    font-family: var(--font-body);
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.15), inset 0 0 10px rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.7);
    color: var(--primary);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.9rem;
}

/* PAGES SPÉCIFIQUES (Grille Bento, etc) */

/* Accueil / Tableau de bord */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.card-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* .card-icon hover supprimé - élément statique */

.card-action {
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}

/* Statistiques */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-main);
    font-family: var(--font-heading);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Modales */
.modal,
.admin-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active,
.admin-modal.active {
    display: flex;
    opacity: 1;
}

.modal-content,
.admin-modal-content {
    background: #0a0a0e;
    border: 1px solid var(--glass-border);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8), 0 0 0 1px var(--glass-border);
    border-radius: var(--radius-lg);
    color: var(--text-main);
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.active .modal-content,
.admin-modal.active .admin-modal-content {
    transform: translateY(0);
}

.modal-header,
.admin-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.modal-header h2,
.admin-modal-header h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    /* Le cercle est plus propre */
    transition: 0.2s;
    width: 32px;
    height: 32px;
}

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

/* MODAL BONNES PRATIQUES (Nouveau Design) */
.modal-content-bp {
    padding: 0.5rem;
}

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

/* .bp-card hover supprimé - élément statique sauf si explicitement rendu interactif */
.bp-card {
    background: #000000;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.bp-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* .bp-icon hover sync supprimé */

.bp-info h4 {
    color: var(--text-main);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.bp-info p {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.4;
    margin: 0;
}

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

/* Panneau de Notifications */
.notifications-panel {
    position: fixed;
    bottom: 4rem;
    left: calc(var(--sidebar-width) + 2rem);
    right: auto;
    width: 350px;
    background: #0a0a0e;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    /* Style de flèche pour pointer vers le bouton */
    display: none;
    /* Géré par JS, mais bonne valeur par défaut */
}

/* Squelette de Chargement */
.skeleton {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.03) 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite linear;
}

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

    100% {
        background-position: -200% 0;
    }
}

/* Sections Vue - Animation */
.view-section {
    display: none;
    animation: fadeSlideUp 0.5s var(--ease-out-expo);
}

.view-section.active {
    display: block;
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: calc(100% - 2rem);
        height: auto;
        bottom: 0;
        top: auto;
        left: 0;
        margin: 0 1rem 1rem 1rem;
        flex-direction: row;
        justify-content: space-around;
        padding: 0.75rem;
        background: rgba(5, 5, 8, 0.9);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid var(--glass-border);
        border-radius: 20px;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    }

    .main-content {
        margin-left: 0;
        padding-left: 1.5rem;
        padding-bottom: 120px;
        /* Espace pour le menu flottant */
    }

    .logo,
    .sidebar-user,
    .nav-divider {
        display: none;
    }

    .nav-menu {
        flex-direction: row;
        justify-content: space-around;
        overflow-y: visible;
        width: 100%;
    }

    .nav-item {
        flex-direction: column;
        padding: 0.5rem;
        gap: 0.25rem;
        font-size: 0.7rem;
        border: none;
        border-radius: 12px;
        background: transparent;
        width: auto;
        flex: 1;
        justify-content: center;
    }

    .nav-item:hover {
        background: rgba(255, 255, 255, 0.05);
        transform: translateY(-2px);
    }

    .nav-item.active {
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
        border: none;
        background: rgba(255, 255, 255, 0.1);
        color: var(--primary);
    }

    .nav-item.active i {
        transform: scale(1.1);
    }

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

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

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

    h1 {
        font-size: 1.8rem;
    }
}

/* UTILITAIRES ET COMPATIBILITÉ */
.text-muted {
    color: var(--text-muted) !important;
}

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

.text-success {
    color: var(--success);
}

.text-warning {
    color: var(--warning);
}

.text-danger {
    color: var(--danger);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}

.badge {
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.difficulty-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.difficulty-badge.facile {
    background: var(--accent-green-glow);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.difficulty-badge.moyen {
    background: var(--accent-orange-glow);
    color: var(--accent-orange);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.difficulty-badge.difficile {
    background: var(--accent-red-glow);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Nouveaux Badges Admin */
.badge-xp {
    background: var(--accent-cyan-glow);
    color: var(--accent-cyan);
    border: 1px solid rgba(6, 182, 212, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.badge-answer {
    background: var(--accent-green-glow);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Badge générique dynamique */
.badge-success {
    background: var(--accent-green-glow);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
    background: var(--accent-orange-glow);
    color: var(--accent-orange);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
    background: var(--accent-red-glow);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-info {
    background: var(--accent-cyan-glow);
    color: var(--accent-cyan);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-purple {
    background: var(--accent-purple-glow);
    color: var(--accent-purple);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.w-full {
    width: 100%;
}

.mt-2 {
    margin-top: 1rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

/* STYLES D'AUTHENTIFICATION (PREMIUM) */
#auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: 2rem;
}

.auth-box {
    background: rgba(10, 10, 15, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.auth-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    box-shadow: 0 0 10px var(--primary-glow);
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.auth-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.auth-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    outline: none;
}

.auth-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.auth-footer a:hover {
    color: #fff;
    text-shadow: 0 0 5px var(--primary);
}

/* STYLES CLASSEMENT AMÉLIORÉS */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
}

table.ranking-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    margin-top: 1rem;
}

table.ranking-table thead th {
    background: transparent;
    padding: 1rem 1.5rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    font-weight: 700;
    border: none;
}

table.ranking-table tbody tr {
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.3s ease;
}

table.ranking-table td {
    padding: 1.25rem 1.5rem;
    color: var(--text-main);
    vertical-align: middle;
    border: none;
}

table.ranking-table td:first-child {
    border-radius: 12px 0 0 12px;
}

table.ranking-table td:last-child {
    border-radius: 0 12px 12px 0;
}

/* Les lignes du tableau sont statiques par défaut - survol supprimé */
/*
table.ranking-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}
*/

table.ranking-table tr:hover td {
    color: #fff;
}

/* Correction des Badges de Rang */
.rank-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    margin-right: 1rem;
    flex-shrink: 0;
}

/* STYLES SIMULATION PHISHING (REFONTE NEON VERRE) */
#scenariosGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.scenario-card {
    background: rgba(13, 13, 18, 0.8);
    border: 1px solid var(--primary);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(12px);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

/* .scenario-card:hover supprimé - statique sauf si .interactive */
.scenario-card::after {
    display: none;
    /* Supprimer la ligne de dégradé obsolète */
}

.scenario-card h3 {
    margin: 1.2rem 0 0.8rem;
    font-size: 1.25rem;
    color: #fff;
    font-weight: 700;
}

.type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: 0.3s;
}

/* .scenario-card:hover .type-badge supprimé */

.type-badge i {
    width: 16px;
    height: 16px;
}

.scenario-card .status-icon {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.scenario-card.completed .status-icon {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    color: #10b981;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.scenario-card.completed.wrong .status-icon {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #ef4444;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

/* STYLES RESSOURCES (DESIGN BASE DE DONNÉES) */
.resources-section {
    margin-bottom: 4rem;
}

.resources-section h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.resource-card {
    background: rgba(20, 20, 25, 0.8);
    border: 1px solid var(--secondary);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    z-index: 1;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

/* .resource-card:hover supprimé - statique sauf si .interactive */

.resource-card::before {
    display: none;
    /* Supprimer l'effet brillant obsolète */
}

.resource-card .card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.resource-card .icon-wrapper {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    transition: 0.3s;
    margin-right: 1rem;
    flex-shrink: 0;
}

/* .resource-card:hover .icon-wrapper supprimé */

.resource-card h3 {
    font-size: 1.1rem;
    margin: 0;
    line-height: 1.4;
    font-weight: 600;
}

.resource-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-grow: 1;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.resource-card .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.resource-card .action-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    opacity: 0.8;
    transition: 0.3s;
}

/* .resource-card:hover .action-hint supprimé */

/* CYBERSENS - CENTRE DE COMMANDE ADMIN Thème : Extension de Ultra Future v4.0 */

/* Surcharges du conteneur */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.admin-main {
    flex: 1;
    padding: 2rem;
    margin-left: 280px;
    /* Correspond à la largeur de la barre latérale */
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    padding-left: calc(280px + 2rem);
    position: relative;
    overflow-x: hidden;
}

/* S'assurer que le fond reste cohérent */
body {
    background-color: var(--bg-deep);
}

/* Tables Admin - Style Grille de Données */
.admin-table-container {
    background: transparent;
    /* Suppression du fond conteneur */
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    margin-top: 1rem;
    overflow: visible;
    /* Pour l'ombre des lignes */
}

.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    /* Espacement entre les lignes */
}

.admin-table th {
    padding: 0 1.5rem 1rem 1.5rem;
    text-align: left;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    border: none;
    font-weight: 700;
}

.admin-table tbody tr {
    transition: all 0.3s ease;
    /* Suppression des propriétés conflictuelles sur tr */
}

.admin-table td {
    padding: 1.25rem 1.5rem;
    color: var(--text-main);
    vertical-align: middle;
    font-size: 0.95rem;

    /* Définition complète des bordures et du fond sur les cellules pour l'effet carte */
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    background: rgba(12, 12, 16, 0.6);
    /* Unifié ici */
    /* backdrop-filter: blur(12px); Supprimé pour éviter les artefacts visuels entre cellules */
}

.admin-table td:first-child {
    border-left: 1px solid var(--glass-border);
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

/* Pour les tables avec une colonne masquée (ex: Cours) */
/* Cas normal : 1ère col masquée, donc on arrondit la 2ème */
.admin-table.has-hidden-col tbody:not(.reorder-active) td:first-child {
    border-left: none;
    border-radius: 0;
}

.admin-table.has-hidden-col tbody:not(.reorder-active) td:nth-child(2) {
    border-left: 1px solid var(--glass-border);
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

/* Cas réorganisation : 1ère col visible, on revient au standard */
.admin-table.has-hidden-col tbody.reorder-active td:first-child {
    border-left: 1px solid var(--glass-border);
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.admin-table.has-hidden-col tbody.reorder-active td:nth-child(2) {
    border-left: none;
    border-radius: 0;
}

.admin-table td:last-child {
    border-right: 1px solid var(--glass-border);
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* .admin-table tr:hover supprimé - lignes statiques */

/* Badges Admin */
.badge-role {
    font-size: 0.7rem;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid transparent;
}

.badge-role.superadmin {
    background: rgba(255, 0, 85, 0.1);
    color: var(--danger);
    border-color: rgba(255, 0, 85, 0.3);
    box-shadow: 0 0 10px rgba(255, 0, 85, 0.2);
}

.badge-role.admin {
    background: rgba(255, 204, 0, 0.1);
    color: var(--warning);
    border-color: rgba(255, 204, 0, 0.3);
}

.badge-role.creator {
    background: rgba(188, 19, 254, 0.1);
    color: var(--accent);
    border-color: rgba(188, 19, 254, 0.3);
}

.badge-role.user {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Surcharges Modal Admin */
.admin-modal {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
}

.admin-modal-content {
    background: #08080c;
    border: 1px solid var(--primary);
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
}

.admin-modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-modal-header h2 {
    color: var(--primary);
    text-transform: uppercase;
    font-size: 1.2rem;
    letter-spacing: 0.1em;
}

.w-100 {
    width: 100%;
}

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

.text-end {
    text-align: right;
}

.admin-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Grille de sélection de rôle */
.role-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.role-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1.25rem 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    position: relative;
}

.role-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--text-muted);
    transform: translateY(-3px);
}

.role-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    /* top: 0; left: 0; ? Non le label wrap tout. */
    inset: 0;
    z-index: 5;
}

/* État sélectionné via une classe JS ou le sélecteur :checked + div... Mais ici structure plus simple : input inside label. On va utiliser :has si supporté, ou ajouter une classe JS. Pour simplifier sans JS complexe, on utilise le sélecteur voisin siblings. */

.role-card:has(input:checked),
.role-card.active {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.15) inset;
}

.role-card-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.role-card:has(input:checked) .role-card-icon,
.role-card.active .role-card-icon {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 15px var(--primary-glow);
}

.role-card-title {
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.95rem;
}

.role-card-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.3;
}

/* Cartes Statistiques Admin */
.stat-card-admin {
    background: rgba(13, 13, 18, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* .stat-card-admin:hover supprimé - ce sont généralement des stats statiques */
.stat-card-admin:hover {
    border-color: var(--glass-border);
    /* Réinitialiser par défaut */
    transform: none;
    box-shadow: none;
    background: rgba(13, 13, 18, 0.6);
}

/* Supprimer l'ancien triangle de coin */
.stat-card-admin::after {
    display: none;
}

.stat-card-admin h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin: 0.5rem 0 0;
    line-height: 1;
}

.stat-card-admin p {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    transition: 0.3s;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* .stat-card-admin:hover .icon-box supprimé */

/* Couleurs pour les stats */
.bg-primary-subtle {
    color: var(--primary);
    border-color: var(--primary);
}

.bg-success-subtle {
    color: var(--success);
    border-color: var(--success);
}

.bg-warning-subtle {
    color: var(--warning);
    border-color: var(--warning);
}

.bg-info-subtle {
    color: var(--accent);
    border-color: var(--accent);
}

/* Admin Responsive */
@media (max-width: 1024px) {
    .admin-main {
        margin-left: 0;
        padding-left: 1.5rem;
        padding-top: 1rem;
        padding-bottom: 6rem;
    }
}

/* AMÉLIORATIONS PANNEAU NOTIFICATIONS */
.notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--glass-border);
}

.notifications-header h3 {
    font-size: 1.1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-main);
}

.notifications-header h3 i {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

.mark-read-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-body);
}

.mark-read-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary);
    border-color: var(--primary);
}

.notifications-list {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.notifications-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 100px;
}

/* Barre de défilement pour les notifications */
.notifications-list::-webkit-scrollbar {
    width: 4px;
}

.notifications-list::-webkit-scrollbar-track {
    background: transparent;
}

.notifications-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.notifications-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* REFONTE CARTES DE COURS */
.course-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #000000;
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

/* Carte de cours interactive (seulement si non verrouillée) */
.course-card:not(.card-locked) {
    cursor: pointer;
}

.course-card:not(.card-locked):hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.15);
    background: #0a0a0a;
}

/* Carte verrouillée - Statique */
.course-card.card-locked {
    cursor: default;
    opacity: 0.7;
}

.course-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.course-card .card-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--primary);
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.course-card:not(.card-locked):hover .card-icon {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 20px var(--primary-glow);
    transform: scale(1.05) rotate(-3deg);
    border-color: var(--primary);
}

.course-body {
    flex-grow: 1;
    margin-bottom: 2rem;
}

.course-body h3 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    font-weight: 700;
}

.course-body p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    opacity: 0.9;
}

.course-footer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.status-indicator {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.status-indicator.completed {
    color: var(--success);
}

.status-indicator.in-progress {
    color: var(--warning);
}

.full-width {
    width: 100%;
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    border-radius: 8px;
}

/* Bouton d'action de cours statique (Visuel uniquement, pas d'interaction) */
.course-action-btn {
    pointer-events: none;
    /* Laisser passer les clics vers la carte */
    background: var(--primary);
    color: #000;
    border: 1px solid var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    /* Aucun effet de survol défini ici, donc reste statique */
}

/* Refonte Superposition de Verrouillage */
.lock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(5, 5, 8, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    z-index: 10;
    opacity: 0;
    transition: 0.3s;
}

.card-locked .lock-overlay {
    opacity: 1;
}

.lock-icon {
    width: 40px;
    height: 40px;
    color: var(--text-muted);
    opacity: 0.7;
}



/* ACTIONS ADMIN ET CORRECTIONS D'ALIGNEMENT */
.admin-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: var(--text-muted);
    transition: all 0.2s ease;
    background: transparent;
    border: 1px solid transparent;
    text-decoration: none;
    /* supprimer les soulignements */
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.btn-icon.edit:hover {
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.1);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px var(--accent-cyan-glow);
}

.btn-icon.delete:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

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

/* S'assurer que les cellules du tableau s'alignent correctement */
.admin-table td {
    vertical-align: middle !important;
}

/* Ajustements de colonnes spécifiques */
.actions-col {
    width: 150px;
    /* largeur fixe pour les actions */
}

/* Correction pour le texte invisible dans les dropdowns */
select.form-input option,
select option {
    background-color: #0d0d12 !important;
    color: var(--text-main) !important;
    padding: 10px;
}

select.form-input:focus,
select:focus {
    background-color: rgba(0, 0, 0, 0.5);
    border-color: var(--primary);
}

/* ÉDITEUR ADMIN ET CORRECTIONS FORMULAIRES */

/* Correction Visibilité Éditeur Quill en Mode Sombre */
.ql-toolbar.ql-snow {
    border-color: var(--glass-border) !important;
    background: rgba(255, 255, 255, 0.03);
}

.ql-container.ql-snow {
    border-color: var(--glass-border) !important;
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-main);
    font-family: var(--font-body);
}

/* Forcer les icônes à être visibles (blanc/primary) */
.ql-snow .ql-stroke {
    stroke: var(--text-muted) !important;
}

.ql-snow .ql-fill,
.ql-snow .ql-stroke.ql-fill {
    fill: var(--text-muted) !important;
}

.ql-snow .ql-picker {
    color: var(--text-muted) !important;
}

/* États de survol pour les icônes de l'éditeur */
.ql-snow .ql-picker:hover,
.ql-snow button:hover .ql-stroke,
.ql-snow .ql-picker-label:hover,
.ql-snow .ql-picker-item:hover {
    color: var(--primary) !important;
    stroke: var(--primary) !important;
}

.ql-snow button:hover .ql-fill {
    fill: var(--primary) !important;
}

/* Supprimer les flèches des inputs numériques */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
    /* Firefox */
    text-align: center;
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--primary);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.75rem;
}

input[type=number]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.difficulty-badge.intermediaire,
.difficulty-badge.interm�diaire {
    background: rgba(255, 204, 0, 0.1);
    color: var(--warning);
    border-color: rgba(255, 204, 0, 0.2);
}

/* Styles spécifiques pour l'admin */

/* Mise en page / Barre supérieure */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.breadcrumb-item a {
    color: var(--text-muted);
    transition: color 0.2s;
}

.breadcrumb-item a:hover {
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--text-main);
    font-weight: 500;
}

.breadcrumb-sep {
    width: 16px;
    height: 16px;
    opacity: 0.5;
}

.page-header-content {
    margin-bottom: 1.5rem;
}

.page-header-content h1 {
    font-family: var(--font-heading, "Arial", sans-serif);
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.4));
}

.admin-table-container {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1rem;
    overflow-x: auto;
}

/* Ajustements colonnes News */
.admin-table td {
    vertical-align: middle;
}

.admin-table th:last-child,
.admin-table td:last-child {
    text-align: right;
}

.actions-cell {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.action-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--primary);
    color: black;
    /* Meilleur contraste sur le primaire */
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 0 15px var(--primary-glow);
}

.action-btn.delete:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

/* Gestion de la description */
.admin-table td:nth-child(4) {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {

    .admin-table td:nth-child(2),
    /* Source */
    .admin-table td:nth-child(4) {
        /* Description */
        display: none;
    }
}

/* Styles de formulaire */
.form-container {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    max-width: 800px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group label .required {
    color: var(--danger);
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

/* Styles d'alerte localement si manquants */
.alert {
    padding: 1rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: var(--accent-green-glow);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--accent-green);
}

.alert-danger {
    background: var(--accent-red-glow);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--accent-red);
}

/* ELEMENTS D'INTERFACE ADMIN (Boutons, Forms) */

/* BOUTONS */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    font-size: 0.95rem;
    font-family: var(--font-body);
}

.btn-primary {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 15px var(--primary-glow);
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 0 25px var(--primary-glow);
}

.btn-outline {
    background: transparent;
    border-color: var(--glass-border);
    color: var(--text-muted);
}

.btn-outline:hover {
    border-color: var(--text-main);
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

/* FORMULAIRES (Renforcement) */
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group input[type="url"],
.form-group select,
.form-group textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-main) !important;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary) !important;
    background: rgba(0, 0, 0, 0.5) !important;
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

/* Corriger les couleurs du texte */
input,
textarea,
select {
    color: var(--text-main);
}

/* Actions utilisateur de la barre latérale */
.sidebar-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.sidebar-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
}

.sidebar-action-btn i {
    width: 18px;
    height: 18px;
}

.sidebar-action-btn .notification-badge {
    top: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    font-size: 10px;
}

/* CONTENU DES COURS (Rendu Riche) */
.course-content {
    color: var(--text-main);
    line-height: 1.7;
    font-size: 1rem;
}

.course-content h1,
.course-content h2,
.course-content h3,
.course-content h4 {
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    color: var(--text-main);
}

.course-content p {
    margin-bottom: 1em;
}

.course-content ul,
.course-content ol {
    margin-bottom: 1em;
    padding-left: 2em;
    /* Restaurer l'indentation */
    list-style-position: outside;
}

.course-content ul {
    list-style-type: disc;
}

.course-content ol {
    list-style-type: decimal;
}

.course-content li {
    margin-bottom: 0.5em;
    padding-left: 0.5em;
}

.course-content blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1rem;
    margin-left: 0;
    margin-bottom: 1em;
    font-style: italic;
    color: var(--text-muted);
}

.course-content pre {
    background: #0f0f12;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1em;
    border: 1px solid var(--glass-border);
}

.course-content code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2em 0.4em;
    border-radius: 4px;
}

.course-content pre code {
    background: transparent;
    padding: 0;
}

.course-content a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid var(--primary);
    transition: all 0.2s;
}

.course-content a:hover {
    text-shadow: 0 0 8px var(--primary-glow);
    border-bottom-color: transparent;
    background: rgba(255, 255, 255, 0.1);
    padding: 0 4px;
    border-radius: 4px;
    margin: 0 -4px;
}


.course-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1em 0;
    border: 1px solid var(--glass-border);
}

.course-content strong {
    color: #fff;
    font-weight: 700;
}