/* --- VARIABLES & RESET --- */
:root {
    --primary-color: #1B3A57; 
    --accent-color: #C5A059;  
    --text-color: #333333;
    --light-bg: #F4F6F8;
    --white: #ffffff;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Roboto', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* --- UTILITAIRES --- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.bg-light { background-color: var(--light-bg); }
.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
}
.section-subtitle { text-align: center; margin-bottom: 50px; color: #666; }

/* --- BUTTONS --- */
.btn-primary {
    background-color: var(--primary-color);
    color: var(--white) !important;
    padding: 10px 25px;
    border-radius: 4px;
    font-weight: bold;
}
.btn-primary:hover { background-color: var(--accent-color); }

.btn-login {
    background-color: transparent; 
    border: 2px solid var(--primary-color); 
    color: var(--primary-color) !important; 
    padding: 8px 20px; 
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background-color: var(--primary-color); 
    color: var(--white) !important; 
    transform: translateY(-2px); 
}

@media (max-width: 768px) {
    .btn-login {
        width: 100%;
        text-align: center;
        display: block;
        margin-bottom: 10px;
    }
}

.btn-secondary {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: bold;
    display: inline-block;
}
.btn-secondary:hover { background-color: #b08d4a; }

/* --- HERO SECTION STYLE "PREMIUM" --- */
.hero-premium {
    background: radial-gradient(circle at center, #0F2D4A 0%, #051525 100%);
    min-height: 85vh; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 120px 20px 60px; 
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 900px;
    z-index: 2;
    position: relative;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid rgba(197, 160, 89, 0.5); 
    border-radius: 50px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-color);
    background: rgba(11, 28, 46, 0.6);
    backdrop-filter: blur(5px);
    margin-bottom: 30px;
}

.hero-premium h1 {
    font-family: var(--font-heading);
    font-size: 3.8rem;
    line-height: 1.1;
    margin-bottom: 25px;
    color: white;
}

.text-gold {
    color: var(--accent-color);
}

.hero-desc {
    font-size: 1.25rem;
    color: #cbd5e1; 
    max-width: 700px;
    margin: 0 auto 40px;
    font-weight: 300;
}

.hero-role-box {
    background: rgba(255, 255, 255, 0.05); 
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 30px;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 40px;
    color: #C5A059; 
    font-weight: 500;
    font-size: 1.1rem;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-gold-hero {
    background-color: var(--accent-color);
    color: #051525; 
    padding: 14px 35px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: transform 0.3s;
}
.btn-gold-hero:hover {
    background-color: #dcb365;
    transform: translateY(-3px);
}

.btn-dark-hero {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 14px 35px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
}
.btn-dark-hero:hover {
    background-color: white;
    color: #051525;
}

.hero-curve {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}
.hero-curve svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px; 
}
.hero-curve path {
    fill: #ffffff; 
}

@media (max-width: 768px) {
    .hero-premium h1 { font-size: 2.5rem; }
    .hero-role-box { font-size: 0.95rem; width: 100%; }
    .hero-buttons { flex-direction: column; width: 100%; }
    .btn-gold-hero, .btn-dark-hero { width: 100%; text-align: center; }
}

/* --- MISSION --- */
.mission-content { max-width: 800px; margin: 0 auto; text-align: center; }
.highlight {
    margin-top: 20px;
    font-weight: bold;
    color: var(--accent-color);
    font-size: 1.1rem;
    border: 1px solid var(--accent-color);
    padding: 10px;
    display: inline-block;
}
.check-list { text-align: left; margin: 30px auto; max-width: 600px; }
.check-list li { margin-bottom: 10px; padding-left: 25px; position: relative; }
.check-list li::before {
    content: '✓';
    color: var(--accent-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* --- GRIDS & CARDS --- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }

.card {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-top: 4px solid var(--accent-color);
}

.program-card h3 { color: var(--primary-color); margin-bottom: 15px; }
.program-card ul li {
    margin-bottom: 8px;
    font-size: 0.95rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

/* --- TEAM --- */
.team-card { 
    text-align: center; 
    border-top: none; 
    transition: transform 0.3s; 
    padding-top: 40px; 
}

.team-card:hover { 
    transform: translateY(-5px); 
}

.team-avatar {
    width: 120px;      
    height: 120px;     
    border-radius: 50%; 
    object-fit: cover;  
    object-position: top center; 
    margin: 0 auto 20px; 
    display: block;
    border: 3px solid white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.role {
    display: block;
    color: var(--accent-color);
    font-style: italic;
    margin-bottom: 10px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* --- FOOTER --- */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding-top: 60px;
}

/* --- ANIMATIONS STYLE APPLE --- */
.apple-reveal {
    opacity: 0;
    filter: blur(5px); 
    transform: translateY(30px) scale(0.98); 
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1); 
    will-change: transform, opacity, filter;
}

.apple-reveal.visible {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
}

.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }

/* --- FOOTER STYLE "DARK PREMIUM" --- */
.footer-dark {
    background-color: #0b1c2e; 
    color: #ffffff;
    font-family: var(--font-body);
}

.footer-cta {
    text-align: center;
    padding: 80px 20px 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); 
}

.footer-cta h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #ffffff;
}

.footer-cta p {
    font-size: 1.1rem;
    color: #cbd5e1; 
    margin-bottom: 30px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.contact-line {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-top: 20px;
}

.btn-gold {
    background-color: var(--accent-color);
    color: #ffffff;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: bold;
    transition: 0.3s;
    border: 2px solid var(--accent-color);
}
.btn-gold:hover {
    background-color: #b08d4a;
    border-color: #b08d4a;
}

.btn-outline-white {
    background-color: transparent;
    color: #ffffff;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: 0.3s;
}
.btn-outline-white:hover {
    border-color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
}

.footer-main {
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr; 
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h4 {
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 25px;
}

.footer-logo {
    background-color: var(--accent-color);
    color: #fff;
    padding: 5px 10px;
    font-weight: bold;
    display: inline-block;
    border-radius: 4px;
    margin-bottom: 20px;
}

.footer-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.footer-assoc {
    font-size: 0.8rem;
    color: #64748b;
}

.footer-links li, .contact-list li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #cbd5e1;
    font-size: 0.95rem;
    transition: 0.2s;
}

.footer-links a:hover {
    color: var(--accent-color);
    padding-left: 5px; 
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    font-size: 0.8rem;
    color: #64748b;
}

.bottom-flex {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.legal-links a {
    color: #64748b;
    margin-left: 20px;
}
.legal-links a:hover { color: #ffffff; }

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr; 
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr; 
        text-align: center;
    }
    .cta-buttons {
        flex-direction: column;
    }
    .bottom-flex {
        flex-direction: column;
        text-align: center;
    }
    .legal-links a {
        margin: 0 10px;
    }
}

/* --- PAGE D'AUTHENTIFICATION (INSCRIPTION) --- */
.auth-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 100px 20px 40px;
    background-color: #f8faff;
}

.auth-card {
    background: white;
    width: 100%;
    max-width: 480px;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.02);
    margin-bottom: 20px;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s ease;
    will-change: transform;
}

.auth-card:hover {
    transform: scale(1.02) translateY(-5px); 
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12); 
}

.auth-header {
    text-align: center;
    margin-bottom: 40px; 
    max-width: 480px; 
    width: 100%;
}

.auth-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.auth-header h2 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 5px;
}

.auth-header p {
    color: #666;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: 0.3s;
    background-color: #fcfcfc;
}

.form-group input:hover {
    background-color: #f0f7ff; 
    border-color: var(--primary-color); 
    box-shadow: 0 4px 12px rgba(27, 58, 87, 0.15); 
    transform: translateY(-2px); 
    cursor: text;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 4px rgba(27, 58, 87, 0.1);
}

.info-text {
    font-size: 0.75rem;
    color: #888;
    margin-top: 5px;
    display: block;
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 600;
    transition: color 0.3s ease; 
}

.auth-footer a:hover {
    color: var(--accent-color);
}

.back-home-link {
    color: #888;
    font-size: 0.9rem;
    margin-top: 20px;
    transition: color 0.3s ease;
}

.back-home-link:hover {
    color: var(--accent-color);
}

/* --- NOUVELLE BARRE DE NAVIGATION --- */
.navbar-expanded {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 20px; 
    height: auto;
    min-height: 60px; 
    background-color: #fff; 
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 350px;
}

.logo-icon-img img {
    height: 45px; 
    width: auto;
    display: block;
}

.logo-text-group {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-main {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.logo-sub {
    font-size: 0.7rem;
    color: #666;
    margin-top: 2px;
}

.nav-center {
    display: flex;
    gap: 20px; 
    align-items: center;
}

.nav-center a {
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.95rem;
    white-space: nowrap; 
    transition: color 0.3s ease;
}

.nav-center a:hover {
    color: var(--accent-color); 
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-contact {
    display: flex;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-color);
    align-items: center;
    margin-right: 5px;
}

.phone-number {
    font-weight: 500;
    color: var(--primary-color);
    white-space: nowrap;
}

.nav-buttons-group {
    display: flex;
    gap: 10px;
}

.navbar-expanded .btn-login {
    padding: 6px 16px; 
    font-size: 0.9rem;
}

.navbar-expanded .btn-login:hover {
    background-color: var(--accent-color); 
    border-color: var(--accent-color);
    color: white !important;
}

.btn-primary-dark {
    background-color: #0b1c2e; 
    color: white !important;
    padding: 6px 16px; 
    border-radius: 4px;
    font-weight: bold;
    border: 1px solid #0b1c2e;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-primary-dark:hover {
    background-color: var(--accent-color); 
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

@media (max-width: 1100px) {
    .navbar-expanded { flex-direction: column; gap: 15px; padding: 15px; }
    .nav-center { flex-wrap: wrap; justify-content: center; }
    .nav-right { flex-direction: column; }
    .logo-sub { display: none; }
    .nav-contact { margin-right: 0; margin-bottom: 10px; }
}

/* --- PAGE PROGRAMME DÉTAILLÉ --- */
.program-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 30px;
    margin-top: 40px;
}

.program-item {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    border-left: 3px solid transparent;
    transition: transform 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.program-item:hover {
    transform: translateY(-5px);
    border-left-color: var(--accent-color);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.module-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: rgba(197, 160, 89, 0.6); 
    position: absolute;
    top: 10px;
    right: 20px;
    font-family: var(--font-heading);
}

.program-item h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    margin-top: 10px;
    padding-right: 40px; 
}

.program-item ul {
    list-style: none;
    padding: 0;
}

.program-item ul li {
    position: relative;
    padding-left: 15px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.4;
}

.program-item ul li::before {
    content: "•";
    color: var(--accent-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.highlight-item {
    background: white; 
    border: none;      
}

/* --- LAYOUT PROGRAMME AVEC SIDEBAR --- */
.program-wrapper {
    display: flex;
    gap: 50px; 
    align-items: flex-start; 
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.program-sidebar {
    width: 250px; 
    position: sticky; 
    top: 100px; 
    flex-shrink: 0; 
}

.sidebar-nav a {
    display: block;
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 6px;
    color: #555;
    font-weight: 500;
    transition: 0.3s;
    border-left: 3px solid transparent; 
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    background-color: white;
    color: var(--primary-color);
    border-left-color: var(--accent-color); 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.program-content {
    flex-grow: 1; 
}

@media (max-width: 900px) {
    .program-wrapper {
        flex-direction: column;
    }
    .program-sidebar {
        display: none; 
    }
}

/* --- BOUTON SECONDAIRE HERO --- */
.btn-outline-hero {
    display: inline-block;
    padding: 10px 28px; 
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.7); 
    color: white;
    margin-left: 15px; 
    transition: all 0.3s ease;
}

.btn-outline-hero:hover {
    background-color: white;
    color: var(--primary-color); 
    border-color: white;
    transform: translateY(-2px); 
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* --- HERO STANDARD --- */
.hero {
    background: radial-gradient(circle at center, #0F2D4A 0%, #051525 100%);
    color: white;
    padding: 120px 20px 60px; 
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: white;
}

@media (max-width: 768px) {
    .hero { padding-top: 100px; }
    .hero h1 { font-size: 2.5rem; }
}

/* --- PAGE CONTACT --- */
.contact-info-box {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 20px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.contact-item .icon {
    font-size: 1.5rem;
    background-color: rgba(197, 160, 89, 0.1); 
    color: var(--accent-color);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.contact-item strong {
    display: block;
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 5px;
    font-family: var(--font-heading);
}

.contact-item p {
    color: #555;
    line-height: 1.4;
    margin: 0;
}

.contact-item a {
    color: var(--accent-color);
    font-weight: 500;
}

/* --- FAQ STYLE ACCORDÉON --- */
.category-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--primary-color);
    margin: 40px 0 20px;
    padding-left: 12px;
    border-left: 4px solid var(--accent-color); 
    font-weight: bold;
}

.faq-item {
    background: white;
    border-radius: 6px;
    margin-bottom: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    overflow: hidden; 
    border: 1px solid rgba(0,0,0,0.03);
}

.faq-question {
    width: 100%;
    text-align: left;
    background: white;
    border: none;
    padding: 18px 25px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
    font-family: var(--font-body);
}

.faq-question:hover {
    background-color: #f9fbfd; 
}

.faq-icon {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent-color);
    transition: transform 0.3s ease;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: white;
    padding: 0 25px;
}

.faq-answer p {
    padding-bottom: 20px;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg); 
}

/* --- ENCART BAS DE PAGE (BLEU) --- */
.faq-help-box {
    background-color: #eef4fa; 
    border: 1px solid #dbeafe;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    margin-top: 60px;
}

.faq-help-box h3 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 10px;
}

.faq-help-box p {
    color: #666;
    margin-bottom: 20px;
}

.btn-contact-mail {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.1rem;
    text-decoration: underline;
    text-decoration-color: var(--accent-color);
    text-underline-offset: 4px;
}
.btn-contact-mail:hover {
    color: var(--accent-color);
}

/* --- CORRECTIONS HEADER ET BOUTONS --- */
.nav-buttons-group a, 
.btn-login, 
.btn-primary-dark {
    white-space: nowrap !important; 
}

.header .container {
    max-width: 1350px; 
    padding: 0 30px;   
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 10px; 
    white-space: nowrap; 
}

/* =========================================
   EFFET HEADER QUI RÉTRÉCIT AU SCROLL
========================================= */

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #ffffff;
    transition: box-shadow 0.3s ease;
}

/* Transition pour l'image du logo */
.header .logo-wrapper img {
    transition: height 0.3s ease-in-out;
}

/* Quand on scrolle vers le bas */
.header.scrolled {
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

/* On force le logo à rétrécir (De 70px à 50px) */
.header.scrolled .logo-wrapper img {
    height: 50px !important; 
}

/* =========================================
   📱 OPTIMISATION EXTRÊME POUR TÉLÉPHONE
========================================= */
@media (max-width: 768px) {
    /* 1. On cache le numéro de téléphone pour libérer de la place */
    .nav-contact {
        display: none !important;
    }

    /* 2. Le logo de base devient plus petit */
    .header .logo-wrapper img {
        height: 50px !important;
    }

    /* 3. On rapproche les boutons et le menu pour que ce soit très compact */
    .header-responsive {
        gap: 10px !important;
    }
    .nav-center {
        gap: 8px !important;
        padding: 0 !important;
    }
    .nav-center a {
        font-size: 0.85rem !important;
        padding: 4px 6px !important;
    }
    .header-right-responsive {
        gap: 5px !important;
    }
    .btn-gold, .btn-primary-dark, .btn-login {
        padding: 6px 10px !important;
        font-size: 0.75rem !important;
    }

    /* 4. LE SECRET : QUAND ON DESCEND SUR LA PAGE (SCROLL) */
    /* On fait complètement disparaître le menu et les boutons pour ne laisser QUE le logo ! */
    .header.scrolled .nav-center,
    .header.scrolled .nav-right {
        max-height: 0 !important;
        opacity: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: none !important;
    }

    /* La barre devient minuscule (45px) et ne cache plus le texte du site */
    .header.scrolled .navbar-expanded {
        padding: 5px 15px !important;
        min-height: 45px !important;
    }
    .header.scrolled .logo-wrapper img {
        height: 35px !important;
    }

    /* 5. CORRECTION DU DÉCALAGE BLANC */
    /* Comme la barre est plus petite de base, on réduit l'espace blanc en haut des pages */
    body section.auth-section, 
    body section.dashboard-section {
        padding-top: 180px !important;
    }
    
    body section.hero,
    body section.hero-premium {
        padding-top: 160px !important;
    }
}

/* =========================================
   📱 RÉPARATION GLOBALE DES DÉBORDEMENTS MOBILE
========================================= */

/* 1. LA SOLUTION MIRACLE : Bloquer le défilement horizontal sur tout le site */
html, body {
    overflow-x: hidden;
    width: 100%;
}

@media (max-width: 768px) {
    /* 2. Réduire les énormes marges intérieures des sections et conteneurs */
    .section { 
        padding: 40px 0 !important; 
    }
    .container {
        padding: 0 15px !important;
    }
    
    /* 3. Ajustement des cartes (Intervenants / À propos) pour qu'elles rentrent dans l'écran */
    .card, .team-card {
        padding: 20px !important; /* On divise le padding par deux */
    }
    .team-avatar {
        width: 80px !important; /* Photos plus petites */
        height: 80px !important;
    }
    .team-card h3 {
        font-size: 1.15rem !important;
    }
    .team-card p, .role {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
    }
    
    /* Forcer toutes les grilles (grid-2, grid-3) à s'empiler proprement sur 1 colonne */
    .grid-2, .grid-3 {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* =========================================
       📚 OPTIMISATION SPÉCIALE PAGE PROGRAMME
    ========================================= */
    .program-grid {
        grid-template-columns: 1fr 1fr !important; /* On force 2 carrés par ligne ! */
        gap: 10px !important; /* On colle un peu plus les carrés */
        margin-top: 25px !important;
    }
    
    /* Réduction drastique de la taille des éléments pour que ça loge */
    .program-item {
        padding: 12px !important;
        border-radius: 6px !important;
    }
    .module-number {
        font-size: 1.2rem !important; /* Le numéro 01, 02 en fond plus petit */
        top: 5px !important;
        right: 8px !important;
    }
    .program-item h3 {
        font-size: 0.85rem !important; /* Titre réduit */
        margin-bottom: 8px !important;
        margin-top: 5px !important;
        padding-right: 0 !important;
        line-height: 1.2 !important;
    }
    .program-item ul li {
        font-size: 0.70rem !important; /* Texte des puces tout petit mais lisible */
        margin-bottom: 4px !important;
        padding-left: 10px !important;
        line-height: 1.2 !important;
    }
    .program-item ul li::before {
        font-size: 0.70rem !important;
    }

    /* =========================================
       ✉️ PAGE CONTACT ET FAQ
    ========================================= */
    .contact-info-box {
        gap: 15px !important;
    }
    .faq-question {
        font-size: 0.9rem !important;
        padding: 15px !important;
    }
    .faq-answer p {
        font-size: 0.85rem !important;
    }
    .faq-help-box {
        padding: 25px 15px !important;
    }
}