/* =========================================
   1. VARIABLES & BASE
   ========================================= */
:root {
    --sega-blue: #00a3ff;       /* Bleu Sega */
    --neon-color: #bc13fe;      /* Violet Néon */
    --sidebar-bg: #ffffff;      /* Fond du menu blanc pour la propreté */
    --content-bg: #f4f4f4;      /* Fond gris très clair pour la zone principale */
    --header-height: 65px;      /* Hauteur du bandeau stockée en variable */
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    background-color: var(--content-bg);
    color: #333;
    overflow-x: hidden; /* Évite le scroll horizontal inutile */
}

/* =========================================
   2. HEADER (BANDEAU NOIR)
   ========================================= */
.header-mini {
    background: linear-gradient(180deg, #1a1a1a 0%, #000000 100%);
    height: 65px; 
    display: flex;  
    align-items: center;  
    padding: 0 20px;
    border-bottom: 3px solid var(--sega-blue);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    position: relative; /* Garde la position pour le layout */
    z-index: 100;
}
.logo-mini { height: 40px; margin-right: 15px; }

.sega-blue {
    color: var(--sega-blue);
    /* Arial Black est déjà grasse, mais le 900 force l'épaisseur maximale */
    font-family: 'Arial Black', sans-serif; 
    font-weight: 900; 
    
    text-transform: uppercase;
    font-size: 0.95rem; /* On reste sur la taille compacte du CSS1 */
    letter-spacing: 1px; /* L'espacement qui donne le look pro */
    margin-right: 5px;
    
    /* Petit bonus pour la netteté sur écran */
    -webkit-font-smoothing: antialiased;
}

.neon-text {
    color: #fff;
    font-size: 1.1rem; /* On garde la taille lisible */
    text-shadow: 0 0 5px var(--neon-color), 0 0 10px var(--neon-color);
    animation: breathe 3s ease-in-out infinite alternate;
}

@keyframes breathe {
    from { opacity: 0.7; }
    to { opacity: 1; text-shadow: 0 0 10px var(--neon-color), 0 0 20px var(--neon-color); }
}

/* =========================================
   3. MISE EN PAGE (C'est ici que la magie opère)
   ========================================= */
/* Ce conteneur englobe Menu + Contenu */
.main-layout {
    display: flex;              /* Active le mode "Côte à Côte" */
    min-height: calc(100vh - var(--header-height)); /* Prend toute la hauteur restante */
    width: 100%;
}

/* LE MENU GAUCHE */
.sidebar {
    width: 260px;               /* Largeur fixe */
    background: var(--sidebar-bg);
    border-right: 1px solid #ddd;
    padding: 20px;
    flex-shrink: 0;             /* Interdit au menu de rétrécir */
    display: flex;
    flex-direction: column;
}

.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar li { margin-bottom: 15px; }
.sidebar a { 
    text-decoration: none; 
    color: #555; 
    font-weight: bold; 
    display: block;
    padding: 10px;
    border-radius: 5px;
    transition: all 0.2s;
}
.sidebar a:hover { background: #f0f0f0; color: var(--sega-blue); }
.sidebar a.active { 
    color: white; 
    background: var(--sega-blue); 
}

/* LA ZONE DE DROITE (CONTENU) */
.content-area {
    flex-grow: 1;               /* Prend tout l'espace restant à droite */
    padding: 40px;              /* Espace interne */
    overflow-y: auto;           /* Permet de scroller si le contenu est long */
    background-color: var(--content-bg);
}

/* =========================================
   4. ELEMENTS SPÉCIFIQUES COURS (Vidéo & Texte)
   ========================================= */

/* Conteneur pour centrer le texte dans la zone de droite (plus joli à lire) */
.course-container {
    max-width: 900px;           /* Limite la largeur pour la lecture */
    margin: 0 auto;             /* Centre le bloc dans la zone de droite */
    background: transparent;    /* Fond transparent pour se fondre */
}

.course-header h1 {
    color: var(--sega-blue);
    margin-top: 0;
    font-size: 2rem;
    border-left: 6px solid var(--sega-blue);
    padding-left: 20px;
}

/* Le Lecteur Vidéo Responsive */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;     /* Ratio 16:9 */
    height: 0;
    overflow: hidden;
    margin: 30px 0;
    border-radius: 12px;
    border: 4px solid #222;     /* Cadre noir style écran TV */
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    background: black;
}

.video-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

/* Le texte explicatif */
.content-text {
    background: #ffffff;
    padding: 40px;              /* Gros padding pour l'effet "feuille" */
    border-radius: 8px;
    line-height: 1.8;           /* Interligne confortable */
    font-size: 1.1rem;
    color: #333;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.content-text h2 {
    color: var(--sega-blue);
    margin-top: 40px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

/* Les blocs de code (Noir et Vert) */
pre {
    background: #1e1e1e;
    color: #00ff41;             /* Vert Terminal */
    padding: 20px;
    border-radius: 6px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    border: 1px solid #444;
    margin: 20px 0;
}

code {
    background: #f0f0f0;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: #d63384;
    font-weight: bold;
}

/* Lien de retour */
.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #666;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
}
.back-link:hover { color: var(--sega-blue); text-decoration: underline; }

/* =========================================
   5. ELEMENTS DIVERS (Cards, Outils, etc.)
   ========================================= */
/* Si tu utilises encore les Cards sur cette page */
.cards-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.lesson-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-left: 5px solid #ccc;
}
.lesson-card.new { border-left-color: var(--sega-blue); }
.badge {
    background: var(--sega-blue);
    color: white;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 10px;
    float: right;
}
.btn-read {
    color: var(--sega-blue);
    text-decoration: none;
    font-weight: bold;
    margin-top: 10px;
    display: inline-block;
}

/* Logos Outils XL */
.tools-container {
    display: flex;
    gap: 40px;
    margin: 20px 0;
    flex-wrap: wrap;
}
.tool-logo-only {
    width: 150px; /* Ajusté pour ne pas être trop géant dans un cours */
    height: 150px;
    object-fit: contain;
    filter: drop-shadow(5px 5px 10px rgba(0,0,0,0.3));
    transition: transform 0.3s ease;
}
.tool-logo-link:hover .tool-logo-only {
    transform: scale(1.1);
    filter: drop-shadow(0 0 15px var(--sega-blue));
}

/* =========================================
   6. MOBILE
   ========================================= */
@media (max-width: 800px) {
    .main-layout {
        flex-direction: column; /* Sur mobile, le menu passe au dessus */
    }
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #ddd;
        box-sizing: border-box; /* Important pour ne pas dépasser */
    }
    .content-area {
        padding: 15px;
    }
    .course-header h1 {
        font-size: 1.5rem;
    }
}