/* Modern MSF English Learning Academy — 2026 Premium Redesign */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&display=swap');

* { margin:0; padding:0; box-sizing:border-box; }

:root {
    --bg-start: #050d1f;
    --bg-end: #0b1a3b;
    --surface: rgba(15,30,65,0.75);
    --surface-soft: rgba(255,255,255,0.06);
    --surface-strong: rgba(255,255,255,0.12);
    --glass: rgba(15,30,65,0.55);
    --text: #f0f4ff;
    --text-muted: #8ea4cc;
    --accent: #f5b845;
    --accent2: #ff8c42;
    --accent-glow: rgba(245,184,69,0.35);
    --blue: #4b7ef5;
    --blue-glow: rgba(75,126,245,0.25);
    --border: rgba(255,255,255,0.1);
    --shadow: 0 24px 64px rgba(0,0,0,0.4);
    --radius: 24px;
}

html { scroll-behavior: smooth; }

@keyframes gradientShift {
    0%,100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: linear-gradient(135deg, var(--bg-start), #0e1f4a, var(--bg-end), #061230);
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

::selection { background: var(--accent-glow); color: #fff; }

.container { width: min(1440px, calc(100% - 48px)); margin: 0 auto; }

h1,h2,h3,h4 { font-family: 'Space Grotesk','Inter',sans-serif; }

header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: padding 0.4s ease, background 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 30px rgba(0,0,0,0.1);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 0;
    transition: padding 0.4s ease;
}

header.scrolled .header-container { padding: 8px 0; }

.logo { flex-shrink: 0; }

.logo-link {
    display: flex;
    align-items: center;
    background: #ffffff;
    padding: 6px 14px;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3), 0 0 15px rgba(245,184,69,0.15);
    transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
}

.logo-image {
    height: 56px;
    width: auto;
    display: block;
    object-fit: contain;
    transition: all 0.4s ease;
    mix-blend-mode: multiply; /* Helps blend any slight off-white edges with the pure white badge */
}

header.scrolled .logo-image { height: 44px; }
header.scrolled .logo-link { padding: 4px 10px; border-radius: 10px; }

.logo-link:hover { 
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4), 0 0 20px rgba(245,184,69,0.3);
}

nav ul {
    display: flex;
    gap: 8px;
    list-style: none;
    align-items: center;
}

nav ul li a {
    color: #1a202c; /* Dark text for white nav */
    text-decoration: none;
    font-weight: 500;
    font-size: 0.92rem;
    padding: 8px 16px;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--accent);
    background: rgba(245,184,69,0.1);
}

/* Dropdown Menus */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: rgba(255, 255, 255, 0.98);
    min-width: 220px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    border-radius: 16px;
    padding: 8px;
    z-index: 200;
    top: 100%;
    left: 0;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.dropdown:hover .dropdown-content {
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-content li {
    list-style: none;
    width: 100%;
}

.dropdown-content li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #1a202c;
    border-radius: 10px;
    font-weight: 500;
    white-space: nowrap;
    width: 100%;
}

.dropdown-content li a:hover {
    background: rgba(245,184,69,0.1);
    color: var(--accent);
}

.dropdown > a::after {
    content: '\f0d7';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: 6px;
    font-size: 0.8em;
}

.nav-auth-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent2)) !important;
    color: #0a0f1e !important;
    padding: 8px 20px !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 15px rgba(245,184,69,0.3) !important;
    margin-left: 10px;
}
.nav-auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245,184,69,0.4) !important;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #1a202c; /* Dark icon for white nav */
    padding: 8px;
    border-radius: 10px;
    transition: background 0.3s;
}
.menu-toggle:hover { background: rgba(0,0,0,0.05); }

.hero {
    position: relative;
    padding: min(130px, 14vw) 0 100px;
    overflow: hidden;
}

.hero-canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.hero::before,
.hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
}

.hero::before {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(245, 184, 69, 0.5), transparent 70%);
    top: -150px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.hero::after {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--blue-glow), transparent 70%);
    left: -60px;
    bottom: 0;
    animation: float 10s ease-in-out infinite reverse;
}

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

.hero-inner {
    display: grid;
    grid-template-columns: 1.2fr 0.9fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-copy { max-width: 640px; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: linear-gradient(135deg, rgba(245,184,69,0.15), rgba(255,140,66,0.1));
    color: var(--accent);
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(245,184,69,0.2);
    backdrop-filter: blur(8px);
}

.hero h1 {
    font-size: clamp(2.8rem, 5vw, 4.2rem);
    line-height: 1.05;
    margin-bottom: 1.4rem;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #fff 30%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    max-width: 580px;
    line-height: 1.8;
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

/* Buttons */
.btn {
    padding: 14px 32px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    cursor: pointer;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #0a0f1e;
    box-shadow: 0 8px 32px rgba(245,184,69,0.25);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.2));
    opacity: 0;
    transition: opacity 0.3s;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 40px rgba(245,184,69,0.4);
}
.btn:hover::after { opacity: 1; }

.btn-secondary {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--text);
    box-shadow: none;
    backdrop-filter: blur(8px);
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.08);
    border-color: var(--accent);
    box-shadow: 0 8px 32px rgba(245,184,69,0.15);
}

/* Hero stats */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.hero-stat {
    background: var(--glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.2rem 1.4rem;
    display: grid;
    gap: 0.3rem;
    transition: all 0.35s ease;
}

.hero-stat:hover {
    border-color: rgba(245,184,69,0.3);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.2);
}

.hero-stat strong {
    font-size: 1.6rem;
    color: var(--accent);
    font-family: 'Space Grotesk',sans-serif;
}

.hero-stat span { color: var(--text-muted); font-size: 0.88rem; }

/* Hero cards */
.hero-cards { display: grid; gap: 1.2rem; }

.hero-card {
    background: var(--glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.8rem;
    box-shadow: var(--shadow);
    display: grid;
    gap: 0.8rem;
    transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
}

.hero-card:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(245,184,69,0.3);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.hero-card h4 { font-size: 1.1rem; color: var(--accent); }
.hero-card p { color: var(--text-muted); line-height: 1.65; font-size: 0.93rem; }

/* Section spacing */
section { padding: 70px 0; }
section h2 {
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    text-align: center;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.about { padding-top: 100px; }

.about-content {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
    align-items: center;
}

.about-visual {
    min-height: 380px;
    background: var(--glass);
    backdrop-filter: blur(16px);
    border-radius: 24px;
    padding: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.about-visual::before {
    content: '';
    position: absolute;
    width: 200px; height: 200px;
    background: radial-gradient(circle, var(--accent-glow), transparent 70%);
    top: -50px; right: -50px;
    filter: blur(40px);
}

.about-visual i { font-size: 5rem; color: var(--accent); position: relative; z-index: 1; }

.about-text p {
    margin-bottom: 1.3rem;
    font-size: 1.02rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.formations {
    background: linear-gradient(180deg, rgba(8,18,45,0.96), rgba(12,25,55,0.96));
}

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

.card {
    background: var(--glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    text-align: left;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
}

.card:hover {
    transform: translateY(-8px);
    border-color: rgba(245,184,69,0.4);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3), 0 0 30px var(--accent-glow);
}

.card i {
    height: 56px;
    width: 56px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(245,184,69,0.15), rgba(255,140,66,0.1));
    color: var(--accent);
    border-radius: 16px;
    margin-bottom: 1.2rem;
    font-size: 1.3rem;
}

.card h3 { font-size: 1.25rem; margin-bottom: 0.8rem; }
.card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; }

.catalogue { margin-top: 60px; overflow-x: auto; border-radius: 20px; }

.catalogue-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 900px;
    background: var(--glass);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    overflow: hidden;
}

.catalogue-table th,
.catalogue-table td {
    padding: 16px 20px;
    color: var(--text-muted);
    vertical-align: top;
    border-bottom: 1px solid var(--border);
}

.catalogue-table th {
    background: rgba(245,184,69,0.08);
    color: var(--text);
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.catalogue-table tbody tr { transition: background 0.3s; }
.catalogue-table tbody tr:hover { background: rgba(245,184,69,0.05); }
.catalogue-table td:first-child { color: var(--text); font-weight: 600; width: 240px; }
.catalogue-table td:last-child { white-space: nowrap; text-align: right; color: var(--accent); font-weight: 600; }

.cefr-levels { margin-top: 60px; text-align: center; }
.cefr-levels h3 { margin-bottom: 1rem; color: var(--text); }
.cefr-levels > p { color: var(--text-muted); margin-bottom: 2rem; }

.cefr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.2rem;
}

.cefr-level {
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.5rem;
    text-align: left;
    transition: all 0.35s ease;
}

.cefr-level:hover {
    transform: translateY(-4px);
    border-color: rgba(75,126,245,0.3);
    box-shadow: 0 12px 32px rgba(0,0,0,0.2);
}

.cefr-level h4 { color: var(--accent); margin-bottom: 0.5rem; font-size: 1.05rem; }
.cefr-level p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; margin: 0; }

.gallery {
    background: linear-gradient(180deg, rgba(8,18,45,0.96), rgba(12,25,55,0.96));
}

.section-subtitle {
    color: var(--text-muted);
    text-align: center;
    margin-top: 0.5rem;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.gallery-upload-area { margin-bottom: 3rem; }

.upload-zone {
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 2px dashed rgba(245,184,69,0.35);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.35s ease;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--accent);
    background: rgba(245,184,69,0.06);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(245,184,69,0.15);
}

.upload-zone i { font-size: 2.5rem; color: var(--accent); margin-bottom: 1rem; }
.upload-zone h3 { color: var(--text); margin-bottom: 0.5rem; }
.upload-zone p { color: var(--text-muted); margin-bottom: 1.5rem; }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.2rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 12px 32px rgba(0,0,0,0.25);
    transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
}
.gallery-item:hover { transform: scale(1.04); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

.gallery-item-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,0.7));
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s; gap: 0.8rem;
}
.gallery-item:hover .gallery-item-overlay { opacity: 1; }

.gallery-item-overlay button {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s;
    font-weight: 600;
    font-size: 0.85rem;
}
.gallery-item-overlay button:hover {
    background: var(--accent);
    color: #0a0f1e;
    border-color: var(--accent);
}

.gallery-empty { text-align: center; padding: 2rem; color: var(--text-muted); }

.gallery-lightbox {
    display: none; position: fixed; z-index: 1000;
    left: 0; top: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(10px);
}

@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

.gallery-lightbox.active {
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn 0.3s ease;
}

#lightbox-image {
    max-width: 90%; max-height: 80vh;
    border-radius: 16px;
    box-shadow: 0 0 40px rgba(245,184,69,0.3);
}

.gallery-close {
    position: absolute; right: 30px; top: 20px;
    color: var(--accent); font-size: 36px;
    cursor: pointer; transition: all 0.2s;
    background: rgba(0,0,0,0.4); border-radius: 50%;
    width: 48px; height: 48px; display: flex;
    align-items: center; justify-content: center;
}
.gallery-close:hover { color: #fff; background: rgba(245,184,69,0.3); }

.gallery-lightbox-caption {
    position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
    color: var(--text-muted); font-size: 0.9rem; text-align: center;
}

/* Testimonials */
.testimonials {
    background: linear-gradient(135deg, rgba(8,18,45,0.96), rgba(14,30,65,0.96));
    position: relative; overflow: hidden;
}

.testimonials::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at top right, var(--accent-glow), transparent 30%),
                radial-gradient(circle at bottom left, var(--blue-glow), transparent 25%);
    pointer-events: none;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    position: relative; z-index: 1;
}

.testimonial {
    background: var(--glass);
    backdrop-filter: blur(16px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
}

.testimonial:hover {
    transform: translateY(-6px);
    border-color: rgba(245,184,69,0.3);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.testimonial i { color: var(--accent); margin-bottom: 1rem; font-size: 1.8rem; }
.testimonial p { color: var(--text-muted); line-height: 1.8; margin-bottom: 1.2rem; font-size: 0.95rem; }
.testimonial .author { font-weight: 700; color: var(--accent); font-size: 0.95rem; }

/* Contact & Registration */
.contact, .registration {
    background: linear-gradient(180deg, rgba(8,18,45,0.96), rgba(12,25,55,0.96));
}

.contact-form {
    background: var(--glass);
    backdrop-filter: blur(16px);
    padding: 40px;
    border-radius: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text); font-weight: 600; font-size: 0.9rem; }

/* Auth pages - lighter color for dark backgrounds */
.auth-page .form-group label,
.dashboard-page .form-group label,
.assessment-page .form-group label {
    color: #e0e7ff;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.08);
    color: #f0f4ff;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    background: rgba(255,255,255,0.12);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(245,184,69,0.12);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(224, 231, 255, 0.5);
    opacity: 1;
}

.form-group textarea { min-height: 130px; resize: vertical; }

.form-submit { text-align: center; margin-top: 1.5rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; justify-content: center; }

.form-status { margin-top: 20px; padding: 12px; border-radius: 12px; font-size: 0.95rem; font-weight: 500; text-align: center; display: none; }
.form-status.success { display: block; background: rgba(134, 239, 172, 0.1); color: #86efac; border: 1px solid rgba(134, 239, 172, 0.2); }
.form-status.error { display: block; background: rgba(252, 165, 165, 0.1); color: #fca5a5; border: 1px solid rgba(252, 165, 165, 0.2); }
.form-error { color: #fca5a5; margin-top: 10px; display: block; }

/* Team Section */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.team-card {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s ease;
}

.team-card:hover {
    transform: translateY(-10px);
    border-color: rgba(245,184,69,0.3);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.team-img-wrap {
    height: 220px;
    width: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border);
}

.team-placeholder {
    font-size: 5rem;
    color: var(--text-muted);
    opacity: 0.5;
}

.team-info {
    padding: 2rem;
    text-align: center;
}

.team-info h3 {
    margin-bottom: 0.2rem;
    color: var(--text);
    font-size: 1.4rem;
}

.team-role {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.team-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Contact Page Split Layout */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: stretch;
}

.contact-info-panel {
    background: var(--glass);
    backdrop-filter: blur(16px);
    border-radius: 24px;
    padding: 2.5rem;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.contact-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-detail-item i {
    font-size: 1.5rem;
    color: var(--accent);
    margin-top: 0.2rem;
}

.contact-detail-item h4 {
    margin-bottom: 0.2rem;
    color: var(--text);
}

.contact-detail-item p {
    color: var(--text-muted);
    margin: 0;
}

.map-container {
    flex: 1;
    min-height: 300px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    margin-top: 1rem;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    filter: invert(90%) hue-rotate(180deg) brightness(80%) contrast(120%);
}

@media (max-width: 992px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }
    .map-container {
        min-height: 400px;
    }
}

/* Inner Page Header */
.page-header {
    background: linear-gradient(135deg, rgba(5,13,31,0.95), rgba(11,26,61,0.95));
    padding: 160px 0 80px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, rgba(245,184,69,0.08) 0%, transparent 60%);
    pointer-events: none;
}

.page-header h1 {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.page-header p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Auth, dashboard, assessment pages */
.auth-page, .dashboard-page, .assessment-page, .admin-page {
    min-height: calc(100vh - 160px);
    display: flex;
    align-items: center;
    padding: 60px 0;
}

.auth-card, .welcome-card, .info-panel, .question-card,
.result-box, .report-card, .admin-card {
    background: var(--glass);
    backdrop-filter: blur(16px);
    border-radius: 24px;
    padding: 2.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.auth-card { max-width: 480px; margin: 0 auto; }

.auth-card h2, .welcome-card h2, .info-panel h3, .question-card h3,
.result-box h3, .report-card h3, .admin-card h2 {
    margin-bottom: 1.2rem;
    color: var(--text);
}

.auth-card p, .welcome-card p, .info-panel p, .question-card label,
.result-box p, .report-card p, .report-card ul, .admin-card p {
    color: var(--text-muted);
}

.info-panel ul { list-style: disc; padding-left: 20px; margin-top: 16px; }
.info-panel ul li { margin-bottom: 0.9rem; }

.dashboard-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; }

.hidden { display: none !important; }

/* Dashboard Grid Layout */
.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    align-items: start;
    margin-top: 1.5rem;
}

.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
}

/* Interactive Catalogue & Modal */
.cat-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 2rem;
}

.cat-filter button {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.cat-filter button:hover, .cat-filter button.active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.cat-card {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.cat-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.cat-card h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.cat-card .cat-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.cat-card .btn-small {
    margin-top: auto;
    padding: 8px 16px;
    font-size: 0.9rem;
    width: fit-content;
}

/* Modal Overlay */
.course-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(5, 13, 31, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.course-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.course-modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(30px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.course-modal-overlay.active .course-modal {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 20px; right: 20px;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 10;
}

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

.modal-header {
    padding: 30px 40px 20px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 { font-size: 2rem; margin-bottom: 10px; }

.modal-meta {
    display: flex;
    gap: 20px;
    color: var(--accent);
    font-weight: 500;
}

.modal-body {
    padding: 30px 40px;
}

.modal-section { margin-bottom: 24px; }
.modal-section h4 { color: #fff; margin-bottom: 8px; font-size: 1.1rem; }
.modal-section p, .modal-section ul { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }
.modal-section ul { list-style: disc; padding-left: 20px; }

.modal-footer {
    padding: 20px 40px 30px;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Livres / Books Section */
.book-card {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 28px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
}

.book-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0,0,0,0.6), 0 0 30px rgba(245,184,69,0.3);
    border-color: var(--accent);
}

.book-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--accent);
    color: #000;
    padding: 6px 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.book-cover {
    width: 100%;
    height: 240px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.book-card:hover .book-cover img {
    transform: scale(1.1);
}

.book-cover-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a2b4d, #0b1a3d);
    color: var(--accent);
    opacity: 0.4;
}

.book-info {
    padding: 1.2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.book-header h3 {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 0.2rem;
    line-height: 1.2;
}

.book-header .author {
    color: var(--accent);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.book-info .desc {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-actions {
    margin-top: auto;
    display: flex;
    gap: 12px;
}

.book-actions .btn {
    padding: 10px 20px;
    font-size: 0.88rem;
    border-radius: 12px;
}

.book-actions .btn-purchase {
    flex: 2;
}

.book-actions .btn-secondary {
    flex: 1;
}

/* Books Grid */
#books-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 2rem !important;
    margin-top: 2rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

@media (max-width: 1200px) {
    #books-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1.8rem !important;
    }
}

@media (max-width: 768px) {
    #books-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }
}

@media (max-width: 480px) {
    #books-grid {
        grid-template-columns: 1fr !important;
        gap: 1.2rem !important;
    }
}

#books-grid > * {
    min-width: 0 !important;
}

.error-box {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    background: rgba(255, 75, 75, 0.05);
    border: 1px solid rgba(255, 75, 75, 0.2);
    border-radius: 20px;
    color: #ff8080;
}

/* Level Test Popup */
.level-test-popup {
    position: fixed;
    bottom: 30px;
    right: -400px;
    width: 350px;
    background: linear-gradient(135deg, rgba(11,26,61,0.95), rgba(5,13,31,0.98));
    backdrop-filter: blur(12px);
    border: 1px solid var(--accent);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6), 0 0 20px rgba(245,184,69,0.2);
    z-index: 1500;
    transition: right 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.level-test-popup.show {
    right: 30px;
}

.level-test-popup .close-popup {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s;
}

.level-test-popup .close-popup:hover { color: var(--accent); }
.level-test-popup h3 { color: #fff; margin-bottom: 10px; font-size: 1.3rem; }
.level-test-popup p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 20px; }

/* PDF Generation styles (hidden in normal view) */
.pdf-export-container { display: none; }

/* Scrollbar for modal */
.course-modal::-webkit-scrollbar { width: 8px; }
.course-modal::-webkit-scrollbar-track { background: var(--bg-start); border-radius: 0 24px 24px 0; }
.course-modal::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; }

/* Footer */
footer {
    background: rgba(3,8,20,0.98);
    padding: 40px 0 28px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
}

footer p { margin-bottom: 0.5rem; }
footer a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
footer a:hover { color: #fff; }

/* Reveal animations (CSS-only for absolute robustness) */
@keyframes revealFade {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.reveal {
    opacity: 1; /* Visible par défaut */
    animation: revealFade 0.8s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* On peut quand même garder la classe .visible pour d'éventuels déclenchements JS */
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Floating WhatsApp button */
.whatsapp-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 99;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 8px 28px rgba(37,211,102,0.4);
    transition: all 0.35s ease;
    text-decoration: none;
    animation: pulse-wa 2s ease-in-out infinite;
}

.whatsapp-float:hover {
    transform: scale(1.12);
    box-shadow: 0 12px 40px rgba(37,211,102,0.55);
}

@keyframes pulse-wa {
    0%,100% { box-shadow: 0 8px 28px rgba(37,211,102,0.4); }
    50% { box-shadow: 0 8px 40px rgba(37,211,102,0.6); }
}

/* Scroll to top */
.scroll-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 99;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: all 0.35s ease;
}

.scroll-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.scroll-top:hover {
    background: var(--accent);
    color: #0a0f1e;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-inner, .about-content { grid-template-columns: 1fr; }
    .hero-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: row;
        position: relative;
    }

    .menu-toggle { display: block; }

    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(5,13,31,0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 1.5rem;
        gap: 4px;
        border-radius: 0 0 20px 20px;
        border: 1px solid var(--border);
        border-top: none;
        box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    }

    nav ul.active { display: flex; }
    nav ul li a { 
        padding: 12px 16px; 
        display: block; 
        border-radius: 12px; 
        width: 100%; 
        color: var(--text) !important; 
    }
    nav ul li a:hover,
    nav ul li a.active {
        color: var(--accent) !important;
        background: rgba(245,184,69,0.1);
    }
    .dropdown-content li a {
        color: var(--text-muted) !important;
    }
    .dropdown-content li a:hover {
        color: var(--accent) !important;
        background: rgba(245,184,69,0.1);
    }

    .logo-image { height: 40px; }
    .logo-text { font-size: 1.8rem; }
    .logo-academy { display: none; }

    .hero { padding-top: 80px; padding-bottom: 60px; }
    .hero h1 { font-size: 2.4rem; }
    section h2 { font-size: 1.8rem; }

    .hero-stats { grid-template-columns: 1fr; }
    .cards, .testimonial-grid { grid-template-columns: 1fr; }
    .contact-form { padding: 28px; }
    .cefr-grid { grid-template-columns: 1fr; }

    .whatsapp-float { width: 52px; height: 52px; font-size: 1.5rem; bottom: 20px; right: 20px; }
    .scroll-top { bottom: 84px; right: 22px; }
}

/* ══════════════════════════════════════════════════════════════
   OPTIMISATION MOBILE COMPLÈTE - Tablet & Mobile Responsive
   ══════════════════════════════════════════════════════════════ */

/* ─ Tablette (768px - 1024px) ─ */
@media (max-width: 1024px) {
    .container { width: min(100%, calc(100% - 32px)); }
    
    /* Typography - Responsive */
    h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); line-height: 1.2; }
    h2 { font-size: clamp(1.5rem, 4.5vw, 2.2rem); line-height: 1.2; }
    h3 { font-size: clamp(1.2rem, 4vw, 1.8rem); }
    h4 { font-size: clamp(1rem, 3.5vw, 1.4rem); }
    
    /* Espacements */
    section { padding: 50px 0; }
    .page-header { padding: 120px 0 60px; }
    
    /* Grilles */
    .hero-cards { grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
    .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
    .book-card { font-size: 0.95rem; }
    
    /* CEO Section */
    .ceo-grid { gap: 2.5rem; }
    .ceo-image-wrapper { max-width: 350px; }
    
    /* Modals et Cards */
    .auth-card, .course-modal { max-width: 90%; padding: 1.8rem; }
    .modal-content { max-height: 85vh; }
}

/* ─ Mobile Large (641px - 768px) ─ */
@media (max-width: 768px) {
    .container { width: calc(100% - 24px); }
    
    /* Typography */
    h1 { font-size: clamp(1.6rem, 6vw, 2.4rem); }
    h2 { font-size: clamp(1.3rem, 5vw, 2rem); }
    h3 { font-size: clamp(1.1rem, 4.5vw, 1.6rem); }
    h4 { font-size: clamp(0.95rem, 3.5vw, 1.3rem); }
    
    body { font-size: 15px; line-height: 1.5; }
    p { font-size: clamp(0.9rem, 3vw, 1rem); }
    
    /* Espacements */
    section { padding: 40px 0; }
    .page-header { padding: 100px 0 50px; }
    
    /* Header */
    .header-container { gap: 16px; }
    .logo-image { height: 38px; }
    
    /* Hero Section */
    .hero { padding-top: 70px; padding-bottom: 50px; }
    .hero-inner { gap: 2rem; }
    .hero-copy { max-width: 100%; }
    .hero-cta { flex-direction: column; gap: 0.8rem; }
    .hero-cta .btn { width: 100%; padding: 12px 20px; font-size: 0.95rem; }
    
    /* Cards */
    .hero-cards { grid-template-columns: 1fr; gap: 1rem; }
    .hero-card { padding: 1.2rem; }
    .hero-card h4 { font-size: 1.1rem; }
    
    /* Grilles */
    .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .testimonial-grid { grid-template-columns: 1fr; }
    
    /* CEO Section */
    .ceo-grid { grid-template-columns: 1fr; gap: 2rem; }
    .ceo-image-wrapper { max-width: 100%; }
    
    /* Formulaires */
    .contact-form, .auth-card, .login-form, .signup-form { 
        padding: 1.5rem; 
        border-radius: 16px;
    }
    .form-group { margin-bottom: 1rem; }
    input, textarea, select { 
        padding: 10px 12px; 
        font-size: 16px; /* Prevent zoom on iOS */
        border-radius: 10px;
    }
    
    /* Boutons */
    .btn { 
        padding: 11px 18px; 
        font-size: 0.95rem; 
        border-radius: 12px;
    }
    .btn-small { padding: 8px 12px; font-size: 0.85rem; }
    
    /* Dashboard */
    .dashboard-layout { grid-template-columns: 1fr; gap: 1.5rem; }
    .dashboard-sidebar { order: -1; }
    
    /* Popup */
    .level-test-popup { 
        position: fixed; 
        bottom: 15px; 
        right: 15px; 
        left: 15px;
        width: auto; 
        max-width: 100%;
        padding: 1.5rem; 
        border-radius: 16px;
    }
}

/* ─ Mobile Medium (481px - 640px) ─ */
@media (max-width: 640px) {
    .container { width: calc(100% - 20px); }
    
    /* Typography */
    h1 { font-size: clamp(1.4rem, 7vw, 2.2rem); font-weight: 700; }
    h2 { font-size: clamp(1.15rem, 5.5vw, 1.8rem); }
    h3 { font-size: clamp(1rem, 4.5vw, 1.5rem); }
    h4 { font-size: clamp(0.9rem, 4vw, 1.2rem); }
    
    body { font-size: 14px; }
    p { font-size: clamp(0.875rem, 3.5vw, 0.95rem); }
    
    /* Espacements */
    section { padding: 35px 0; }
    .page-header { padding: 80px 0 40px; }
    
    /* Hero */
    .hero { padding-top: 60px; padding-bottom: 40px; }
    .hero-inner { gap: 1.5rem; }
    .hero-cta { gap: 0.6rem; }
    .hero-cta .btn { padding: 10px 18px; font-size: 0.9rem; }
    
    .hero-stats { grid-template-columns: 1fr; gap: 0.8rem; margin-top: 1.5rem; }
    .hero-stat strong { font-size: 1.4rem; }
    
    /* Cards */
    .hero-cards { grid-template-columns: 1fr; gap: 0.8rem; }
    .hero-card { padding: 1rem; border-radius: 14px; }
    .hero-card h4 { font-size: 1rem; margin-bottom: 0.5rem; }
    .hero-card p { font-size: 0.85rem; }
    
    /* Grilles */
    .cat-grid { grid-template-columns: 1fr; gap: 0.8rem; }
    .gallery-grid { grid-template-columns: 1fr; gap: 0.8rem; }
    
    /* Formulaires */
    .contact-form, .auth-card, .login-form, .signup-form { 
        padding: 1.2rem; 
        border-radius: 14px;
        margin: 1rem 0;
    }
    .form-group { margin-bottom: 0.8rem; }
    input, textarea, select { 
        padding: 9px 10px; 
        font-size: 16px;
        border-radius: 8px;
    }
    label { font-size: 0.85rem; margin-bottom: 0.4rem; }
    
    /* Boutons */
    .btn { 
        padding: 9px 16px; 
        font-size: 0.9rem; 
        border-radius: 10px;
    }
    .btn-small { padding: 6px 10px; font-size: 0.8rem; }
    
    /* CEO Section */
    .ceo-content h2 { font-size: clamp(1.3rem, 6vw, 2rem); }
    .ceo-quote { font-size: 1rem; padding-left: 1rem; margin-bottom: 1.5rem; }
    .ceo-signature { font-size: 1.3rem; }
    
    /* Modals */
    .course-modal, .auth-card { width: 95%; max-height: 90vh; }
    
    /* Popup */
    .level-test-popup { 
        width: calc(100% - 30px);
        padding: 1.2rem;
    }
    
    /* Dropdown */
    .dropdown-content { min-width: 100% !important; }
    
    /* WhatsApp et Scroll Top */
    .whatsapp-float { width: 50px; height: 50px; font-size: 1.4rem; bottom: 15px; right: 15px; }
    .scroll-top { width: 45px; height: 45px; font-size: 0.9rem; bottom: 75px; right: 15px; }
}

/* ─ Mobile Small (max-width: 480px) ─ */
@media (max-width: 480px) {
    .container { width: calc(100% - 16px); margin: 0 auto; }
    * { -webkit-tap-highlight-color: transparent; }
    
    /* Typography - Ultra Responsive */
    h1 { font-size: clamp(1.2rem, 8vw, 2rem); line-height: 1.15; letter-spacing: -0.5px; }
    h2 { font-size: clamp(1rem, 6vw, 1.6rem); line-height: 1.2; }
    h3 { font-size: clamp(0.9rem, 5vw, 1.3rem); }
    h4 { font-size: clamp(0.85rem, 4.5vw, 1.1rem); }
    
    body { font-size: 13px; line-height: 1.45; }
    p { font-size: clamp(0.8rem, 3.5vw, 0.9rem); line-height: 1.4; }
    small { font-size: 0.75rem; }
    
    /* Espacements agressifs */
    section { padding: 30px 0; }
    .page-header { padding: 70px 0 35px; }
    section + section { margin-top: 0; }
    
    /* Header Optimisation */
    header { position: fixed; width: 100%; }
    body { padding-top: 60px; }
    .header-container { padding: 10px 0; gap: 12px; }
    .logo-image { height: 35px; }
    nav ul li a { padding: 10px 12px; font-size: 0.9rem; }
    
    /* Hero */
    .hero { padding-top: 50px; padding-bottom: 30px; min-height: auto; }
    .hero-inner { gap: 1rem; }
    .hero-copy h1 { text-shadow: 0 0 20px rgba(245,184,69,0.3); }
    .hero-copy > p { margin-bottom: 1rem; font-size: 0.85rem; }
    
    .hero-cta { flex-direction: column; gap: 0.5rem; }
    .hero-cta .btn { 
        width: 100%; 
        padding: 9px 14px; 
        font-size: 0.85rem; 
        border-radius: 9px;
    }
    
    .hero-stats { grid-template-columns: 1fr; gap: 0.6rem; margin-top: 1rem; }
    .hero-stat { padding: 0.8rem; border-radius: 10px; }
    .hero-stat strong { display: block; font-size: 1.2rem; margin-bottom: 0.2rem; }
    .hero-stat span { font-size: 0.75rem; }
    
    /* Cards */
    .hero-cards { grid-template-columns: 1fr; gap: 0.6rem; }
    .hero-card { 
        padding: 0.9rem; 
        border-radius: 12px;
        gap: 0.5rem;
    }
    .hero-card .card-icon { font-size: 1.8rem; }
    .hero-card h4 { font-size: 0.95rem; margin-bottom: 0.4rem; }
    .hero-card p { font-size: 0.8rem; }
    
    /* Catalogue Grilles */
    .cat-grid { grid-template-columns: 1fr; gap: 0.6rem; }
    .cat-card { 
        padding: 0.9rem; 
        border-radius: 12px;
        gap: 0.5rem;
    }
    .cat-card h4 { font-size: 0.95rem; }
    .cat-card .cat-meta { gap: 0.6rem; font-size: 0.8rem; }
    
    /* Gallerie */
    .gallery-grid { grid-template-columns: 1fr; gap: 0.6rem; }
    .gallery-item { border-radius: 12px; }
    
    /* Formulaires */
    .contact-form, .auth-card, .login-form, .signup-form { 
        padding: 1rem; 
        border-radius: 12px;
        margin: 0.8rem 0;
    }
    
    .form-group { margin-bottom: 0.7rem; }
    .form-group label { 
        display: block; 
        font-size: 0.8rem; 
        margin-bottom: 0.3rem; 
        font-weight: 600;
    }
    
    input, textarea, select { 
        width: 100%;
        padding: 8px 9px; 
        font-size: 16px; /* iOS zoom fix */
        border-radius: 8px;
        border: 1px solid var(--border);
        background: rgba(255,255,255,0.05);
        color: var(--text);
    }
    
    input:focus, textarea:focus, select:focus {
        outline: none;
        border-color: var(--accent);
        background: rgba(255,255,255,0.08);
    }
    
    textarea { resize: vertical; min-height: 80px; }
    
    /* Boutons */
    .btn { 
        padding: 8px 14px; 
        font-size: 0.85rem; 
        border-radius: 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.4rem;
    }
    
    .btn-small { 
        padding: 5px 8px; 
        font-size: 0.75rem; 
        border-radius: 6px;
    }
    
    .btn i { font-size: 0.9em; }
    
    /* CEO Section */
    .ceo-grid { gap: 1.5rem; }
    .ceo-image-wrapper { 
        max-width: 100%; 
        padding: 6px; 
        border-radius: 16px;
    }
    .ceo-content h2 { font-size: clamp(1.1rem, 7vw, 1.8rem); }
    .ceo-quote { 
        font-size: 0.9rem; 
        padding-left: 0.8rem; 
        margin-bottom: 1rem; 
        border-left-width: 2px;
    }
    .ceo-signature { font-size: 1.1rem; }
    
    /* Dashboard */
    .dashboard-layout { gap: 1rem; }
    .dashboard-sidebar { order: -1; gap: 1rem; }
    .dashboard-main { gap: 1rem; }
    
    .info-panel, .question-card, .result-box { 
        padding: 1rem; 
        border-radius: 12px;
        margin-bottom: 1rem;
    }
    
    /* Modals */
    .course-modal { 
        width: 95vw; 
        max-height: 85vh;
        padding: 1rem;
        border-radius: 16px;
    }
    .course-modal-header { padding: 0 0 0.8rem 0; }
    .course-modal-header h3 { font-size: 1.1rem; }
    
    .auth-card { 
        width: 95%; 
        max-width: 400px;
        padding: 1rem;
        margin: 0 auto;
    }
    
    /* Popup */
    .level-test-popup { 
        position: fixed; 
        bottom: 12px; 
        left: 12px;
        right: 12px;
        width: auto;
        padding: 1rem; 
        border-radius: 12px;
        z-index: 1400;
    }
    .level-test-popup h3 { font-size: 1rem; margin-bottom: 0.5rem; }
    .level-test-popup p { font-size: 0.8rem; margin-bottom: 0.8rem; }
    .level-test-popup .btn { width: 100%; }
    
    /* Dropdown Menu */
    nav ul li { width: 100%; }
    nav ul li a { width: 100%; padding: 10px; border-radius: 8px; }
    .dropdown-content { padding-left: 10px !important; }
    .dropdown-content li { width: 100%; }
    
    /* Floating Buttons */
    .whatsapp-float { 
        width: 48px; 
        height: 48px; 
        font-size: 1.3rem; 
        bottom: 12px; 
        right: 12px;
        border-radius: 50%;
    }
    .scroll-top { 
        width: 42px; 
        height: 42px; 
        font-size: 0.85rem; 
        bottom: 68px; 
        right: 12px;
        border-radius: 50%;
    }
    
    /* Lightbox pour mobile */
    .lightbox.active { background: rgba(0,0,0,0.95); }
    .lightbox-image { max-width: 95vw; max-height: 80vh; }
    
    /* Grid Responsive */
    .grid { grid-template-columns: 1fr !important; }
    .grid.auto-fit { grid-template-columns: 1fr !important; }
    
    /* Testimonials */
    .testimonial { padding: 0.9rem; }
    .testimonial-text { font-size: 0.85rem; }
    .testimonial-author { font-size: 0.8rem; }
    
    /* Éviter les débordements */
    img, video, embed, iframe { max-width: 100%; height: auto; display: block; }
    table { width: 100%; overflow-x: auto; }
    
    /* Améliorer les touches sur mobile */
    a, button { min-height: 44px; min-width: 44px; display: flex; align-items: center; justify-content: center; }
}

/* ─ Ultra Mobile (max-width: 360px) ─ */
@media (max-width: 360px) {
    .container { width: calc(100% - 12px); }
    
    h1 { font-size: clamp(1rem, 9vw, 1.6rem); }
    h2 { font-size: clamp(0.95rem, 7vw, 1.4rem); }
    
    body { font-size: 12px; }
    
    section { padding: 25px 0; }
    
    .hero-cta .btn { font-size: 0.8rem; padding: 7px 12px; }
    .btn { font-size: 0.8rem; padding: 7px 12px; }
    
    .hero-stat strong { font-size: 1.1rem; }
    
    .contact-form, .auth-card { padding: 0.8rem; }
}

.hidden { display: none !important; }

/* ── Scroll Reveal Animations ── */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* ── Loader / Spinner ── */
.loader-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    grid-column: 1 / -1;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(245, 184, 69, 0.2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Glassmorphism Hover Enhancements ── */
.card, .hero-stat, .hero-card, .cat-card, .book-card, .testimonial {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.card:hover, .hero-stat:hover, .hero-card:hover, .cat-card:hover, .book-card:hover, .testimonial:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 20px var(--accent-glow);
    border-color: rgba(245, 184, 69, 0.5);
    z-index: 10;
}

/* Vibrant Redesign Enhancements */
.hero h1 {
    text-shadow: 0 0 40px rgba(245, 184, 69, 0.4);
}

.btn-vibrant {
    position: relative;
    overflow: hidden;
    animation: pulse-glow 2s infinite;
    box-shadow: 0 0 20px rgba(245,184,69,0.5);
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(245, 184, 69, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(245, 184, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 184, 69, 0); }
}

.hero-cards {
    perspective: 1000px;
}

.hero-card {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s;
    transform-style: preserve-3d;
}

.hero-card:hover {
    transform: rotateX(10deg) rotateY(-5deg) translateY(-10px) !important;
    box-shadow: -10px 20px 40px rgba(0,0,0,0.5), 0 0 30px rgba(245,184,69,0.3) !important;
    border-color: rgba(245,184,69,0.6) !important;
}

/* CEO Section */
.ceo-section {
    padding: 100px 0;
    position: relative;
    background: linear-gradient(180deg, rgba(11,26,61,0) 0%, rgba(245,184,69,0.03) 100%);
}

.ceo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.ceo-image-wrapper {
    position: relative;
    border-radius: 30px;
    padding: 10px;
    background: linear-gradient(135deg, var(--accent), transparent, var(--accent2));
    box-shadow: 0 30px 60px rgba(0,0,0,0.5), 0 0 50px rgba(245,184,69,0.25);
    animation: float 6s ease-in-out infinite;
    max-width: 380px;
    margin: 0 auto;
}

.ceo-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
    filter: contrast(1.05);
}

/* Mobile Dropdown Overrides */
@media (max-width: 992px) {
    .dropdown-content {
        position: relative;
        box-shadow: none;
        background: transparent;
        min-width: 100%;
        display: none;
        opacity: 1;
        transform: none;
        padding-left: 20px;
        border: none;
    }
    .dropdown.active .dropdown-content,
    .dropdown:hover .dropdown-content {
        display: flex;
    }
    .dropdown > a::after {
        float: right;
    }
}

.ceo-content h2 {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.ceo-quote {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 2rem;
    position: relative;
    padding-left: 1.5rem;
    border-left: 3px solid var(--accent);
}

.ceo-signature {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    color: var(--accent);
    font-weight: 700;
}

@media (max-width: 992px) {
    .ceo-grid { grid-template-columns: 1fr; gap: 3rem; }
    .ceo-image-wrapper { max-width: 400px; margin: 0 auto; }
}