/* RESET GLOBAL POUR LE RESPONSIVE */
*, *::before, *::after {
    box-sizing: border-box;
}
img, video, iframe {
    max-width: 100%;
}

/* ==========================================
   VARIABLES DE COULEURS
   ========================================== */
:root {
    --black: #0a0a0a;
    --white: #fcfcfc;
    --gold: #9c7b22; 
    --gold-hover: #7a6019; 
    --gray: #333333;
    --light-gray: #f9f9f9; 
}

body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    background-color: var(--white);
    color: var(--black);
    line-height: 1.7;
    font-size: 15px;
}

/* ==========================================
   AFFICHAGE DES PAGES (SPA LOGIC)
   ========================================== */
.page { display: none; }
.page.active { display: block; animation: fadeIn 0.5s ease-in; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   HEADER PRO & CENTRÉ
   ========================================== */
header {
    background-color: var(--white);
    padding: 0 40px;
    height: 80px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-left { justify-self: start; }
.header-center { justify-self: center; }
.header-right { 
    justify-self: end;
    display: flex;
    align-items: center;
    height: 100%;
}

#logo { max-height: 50px; }

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--gray);
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a i { color: var(--gold); font-size: 16px; }
.nav-links a:hover { color: var(--gold); }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0;
}
.nav-actions button {
    margin-top: 0 !important;
    white-space: nowrap; 
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--black);
    color: var(--black);
    padding: 8px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}
.btn-outline:hover { background: var(--black); color: var(--white); }

.btn-dark {
    background: var(--gray);
    color: var(--white);
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-text {
    background: transparent;
    border: none;
    color: var(--gray);
    font-size: 18px;
    cursor: pointer;
}
.btn-text:hover { color: #ff4c4c; }

.hidden { display: none !important; }
.menu-toggle { display: none; font-size: 24px; cursor: pointer; color: var(--black); }

/* ==========================================
   HERO SECTION (COUVERTURE ACCUEIL)
   ========================================== */
.hero-premium {
    position: relative;
    height: 80vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--black);
    background-image: url('https://images.unsplash.com/photo-1497366216548-37526070297c?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
}

.hero-small {
    height: auto !important; 
    min-height: auto !important;
    padding: 100px 20px;
}

.hero-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(10,10,10,0.8) 0%, rgba(10,10,10,0.5) 50%, rgba(10,10,10,0.9) 100%);
    z-index: 1;
}

.hero-overlay-gradient {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(10,10,10,0.9) 0%, rgba(156,123,34,0.4) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    max-width: 800px;
    padding: 0 20px;
    animation: fadeIn 1s ease-out;
}

.hero-content h1 {
    font-size: 3.8rem;
    line-height: 1.15;
    margin-bottom: 20px;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #e0e0e0;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* ==========================================
   TYPOGRAPHIE & SECTIONS GLOBALES
   ========================================== */
.content-section { padding: 60px 20px; max-width: 900px; margin: 0 auto; text-align: center; }
.padding-section { padding: 80px 0; }
.bg-light { background-color: var(--light-gray); }

.text-left { text-align: left; }
.text-center { text-align: center; }
.gold-text { color: var(--gold); }
.italic-serif { font-style: italic; font-weight: 400; }

.subtitle-gold {
    color: var(--gold);
    font-size: 0.85rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 600;
    display: block;
    margin-bottom: 10px;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    color: var(--black);
    margin-bottom: 10px;
    font-weight: 700;
}

.divider {
    height: 3px; width: 60px;
    background-color: var(--gold);
    margin: 0 auto 30px auto;
}

.lead-text {
    font-size: 1.2rem; color: #555;
    font-style: italic; margin-bottom: 20px;
}

.reduce-top-space {
    padding-top: 20px !important; 
}

.responsive-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: var(--gold);
    margin-top: 0;
    margin-bottom: 5px;
}

.responsive-subtitle {
    margin-bottom: 20px;
    font-size: 15px;
    color: var(--gray);
}

/* ==========================================
   GRILLES ET CARTES
   ========================================== */
.grid-3 {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 50px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.elegant-card {
    background: var(--white); padding: 40px 30px; border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04); border: 1px solid #f0f0f0;
    transition: all 0.4s ease;
}
.elegant-card:hover {
    transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-bottom: 3px solid var(--gold);
}

.icon-wrapper {
    width: 70px; height: 70px; background: rgba(156, 123, 34, 0.1);
    color: var(--gold); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; margin: 0 auto 20px auto;
}

/* La Méthode (Split Section) */
.split-section { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }

.check-list { list-style: none; padding: 0; margin: 20px 0; }
.check-list li { display: flex; align-items: center; margin-bottom: 20px; font-weight: 500; font-size: 16px; }
.check-icon {
    width: 25px; height: 25px; background: var(--gold); color: var(--white);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 12px; margin-right: 15px; flex-shrink: 0;
}

/* Effet Cadre Image */
.image-wrapper { position: relative; z-index: 2; }
.image-wrapper img {
    width: 100%; border-radius: 10px; box-shadow: 0 15px 40px rgba(0,0,0,0.15); display: block; position: relative; z-index: 2;
}
.image-border {
    position: absolute; top: 20px; left: -20px; right: 20px; bottom: -20px;
    border: 3px solid var(--gold); border-radius: 10px; z-index: 1;
}

/* Témoignages Premium */
.testimonial-card {
    background: var(--white); padding: 40px 30px; border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); position: relative; overflow: hidden;
    text-align: left; z-index: 2;
}
.quote-watermark { position: absolute; top: 20px; right: 20px; font-size: 80px; color: rgba(156,123,34,0.05); z-index: -1; }
.testimonial-card .stars { color: var(--gold); margin-bottom: 15px; font-size: 14px; }
.testimonial-card p { font-style: italic; color: #555; font-size: 15px; margin-bottom: 20px; }
.author-info h4 { margin: 0; font-family: 'Playfair Display', serif; font-size: 1.2rem; color: var(--black); }
.author-info span { font-size: 12px; color: var(--gold); font-weight: 600; text-transform: uppercase; }

/* Mentor */
.mentor-avatar img {
    width: 150px; height: 150px; border-radius: 50%; object-fit: cover;
    border: 4px solid var(--white); box-shadow: 0 0 0 3px var(--gold), 0 15px 30px rgba(0,0,0,0.15);
    margin-bottom: 25px;
}
.mentor-text { max-width: 700px; margin: 0 auto 30px auto; font-size: 1.1rem; color: #444; }

/* ==========================================
   BOUTONS GLOBAUX
   ========================================== */
.btn-gold, .btn-gold-large {
    background: linear-gradient(135deg, #b39130 0%, #8c6e1c 100%);
    color: var(--white); border: none; font-weight: 600; cursor: pointer;
    border-radius: 5px; transition: all 0.3s ease; white-space: nowrap; 
}
.btn-gold { padding: 12px 20px; margin-top: 20px; font-size: 14px; }
.btn-gold-large { padding: 15px 35px; font-size: 16px; }
.shadow-glow { box-shadow: 0 10px 20px rgba(156, 123, 34, 0.3); }
.btn-gold:hover, .btn-gold-large:hover { transform: translateY(-2px); box-shadow: 0 15px 25px rgba(156, 123, 34, 0.4); }

.btn-white, .btn-outline-light { border-radius: 4px; font-weight: bold; cursor: pointer; transition: all 0.3s; }
.btn-white { background-color: var(--black); color: var(--white); border: none; padding: 10px 20px; margin-top: 15px; }
.btn-white:hover { background-color: #333; }

.btn-outline-light { background: transparent; border: 2px solid var(--white); color: var(--white); padding: 15px 35px; font-size: 16px; }
.btn-outline-light:hover { background: var(--white); color: var(--black); }

.btn-green { background: #27ae60; color: white; border: none; padding: 12px 20px; border-radius: 5px; cursor: pointer; font-weight: bold; width: 100%; transition: 0.3s; }
.btn-green:hover { background: #219653; transform: translateY(-2px); }

.btn-blue { background: #2980b9; color: white; border: none; padding: 12px 20px; border-radius: 5px; cursor: pointer; font-weight: bold; width: 100%; transition: 0.3s; }
.btn-blue:hover { background: #2471a3; transform: translateY(-2px); }

/* ==========================================
   FORMULAIRES (Connexion / Inscription / Admin)
   ========================================== */
.auth-container { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 20px; margin-top: 30px; }
.auth-box {
    background: var(--white); color: var(--black); padding: 30px; border: 1px solid #e0e0e0;
    border-top: 4px solid var(--gold); width: 100%; max-width: 400px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); border-radius: 4px;
}
.auth-box h3 { color: var(--gold); margin-top: 0; }
.form-group { margin-bottom: 15px; text-align: left; }
.form-group label { display: block; margin-bottom: 5px; font-size: 14px; font-weight: bold; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 10px; background-color: var(--white) !important; color: var(--black) !important;
    border: 1px solid #ccc !important; border-radius: 4px; box-sizing: border-box; font-family: inherit;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none; border-color: var(--gold) !important; box-shadow: 0 0 5px rgba(156, 123, 34, 0.5);
}

/* ==========================================
   DESIGN CATALOGUE DE COURS & RECHERCHE
   ========================================== */
.search-container-pro {
    max-width: 600px;
    width: 100%;
    margin: 0 auto 30px auto;
    position: relative;
    box-sizing: border-box;
}

.search-container-pro input {
    width: 100%; 
    padding: 15px 20px 15px 50px;
    border-radius: 30px; 
    border: 1px solid #eee; 
    font-size: 16px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1); 
    outline: none;
    font-family: inherit;
    box-sizing: border-box; 
}

.search-container-pro input:focus { 
    box-shadow: 0 0 0 2px var(--gold); 
}

.search-container-pro i {
    position: absolute; 
    left: 20px; 
    top: 50%;
    transform: translateY(-50%); 
    color: var(--gray);
}

.course-card-pro {
    background: var(--white); border-radius: 12px; overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06); transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; flex-direction: column; text-align: left; border: 1px solid #eee;
}
.course-card-pro:hover { transform: translateY(-8px); box-shadow: 0 15px 40px rgba(0,0,0,0.12); }
.course-card-image { width: 100%; height: 220px; object-fit: cover; border-bottom: 3px solid var(--gold); }
.course-card-content { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
.course-badge {
    background: rgba(156, 123, 34, 0.1); color: var(--gold); padding: 5px 12px; font-size: 12px;
    font-weight: 700; border-radius: 4px; display: inline-block; margin-bottom: 15px; align-self: flex-start;
}
.course-card-title { font-family: 'Playfair Display', serif; font-size: 1.4rem; margin: 0 0 10px 0; color: var(--black); line-height: 1.3; }
.course-card-desc { font-size: 14px; color: #666; margin-bottom: 25px; flex-grow: 1; }
.course-card-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #eee; padding-top: 15px; margin-top: auto; }
.course-price { font-size: 1.3rem; font-weight: 700; color: var(--black); }


/* ==========================================
   ADMIN DASHBOARD PRO (SIDEBAR & MODALS)
   ========================================== */
.admin-layout { display: flex; height: calc(100vh - 80px); background: var(--light-gray); }

.admin-sidebar {
    width: 250px; background: var(--black); color: var(--white);
    padding: 20px 0; overflow-y: auto; flex-shrink: 0;
}
.admin-brand { font-family: 'Playfair Display', serif; font-size: 1.2rem; color: var(--gold); text-align: center; margin-bottom: 30px; font-weight: bold; }
.admin-menu { list-style: none; padding: 0; margin: 0; }
.admin-menu li {
    padding: 15px 25px; cursor: pointer; border-left: 4px solid transparent;
    transition: all 0.3s; display: flex; align-items: center; gap: 10px; font-weight: 500;
}
.admin-menu li:hover { background: rgba(255,255,255,0.05); color: var(--gold); }
.admin-menu li.active { background: rgba(156,123,34,0.1); border-left: 4px solid var(--gold); color: var(--gold); }

.admin-content { flex-grow: 1; padding: 30px; overflow-y: auto; }
.admin-tab { display: none; animation: fadeIn 0.4s; }
.admin-tab.active { display: block; }
.admin-header-flex { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }

.admin-search { width: 100%; max-width: 400px; padding: 10px; margin-bottom: 20px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--white); box-shadow: 0 4px 6px rgba(0,0,0,0.05); border-radius: 8px; overflow: hidden; }
.admin-table th, .admin-table td { padding: 15px; text-align: left; border-bottom: 1px solid #eee; }
.admin-table th { background: var(--black); color: var(--gold); text-transform: uppercase; font-size: 13px; }
.admin-table tr:hover { background: #fdfdfd; }
.admin-table img { width: 50px; height: 50px; object-fit: cover; border-radius: 4px; }

.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 2000; align-items: center; justify-content: center; }
.modal-content { background: var(--white); padding: 30px; border-radius: 8px; width: 100%; max-width: 500px; position: relative; max-height: 90vh; overflow-y: auto; box-sizing: border-box; }
/* Bouton Fermer universel */
.close-btn { 
    position: absolute; 
    top: 10px; 
    right: 15px; 
    font-size: 28px; 
    cursor: pointer; 
    color: var(--gray); 
    z-index: 100; /* AJOUT : Force la croix au-dessus des icônes */
    transition: 0.2s;
}
.close-btn:hover { color: red; transform: scale(1.1); }

.custom-file-upload { margin-bottom: 15px; }
.file-label {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    background-color: var(--light-gray); border: 2px dashed var(--gold);
    color: var(--black); padding: 12px; border-radius: 6px; cursor: pointer;
    font-weight: 500; transition: all 0.3s ease; text-align: center;
}
.file-label:hover { background-color: rgba(156, 123, 34, 0.1); }
.file-label i { color: var(--gold); font-size: 1.2rem; }

.btn-icon { background: none; border: none; cursor: pointer; padding: 5px; border-radius: 4px; transition: 0.2s; }
.btn-icon:hover { background: #eee; }
.text-danger { color: #ff4c4c; }
.text-primary { color: #3498db; }

#modal-custom-alert, #modal-custom-confirm { z-index: 9999; }
/* Modale de Dialogue (Invité, Alertes, Confirmations) */
.dialog-content {
    background: var(--white); 
    padding: 30px; 
    border-radius: 12px; 
    text-align: center;
    max-width: 400px; 
    width: 90%; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.2); 
    border-top: 4px solid var(--gold); 
    box-sizing: border-box;
    position: relative; /* AJOUT CRUCIAL : Garde la croix à l'intérieur */
}
.dialog-icon { font-size: 40px; color: var(--gold); margin-bottom: 15px; }
.dialog-content p { font-size: 16px; font-weight: 500; margin-bottom: 25px; }
.dialog-buttons { display: flex; justify-content: center; gap: 15px; }
.dialog-buttons button { padding: 10px 25px; border-radius: 6px; font-weight: bold; cursor: pointer; border: none; transition: 0.3s; }
.btn-dialog-yes { background: var(--gold); color: var(--white); }
.btn-dialog-yes:hover { background: var(--gold-hover); }
.btn-dialog-no { background: #eee; color: var(--black); }
.btn-dialog-no:hover { background: #ddd; }

.modal-tabs-header { display: flex; background: var(--light-gray); border-bottom: 1px solid #ddd; }
.modal-tab-btn { 
    flex: 1; padding: 15px; border: none; background: transparent; 
    cursor: pointer; font-weight: bold; color: var(--gray); 
    transition: 0.3s; font-size: 14px; outline: none;
}
.modal-tab-btn.active { background: var(--white); color: var(--gold); border-bottom: 3px solid var(--gold); }
.modal-tab-btn:hover:not(.active) { background: #eee; }

/* ==========================================
   FOOTER
   ========================================== */
footer {
    background-color: var(--white); color: var(--black); text-align: center;
    padding: 20px; border-top: 1px solid var(--gold); margin-top: 40px;
}


/* ==========================================
   LECTEUR DE COURS PRO (TUTOR LMS STYLE)
   ========================================== */
.player-navbar {
    background: var(--white); height: 70px; display: flex; justify-content: space-between;
    align-items: center; padding: 0 30px; box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky; top: 0; z-index: 100; border-bottom: 1px solid #eaeaea;
}

.player-nav-left { display: flex; align-items: center; gap: 20px; }
.btn-back-player { background: none; border: none; font-weight: 600; color: #555; cursor: pointer; transition: 0.3s; }
.btn-back-player:hover { color: var(--gold); }
.divider-vertical { width: 1px; height: 30px; background: #ddd; }
.player-title { margin: 0; font-family: 'Playfair Display', serif; font-size: 1.2rem; color: var(--black); }

/* Barre de progression */
.player-progress-container { width: 250px; }
.progress-text { font-size: 12px; color: #666; font-weight: bold; margin-bottom: 5px; text-align: right; }
.progress-bar-bg { background: #e0e0e0; height: 8px; border-radius: 4px; overflow: hidden; }
.progress-bar-fill { background: var(--gold); height: 100%; width: 0%; transition: width 0.5s ease; }

/* Layout principal : Sidebar à gauche (320px), Contenu à droite (1fr) */
.player-layout-pro {
    display: grid; 
    grid-template-columns: 320px 1fr; 
    max-width: 1400px;
    margin: 30px auto; 
    gap: 40px; 
    padding: 0 20px; 
    align-items: start;
}

/* Zone Vidéo : Réduite et centrée */
.video-wrapper {
    background: #111; 
    border-radius: 12px; 
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); 
    aspect-ratio: 16 / 9;
    max-width: 850px; 
    max-height: 60vh; 
    margin: 0 auto; 
    display: flex; 
    align-items: center; 
    justify-content: center;
}
.video-wrapper iframe { width: 100%; height: 100%; border: none; }

/* Onglets */
.player-tabs { display: flex; gap: 20px; border-bottom: 2px solid #eaeaea; margin-top: 30px; }
.player-tab-btn {
    background: none; border: none; padding: 15px 0; font-size: 16px; font-weight: bold;
    color: #777; cursor: pointer; position: relative;
}
.player-tab-btn.active { color: var(--gold); }
.player-tab-btn.active::after {
    content: ''; position: absolute; bottom: -2px; left: 0; width: 100%;
    height: 3px; background: var(--gold); border-radius: 3px 3px 0 0;
}
.badge-count { background: #eee; padding: 2px 8px; border-radius: 10px; font-size: 12px; margin-left: 5px; color: #555; }
.player-tab-btn.active .badge-count { background: rgba(156, 123, 34, 0.2); color: var(--gold); }

.player-tab-content { display: none; padding: 30px 0; animation: fadeIn 0.3s ease; }
.player-tab-content.active { display: block; }

/* Fichiers d'exercice */
.resource-card {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--white); padding: 20px; border-radius: 8px;
    border: 1px solid #eee; box-shadow: 0 4px 10px rgba(0,0,0,0.03); margin-bottom: 15px;
}
.resource-info { display: flex; align-items: center; gap: 15px; }
.resource-icon { font-size: 24px; color: #e74c3c; }

/* Sidebar */
.player-sidebar-pro {
    background: var(--white); border-radius: 12px; border: 1px solid #eaeaea;
    overflow: hidden; position: sticky; top: 100px; box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}
.sidebar-header { padding: 20px; border-bottom: 1px solid #eaeaea; background: #fafafa; }
.sidebar-header h4 { margin: 0; color: var(--black); }
.sidebar-list { max-height: calc(100vh - 200px); overflow-y: auto; }

/* ==========================================
   RESPONSIVE DESIGN (TABLETTES & MOBILES)
   ========================================== */
@media (max-width: 1100px) { 
    .grid-4 { grid-template-columns: repeat(3, 1fr); } 
}

@media (max-width: 900px) {
    /* Header Mobile */
    header { display: flex; justify-content: space-between; padding: 0 20px; }
    .menu-toggle { display: block; }
    
    nav.header-center {
        position: fixed; top: 80px; right: -100%; width: 250px; height: calc(100vh - 80px);
        background: var(--white); flex-direction: column; align-items: flex-start;
        padding: 30px; box-shadow: -5px 0 15px rgba(0,0,0,0.05); transition: right 0.3s ease; display: flex;
    }
    nav.header-center.mobile-active { right: 0; }
    .nav-links { flex-direction: column; width: 100%; gap: 25px; }
    
    .header-right { gap: 20px; }
    /* Rendre les boutons d'action visibles sur mobile mais sous forme d'icônes rondes */
    .header-right .nav-actions { 
        display: flex !important; 
        gap: 10px; 
        align-items: center;
    }
    
    .hide-mobile { 
        display: none !important; 
    }
    
    .nav-actions button {
        padding: 0 !important;
        width: 38px;
        height: 38px;
        border-radius: 50% !important; /* Boutons ronds sur mobile */
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 !important;
    }
    
    .nav-actions button i {
        margin: 0;
        font-size: 16px;
    }
    .hide-mobile { display: none; }
    .btn-outline, .btn-gold { padding: 8px 12px; font-size: 16px; }

    /* Grilles Mobile */
    .grid-3 { grid-template-columns: 1fr; }
    .split-section { grid-template-columns: 1fr; text-align: center; }
    .split-text .divider { margin: 0 auto 30px auto !important; }
    .check-list { text-align: left; }
    .image-border { display: none; }

    /* Lecteur LMS Mobile : On inverse l'affichage pour mettre la vidéo AU DESSUS de la liste des leçons */
    .player-layout-pro { 
        display: flex; 
        flex-direction: column-reverse; 
    }
    .player-sidebar-pro { position: relative; top: 0; width: 100%; }
    .player-navbar { flex-direction: column; height: auto; padding: 15px; gap: 15px; }
    .player-progress-container { width: 100%; }

    /* Admin & Student Mobile */
    .admin-layout, .student-layout { flex-direction: column; height: auto; }
    .admin-sidebar { width: 100%; display: flex; flex-wrap: wrap; padding: 10px; }
    .admin-brand { width: 100%; margin-bottom: 10px; text-align: center; }
    
    .admin-menu { display: flex; overflow-x: auto; width: 100%; }
    .admin-menu li { padding: 10px 15px; white-space: nowrap; border-left: none; border-bottom: 3px solid transparent; }
    .admin-menu li.active { border-left: none; border-bottom: 3px solid var(--gold); }
    .admin-table { display: block; overflow-x: auto; white-space: nowrap; }
    

    /* Espacements globaux */
    .hero-premium { padding: 60px 15px; }
    .hero-buttons { flex-direction: column; gap: 10px; }
    .content-section { padding: 40px 15px; }
    .auth-container { flex-direction: column; align-items: center; }
    .auth-box { max-width: 100%; box-sizing: border-box; }
    iframe { height: auto !important; aspect-ratio: 16 / 9; }

    /* NOUVELLES RÈGLES POUR CORRIGER LES GROS TITRES SUR MOBILE */
    .hero-content h1 { 
        font-size: 2rem !important; 
        line-height: 1.2; 
        margin-bottom: 15px;
    }
    .hero-content p {
        font-size: 15px !important;
        margin-bottom: 25px;
    }
    .section-title {
        font-size: 2rem !important;
        line-height: 1.3;
    }
    .lead-text {
        font-size: 15px !important;
        margin-bottom: 20px;
    }
}

@media (max-width: 850px) { 
    .grid-4 { grid-template-columns: repeat(2, 1fr); } 
}

@media (max-width: 768px) {
    .search-container-pro { width: 95%; }
    .search-container-pro input { font-size: 14px; padding: 12px 15px 12px 40px; }
    .search-container-pro i { left: 15px; }
    
    .responsive-title { font-size: 1.6rem; }
    .responsive-subtitle { font-size: 13px; margin-bottom: 15px; }
}

@media (max-width: 550px) { 
    .grid-4 { grid-template-columns: 1fr; } 
}

/* 3. CORRECTION POUR LES TRÈS PETITS TÉLÉPHONES */
@media (max-width: 450px) {
    .hero-content h1 { 
        font-size: 1.8rem !important; 
    }
    .section-title {
        font-size: 1.7rem !important;
    }
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    .hero-buttons button {
        width: 100%; /* Les boutons prennent toute la largeur sur petit écran */
    }
}

/* Adaptation du layout pour l'espace élève */
.student-layout { display: flex; height: calc(100vh - 80px); background: var(--light-gray); }
.student-menu li { color: var(--gray); }
.student-menu li:hover { background: rgba(156,123,34,0.05); color: var(--gold); }
.student-menu li.active { border-left: 4px solid var(--gold); background: rgba(156,123,34,0.05); color: var(--gold); }

/* ==========================================
   GRILLE DES PARAMÈTRES (PROFIL & SUPPRESSION)
   ========================================== */
.settings-grid { 
    display: grid; 
    gap: 30px; 
    align-items: start; 
    width: 100%;
}

.settings-grid > div {
    box-sizing: border-box; /* Empêche les boîtes de déborder */
}

/* Affichage PC (Écrans larges) : 2 colonnes de largeur égale */
@media (min-width: 901px) {
    .settings-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Affichage Mobile et Tablette : 1 seule colonne verticale */
@media (max-width: 900px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

/* Badges de Statut (Admin Transactions) */
.badge-success { background: #e8f8f5; color: #27ae60; }
.badge-danger { background: #fff0f0; color: #d32f2f; }
.badge-warning { background: #fff8e1; color: #f39c12; }

/* Utilitaires */
.hidden { display: none !important; }

/* Bouton Appel USSD (Mobile) */
@media (min-width: 900px) {
    /* Sur PC, on grise le bouton "Ouvrir le clavier" car ça ne sert à rien */
    #btn-open-dialer {
        pointer-events: none;
        background: #eee !important;
        color: #999 !important;
        box-shadow: none !important;
    }
    #btn-open-dialer::after {
        content: " (Disponible uniquement sur smartphone)";
        font-size: 11px;
        display: block;
    }
}

/* Espace Auth refondu */
.auth-links {
    text-align: center;
    margin-top: 15px;
}
.auth-links a {
    color: var(--gold);
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}
.auth-links a:hover {
    text-decoration: underline;
}

/* Fix Icone Oeil (Formulaires) */
.form-group i.fa-eye, .form-group i.fa-eye-slash {
    transition: color 0.3s ease;
}
.form-group i.fa-eye:hover, .form-group i.fa-eye-slash:hover {
    color: var(--gold) !important;
}

/* Modale de Confirmation - Texte Centré */
#modal-custom-confirm p {
    font-size: 15px;
    white-space: pre-line; /* Permet les retours à la ligne dans le JS */
}

/* ==========================================
   CORRECTIONS RESPONSIVE AVANCÉES (MOBILES)
   ========================================== */
@media (max-width: 600px) {
    /* 1. Modales (Popups) */
    .modal-content {
        width: 95%;
        padding: 20px;
        margin: 10px;
    }
    .modal-tabs-header {
        flex-direction: column; /* Empile les onglets des popups sur mobile */
    }
    .modal-tab-btn {
        width: 100%;
        border-bottom: 1px solid #eee;
    }

    /* 2. Lecteur Vidéo & Onglets */
    .player-tabs {
        flex-wrap: wrap; /* Permet aux onglets de passer à la ligne */
        gap: 10px;
    }
    .player-tab-btn {
        flex: 1 1 100%; /* Les onglets prennent toute la largeur sur petit mobile */
        text-align: center;
        padding: 10px 0;
    }
    .video-wrapper {
        border-radius: 8px;
    }

    /* 3. Tableaux Admin et Élèves */
    .admin-table th, .admin-table td {
        padding: 10px;
        font-size: 13px; /* Réduit le texte des tableaux */
    }

    /* 4. Menus latéraux (Admin/Dashboard) */
    .admin-menu li {
        flex-shrink: 0; /* Empêche les icônes du menu mobile de s'écraser */
    }

    /* 5. Grille des paramètres (MVola / Webhook) */
    .settings-grid .auth-box {
        padding: 20px 15px;
    }
    
    /* 6. Espacements des popups de dialogue */
    .dialog-content {
        padding: 20px;
        width: 95%;
    }
    .dialog-buttons {
        flex-direction: column;
        width: 100%;
    }
    .dialog-buttons button {
        width: 100%;
    }
}

/* ==========================================
   DESIGN DU PIED DE PAGE & MENTIONS LÉGALES
   ========================================== */
footer {
    background-color: #f8f9fa; /* Gris très clair comme sur la capture */
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid #eaeaea;
    margin-top: 60px;
}

.footer-links {
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    margin: 0 5px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--black);
    text-decoration: underline;
}

.footer-copyright {
    color: #888;
    font-size: 13px;
    margin: 5px 0;
}

.footer-powered {
    color: #aaa;
    font-size: 12px;
    margin: 0;
}

/* Texte d'acceptation (Disclaimer Inscription) */
.legal-disclaimer {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 15px;
    margin-bottom: 15px;
    text-align: left;
}

.legal-disclaimer p {
    font-size: 12px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 8px;
}

.legal-disclaimer a {
    color: #2980b9; /* Bleu professionnel classique pour les liens légaux */
    text-decoration: none;
}

.legal-disclaimer a:hover {
    text-decoration: underline;
}