:root {
    --primary-color: #0A2A43;
    /* Deep Navy Blue */
    --secondary-color: #d19f2a;
    /* Nouveau Doré Principal */
    --secondary-color-hover: #b88a20;
    --bg-light: #F8F9FA;
    --bg-white: #FFFFFF;
    --text-dark: #2C3E50;
    --text-muted: #6c757d;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/*--------------------------------------------------------------
# General
--------------------------------------------------------------*/
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-dark);
    /* Lighter background for the "outside" */
    background-color: #e9ecef;
    padding-top: 0;
    /* Handled by site-wrapper padding or Spacer */
    line-height: 1.6;
}

/* Global Wrapper for "Relief/Frame" effect */
.site-wrapper {
    max-width: 1440px;
    margin: 0 auto;
    background-color: var(--bg-white);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.08), 0 0 10px rgba(0, 0, 0, 0.05);
    /* Soft depth */
    min-height: 100vh;
    position: relative;
    border-left: 1px solid rgba(0, 0, 0, 0.03);
    border-right: 1px solid rgba(0, 0, 0, 0.03);
    border-left: 1px solid rgba(0, 0, 0, 0.03);
    border-right: 1px solid rgba(0, 0, 0, 0.03);
    padding-top: 0;
    /* Sticky navbar takes space in flow */
    overflow-x: hidden;
    /* Prevent horizontal scroll */
}

/* Navbar Visuals */
.navbar {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', sans-serif;
    color: var(--primary-color);
    font-weight: 700;
}

/*--------------------------------------------------------------
# Navigation Menu
--------------------------------------------------------------*/
.navbar {
    background-color: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
}

.navbar-brand img {
    max-height: 60px;
    /* Optimized for sticky header */
    width: auto;
}

.nav-link {
    font-weight: 600;
    color: var(--primary-color) !important;
    margin-left: 10px;
    font-size: 0.95rem;
    position: relative;
}


.nav-link::before {
    content: '';
    position: absolute;
    width: 100%;
    /* Fixed width, always visible */
    height: 3px;
    /* Slightly thicker for visibility */
    bottom: 0;
    left: 0;
    background-color: var(--secondary-color);
    transition: all 0.3s ease;
}

.navbar-nav .nav-item:nth-child(1) .nav-link::before {
    background-color: #d19f2a;
    /* Doré (Accueil) */
}

.navbar-nav .nav-item:nth-child(2) .nav-link::before {
    background-color: #016960;
    /* Vert canard (L'École) */
}

.navbar-nav .nav-item:nth-child(3) .nav-link::before {
    background-color: #78242f;
    /* Bordeaux (Performances) */
}

.navbar-nav .nav-item:nth-child(4) .nav-link::before {
    background-color: #045b91;
    /* Nouveau Bleu (Établissements) */
}

.navbar-nav .nav-item:nth-child(5) .nav-link::before {
    background-color: #d19f2a;
    /* Doré (Actualités) */
}

.navbar-nav .nav-item:nth-child(6) .nav-link::before {
    background-color: #016960;
    /* Vert canard (Galerie) */
}

.navbar-nav .nav-item:nth-child(7) .nav-link::before {
    background-color: #78242f;
    /* Bordeaux (Contact) */
}


/* Hide dropdown arrow by default */
.dropdown-toggle::after {
    opacity: 0;
    margin-left: 0.5em;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
    transition: opacity 0.3s ease;
}

/* Show dropdown arrow on hover */
.nav-item.dropdown:hover .dropdown-toggle::after {
    opacity: 1;
}

.btn-primary,
.btn-premium {
    background: linear-gradient(135deg, #9b2e3c 0%, #78242f 100%);
    border: none;
    color: white !important;
    font-weight: 600;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    /* Pill shape */
    box-shadow: 0 4px 15px rgba(120, 36, 47, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary:hover,
.btn-premium:hover {
    background: linear-gradient(135deg, #78242f 0%, #9b2e3c 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(120, 36, 47, 0.4);
}

.btn-outline-light {
    border: 2px solid white;
    border-radius: 50px;
    padding: 0.8rem 2rem;
    font-weight: 600;
}

.btn-outline-light:hover {
    background-color: white;
    color: var(--primary-color);
}

/*--------------------------------------------------------------
# Hero Section (Swiper)
--------------------------------------------------------------*/
/*--------------------------------------------------------------
# Hero Section (Swiper)
--------------------------------------------------------------*/
.hero-section {
    position: relative;
    overflow: hidden;
    background-color: var(--primary-color);
    /* Fallback */
}

.hero-swiper {
    width: 100%;
    height: auto;
    /* Removed fixed height constraints to let image define ratio */
    min-height: unset;
    max-height: unset;
}

.swiper-slide {
    position: relative;
    overflow: hidden;
    display: block;
    /* Changed from flex to block to stack image */
    height: auto;
}

/* New Class for Image-based Slide */
.slide-img-fit {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    /* Ensures full image is seen */
}

/* Background fallback if needed, but we are moving to <img> */
.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    display: none;
    /* Hide old background div if still present during transition */
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradient overlay for readability */
    background: linear-gradient(135deg, rgba(10, 42, 67, 0.4) 0%, rgba(10, 42, 67, 0.1) 100%);
    z-index: 2;
    pointer-events: none;
    /* Let clicks pass through if needed */
}

/* Wrapper to center content absolutely over the image */
.slide-content-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.slide-content {
    color: white;
    text-align: center;
    padding: 0 30px;
    width: 100%;
    /* Full width to allow long titles with large font */
}

/* Custom Navigation Buttons */
.swiper-button-next,
.swiper-button-prev {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    background-color: rgba(0, 0, 0, 0.2);
    /* Slightly darker for visibility on light images */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 1.2rem;
    font-weight: bold;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: scale(1.1);
}

.swiper-pagination-bullet {
    background: white;
    opacity: 0.5;
    width: 10px;
    height: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--secondary-color);
    width: 30px;
    border-radius: 5px;
}

/* Hero Typography */
.hero-subtitle {
    font-family: 'Open Sans', sans-serif;
    font-size: var(--subtitle-size, 1.1rem);
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--secondary-color);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
}

.hero-title {
    font-size: var(--title-size, 3.5rem);
    /* Slightly smaller to fit better in variable heights */
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.2rem;
    color: white;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.7);
    white-space: nowrap;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: calc(var(--title-size, 3.5rem) * 0.35) !important;
        white-space: normal !important;
    }

    .hero-subtitle {
        font-size: calc(var(--subtitle-size, 1.1rem) * 0.5) !important;
        letter-spacing: 2px;
    }

    .lead.shadow-text {
        font-size: calc(var(--desc-size, 1.3rem) * 0.6) !important;
    }

    .slide-content {
        padding-top: 35px;
    }
}

/*--------------------------------------------------------------
# Section Styling
--------------------------------------------------------------*/
.section-padding {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.section-title p {
    color: var(--secondary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.section-title-line {
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 0 auto;
}

/*--------------------------------------------------------------
# Cards
--------------------------------------------------------------*/
.feature-card {
    padding: 40px 30px;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-bottom-color: var(--secondary-color);
}

.feature-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.feature-title {
    font-size: 1.25rem;
    margin-bottom: 15px;
}

.news-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.news-card img {
    height: 220px;
    object-fit: cover;
}

.news-badge {
    background-color: var(--secondary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

/*--------------------------------------------------------------
# Stats Section
--------------------------------------------------------------*/
.stats-section {
    background-color: var(--primary-color);
    color: white;
    padding: 60px 0;
}

.stat-item h3 {
    color: var(--secondary-color);
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0;
}

.stat-item p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/*--------------------------------------------------------------
# Call to Action
--------------------------------------------------------------*/
.cta-section {
    background: linear-gradient(135deg, #0a2b45 0%, #174466 100%);
    color: white;
    text-align: center;
    border-radius: 20px;
    margin-left: 40px;
    margin-right: 40px;
    box-shadow: 0 15px 40px rgba(10, 43, 69, 0.35);
}

@media (max-width: 768px) {
    .cta-section {
        margin-left: 15px;
        margin-right: 15px;
        border-radius: 14px;
    }
}

.cta-btn {
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.cta-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.5);
    filter: brightness(1.1);
}

/*--------------------------------------------------------------
# Animations
--------------------------------------------------------------*/
.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Feature Card Vivid Style */
.feature-card-vivid {
    background: linear-gradient(135deg, #d19f2a 0%, #a67c21 100%);
    /* Vivid Gold Gradient */
    border: none;
    box-shadow: 0 10px 30px rgba(209, 159, 42, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card-vivid:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(209, 159, 42, 0.6);
}

/* Cycle Cards Colors */
.feature-card-orange {
    background: linear-gradient(135deg, #e3b04c 0%, #d19f2a 100%);
    border: none;
    box-shadow: 0 10px 30px rgba(209, 159, 42, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card-orange:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(209, 159, 42, 0.6);
}

.feature-card-pistache {
    background: linear-gradient(135deg, #018a7d 0%, #016960 100%);
    /* Teal/Vert canard */
    border: none;
    box-shadow: 0 10px 30px rgba(1, 105, 96, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card-pistache:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(1, 105, 96, 0.6);
}

.feature-card-mauve {
    background: linear-gradient(135deg, #9b2e3c 0%, #78242f 100%);
    border: none;
    box-shadow: 0 10px 30px rgba(120, 36, 47, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card-mauve:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(120, 36, 47, 0.6);
}

.feature-card-blue-roi {
    background: linear-gradient(135deg, #0570b6 0%, #045b91 100%);
    /* Nouveau Bleu */
    border: none;
    box-shadow: 0 10px 30px rgba(4, 91, 145, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card-blue-roi:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(4, 91, 145, 0.6);
}

/* Common Text for Colored Cards */
.feature-card-colored h3,
.feature-card-colored p,
.feature-card-colored i {
    color: white !important;
}

.feature-card-colored .opacity-90 {
    opacity: 0.9;
}