/* =========================================
   1. VARIABLES & THEME (FULL DARK)
   ========================================= */
:root {
    /* Couleurs de fond */
    --bg-main: #050505;       /* Noir profond */
    --header-bg: rgba(20, 20, 20, 0.85);
    --card-bg: rgba(28, 28, 30, 0.75);
    
    /* Textes */
    --text-main: #f5f5f7;     /* Blanc cassé */
    --text-grey: #a1a1a6;     /* Gris doux */
    
    /* Accent (Bleu Chronos) */
    --accent: #2997ff;
    --accent-glass: rgba(41, 151, 255, 0.15);
    --accent-hover: #0077ED;
    
    /* Bordures & Ombres */
    --border: rgba(255, 255, 255, 0.12);
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.5);
    --shadow-lg: 0 20px 50px rgba(0,0,0,0.6);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;

    /* Motif de fond : Grille subtile */
    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;
    background-attachment: fixed;
}

/* Scrollbar Dark */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* =========================================
   3. HEADER & NAVIGATION
   ========================================= */
header {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    width: 90%; max-width: 1000px; height: 60px;
    background: var(--header-bg);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-radius: 100px; padding: 0 30px;
    z-index: 1000; display: flex; justify-content: space-between; align-items: center;
    transition: 0.3s ease;
}

.logo-container { 
    font-weight: 800; font-size: 1.1rem; text-decoration: none; 
    color: white; letter-spacing: -0.5px; text-transform: uppercase; 
}

.nav-links { list-style: none; display: flex; gap: 30px; align-items: center; }
.nav-links a { 
    text-decoration: none; color: var(--text-main); font-size: 0.9rem; font-weight: 500; 
    opacity: 0.7; transition: 0.2s; position: relative;
}
.nav-links a:hover, .nav-links a.active { 
    opacity: 1; color: var(--accent); 
    text-shadow: 0 0 10px rgba(41, 151, 255, 0.4); 
}

.theme-switch { display: none; } /* Caché car Full Dark */
.hamburger { display: none; font-size: 1.2rem; cursor: pointer; color: white; }

/* =========================================
   4. HERO SECTIONS
   ========================================= */

/* A. Hero Principal (Accueil) */
.hero-section {
    position: relative; height: 100vh; min-height: 700px;
    display: flex; align-items: center; justify-content: center; text-align: center;
    padding: 0 20px;
    background: url('https://media.istockphoto.com/id/1410950079/fr/photo/salle-de-classe-de-style-moderne-dans-le-rendu-3d-du-matin.jpg?s=612x612&w=0&k=20&c=E-XsAn9LX2BU4UHGAmD15L-ofcXuBOxVLCTnnEWIucU=');
    background-size: cover; background-position: center;
}
.hero-section::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.8) 80%, var(--bg-main) 100%);
    z-index: 1;
}

.hero-content { max-width: 900px; z-index: 2; animation: floatUp 1s cubic-bezier(0.2, 0.8, 0.2, 1); }
.hero-content h1 { 
    font-size: 5rem; font-weight: 800; margin-bottom: 20px; line-height: 1.05; letter-spacing: -2px; color: white;
    text-shadow: 0 0 30px rgba(0,0,0,0.8);
}
.hero-content p { 
    font-size: 1.5rem; opacity: 0.9; margin-bottom: 40px; max-width: 700px; margin-left: auto; margin-right: auto; 
    font-weight: 400; color: #ddd;
}

/* B. Hero Small (Établissements, etc.) */
.hero-small {
    position: relative; height: 35vh; min-height: 300px;
    display: flex; align-items: center; justify-content: center; text-align: center;
    padding: 0 20px; 
    background: url('https://images.unsplash.com/photo-1562774053-701939374585?q=80&w=1986&auto=format&fit=crop');
    background-size: cover; background-position: center;
}
.hero-small::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.9) 80%, var(--bg-main) 100%);
    z-index: 1;
}
.hero-content-small { 
    z-index: 2; position: relative; max-width: 800px; 
    animation: floatUp 0.8s ease; padding-top: 40px;
}
.hero-content-small h1 { font-size: 3.5rem; font-weight: 800; margin-bottom: 10px; letter-spacing: -2px; color: white; }
.hero-content-small p { font-size: 1.2rem; color: #ccc; }

/* =========================================
   5. COMPOSANTS (Boutons, Inputs, Cards)
   ========================================= */

/* Boutons */
.cta-group { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }
.btn { 
    padding: 16px 36px; border-radius: 100px; text-decoration: none; font-weight: 600; font-size: 1rem;
    transition: all 0.3s ease; display: inline-flex; align-items: center; gap: 10px;
}
.btn-primary { 
    background: var(--accent); color: white; border: 1px solid transparent; 
    box-shadow: 0 0 20px rgba(41, 151, 255, 0.3); 
}
.btn-primary:hover { 
    transform: translateY(-3px) scale(1.02); background: #0062c4; 
    box-shadow: 0 0 30px rgba(41, 151, 255, 0.5); 
}
.btn-secondary { 
    background: rgba(255,255,255,0.1); color: white; 
    border: 1px solid rgba(255,255,255,0.2); backdrop-filter: blur(10px); 
}
.btn-secondary:hover { background: rgba(255,255,255,0.15); transform: translateY(-3px); }

/* Barre d'outils (Filtres & Recherche) */
.toolbar {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px;
    max-width: 1200px; margin: -30px auto 60px; padding: 0 30px;
    position: relative; z-index: 10;
}
.search-box {
    background: var(--card-bg); border: 1px solid var(--border);
    padding: 12px 24px; border-radius: 100px; display: flex; align-items: center; gap: 12px;
    width: 100%; max-width: 350px; transition: 0.3s;
    box-shadow: var(--shadow-sm); backdrop-filter: blur(10px);
}
.search-box input { border: none; background: none; outline: none; width: 100%; color: white; font-size: 1rem; }
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 15px rgba(41, 151, 255, 0.2); }
.search-box i { color: var(--text-grey); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-btn {
    padding: 10px 20px; border-radius: 100px; border: 1px solid var(--border);
    background: var(--card-bg); color: var(--text-grey); cursor: pointer; font-weight: 600; font-size: 0.9rem;
    transition: 0.3s;
}
.filter-btn:hover, .filter-btn.active { 
    background: var(--accent); color: white; border-color: var(--accent); 
    box-shadow: 0 0 15px rgba(41, 151, 255, 0.3); 
}

/* =========================================
   6. CARTES & GRILLE
   ========================================= */
.section-container { max-width: 1200px; margin: 0 auto 150px; padding: 0 30px; }
.section-title { font-size: 2.5rem; margin-bottom: 40px; font-weight: 800; letter-spacing: -1px; color: white; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }

/* Carte Standard */
.card {
    background: var(--card-bg); backdrop-filter: blur(20px);
    padding: 50px 40px; border-radius: 32px; border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-10px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.card i { 
    font-size: 2.2rem; color: var(--accent); margin-bottom: 25px; 
    background: var(--accent-glass); padding: 18px; border-radius: 20px; transition: 0.3s; 
}
.card:hover i { 
    background: var(--accent); color: white; transform: rotate(-10deg) scale(1.1); 
    box-shadow: 0 0 20px var(--accent); 
}
.card h3 { font-size: 1.6rem; margin-bottom: 15px; font-weight: 700; color: white; }
.card p { font-size: 1.1rem; color: var(--text-grey); }

/* Carte Établissement (Spécifique) */
.etab-card { display: flex; flex-direction: column; align-items: center; text-align: center; }
.etab-logo-container {
    width: 100px; height: 100px; background: #151515; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
    box-shadow: var(--shadow-md); border: 4px solid var(--bg-main); transition: 0.4s ease;
}
.etab-card:hover .etab-logo-container { 
    transform: scale(1.1) rotate(5deg); border-color: var(--accent); 
    box-shadow: 0 0 20px rgba(41, 151, 255, 0.3); 
}
.etab-logo { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; padding: 5px; }

.badge {
    position: absolute; top: 15px; right: 15px;
    background: linear-gradient(135deg, #FF9500, #FF5E3A);
    color: white; font-size: 0.7rem; font-weight: 700; padding: 6px 14px; border-radius: 20px;
    box-shadow: 0 4px 10px rgba(255, 94, 58, 0.4); text-transform: uppercase; letter-spacing: 0.5px;
}
.etab-role {
    display: inline-block; padding: 6px 16px; border-radius: 100px;
    font-size: 0.8rem; font-weight: 600; margin-bottom: 15px;
    background: var(--accent-glass); color: var(--accent); border: 1px solid rgba(41, 151, 255, 0.2);
}

/* Stats Bar */
.stats-bar {
    display: flex; justify-content: space-around; flex-wrap: wrap;
    max-width: 1000px; margin: -60px auto 100px;
    background: var(--card-bg); backdrop-filter: blur(30px);
    padding: 40px; border-radius: 30px; box-shadow: var(--shadow-lg);
    position: relative; z-index: 10; border: 1px solid var(--border);
}
.stat-item { text-align: center; flex: 1; min-width: 150px; }
.stat-item h3 { 
    font-size: 3rem; color: var(--accent); margin: 0; font-weight: 800; letter-spacing: -2px; 
    text-shadow: 0 0 20px rgba(41, 151, 255, 0.3); 
}
.stat-item p { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; color: var(--text-grey); margin-top: 5px; }

/* =========================================
   7. AUTRES ELEMENTS (FAQ, Footer, etc.)
   ========================================= */
.feature-split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 80px; align-items: center; margin-bottom: 150px; }
.feature-img img { width: 100%; border-radius: 30px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); transition: 0.5s; opacity: 0.9; }
.feature-img img:hover { transform: scale(1.02); opacity: 1; }
.feature-text h2 { font-size: 3.2rem; margin-bottom: 25px; line-height: 1.1; font-weight: 800; color: white; }
.feature-text p { font-size: 1.2rem; color: var(--text-grey); margin-bottom: 35px; }

.faq-item { background: #111; margin-bottom: 15px; border-radius: 20px; border: 1px solid var(--border); overflow: hidden; transition: 0.3s; }
.faq-header { padding: 25px 30px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 1.1rem; color: white; }
.faq-body { padding: 0 30px; max-height: 0; overflow: hidden; transition: 0.4s ease; opacity: 0; color: var(--text-grey); }
.faq-item.active .faq-body { padding-bottom: 30px; max-height: 200px; opacity: 1; }
.faq-item.active { border-color: var(--accent); }
.faq-item.active .faq-icon { transform: rotate(180deg); color: var(--accent); }

.quote-box {
    background: linear-gradient(135deg, #0071e3 0%, #4facfe 100%);
    color: white; padding: 80px 40px; border-radius: 40px; text-align: center;
    box-shadow: 0 20px 80px rgba(0, 113, 227, 0.4);
}
.quote-text { font-size: 1.8rem; font-style: italic; margin-bottom: 30px; font-weight: 600; }

footer { 
    text-align: center; padding: 60px; 
    background: #080808; border-top: 1px solid var(--border); color: var(--text-grey); 
}

/* Animations */
@keyframes floatUp { from { opacity: 0; transform: translateY(50px); } to { opacity: 1; transform: translateY(0); } }
.reveal { opacity: 0; transform: translateY(50px); transition: 1s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* =========================================
   8. MOBILE RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
    .hero-content h1 { font-size: 3rem; }
    .hero-small { height: 40vh; }
    .feature-split { grid-template-columns: 1fr; gap: 40px; }
    .stats-bar { flex-direction: column; gap: 30px; margin-top: -30px; padding: 30px; }
    .toolbar { flex-direction: column-reverse; align-items: stretch; }
    .filters { overflow-x: auto; padding-bottom: 10px; justify-content: start; }
    
    body { background-attachment: scroll; } /* Fix mobile scroll bug */
    
    .hamburger { display: block; }
    .nav-links { display: none; }
    .nav-links.nav-active { 
        display: flex; flex-direction: column; position: fixed; top: 0; right: 0; 
        height: 100vh; width: 80%; background: #111; z-index: 999; 
        padding-top: 100px; box-shadow: -20px 0 50px rgba(0,0,0,0.5); 
    }
}