/* Base Styles */
:root {
    --blue: #0055A4;
    --white: #ffffff;
    --red: #EF4135;
    --dark: #333333;
    --light: #f5f5f5;
    --gray: #777777;
    --light-blue: #e6f0ff;
    --light-red: #ffebe9;
}



main {
    margin-top: 0;
    position: relative;
    z-index: 1;
}

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

/* body {
    font-family: 'Roboto', Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--white);
} */
  body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            line-height: 1.6;
            color: var(--dark-color);
            background: var(--white);
            overflow-x: hidden;
        }
.container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Les styles pour container-img, responsive-img et hero-content sont définis dans hero-overlay.css */
  

a {
    text-decoration: none;
    color: var(--blue);
    transition: all 0.3s ease;
    font-size: 1.35em;
}

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

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

section {
    padding: 80px 0;
    position: relative;
    z-index: 1;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 40px;
}

h3 {
    font-size: 1.8rem;
}

p {
    margin-bottom: 15px;
}
/* Section candidate */
section.candidate {
    padding: 60px 0;
    /* margin-top: 150px; Augmenter davantage la marge supérieure pour éviter le chevauchement avec la section hero */
    clear: both; /* Assure que la section commence après tout élément flottant précédent */
    position: relative;
    z-index: 2; /* S'assurer que cette section est au-dessus de la section hero */
}

/* Ajuster les autres sections après la section hero */
section.highlights, section.news-preview, section.join-us {
    position: relative;
    z-index: 2; /* S'assurer que ces sections sont au-dessus de la section hero */
    clear: both; /* Assurer qu'elles commencent après tout élément flottant précédent */
}

/* Conteneur principal */
.candidate-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

/* Bloc vidéo/image */
.candidate-video {
    flex: 1;
    max-width: 50%;
}

.candidate-video iframe {
    width: 100%;
    height: 400px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

/* Bloc texte */
.candidate-text {
    flex: 1;
    max-width: 82%;
    padding: 20px;
}

/* Style du texte */
.candidate-text h2 {
    text-align: left;
    color: var(--blue);
    margin-bottom: 10px;
    font-size: 2.2rem;
}

.candidate-text h3 {
    color: var(--red);
    margin-bottom: 20px;
    font-weight: 500;
    font-size: 1.5rem;
}

.candidate-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 15px;
    text-align: justify;
}

/* Lien Lire la suite */
.read-more {
    color: var(--blue);
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
    margin-top: 10px;
    font-size: 1.1rem;
}

.read-more:hover {
    color: var(--red);
    text-decoration: underline;
}
/* ... existing code ... */

/* Responsive Styles */
/* Pour les écrans de 993px et plus */
@media (min-width: 993px) {
    .candidate-info {
        justify-content: space-between;
        align-items: center;
        gap: 40px;
    }
    
    .candidate-video {
        flex: 1;
        max-width: 50%;
        display: flex;
        justify-content: center;
    }
    
    .candidate-text {
        flex: 1;
        max-width: 45%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .candidate-text h2,
    .candidate-text h3 {
        text-align: left;
    }
    
    .candidate-text .btn {
        align-self: flex-start;
        margin-top: 20px;
    }
}

@media (max-width: 992px) {
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2.2rem;
    }
    
    .candidate-info {
        gap: 30px;
        flex-direction: column;
        align-items: center;
    }
    
    .candidate-video {
        flex: 1;
        min-width: 98%; /* Assure que la vidéo occupe au moins 75% de la largeur */
        max-width: 98%;
        margin: 0 auto; /* Centre la vidéo horizontalement */
    }
    
    .candidate-video iframe {
        height: 500px; /* Hauteur augmentée pour que la vidéo occupe au moins 2/3 de l'espace */
        width: 100%; /* Assure que l'iframe occupe toute la largeur de son conteneur */
    }
}

@media (max-width: 768px) {
    .candidate-info {
        flex-direction: column;
        text-align: center;
    }
    
    .candidate-text {
        max-width: 100%;
    }
    
    .candidate-text h2,
    .candidate-text h3 {
        text-align: center;
    }
    p#slogan-header{
        margin: 0; 
        color:#F1422A;
         font-size: 1.6rem !important;
         font-family: math;
        }
}

p#slogan-header{
margin: 0; 
color:#F1422A;
 font-size: 1.8rem;
 font-family: math;
}
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1.1rem;
}

.btn-primary {
    background-color: var(--blue);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #004080;
    color: var(--white);
}

.btn-secondary {
    background-color: var(--red);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: #d03025;
    color: var(--white);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--blue);
    color: var(--blue);
}

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

.center {
    text-align: center;
    margin-top: 30px;
}

/* Header Styles */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1rem 0 1rem;
}

.logo img {
    height: 90px;
}

.main-menu {
    display: flex;
    list-style: none;
}

.main-menu li {
    position: relative;
    margin-left: 30px;
}

.main-menu li a {
    color: var(--dark);
    font-weight: 500;
    padding: 10px 0;
    display: block;
}

.main-menu li.active a,
.main-menu li a:hover {
    color: var(--blue);
}

.dropdown:hover .submenu {
    display: block;
}

.submenu {
    display: none;
    position: absolute;
    background-color: var(--white);
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    z-index: 1;
    border-radius: 5px;
    padding: 10px 0;
}

.submenu li {
    margin: 0;
}

.submenu li a {
    padding: 10px 20px;
    font-weight: 400;
}

.submenu li a:hover {
    background-color: var(--light-blue);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 30px;
    height: 3px;
    background-color: var(--dark);
    margin: 3px 0;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    background-size: cover;
    background-position: center;
    text-align: center;
    padding: 100px 0 100px;
    position: relative;
}

.subtitle {
    font-size: 1.5rem;
    margin-bottom: 40px;
}

.cta-buttons {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 30px;
    width: 100%;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}

/* Candidate Section */
.candidate {
    background-color: var(--light);
}

.candidate-info {
    display: flex;
    align-items: center;
justify-content: space-between;
}

.candidate-image {
    flex: 1;
}

.candidate-image img {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.candidate-text {
    flex: 1;
}

.candidate-text h2 {
    text-align: left;
    color: var(--blue);
    margin-bottom: 10px;
}

.candidate-text h3 {
    color: var(--red);
    margin-bottom: 20px;
    font-weight: 500;
}

/* Highlights Section */
.highlights {
    background-color: var(--white);
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.highlight-card {
    background-color: var(--light);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.highlight-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.highlight-card i {
    font-size: 3rem;
    color: var(--blue);
    margin-bottom: 20px;
}

.highlight-card h3 {
    color: var(--dark);
    margin-bottom: 15px;
}

.highlight-card a {
    display: inline-block;
    margin-top: 15px;
    font-weight: 600;
}

/* News Preview Section */
.news-preview {
    background-color: var(--light-blue);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

@media (min-width: 769px) and (max-width: 992px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.news-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.news-image {
    height: 340px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.1);
}

.news-content {
    padding: 20px;
}

.date {
    display: block;
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.news-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.news-content a {
    display: inline-block;
    margin-top: 10px;
    font-weight: 600;
}

/* Join Us Section */
.join-us {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/join-bg.jpg');
    background-size: cover;
    background-position: center;
    color: var(--white);
    text-align: center;
}

.join-us h2 {
    color: var(--white);
}

.join-us p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
}

/* Footer */
footer {
    background-color: var(--dark);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo img {
    height: 60px;
    margin-bottom: 15px;
}

.footer-logo .slogan {
    font-size: 1rem;
    color: var(--white);
}

.footer-links h3,
.footer-contact h3,
.footer-social h3 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.footer-links h3:hover,
.footer-contact h3:hover,
.footer-social h3:hover {
    color: var(--yellow);
}


    



.footer-links h3:after,
.footer-contact h3:after,
.footer-social h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--red);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ccc;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-contact p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.footer-contact i {
    margin-right: 10px;
    color: var(--red);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: var(--red);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: #aaa;
}

.footer-bottom a {
    color: var(--white);
}

/* Newsletter Modal */
.newsletter-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
}

.newsletter-content {
    background-color: var(--white);
    padding: 40px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    position: relative;
    text-align: center;
}

.close-newsletter {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
}

.newsletter-content h3 {
    margin-bottom: 15px;
}

#newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

#newsletter-form input {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

/* Responsive Styles */
@media (max-width: 992px) {
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2.2rem;
    }
    
    .candidate-info {
        flex-direction: column;
        text-align: center;
    }
    
    .candidate-text h2,
    .candidate-text h3 {
        text-align: center;
    }
    
    .candidate-image {
        margin-bottom: 30px;
    }
}

@media (max-width: 1379px) {
 
    .hero h2 {
        font-size: 2.8rem;
    }
    
    .slogan {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1.5rem;
    }
    
    /* .hero {
        padding: 150px 0 80px;
    } */
}

@media (max-width: 992px) {
    .btn {
        padding: 11px 25px;
        font-size: 1rem;
        min-width: 140px;
    }
    
    .hero h2 {
        font-size: 2.5rem;
    }
    
    .slogan {
        font-size: 1.6rem;
    }
    
    .subtitle {
        font-size: 1.3rem;
    }
    
    /* .hero {
        padding: 120px 0 60px;
    } */
}

@media (max-width: 1463px) {
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        min-width: 130px;
    }
    
    .main-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }
    
    .main-menu.active {
        display: flex;
    }
    
    .main-menu li {
        margin: 10px 0;
    }
    
    .submenu {
        position: static;
        box-shadow: none;
        display: none;
        padding-left: 20px;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
  
    
    .hero h2 {
        font-size: 2.2rem;
    }
    
    .slogan {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .cta-buttons {
        flex-direction: row;
        gap: 15px;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
    }
    
    /* .hero {
        padding: 100px 0 50px;
    } */
    
    section {
        padding: 60px 0;
    }
}

@media (max-width: 576px) {
  
    .cta-buttons {
     margin-top: 10px !important;
    }
    .logo img {
        height: 60px;
    }

    .hero {

        height : 270px;
        padding :0;
    }

    .mobile-menu-toggle span {
        width: 20px;
        height: 3px;
        background-color: var(--dark);
        margin: 3px 0;
        transition: all 0.3s ease;
    }
    .hero h2 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }
    
    .slogan {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    p#slogan-header{
        margin: 0; 
        color:#F1422A;
         font-size: 1.4rem !important;
         font-family: math;
        }
    
    .subtitle {
        font-size: 1rem;
        margin-bottom: 15px;
    }
/*     
    .hero {
        padding: 90px 0 0px;
    } */
    
    .hero-content {
        width: 95%;
        padding: 15px 10px;
    }
    
    .btn {
        padding: 0px 20px;
        font-size: 0.9rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    section.candidate {
        transform: translate(0px, 200px);
    }
    
    @media (max-width: 400px) {

    
    .hero h2 {
        font-size: 1.3rem;
        margin-bottom: 8px;
    }
    
    .slogan {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .subtitle {
        font-size: 0.9rem;
        margin-bottom: 12px;
    }
    
    /* .hero {
        padding: 40px 0 20px;
    } */
    
    .hero-content {
        width: 100%;
        padding: 10px 5px;
    }
    
    .btn {
        /* padding: 8px 15px; */
        font-size: 0.8rem;
    }
}

.footer-links h3:after,
    .footer-contact h3:after,
    .footer-social h3:after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-contact p {
        justify-content: center;
    }
    
    .social-icons {
        justify-content: center;
    }
}

@media (max-width: 400px) {
    .hero h2 {
        font-size: 1.3rem;
        margin-bottom: 8px;
    }
    
    .subtitle {
        font-size: 0.9rem;
        margin-bottom: 12px;
    }

    p#slogan-header{
        margin: 0; 
        color:#F1422A;
         font-size: 1.3rem !important;
         font-family: math;
        }
    
 
}

/* ============================================= */
/* STYLES GÉNÉRAUX DU HEADER                     */
/* ============================================= */

header {
    /* CORRECTION FINALE : C'EST L'ANCRE DE POSITIONNEMENT ! */
    /* Le header devient la référence pour le menu en position absolue. */
    position: relative; 
}

/* Vous avez probablement déjà un style pour .container,
   assurez-vous qu'il centre le contenu. Par exemple : */
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1462px;
    margin: 0 auto;
    padding: 0 15px; /* Un peu d'espace sur les côtés */
}


/* ============================================= */
/* VUE ORDINATEUR (plus de 1462px)               */
/* ============================================= */

.main-menu {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex; /* Menu horizontal */
}

.main-menu li {
    margin-left: 20px;
}

.mobile-menu-toggle {
    display: none; /* Bouton hamburger caché */
}


/* ============================================= */
/* VUE MOBILE (largeur d'écran de 1462px ou moins) */
/* ============================================= */
@media (max-width: 1462px) {

    /* Le bouton hamburger est maintenant le seul élément visible dans <nav> */
    nav {
        /* On s'assure qu'il n'interfère pas */
    }

    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 30px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1001;
    }

    .mobile-menu-toggle span {
        width: 30px;
        height: 3px;
        background-color: #333;
        border-radius: 10px;
        transition: all 0.3s linear;
        transform-origin: 1px;
    }

    /* Le menu déroulant */
    .main-menu {
        display: block;
        position: absolute;
        
        /* Se positionne PAR RAPPORT AU HEADER */
        top: 100%;   /* Juste en dessous du header */
        right: 0;    /* Parfaitement sur le bord droit DE LA FENÊTRE */
        
        background-color: #fff;
        box-shadow: 0 8px 16px rgba(0,0,0,0.15);
        border-radius: 0 0 5px 5px; /* Jolis coins arrondis en bas */
        width: 220px;
        z-index: 1000;

        /* État initial (fermé) */
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-out;
        padding: 0;
        border: none;
    }

    /* État actif (ouvert) */
    .main-menu.active {
        max-height: 500px;
        padding: 5px 0;
    }

    /* Liens du menu */
    .main-menu li {
        display: block;
        width: 100%;
        margin-left: 0;
        text-align: right;
    }

    .main-menu li a {
        padding: 12px 20px;
        display: block;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .main-menu li:last-child a { border-bottom: none; }
    .main-menu li a:hover { background-color: #f5f5f5; }
    
    /* Animation du bouton hamburger en croix (X) */
    .mobile-menu-toggle.active span:nth-child(1) { transform: rotate(45deg); }
    .mobile-menu-toggle.active span:nth-child(2) { opacity: 0; transform: translateX(20px); }
    .mobile-menu-toggle.active span:nth-child(3) { transform: rotate(-45deg); }
}