:root {
    --primary: #1e3a8a;
    --secondary: #f59e0b;
    --white: #ffffff;
    --text: #333;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: rgba(255, 255, 255, 0.95);
    position: fixed;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo { font-size: 24px; font-weight: bold; color: var(--primary); }
.logo span { color: var(--secondary); }

.nav-links { display: flex; list-style: none; }
.nav-links li a { text-decoration: none; color: var(--text); margin: 0 15px; font-weight: 500; transition: 0.3s; }
.nav-links li a:hover { color: var(--primary); }

/* --- Masquer le burger sur Desktop --- */
.menu-toggle {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--primary);
    transition: 0.3s;
}
.mobile-only {
    display: none !important; /* Cache le bouton mobile sur ordinateur */
}

/* --- Adaptations Tablettes et Smartphones --- */
@media (max-width: 768px) {
    .nav-btns {
        display: none; /* On cache les boutons isolés */
    }

    .menu-toggle {
        display: flex; /* On affiche le burger */
        z-index: 1001;
    }
	.mobile-only {
			display: block !important;
			width: 100%;
			text-align: center;
			margin-top: 10px;
		}
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%; /* Caché à droite par défaut */
        height: 100vh;
        width: 70%;
        background: white;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: 0.4s ease;
    }

    /* Quand le menu est ouvert */
    .nav-links.active {
        right: 0;
    }
	
	.nav-links .btn {
        display: inline-block;
        margin: 10px 0;
        width: 80%; /* Boutons larges sur mobile */
    }

    .nav-links li {
        margin: 20px 0;
    }

    /* Animation du burger en "X" */
    .menu-toggle.active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

.alert {
    padding: 15px;
    margin: 80px auto 10px; /* 80px pour passer sous la navbar fixe */
    width: 80%;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-danger { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }


/* Boutons */
.btn { padding: 10px 20px; border-radius: 5px; text-decoration: none; font-weight: 600; transition: 0.3s; }
.btn-primary { background: var(--primary); color: white; }
.btn-outline { border: 2px solid var(--primary); color: var(--primary); margin-left: 10px; }
.btn-primary:hover { background: var(--secondary); }

/* Slider Hero */
.hero-slider, .swiper { height: 100vh; width: 100%; }
.swiper-slide {
    background-size: cover;      /* L'image remplit tout l'espace sans se déformer */
    background-position: center; /* L'image reste centrée */
    background-repeat: no-repeat;
    width: 100%;
    height: 100vh;               /* Prend toute la hauteur de l'écran */
}

.overlay {
    display: flex;
    flex-direction: column;      /* Aligne les éléments verticalement */
    justify-content: center;    /* Centre le contenu verticalement */
    align-items: flex-start;    /* Aligne le contenu à GAUCHE */
    
    text-align: left;           /* Aligne le texte à gauche */
    color: white;
    background: linear-gradient(to right, rgba(0,0,0,0.7), transparent); /* Dégradé pour lisibilité */
    
    width: 100%;
    height: 100%;
    padding-left: 10%;          /* Décale le texte de 10% par rapport au bord gauche */
    padding-right: 15%;         /* Empêche le texte d'aller trop loin à droite */
}

.overlay h1 {
    font-size: 3.5rem;
    max-width: 600px;           /* Limite la largeur du titre pour éviter les lignes trop longues */
    margin-bottom: 20px;
    line-height: 1.2;
}

.overlay h1 { font-size: 3rem; margin-bottom: 20px; }

@media (max-width: 768px) {
    .overlay {
        padding-left: 5%;      /* On réduit la marge sur petit écran */
        align-items: center;   /* Optionnel : on peut choisir de recentrer sur mobile */
        text-align: center;
        padding-right: 5%;
    }
    
    .overlay h1 {
        font-size: 2rem;
    }
}

/* Style du Modal (Arrière-plan) */
/* Style du Modal (Arrière-plan) */
/* Style du Modal (Arrière-plan) */
/* Style du Modal (Arrière-plan) */
.modal {
    display: none; /* Caché par défaut */
    position: fixed;
    z-index: 2000; /* Au-dessus de tout */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Fond sombre transparent */
    backdrop-filter: blur(5px); /* Effet de flou moderne */
}

/* Contenu du Modal */
.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Bouton Fermer */
.close-btn {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #aaa;
}

/* Style des champs du formulaire */
form input, form select, form padding {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.form-group { display: flex; gap: 10px; }

.btn-submit {
    width: 100%;
    background: var(--primary);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

.btn-submit:hover { background: var(--secondary); }

.error-msg {
    color: #e11d48;
    font-size: 0.75rem;
    display: block;
    margin-top: -5px;
    margin-bottom: 10px;
    height: 15px; /* Évite que le formulaire ne "saute" quand l'erreur apparaît */
}

input.invalid {
    border-color: #e11d48;
    background-color: #fff1f2;
}


/* Styles Généraux */
/* Styles Généraux */
/* Styles Généraux */
.section { padding: 100px 5%; overflow: hidden; }
.bg-light { background-color: #f8fafc; }
.container { max-width: 1200px; margin: 0 auto; }
.section-header { margin-bottom: 50px; }
.subtitle { color: var(--secondary); font-weight: bold; text-transform: uppercase; letter-spacing: 2px; font-size: 0.9rem; }
.section-header h2 { font-size: 2.5rem; color: var(--primary); margin-top: 10px; }

/* À Propos */
.about-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 50px; align-items: center; }
.about-list { list-style: none; margin-top: 20px; }
.about-list li { margin: 10px 0; display: flex; align-items: center; gap: 10px; font-weight: 500; }
.about-list i { color: #22c55e; }
.about-stats { display: flex; flex-direction: column; gap: 20px; }
.stat-card { background: var(--primary); color: white; padding: 30px; border-radius: 15px; text-align: center; transition: 0.3s; }
.stat-card:hover { transform: scale(1.05); background: var(--secondary); }

/* Formations Cards */
.formations-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.course-card { background: white; padding: 40px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); transition: 0.4s; position: relative; border-bottom: 4px solid transparent; }
.course-card:hover { transform: translateY(-10px); border-bottom-color: var(--secondary); }
.course-icon { font-size: 2.5rem; color: var(--primary); margin-bottom: 20px; }
.read-more { text-decoration: none; color: var(--primary); font-weight: 600; margin-top: 20px; display: inline-block; }

/* Contact */
.contact-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; background: white; border-radius: 30px; overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.contact-info { background: var(--primary); color: white; padding: 50px; }
.contact-form-box { padding: 50px; }
.info-item { display: flex; align-items: center; gap: 15px; margin-top: 30px; }

/* Mobile Adaptations */
@media (max-width: 768px) {
    .about-grid, .contact-wrapper { grid-template-columns: 1fr; }
    .section-header h2 { font-size: 1.8rem; }
}

/* Slider Témoignages */
/* Slider Témoignages */
/* Slider Témoignages */
.swiper-testimonials {
    padding: 50px 0;
}

.testimonial-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin: 10px; /* Espace pour l'ombre */
    text-align: left;
}

.stars {
    color: var(--secondary);
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.testimonial-card p {
    font-style: italic;
    color: #555;
    line-height: 1.6;
    margin-bottom: 25px;
}

.student-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.student-info img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f0f2f5;
}

.student-info h4 {
    color: var(--primary);
    margin-bottom: 2px;
}

.student-info span {
    font-size: 0.85rem;
    color: #888;
}

/* Pagination Swiper personnalisée */
.swiper-pagination-bullet-active {
    background: var(--primary) !important;
}
.swiper-testimonials {
    width: 100%;
    height: auto;
    padding-bottom: 50px !important; /* Espace pour la pagination */
    overflow: hidden; /* Empêche le débordement horizontal sur la page */
}

.testimonial-item {
    height: auto; /* Permet aux cartes d'avoir la même hauteur */
    display: flex;
    flex-direction: column;
}

.testimonial-card {
    flex: 1; /* Force toutes les cartes à prendre la même hauteur dans une ligne */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Footer Styles */
/* Footer Styles */
/* Footer Styles */
/* Footer Styles */
.footer {
    background-color: #0f172a; /* Bleu très foncé */
    color: #94a3b8;
    padding: 80px 0 30px;
}

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

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

.footer-col h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 40px;
    height: 2px;
    background: var(--secondary);
}

.footer-col p {
    line-height: 1.7;
    margin-bottom: 20px;
}

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

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #94a3b8;
    text-decoration: none;
    transition: 0.3s;
}

.footer-col ul li a:hover {
    color: white;
    padding-left: 8px;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 15px;
}

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

.social-links a:hover {
    background: var(--secondary);
    transform: translateY(-5px);
}

/* Newsletter Form */
.newsletter-form {
    display: flex;
    background: rgba(255,255,255,0.05);
    padding: 5px;
    border-radius: 8px;
}

.newsletter-form input {
    background: transparent;
    border: none;
    padding: 10px;
    color: white;
    flex: 1;
    outline: none;
}

.newsletter-form button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

.newsletter-form button:hover {
    background: var(--secondary);
}

/* Footer Bottom */
.footer-divider {
    border: 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 30px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

/* Back to Top Button */
#back-to-top {
    background: var(--secondary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 5px;
    cursor: pointer;
    display: none; /* Affiché par JS */
    transition: 0.3s;
}

#back-to-top:hover {
    background: var(--primary);
}

<style>
/* Animation de clignotement */
@keyframes blinker {
  50% {
    opacity: 0;
  }
}

.blink-period {
  animation: blinker 1.5s linear infinite;
  color: #ffc107; /* Jaune/Or pour attirer l'attention */
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Optionnel : un petit badge pour entourer l'info */
.admin-session-info {
  background: #343a40;
  padding: 5px 15px;
  border-radius: 50px;
  border: 1px solid #4b545c;
  display: flex;
  align-items: center;
}
</style>