@font-face {
    font-family: 'Inter';
    src: url('/assets/fonts/Inter-Variable.woff2') format('woff2');
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/assets/fonts/Inter-Variable.woff2') format('woff2');
    font-style: normal;
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/assets/fonts/Inter-Variable.woff2') format('woff2');
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/assets/fonts/Inter-Variable.woff2') format('woff2');
    font-style: normal;
    font-weight: 800;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/assets/fonts/Inter-Variable.woff2') format('woff2');
    font-style: normal;
    font-weight: 900;
    font-display: swap;
}

@font-face {
    font-family: 'Playfair Display';
    src: url('/assets/fonts/PlayfairDisplay-Variable.woff2') format('woff2');
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: 'Playfair Display';
    src: url('/assets/fonts/PlayfairDisplay-Variable.woff2') format('woff2');
    font-style: normal;
    font-weight: 900;
    font-display: swap;
}

:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-serif: 'Playfair Display', serif;
    --font-display: 'Playfair Display', serif;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: var(--font-sans);
    background: #f8fafc;
    color: #111827;
}

/* Utilitaires de fallback si Tailwind n'est pas appliqué sur certains blocs */
.font-serif { font-family: var(--font-serif); }
.font-display { font-family: var(--font-display); }
.font-sans { font-family: var(--font-sans); }
.container { width: min(1120px, 92%); margin: 0 auto; }
.site-header { background: #fff; border-bottom: 1px solid #e5e7eb; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 0; }
.brand { text-decoration: none; color: #0f766e; font-weight: 700; }
.main-nav { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.nav-link, .lang-link { text-decoration: none; color: #374151; padding: 0.35rem 0.55rem; border-radius: 7px; }
.nav-link.is-active, .lang-link.is-active, .nav-link:hover, .lang-link:hover { background: #dcfce7; color: #065f46; }
main.container { padding: 1.5rem 0; }
.page-block {
    width: min(1120px, 92%);
    margin: 8rem auto 2rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem;
}
.button { display: inline-block; margin-top: 0.6rem; background: #0f766e; color: #fff; text-decoration: none; padding: 0.5rem 0.8rem; border-radius: 8px; }
.site-footer { margin-top: 2rem; background: #0f172a; color: #e2e8f0; }
.footer-inner { padding: 1rem 0; font-size: 0.95rem; }
@media (max-width: 920px) { .header-inner { flex-direction: column; align-items: flex-start; } }
/* Styles spécifiques pour le Header */
.glass-nav {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* Transitions fluides pour le logo et le texte */
#navbar, #nav-logo, #nav-menu, #nav-cta {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#navbar-shell,
#nav-lang,
#mobile-menu-btn,
.nav-menu-state {
    transition:
        background-color 0.45s ease,
        border-color 0.45s ease,
        box-shadow 0.45s ease,
        color 0.45s ease,
        transform 0.45s ease,
        padding 0.45s ease;
}

.nav-shell-top {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: none;
}

.nav-shell-scrolled {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: none;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

.nav-menu-top {
    background: transparent;
    border-color: transparent;
    color: #00335a;
    box-shadow: none;
}

.nav-menu-scrolled {
    background: transparent;
    border-color: transparent;
    color: #00335a;
    box-shadow: none;
}

.nav-lang-top {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.nav-lang-scrolled {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #475569;
}

.nav-mobile-toggle-top {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 10px 24px rgba(0, 12, 28, 0.12);
}

.nav-mobile-toggle-scrolled {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #00335a;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.mobile-menu-panel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition:
        max-height 0.35s ease,
        opacity 0.25s ease,
        transform 0.25s ease;
}

.mobile-menu-panel.is-open {
    max-height: 80vh;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* Animation d'entrée pour le contenu du Hero */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 1.2s ease-out forwards;
}

/* Système de révélation au scroll (utilisé par le JS) */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.reveal-delay-4 { transition-delay: 0.04s; }
.reveal-delay-5 { transition-delay: 0.05s; }
.reveal-delay-8 { transition-delay: 0.08s; }
.reveal-delay-10 { transition-delay: 0.1s; }
.reveal-delay-12 { transition-delay: 0.12s; }
.reveal-delay-15 { transition-delay: 0.15s; }
.reveal-delay-16 { transition-delay: 0.16s; }
.reveal-delay-20 { transition-delay: 0.2s; }
.reveal-delay-24 { transition-delay: 0.24s; }
.reveal-delay-30 { transition-delay: 0.3s; }
.reveal-delay-40 { transition-delay: 0.4s; }
.reveal-delay-25 { transition-delay: 0.25s; }
.reveal-delay-35 { transition-delay: 0.35s; }
.reveal-delay-45 { transition-delay: 0.45s; }
.reveal-delay-50 { transition-delay: 0.5s; }

.campus-accent-teal { background: #00A99D; }
.campus-accent-blue { background: #0054A6; }

/* Page pédagogie */
.cycle-content {
    display: none;
}

.cycle-content.active {
    display: block;
    animation: fadeIn 0.6s ease-out forwards;
}

/* Base responsive hardening */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img,
video,
iframe {
    max-width: 100%;
    height: auto;
}

/* Rich article content safety */
.article-content {
    overflow-wrap: anywhere;
    word-break: normal;
}

.article-content table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

.article-content pre,
.article-content code {
    white-space: pre-wrap;
    word-break: break-word;
}

/* Tablets */
@media (max-width: 1024px) {
    #navbar {
        padding-left: 0.65rem;
        padding-right: 0.65rem;
        padding-top: 0.65rem;
    }

    #navbar-shell {
        padding: 0.75rem 0.95rem;
        border-radius: 1.25rem;
    }

    #mobile-menu .mt-4 {
        margin-top: 0.6rem;
    }

    #hero-slider {
        min-height: 86svh;
    }

    #hero-slider h1,
    #hero-slider h2 {
        max-width: 18ch;
    }

    .home-news-slide {
        min-height: auto !important;
        border-radius: 2rem;
    }

    .home-news-slide .w-\[560px\] {
        width: 100%;
        height: 320px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    main.container {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    #navbar {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        padding-top: 0.5rem;
    }

    #navbar-shell {
        padding: 0.65rem 0.8rem;
        border-radius: 1rem;
    }

    #nav-logo {
        height: 2.9rem;
    }

    #hero-slider {
        min-height: 92svh;
    }

    #hero-slider .max-w-7xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    #hero-slider .absolute.bottom-8 {
        bottom: 1rem;
    }

    #hero-slider .absolute.bottom-8 .max-w-7xl {
        gap: 0.75rem;
        flex-wrap: wrap;
    }

    .home-news-slide {
        border-radius: 1.25rem;
    }

    .home-news-slide .w-\[560px\] {
        height: 240px;
    }

    .home-news-slide .p-8,
    .home-news-slide .md\:p-12,
    .home-news-slide .lg\:p-16 {
        padding: 1.25rem !important;
    }

    .home-news-slide h3 {
        font-size: 1.6rem !important;
        line-height: 1.2 !important;
    }

    .home-news-slide p {
        font-size: 1rem !important;
    }

    .mobile-menu-panel.is-open {
        max-height: calc(100svh - 110px);
        overflow-y: auto;
    }
}

/* Very small devices */
@media (max-width: 480px) {
    #navbar-shell {
        border-radius: 0.9rem;
        padding: 0.55rem 0.7rem;
    }

    #mobile-menu-btn {
        height: 2.5rem;
        width: 2.5rem;
    }

    #hero-slider h1,
    #hero-slider h2 {
        font-size: clamp(1.75rem, 7vw, 2.2rem) !important;
        line-height: 1.1 !important;
    }

    #hero-slider p {
        font-size: 0.95rem !important;
        line-height: 1.65 !important;
    }

    #hero-slider a {
        width: 100%;
        justify-content: center;
        text-align: center;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Floating WhatsApp chooser */
.whatsapp-float {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 140;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.65rem;
}

.whatsapp-float-btn {
    border: 0;
    border-radius: 999px;
    background: #25D366;
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.8rem;
    height: 3.8rem;
    padding: 0;
    box-shadow: 0 16px 34px rgba(37, 211, 102, 0.32);
    cursor: pointer;
}

.whatsapp-float-icon {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.whatsapp-float-panel {
    width: min(280px, calc(100vw - 2rem));
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.14);
    padding: 0.8rem;
    display: none;
}

.whatsapp-float.is-open .whatsapp-float-panel {
    display: block;
}

.whatsapp-float-title {
    margin: 0 0 0.5rem;
    color: #0f172a;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.whatsapp-float-link {
    display: block;
    text-decoration: none;
    color: #00335a;
    font-weight: 700;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.8rem;
    padding: 0.7rem 0.75rem;
}

.whatsapp-float-link + .whatsapp-float-link {
    margin-top: 0.45rem;
}

.whatsapp-float-link:hover {
    background: #eef6ff;
    border-color: #cbd5e1;
}

@media (max-width: 640px) {
    .whatsapp-float {
        right: 0.75rem;
        bottom: 0.75rem;
    }

    .whatsapp-float-btn {
        width: 3.4rem;
        height: 3.4rem;
    }
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade-in { animation: fadeIn 1.2s ease-out forwards; }
.reveal { opacity: 0; transform: translateY(30px); transition: all 1s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }
.glass-nav { background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.2); box-shadow: 0 8px 32px rgba(0,0,0,0.08); }
@keyframes progressAnimation { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.animate-progress { animation: progressAnimation 5s linear forwards; }
[dir="rtl"] [data-why-progress] { transform-origin: right; }
[dir="ltr"] [data-why-progress] { transform-origin: left; }
@keyframes kenBurns { from { transform: scale(1); } to { transform: scale(1.15); } }
.animate-ken-burns { animation: kenBurns 10s linear infinite alternate; }
@keyframes rjFloat { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-10px) rotate(-2deg); } }
.animate-float { animation: rjFloat 6s ease-in-out infinite; }
.rosa-card { transition: all 0.8s ease; position: relative; }
.rosa-card:hover { transform: translateY(-8px); z-index: 10; box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08); background: #fafafa; }
@media (max-width: 640px) { .hero-overlay { background: linear-gradient(180deg, rgba(0,51,90,0.92), rgba(0,51,90,0.60) 55%, rgba(0,169,157,0.30)) !important; } }

/* Schools facilities strip */
.facility-card {
    transition: flex-grow 420ms ease, transform 420ms ease, filter 320ms ease;
}

.facility-strip:hover .facility-card {
    flex-grow: 0.9;
    filter: saturate(0.75);
}

.facility-strip:hover .facility-card:hover {
    flex-grow: 2.8;
    filter: saturate(1);
}

.facility-strip.has-active .facility-card {
    flex-grow: 0.9;
    filter: saturate(0.75);
}

.facility-strip.has-active .facility-card.is-active {
    flex-grow: 2.8;
    filter: saturate(1);
}

@media (max-width: 767px) {
    .facility-strip {
        height: 360px;
    }

    .facility-strip .facility-card {
        min-width: 58vw;
    }
}
