/* --- Variables et Reset --- */
:root {
    --color-green: #34d399;
    --color-dark-blue: #1e3a8a;
    --color-white: #ffffff;
    --font-primary: 'Poppins', sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-primary); }
.header-container, .cards-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* --- En-tête --- */
.site-header { position: relative; z-index: 100; }
.top-bar-green, .top-bar-blue, .main-nav { padding: 0.5rem 5%; }

/* Barre verte */
.top-bar-green { background: var(--color-green); color: var(--color-dark-blue); }
.top-bar-green .header-container { justify-content: flex-start; }
.social-follow { display: flex; align-items: center; gap: 1rem; font-weight: 500; }
.social-follow a { color: var(--color-dark-blue); font-size: 1.1rem; }

/* Barre bleue */
.top-bar-blue { background: var(--color-dark-blue); color: var(--color-white); }
.top-bar-blue .header-container { justify-content: flex-end; }
.contact-info { display: flex; gap: 2rem; }
.contact-item { display: flex; align-items: center; gap: 1rem; }
.contact-item i { font-size: 1.8rem; color: var(--color-green); }
.contact-item span { font-size: 0.8rem; font-weight: 500; }
.contact-item p { font-size: 1rem; font-weight: 600; }

/* Navigation principale */
.main-nav { background: #fff; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.main-nav .header-container { display: flex; justify-content: space-between; align-items: center; }
.logo img { height: 50px; }
.nav-links { list-style: none; display: flex; gap: 2rem; }
.nav-links a {
    text-decoration: none;
    color: var(--color-dark-blue);
    font-weight: 600;
    transition: color 0.3s ease;
}
.nav-links a.active, .nav-links a:hover { color: var(--color-green); }
.nav-actions { display: flex; align-items: center; gap: 1rem; }
.search-btn { background: none; border: none; font-size: 1.2rem; cursor: pointer; }
.btn {
    padding: 0.8rem 1.8rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: opacity 0.3s ease;
}
.btn-green { background-color: var(--color-green); color: #fff; }

/* --- Section Hero --- */
.hero-section {
    min-height: 80vh;
    background: url('assets/3W3A6391.jpeg') no-repeat center center/cover;
    position: relative;
    display: flex;
    align-items: center;
    color: var(--color-white);
    padding: 0 8%;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    
}
.hero-content { position: relative; max-width: 700px; }
.tagline {
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
    border-bottom: 2px solid var(--color-green);
    padding-bottom: 0.3rem;
    margin-bottom: 1rem;
}
.hero-content h1 { font-size: 3.8rem; font-weight: 800; line-height: 1.2; margin-bottom: 2rem; }
.hero-buttons { display: flex; gap: 1rem; }
.btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.slider-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 50px; height: 50px; background: rgba(255,255,255,0.8);
    border: none; border-radius: 50%;
    font-size: 1.8rem; color: var(--color-dark-blue); cursor: pointer;
}
.prev { left: 3%; }
.next { right: 3%; }

/* --- Bannière de cartes --- */
.cards-banner {
    padding: 0 5%;
    margin-top: -80px; /* **IMPORTANT : pour la superposition** */
    position: relative;
    z-index: 20;
}
.cards-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.info-card {
    padding: 2rem;
    border-radius: 8px;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.info-card i { font-size: 3rem; margin-bottom: 1rem; }
.info-card h4 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.info-card p { opacity: 0.9; margin-bottom: 1.5rem; }
.info-card a { color: #fff; text-decoration: none; font-weight: 600; }
.green-card { background-color: var(--color-green); }
.blue-card { background-color: var(--color-dark-blue); }

/* --- RESPONSIVITÉ --- */
.hamburger-menu { display: none; }

@media (max-width: 1200px) {
    .contact-info { display: none; }
    .nav-links, .nav-actions { display: none; }
    .hamburger-menu {
        display: block; background: none; border: none; font-size: 1.8rem; cursor: pointer; color: var(--color-dark-blue);
    }
    .main-nav .header-container { justify-content: space-between; }

    .nav-links.active, .nav-actions.active {
        display: flex; flex-direction: column;
        position: absolute; top: 100%; left: 0;
        width: 100%; background-color: var(--color-white);
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
    .main-nav .nav-links.active { top: 100%; padding: 1rem 0; gap: 0; }
    .nav-links.active ul { flex-direction: column; width: 100%;}
    .nav-links.active li { padding: 1rem; border-bottom: 1px solid #f0f0f0; text-align: center; }
    .nav-actions.active { top: calc(100% + 6 * 57px); padding: 1rem; }
}

@media (max-width: 992px) {
    .hero-content h1 { font-size: 3rem; }
    .cards-container { grid-template-columns: 1fr; }
    .cards-banner { margin-top: -150px; }
}

@media (max-width: 768px) {
    .top-bar-green, .top-bar-blue { display: none; }
    .hero-content h1 { font-size: 2.2rem; }
    .hero-buttons { flex-direction: column; }
    .cards-banner { margin-top: 2rem; position: static; } /* Annule la superposition */
}

/* --- Section Filières Professionnelles --- */
.filiere-pro-section {
    padding: 70px 5%;
    background-color: #fff;
    position: relative; /* Pour le bouton "retour en haut" */
}

.filiere-pro-container {
    max-width: 100px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}
.section-tagline {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-green);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}
.section-header h2 {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--color-dark-blue);
}

.filiere-pro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.filiere-pro-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
}
.filiere-pro-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.light-blue-bg {
    background-color: #f0f7ff; /* Bleu très clair pour la deuxième carte */
}

.card-image {
    position: relative;
    line-height: 0;
}
.card-image img {
    width: 100%;
    height: auto;
}
.level-tag {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background-color: var(--color-green);
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.card-content {
    padding: 2rem;
}
.card-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-dark-blue);
    margin-bottom: 1rem;
    line-height: 1.4;
}
.card-content p {
    color: #555;
    margin-bottom: 2rem;
    line-height: 1.6;
}
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.read-more {
    text-decoration: none;
    color: var(--color-green);
    font-weight: 600;
}
.card-icon {
    font-size: 1.8rem;
    color: #ffcccc; /* Rose très pâle, comme sur l'image */
}

/* Bouton "Retour en haut" */
.back-to-top-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: var(--color-green);
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 1.2rem;
    box-shadow: 0 5px 15px rgba(52, 211, 153, 0.4);
    transition: transform 0.3s ease;
    z-index: 100;
}
.back-to-top-button:hover {
    transform: translateY(-5px);
}

/* --- RESPONSIVITÉ --- */
@media (max-width: 992px) {
    .filiere-pro-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 768px) {
    .filiere-pro-section {
        padding: 60px 5%;
    }
    .section-header h2 {
        font-size: 2.2rem;
    }
}

/* --- Section Filières Professionnelles --- */
.filiere-pro-section {
    padding: 100px 5%;
    background-color: #fff;
    position: relative; /* Indispensable pour l'image de fond */
    overflow: hidden; /* Empêche l'image de déborder */
}

/* NOUVEAU : Image de fond en filigrane */
.filiere-pro-section::before {
    content: '';
    position: absolute;
    bottom: -10%; /* Positionnement en bas à gauche */
    left: -15%;
    width: 40%; /* Taille de l'image */
    height: 80%;
    background-image: url('assets/building-watermark.svg'); /* Votre image SVG */
    background-repeat: no-repeat;
    background-size: contain;
    background-position: left bottom;
    opacity: 0.05; /* Très transparent pour l'effet filigrane */
    z-index: 1; /* Derrière le contenu */
}

.filiere-pro-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative; /* Pour que le contenu soit au-dessus du filigrane */
    z-index: 2;
}

/* ... reste du CSS de la section (inchangé) ... */

.filiere-pro-grid {
    display: grid;
    /* Mise à jour pour mieux gérer 4 cartes */
    grid-template-columns: repeat(2, 1fr); /* Toujours 2 colonnes sur desktop */
    gap: 2rem;
}

/* --- RESPONSIVITÉ --- */
@media (max-width: 992px) {
    .filiere-pro-grid {
        grid-template-columns: 1fr;
    }
    .filiere-pro-section::before {
        /* On cache ou réduit fortement l'image de fond sur mobile */
        opacity: 0.02;
        width: 60%;
        left: -25%;
    }
}

/* --- Section Grille de Tarifs --- */
.tarifs-section {
    padding: 100px 5%;
    background-color: #fff;
    position: relative;
    overflow: hidden;
}
/* Réutilisation de l'image de fond en filigrane */
.tarifs-section::before {
    content: '';
    position: absolute;
    top: 50%;
    right: -15%;
    transform: translateY(-50%);
    width: 40%;
    height: 80%;
    background-image: url('assets/building-watermark.svg');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: right center;
    opacity: 0.05;
    z-index: 1;
}
.tarifs-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* Réutilisation du .section-header */
.highlight-fee {
    display: inline-block;
    background-color: #eafaf1; /* Vert très pâle */
    color: var(--color-green);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    margin-top: 1.5rem;
    font-weight: 500;
}
.highlight-fee strong {
    font-weight: 700;
}

.tarifs-tables-wrapper {
    margin-top: 2rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden; /* Pour que les coins arrondis s'appliquent aux enfants */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.tarif-table {
    width: 100%;
}
.tarif-table:not(:last-child) {
    border-bottom: 2px solid #fff; /* Sépare les tableaux */
}

.tarif-header {
    background-color: var(--color-dark-blue);
    color: #fff;
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.tarif-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa; /* Gris très clair */
    border-top: 1px solid #e9ecef;
}
/* Alternance de couleur pour les lignes */
.tarif-row:nth-child(odd) {
    background-color: #fff;
}
.tarif-row span {
    padding: 1rem 1.5rem;
    color: #333;
}
.tarif-row span:last-child {
    font-weight: 600;
    color: var(--color-dark-blue);
    border-left: 1px solid #e9ecef;
}


/* --- RESPONSIVITÉ pour la grille de tarifs --- */
@media (max-width: 768px) {
    .tarifs-section {
        padding: 60px 5%;
    }
    .tarif-row {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem 1.5rem;
        gap: 0.5rem;
    }
    .tarif-row span:last-child {
        border-left: none;
        padding: 0;
        font-size: 1.2rem;
    }
    .tarifs-section::before {
        display: none; /* Cache le filigrane sur mobile pour la lisibilité */
    }
}

/* --- Section Calendrier d'Inscription --- */
.calendar-section {
    padding: 100px 5%;
    background-color: #fff;
    position: relative;
    overflow: hidden; /* Empêche les filigranes de déborder */
}
/* Images décoratives en filigrane */
.calendar-section::before,
.calendar-section::after {
    content: '';
    position: absolute;
    width: 250px;
    height: 250px;
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.07;
    z-index: 1;
}
.calendar-section::before {
    background-image: url('assets/building-watermark.svg'); /* Mettez le chemin de votre icône */
    left: -50px;
    bottom: 50px;
}
.calendar-section::after {
    background-image: url('assets/book-watermark.svg'); /* Mettez le chemin de votre icône */
    right: -50px;
    top: 200px;
}

.calendar-container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}
/* On peut réutiliser le .section-header */
.section-subtitle {
    color: #777;
    margin-top: 0.5rem;
}

.wave-block {
    margin-top: 3rem;
}
.wave-title {
    text-align: center;
    margin-bottom: 1.5rem;
}
.wave-title a {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-green);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
}
.wave-title p {
    color: #555;
    margin-top: 0.5rem;
}

.calendar-table {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* Dates | Niveaux (plus large) */
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.calendar-header-cell, .calendar-data-cell {
    padding: 1rem 1.5rem;
}

.calendar-header-cell {
    background-color: var(--color-dark-blue);
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
}

.calendar-data-cell {
    background-color: #fff;
    border-top: 1px solid #dee2e6;
    color: #333;
}
/* Ligne verticale de séparation */
.calendar-header-cell:first-child,
.calendar-data-cell:nth-child(2n+3) { /* Cible la 1ère cellule de chaque ligne de données */
    border-right: 1px solid #dee2e6;
}
/* Alternance de couleur pour les lignes */
.calendar-data-cell:nth-child(4n+5),
.calendar-data-cell:nth-child(4n+6) {
    background-color: #f8f9fa; /* Gris très clair */
}


/* --- RESPONSIVITÉ pour le Calendrier --- */
@media (max-width: 768px) {
    .calendar-section {
        padding: 60px 5%;
    }
    .calendar-table {
        display: block; /* On annule la grille */
        border: none;
        border-radius: 0;
    }
    .calendar-header-cell {
        display: none; /* On cache les en-têtes de colonnes */
    }
    .calendar-data-cell {
        display: grid;
        grid-template-columns: 100px 1fr; /* Label | Valeur */
        gap: 1rem;
        border: none;
        padding: 1rem;
        text-align: right;
        border-bottom: 1px solid #eee;
    }
    .calendar-data-cell::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--color-dark-blue);
        text-align: left;
    }
    /* Regrouper visuellement chaque "ligne" en une carte */
    .calendar-data-cell:nth-child(2n+3) {
        border-top: 3px solid var(--color-green);
        margin-top: 1.5rem;
        border-right: none;
    }
    .calendar-data-cell:nth-child(2n+4) {
        border-top: none;
    }
    .calendar-section::before, .calendar-section::after {
        display: none; /* Cache les filigranes pour plus de clarté */
    }
}

/* --- Footer ECMAC --- */
.site-footer-ecmac {
    color: #fff;
}

/* Contenu principal du footer */
.footer-main {
    background-color: var(--color-dark-blue); /* Le bleu-violet de votre thème */
    padding: 80px 5%;
}
.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    /* 4 colonnes, la 1ère et la 4ème sont un peu plus larges */
    grid-template-columns: 1.2fr 1fr 1.2fr 1.2fr;
    gap: 3rem;
}

.footer-column h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 0.8rem;
}
/* Soulignement vert sous les titres */
.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--color-green);
}
.footer-column p {
    color: #ccc;
    line-height: 1.7;
}

.footer-socials { display: flex; gap: 1rem; margin-top: 1.5rem; }
.footer-socials a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.3s ease;
}
.footer-socials a:hover { background-color: var(--color-green); }

.footer-list { list-style: none; padding: 0; }
.footer-list li { margin-bottom: 1rem; }
.footer-list a { color: #ccc; text-decoration: none; transition: color 0.3s ease; }
.footer-list a:hover { color: var(--color-green); }

/* Style pour les actualités */
.news-list { list-style: none; padding: 0; }
.news-list li:not(:last-child) { margin-bottom: 1.5rem; }
.news-list a {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}
.news-list img { width: 70px; height: 70px; border-radius: 8px; object-fit: cover; }
.news-text p { color: #fff; font-weight: 600; line-height: 1.4; margin-bottom: 0.3rem; }
.news-text span { font-size: 0.8rem; color: var(--color-green); }

/* Style pour la liste de contact */
.contact-list { list-style: none; padding: 0; }
.contact-list li { display: flex; align-items: flex-start; gap: 1.2rem; margin-bottom: 1.5rem; }
.contact-list i {
    font-size: 1.2rem;
    color: #fff;
    background-color: var(--color-green);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}
.contact-list p { line-height: 1.5; color: #ccc; }

/* Barre de copyright */
.footer-bottom {
    background-color: var(--color-green);
    padding: 1.5rem 5%;
}
.footer-bottom-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-logo { height: 40px; }
.footer-bottom p { color: var(--color-dark-blue); font-weight: 500; }
.back-to-top-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px; height: 40px;
    background-color: rgba(30, 58, 138, 0.2);
    border-radius: 50%;
    color: var(--color-dark-blue);
    text-decoration: none;
    font-size: 1.5rem;
    transition: background-color 0.3s ease;
}
.back-to-top-icon:hover { background-color: rgba(30, 58, 138, 0.4); }

/* --- RESPONSIVITÉ --- */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 colonnes sur tablette */
    }
}
@media (max-width: 768px) {
    .footer-main { padding-top: 60px; }
    .footer-grid {
        grid-template-columns: 1fr; /* 1 colonne sur mobile */
        text-align: center;
    }
    .footer-column h4::after { left: 50%; transform: translateX(-50%); } /* Centre le soulignement */
    .footer-socials { justify-content: center; }
    .news-list a, .contact-list li { text-align: left; }
    .footer-bottom-container { flex-direction: column; gap: 1rem; }
}