:root {
    --primary-green: #006400;
    --primary-hover: #004d00;
    --secondary-purple: #2E8B57;
    --accent-gold: #EEDD82;
    --light-green: #f0f7f0;
    --light-purple: #f2eef7;
    --dark-text: #333;
    --light-text: #f8f9fa;
    --gray-bg: #f8f9fa;
}

.text-primary { color: var(--primary-green) !important; }
.bg-primary { background-color: var(--primary-green) !important; }
.bg-primary-subtle { background-color: #e6f0e6 !important; }
.border-primary { border-color: var(--primary-green) !important; }

/* Global Button Overrides (UNEPH Green) */
.btn-primary { background-color: var(--primary-green) !important; border-color: var(--primary-green) !important; color: white !important; }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active { background-color: var(--primary-hover) !important; border-color: var(--primary-hover) !important; box-shadow: 0 0 0 0.25rem rgba(0, 100, 0, 0.25) !important; }
.btn-outline-primary { color: var(--primary-green) !important; border-color: var(--primary-green) !important; }
.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active { background-color: var(--primary-green) !important; border-color: var(--primary-green) !important; color: white !important; }
.btn-info { background-color: #20c997 !important; border-color: #20c997 !important; color: white !important; }
.btn-info:hover, .btn-info:focus, .btn-info:active { background-color: #138496 !important; border-color: #117a8b !important; }


html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    position: relative;
    -webkit-overflow-scrolling: touch; /* Scroll fluide iOS */
}

body {
    font-family: "Inter", sans-serif;
    color: var(--dark-text);
    padding-top: 130px; 
    transition: padding-top 0.3s ease;
}

body.no-banner {
    padding-top: 80px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Poppins", sans-serif;
    font-weight: 600;
}

/* Bannière d'information urgente */
.info-banner {
    background: linear-gradient(
        90deg,
        var(--primary-green),
        var(--secondary-purple)
    );
    color: white;
    padding: 12px 0;
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 1030;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Empêche tout débordement interne */
}

.info-banner .container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
}

.info-banner p {
    margin: 0;
    font-weight: 500;
    font-size: 1.1rem;
    white-space: nowrap;
    animation: marquee 15s linear infinite;
}

@keyframes marquee {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

.info-banner .btn {
    margin-left: 20px;
    background-color: var(--accent-gold);
    border: none;
    border-radius: 30px;
    padding: 8px 20px;
    font-weight: 600;
    transition: all 0.3s;
    z-index: 2;
    position: relative;
}

.info-banner .btn:hover {
    background-color: #c19b2d;
    transform: translateY(-2px);
}

.info-banner .close-banner {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    margin-left: 15px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s;
    z-index: 2;
    position: relative;
}

.info-banner .close-banner:hover {
    opacity: 1;
}

/* Navbar */

.navbar {
    /* background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    padding: 15px 0;
    position: sticky;
    top: 50px;
    z-index: 1020; */

    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: top 0.3s ease; /* Animation fluide lors du changement de position */
    padding: 15px 0;
    /* Changement en fixed */
    position: fixed;
    /* La navbar commence en dessous de la bannière (hauteur bannière) */
    top: 50px; 
    left: 0;
    right: 0;
    z-index: 1020;
}

body.no-banner .navbar {
    top: 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--primary-green);
}

.navbar-brand img {
    height: 40px;
    margin-right: 6px;
}

.navbar-brand:hover {
    color: var(--secondary-purple);
    text-decoration: none;
}

.nav-link {
    font-weight: 500;
    margin: 0 10px;
    color: var(--dark-text);
    transition: color 0.3s;
}

.nav-link:hover,
.nav-link:focus,
.nav-link:active {
    color: var(--primary-green) !important;
}

.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item:active {
    background-color: var(--primary-green) !important;
    color: white !important;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 10px 0;
}

.btn-inscription {
    background-color: var(--accent-gold);
    color: white;
    border-radius: 30px;
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
}

.btn-inscription:hover {
    background-color: #c19b2d;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

/* Caroussel */

/* =========================================
   Styles des Flèches de Carrousel (Navigation)
   ========================================= */

/* Style général pour les contrôles */
.carousel-control-prev,
.carousel-control-next {
    width: 50px; /* Largeur de la zone cliquable */
    opacity: 1; /* Toujours visible */
    top: 50%;
    transform: translateY(-50%);
    bottom: auto; /* Annule l'étirement vertical par défaut */
}

.carousel-control-prev {
    left: 20px; /* Espacement du bord gauche */
}

.carousel-control-next {
    right: 20px; /* Espacement du bord droit */
}

/* Style de l'icône (le rond et la flèche) */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: var(--primary-green); /* Fond vert foncé (votre couleur primaire) */
    border-radius: 50%; /* Forme ronde */
    width: 40px;
    height: 40px;
    background-size: 50%; /* Taille de la flèche à l'intérieur */
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); /* Ombre légère */
    transition: all 0.3s ease;
}

/* Changement de couleur au survol */
.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
    background-color: var(--accent-gold); /* Devient doré au survol */
    transform: scale(1.1); /* Léger grossissement */
}

/* Exception pour le Hero (Accueil) : fond semi-transparent noir pour mieux voir sur les photos */
.hero-carousel .carousel-control-prev-icon,
.hero-carousel .carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255,255,255,0.5);
}

.hero-carousel .carousel-control-prev:hover .carousel-control-prev-icon,
.hero-carousel .carousel-control-next:hover .carousel-control-next-icon {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
}

/* Hero Carousel avec Typewriter Effect */
.hero-carousel {
    height: 80vh;
    position: relative;
    overflow: hidden;
    padding: 0;
}

.carousel-item {
    height: 80vh;
    background-size: cover;
    background-position: center;
}

.carousel-caption {
    bottom: 30%;
    text-align: left;
    max-width: 700px;
    margin-left: 10%;
}

.program-hero-content {
    max-width: 850px;
    margin-left: 10%;
}

.typewriter-text {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.5s;
    position: relative;
    display: inline-block;
}

.typewriter-text-page {
    font-size: 4.2rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: white;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.5s;
    position: relative;
    display: inline-block;
    line-height: 1.1;
}

.typewriter-text::after {
    content: "|";
    position: absolute;
    right: -10px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%,
    50% {
        opacity: 1;
    }
    51%,
    100% {
        opacity: 0;
    }
}

.carousel-caption p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.7s;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

.carousel-caption .btn {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.9s;
}

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

.btn-primary {
    background-color: var(--primary-green);
    border: none;
    border-radius: 30px;
    padding: 12px 30px;
    font-weight: 600;
    margin-right: 15px;
    transition: all 0.3s;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    color: white;
}

.btn-primary:focus, .btn-primary:active, .btn-primary:focus-visible {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    box-shadow: 0 0 0 0.25rem rgba(0, 100, 0, 0.25) !important;
    color: white !important;
}

.btn:focus, .btn:active {
    outline: none !important;
    box-shadow: 0 0 0 0.25rem rgba(0, 100, 0, 0.15) !important;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-green) !important;
    box-shadow: 0 0 0 0.25rem rgba(0, 100, 0, 0.1) !important;
}

.btn-outline-light {
    border-radius: 30px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-outline-light:hover {
    transform: translateY(-2px);
}

/* Sections générales */
section {
    padding: 80px 0;
    width: 100%;
    overflow: hidden; /* Empêche les animations AOS de casser le layout */
}

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

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

.section-title p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    color: #666;
}

.section-title::after {
    content: "";
    position: absolute;
    width: 80px;
    height: 4px;
    background: linear-gradient(
        to right,
        var(--primary-green),
        var(--secondary-purple)
    );
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Section À propos */
.about-section {
    background-color: var(--light-green);
}

.about-section,
.why-choose-section {
    padding: 50px;
}

.timeline {
    position: relative;
    max-width: 1200px;
    margin: 50px auto;
    overflow: hidden; /* Empêche le débordement horizontal */
}

.timeline::after {
    content: "";
    position: absolute;
    width: 6px;
    background-color: var(--primary-green);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
    border-radius: 3px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-content {
    padding: 20px 30px;
    background-color: white;
    position: relative;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.timeline-item:nth-child(odd) .timeline-content::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: white;
    top: 20px;
    border-radius: 50%;
    z-index: 1;
    box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2);
}

.timeline-item:nth-child(even) .timeline-content::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    left: -10px;
    background-color: white;
    top: 20px;
    border-radius: 50%;
    z-index: 1;
    box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2);
}

.timeline-item::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--accent-gold);
    border: 4px solid white;
    top: 20px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(odd)::after {
    right: -10px;
}

.timeline-item:nth-child(even)::after {
    left: -10px;
}

/* Section Statistiques */
.stats-section {
    background: linear-gradient(
        135deg,
        var(--primary-green),
        var(--secondary-purple)
    );
    color: white;
}

.stat-item {
    text-align: center;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s, transform 0.8s;
}

.stat-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    font-family: "Poppins", sans-serif;
}

.stat-text {
    font-size: 1.2rem;
    opacity: 0.9;
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--accent-gold);
}

/* Section Facultés */
/* .faculty-carousel .carousel-item {
    height: auto;
    padding: 50px 0;
}

.faculty-carousel button{
    background-color: var(--primary-green);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s;
    cursor: pointer;
}

.faculty-card {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    margin: 15px;
    height: 100%;
}

.faculty-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.faculty-img {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.faculty-content {
    padding: 25px;
}

.faculty-content h3 {
    color: var(--primary-green);
    margin-bottom: 15px;
} */

/* Section Services */
.services-section {
    background-color: var(--light-purple);
}

.service-card {
    background-color: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    margin-bottom: 30px;
}

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

.service-icon {
    font-size: 3rem;
    color: var(--primary-green);
    margin-bottom: 20px;
}

/* Section Programmes */
.program-filter {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.filter-btn {
    background: none;
    border: 2px solid var(--primary-green);
    color: var(--primary-green);
    padding: 10px 25px;
    margin: 0 10px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
}

.filter-btn.active,
.filter-btn:hover {
    background-color: var(--primary-green);
    color: white;
}

.program-card {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    transition: transform 0.3s;
}

.program-card:hover {
    transform: translateY(-10px);
}

.program-img {
    height: 270px;
    background-size: cover;
    background-position: center;
}

.program-content {
    padding: 25px;
}

.program-content h3 {
    color: var(--primary-green);
    margin-bottom: 15px;
}
.program-content a:hover, .program-content a:focus {
    background-color: var(--secondary-purple);
}

.program-duration {
    display: inline-block;
    background-color: var(--light-green);
    color: var(--primary-green);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
}

/* Section Pourquoi nous choisir */
.why-choose-section {
    background-color: var(--light-green);
}

.reason-card {
    background-color: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    margin-bottom: 30px;
}

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

.reason-icon {
    font-size: 3rem;
    color: var(--accent-gold);
    margin-bottom: 20px;
}

/* Section FAQ */
.faq-section {
    background-color: var(--light-purple);
}

.accordion-item {
    border: none;
    margin-bottom: 15px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.accordion-button {
    background-color: white;
    color: var(--primary-green);
    font-weight: 600;
    padding: 20px;
    border: none;
    box-shadow: none;
}

.accordion-button:not(.collapsed) {
    background-color: var(--light-green);
    color: var(--primary-green);
}

.accordion-body {
    padding: 20px;
    background-color: white;
}

/* Section Galerie */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 30px;
    height: 250px;
    cursor: pointer;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.gallery-item:hover .gallery-img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 100, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-icon {
    color: white;
    font-size: 2rem;
}

/* Section Vidéos */
.video-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.video-thumbnail {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(212, 175, 55, 0.8);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s;
}

.video-play-btn:hover {
    background-color: var(--accent-gold);
    transform: translate(-50%, -50%) scale(1.1);
}

/* Section Actualités */
.news-carousel .carousel-item {
    height: auto;
    padding: 50px 0;
}

.news-card {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    margin: 15px;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-10px);
}

.news-img {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.news-content {
    padding: 25px;
}

.news-date {
    color: var(--accent-gold);
    font-weight: 600;
    margin-bottom: 10px;
}

.news-content h3 {
    color: var(--primary-green);
    margin-bottom: 15px;
}

/* Section Médias */
.media-section {
    background-color: var(--light-green);
}

.media-card {
    background-color: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    margin-bottom: 30px;
}

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

.media-logo {
    height: 60px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-logo img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.media-content h4 {
    color: var(--primary-green);
    margin-bottom: 15px;
}

.media-content a:hover, .media-content a:focus {
    background-color: var(--secondary-purple);
    text-decoration: none;
}

.media-date {
    color: var(--accent-gold);
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

/* Section Carte */
.map-section {
    padding: 0;
    height: 500px;
}

#map {
    height: 100%;
    width: 100%;
}

/* Section Contact */
.contact-section {
    background-color: var(--light-green);
}

.contact-info {
    margin-bottom: 40px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
}

.contact-icon {
    font-size: 1.5rem;
    color: var(--primary-green);
    margin-right: 15px;
    margin-top: 5px;
}

.contact-details h4 {
    color: var(--primary-green);
    margin-bottom: 5px;
}

.social-icons {
    display: flex;
    margin-top: 30px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-green);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    transition: all 0.3s;
}

.social-icon:hover {
    background-color: var(--accent-gold);
    transform: translateY(-5px);
}

.contact-form {
    background-color: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-control {
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid #ddd;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.2rem rgba(0, 100, 0, 0.25);
}

/* Footer */
footer {
    background-color: #1a1a2e;
    color: white;
    padding: 80px 0 0;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
}

.footer-about {
    margin-bottom: 30px;
}

.footer-links h4 {
    color: white;
    margin-bottom: 25px;
    font-size: 1.2rem;
    position: relative;
}

.footer-links h4::after {
    content: "";
    position: absolute;
    width: 40px;
    height: 3px;
    background-color: var(--accent-gold);
    bottom: -10px;
    left: 0;
}

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

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

.footer-links a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover,
.footer-links a:focus,
.footer-links a:active {
    color: var(--accent-gold);
}

.footer-bottom {
    background-color: #0f0f1a;
    padding: 20px 0;
    margin-top: 50px;
    text-align: center;
}

/* Scroll to Top Button */
/* Styles pour le Scroll to Top (déjà présent mais assurons-nous qu'il est bon) */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--accent-gold);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 9999; /* Très haut pour être au-dessus de tout */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.scroll-to-top.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}



/* Bannière de consentement aux cookies */
/* Styles pour la bannière Cookies (Réglementé) */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;              /* Force la largeur à l'écran */
    box-sizing: border-box;   /* Inclut le padding dans la largeur */
    max-width: 100vw;         /* Ne dépasse JAMAIS la largeur du viewport */
    overflow: hidden;         /* Coupe tout débordement interne */
    background-color: #fff;
    color: #333;
    padding: 20px;
    z-index: 10000;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    border-top: 4px solid var(--primary-green);
    display: flex;
}

.cookie-banner .btn {
    border-radius: 8px;
    font-weight: 600;
    white-space: nowrap;      /* Empêche le texte du bouton de sauter à la ligne */
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;              /* Force à ne pas dépasser */
    max-width: 1200px;
    margin: 0 auto;
    gap: 15px;
    box-sizing: border-box;
}

.cookie-text h4 {
    color: var(--primary-green);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.cookie-text p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.cookie-text {
    flex: 1;                  /* Prend l'espace restant disponible */
    min-width: 0;             /* Empêche le texte de forcer un agrandissement */
    overflow-wrap: break-word;
    word-break: break-word;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;           /* Les boutons ne rétrécissent pas */
}

/* Admission style */

.wizard-container {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    padding: 40px;
    margin-top: -50px; /* Chevauchement léger avec le header */
    position: relative;
    z-index: 10;
    margin-bottom: 50px;
}

/* Barre de progression */
.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.step-indicator::before {
    content: "";
    position: absolute;
    top: 15px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #e9ecef;
    z-index: 1;
}

.step {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 20%;
}

.step-circle {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 3px solid white;
}

.step.active .step-circle {
    background-color: var(--primary-green);
    color: white;
    box-shadow: 0 0 0 3px rgba(0, 100, 0, 0.2);
}

.step.completed .step-circle {
    background-color: var(--accent-gold);
    color: white;
}

.step-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
    display: block;
}

.step.active .step-label {
    color: var(--primary-green);
    font-weight: 700;
}

/* Masquer les étapes non actives */
.form-step {
    display: none;
    animation: fadeIn 0.5s;
}

.form-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Style des clauses */
.scroll-box {
    height: 300px;
    overflow-y: scroll;
    border: 1px solid #dee2e6;
    padding: 20px;
    border-radius: 8px;
    background-color: #f8f9fa;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.scroll-box h5 {
    color: var(--primary-green);
    margin-top: 15px;
}

/* Upload Box */
.upload-box {
    border: 2px dashed #dee2e6;
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.3s;
}

.upload-box:hover {
    border-color: var(--primary-green);
    background-color: var(--light-green);
}

.page-hero {
    background: linear-gradient(rgba(0, 100, 0, 0.8), rgba(46, 139, 87, 0.8)),
    url("../img/uneph.jpg");   
    background-size: cover;
    background-position: center;
    padding: 100px 0 120px;
    color: white;
    text-align: center;
}

/* End Admission */

/* Responsive */
@media (max-width: 991px) {
    .dropdown-menu li a.dropdown-item {
        white-space: normal; /* C'est la ligne clé pour le saut de ligne */
        word-wrap: break-word; /* Assure que les mots longs sont coupés si nécessaire */
        padding-right: 6px;
    }

    /* Assurez-vous que l'élément parent a de la place */
    .dropdown-menu li {
        max-width: 300px; /* Ajustez cette valeur si nécessaire, pour éviter que le menu soit trop large */
    }

    .hero-carousel {
        height: auto;
        min-height: 500px;
        padding: 80px 0;
        position: relative;
        overflow: hidden;
    }

    .carousel-item {
        height: auto;
        min-height: 500px;
    }
    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-item:nth-child(odd)::after,
    .timeline-item:nth-child(even)::after {
        left: 21px;
    }

    .timeline-item:nth-child(odd) .timeline-content::after,
    .timeline-item:nth-child(even) .timeline-content::after {
        left: -10px;
        right: auto;
    }

    .carousel-caption {
        margin-left: 5%;
        margin-right: 5%;
    }

    .typewriter-text {
        font-size: 2.5rem;
    }

    /* === CORRECTIF TIMELINE MOBILE === */
    .timeline::after {
        left: 15px; /* Ligne verticale à gauche */
    }

    .timeline-item {
        width: 100% !important;  /* Prend toute la largeur */
        left: 0 !important;      /* Remet à gauche (annule le left: 50%) */
        padding-left: 50px;      /* Espace pour la ligne + le rond */
        padding-right: 15px;
    }

    /* Cache les pseudo-éléments de connexion (les ronds) */
    .timeline-item:nth-child(odd) .timeline-content::after,
    .timeline-item:nth-child(even) .timeline-content::after {
        display: none;
    }

    /* Remet tous les ronds de timeline à gauche */
    .timeline-item::after,
    .timeline-item:nth-child(odd)::after,
    .timeline-item:nth-child(even)::after {
        left: 5px;
        right: auto;
    }
}

@media (max-width: 576px) {
    .cookie-buttons {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    .cookie-buttons .btn {
        width: 100%;
    }
}

@media (max-width: 768px) {

    body {
        padding-top: 110px; /* Ajustement mobile */
    }
    .info-banner {
        height: auto;
        min-height: 50px;
        position: fixed;
    }
    .navbar {
        top: 50px; /* Colle juste sous la bannière, même sur mobile */
    }
    .navbar-brand {
        font-size: 1.4rem;
    }
    .navbar-brand img {
        height: 35px;
    }
    .navbar-toggler {
        border: none;
        padding: 5px;
    }
    .navbar-toggler:focus {
        box-shadow: none;
    }
    /* Menu collapse scrollable si trop grand */
    .navbar-collapse {
        max-height: 75vh;
        overflow-y: auto;
        background: white;
        padding: 20px;
        border-radius: 0 0 15px 15px;
        margin-top: 0;
        box-shadow: 0 15px 30px rgba(0,0,0,0.1);
        border-top: 1px solid #eee;
    }
    /* Bouton inscription pleine largeur sur mobile */
    .btn-inscription.ms-3 {
        margin-left: 0 !important;
        margin-top: 15px;
        width: 100%;
        text-align: center;
        display: block;
        padding: 12px;
    }
    .cookie-banner {
        padding: 15px;
    }
    .cookie-text h4 {
        font-size: 1rem;
        text-align: center;
        width: 100%;
    }
    .cookie-text p {
        font-size: 0.8rem;
        line-height: 1.4;
        margin-bottom: 15px;
    }
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
    }
    
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 30px;
        height: 30px;
    }
    
    .carousel-control-prev { left: 10px; }
    .carousel-control-next { right: 10px; }
    .hero-carousel {
        height: 46vh;
        position: relative;
        overflow: hidden;
    }

    .dropdown-menu li a.dropdown-item {
        white-space: normal; /* C'est la ligne clé pour le saut de ligne */
        word-wrap: break-word; /* Assure que les mots longs sont coupés si nécessaire */
        padding-right: 6px;
    }

    /* Assurez-vous que l'élément parent a de la place */
    .dropdown-menu li {
        max-width: 300px; /* Ajustez cette valeur si nécessaire, pour éviter que le menu soit trop large */
    }
    section {
        padding: 14px 0;
    }

    .carousel-item {
        height: 46vh;
        background-size: cover;
        background-position: center;
    }
    .carousel-item p {
        display: none;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .carousel-caption {
        bottom: 30%;
        max-width: 100%;
        margin-left: 5%;
        margin-right: 5%;
        padding: 0;
        background: none;
        backdrop-filter: none;
        border-left: none;
    }

    .typewriter-text {
        font-size: 2.2rem;
    }

    .typewriter-text-page {
        font-size: 2.8rem;
        line-height: 1.05;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .info-banner .container {
        flex-direction: row;        /* Garde tout sur une ligne */
        flex-wrap: nowrap;
        gap: 8px;
        padding: 0 10px;
        justify-content: space-between;
        overflow: hidden;
    }

    .info-banner p {
        animation: marquee 12s linear infinite; /* Défilement plus rapide sur mobile */
        white-space: nowrap;
        font-size: 0.78rem;         /* Texte plus petit */
        font-weight: 500;
        flex: 1;
        overflow: hidden;
        min-width: 0;
    }

    .info-banner .btn {
        margin-left: 6px;
        padding: 3px 10px;          /* Bouton plus compact */
        font-size: 0.75rem;
        flex-shrink: 0;             /* Ne rétrécit pas */
        border-radius: 15px;
    }

    .info-banner .close-banner {
        font-size: 0.9rem;
        margin-left: 6px;
        flex-shrink: 0;
    }
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 5px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}
