:root {
    /* Nouvelles couleurs académiques Premium */
    --primary: #1a2a44;       /* Bleu Nuit Institutionnel */
    --primary-light: #253b5f; /* Variante plus claire pour les dégradés */
    --secondary: #b8860b;     /* Or Académique (Dark Goldenrod) */
    --accent: #d4af37;        /* Or Brillant pour les survols */
    --text: #1f1f1f;
    --light-bg: #f4f7f9;
    --whatsapp-color: #25d366;
}

/* =========================
   GLOBAL
========================= */
body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text);
    background: #fff;
    line-height: 1.6;
    margin: 0;
}

/* =========================
   NAVBAR PREMIUM
========================= */
.navbar {
    background: rgba(26, 42, 68, 0.95) !important; /* Utilisation du nouveau bleu */
    backdrop-filter: blur(10px);
    transition: 0.3s;
    padding: 10px 0;
}

/* Style du lien actif dans le menu */
.navbar .nav-link.active {
    color: var(--secondary) !important; /* Change la couleur en Or */
}

.navbar .nav-link {
    color: #fff !important;
    font-weight: 500;
    position: relative;
    margin-left: 15px;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.navbar .nav-link::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 2px;
    background: var(--secondary);
    left: 0;
    bottom: -5px;
    transition: 0.3s;
}

.navbar .nav-link:hover::after {
    width: 100%;
}

/* =========================
   HERO AVEC ANIMATION REBOND
========================= */
.hero {
    /* Dégradé utilisant le nouveau bleu nuit */
    background: linear-gradient(rgba(10, 20, 40, 0.75), rgba(26, 42, 68, 0.85)), 
                url('images/img9.jpg');
    background-size: cover top;
    background-position: center;
    color: #fff;
    text-align: center;
    padding: 120px 20px;
    min-height: 550px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-container {
    height: 120px; /* Espace pour les titres */
    position: relative;
    width: 100%;
    z-index: 5;
}

.slide-text {
    position: absolute;
    width: 100%;
    left: 0;
    top: 0;
    opacity: 0;
    margin: 0;
    font-size: 48px;
    font-weight: 800;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    transform: translateY(60px);
    animation: slideRebond 15s infinite ease-in-out;
}

/* Timings de l'animation */
.slide-text:nth-child(1) { animation-delay: 0s; }
.slide-text:nth-child(2) { animation-delay: 5s; }
.slide-text:nth-child(3) { animation-delay: 10s; }

@keyframes slideRebond {
    0% { opacity: 0; transform: translateY(60px); }
    4% { opacity: 1; transform: translateY(0); } /* Arrivée */
    6% { transform: translateY(-12px); }         /* Rebond haut */
    8% { transform: translateY(0); }             /* Stabilisation */
    30% { opacity: 1; transform: translateY(0); }
    33% { opacity: 0; transform: translateY(-40px); } /* Sortie fluide */
    100% { opacity: 0; }
}

/* =========================
   BOUTONS PREMIUM
========================= */
.btn-primary-custom {
    background-color: var(--secondary);
    color: #fff;
    border: none;
    padding: 12px 35px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    transition: 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary-custom:hover {
    background-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    color: #fff;
}

/* =========================
   STATISTIQUES (Dégradé de Bleu Nuit)
========================= */
.stats-section {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    padding: 80px 0;
    text-align: center;
}

.stat-number {
    font-size: 3.2rem;
    font-weight: 800;
    color: var(--secondary); /* Chiffres en Or */
    display: block;
}

/* =========================
   TÉMOIGNAGES
========================= */
.blockquote {
    border-left: 5px solid var(--secondary);
    background: var(--light-bg);
    padding: 40px;
    border-radius: 0 20px 20px 0;
    font-style: italic;
    font-size: 1.1rem;
    position: relative;
}

.blockquote::before {
    content: "\f10d"; /* Icône de citation FontAwesome */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    top: 10px;
    left: 10px;
    color: rgba(184, 134, 11, 0.2);
    font-size: 3rem;
}

/* =========================
   WHATSAPP
========================= */
.whatsapp-float {
    position: fixed;
    width: 65px;
    height: 65px;
    bottom: 30px;
    right: 30px;
    background-color: var(--whatsapp-color);
    color: #FFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: 0.4s;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.15) rotate(10deg);
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {
    .slide-text { font-size: 28px; }
    .hero-container { height: 90px; }
    .hero { padding: 100px 15px; min-height: 400px; }
    .stat-number { font-size: 2.2rem; }
}

/* =========================
   CORRECTION VISIBILITÉ FOOTER
========================= */
footer {
    background-color: #0f172a !important; /* Bleu très sombre */
    color: #ffffff !important; /* Texte général en blanc */
    border-top: 4px solid var(--secondary);
}

/* Forcer la visibilité des paragraphes et textes mutés */
footer p, 
footer .text-muted, 
footer .small {
    color: #cbd5e1 !important; /* Gris clair bleuté très lisible */
}

/* Titres en Or */
footer h5 {
    color: var(--secondary) !important;
    font-weight: 700;
}

/* Liens du footer */
footer ul li a {
    color: #cbd5e1 !important;
    text-decoration: none;
    transition: 0.3s;
}

footer ul li a:hover {
    color: var(--accent) !important;
    padding-left: 5px;
}

/* Icônes de contact */
footer .fas, 
footer .fab {
    color: var(--secondary) !important;
    margin-right: 10px;
}

/* =========================
   STYLE SECTION CYCLES
========================= */
.cycle-card {
    background: #ffffff;
    border-radius: 15px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #edf2f7;
    position: relative;
}

.cycle-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(26, 42, 68, 0.1) !important;
    border-color: var(--secondary);
}

.cycle-icon-box {
    width: 70px;
    height: 70px;
    background: var(--light-bg);
    color: var(--primary);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.cycle-card:hover .cycle-icon-box {
    background: var(--secondary);
    color: #fff;
}

.cycle-card h4 {
    letter-spacing: -0.5px;
}

/* =========================
   STYLE GALERIE DÉFILANTE
========================= */
.gallery-wrapper {
    width: 100%;
    display: flex;
    position: relative;
    padding: 20px 0;
}

.gallery-scroll {
    display: flex;
    width: calc(250px * 12); /* Largeur d'une image * nombre total d'images */
    animation: scrollGallery 30s linear infinite;
}

.gallery-scroll img {
    width: 350px;
    height: 250px;
    object-fit: cover;
    margin: 0 15px;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    filter: grayscale(20%);
}

.gallery-scroll img:hover {
    transform: scale(1.05);
    filter: grayscale(0%);
    border: 2px solid var(--secondary);
}

/* Animation du défilement */
@keyframes scrollGallery {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-350px * 6 - 180px)); } /* Déplacement de la moitié du set */
}

/* Pause au survol pour laisser admirer les photos */
.gallery-wrapper:hover .gallery-scroll {
    animation-play-state: paused;
}

@media (max-width: 768px) {
    .gallery-scroll img {
        width: 250px;
        height: 180px;
    }
}

/* =========================
   STYLE SECTION CONTACT BG
========================= */
.contact-bg-section {
    background: linear-gradient(rgba(10, 26, 68, 0.85), rgba(10, 26, 68, 0.85)), 
                url('images/img10.jpg'); /* Remplace par ton image d'arrière-plan */
    background-size: cover top;
    background-position: center;
    background-attachment: fixed; /* Effet Parallax */
}

.contact-icon-circle {
    width: 50px;
    height: 50px;
    background: rgba(184, 134, 11, 0.2);
    border: 1px solid var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    font-size: 1.2rem;
}

.contact-glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.custom-input {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 12px 15px;
    border-radius: 10px;
    transition: 0.3s;
}

.custom-input:focus {
    background: #fff;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.1);
    outline: none;
}

/* Animation de la bannière */
.reveal-text {
    animation: fadeInUp 1s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Style compact pour les valeurs */
.valeur-box {
    padding: 15px;
    background: #fff;
    border-radius: 10px;
    transition: 0.3s;
    border: 1px solid #eee;
}

.valeur-box i {
    font-size: 1.2rem;
}

.valeur-box:hover {
    border-color: var(--secondary);
    transform: scale(1.05);
}

/* Conteneur d'image réduit */
.img-container-mini {
    position: relative;
    padding: 10px;
}

.img-container-mini::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 40px; height: 40px;
    border-top: 3px solid var(--secondary);
    border-left: 3px solid var(--secondary);
}

/* Style des cartes de cycles */
.cycle-box {
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cycle-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08) !important;
}

.cycle-badge {
    display: inline-block;
    padding: 4px 15px;
    background: var(--light-bg);
    color: var(--secondary);
    font-weight: 800;
    font-size: 0.7rem;
    text-transform: uppercase;
    border-radius: 50px;
    border: 1px solid rgba(184, 134, 11, 0.2);
}

.cycle-box h3 {
    font-size: 1.4rem;
    line-height: 1.3;
}

.cycle-box i {
    width: 20px;
}

/* =========================
   STYLE GALERIE FILTRABLE
========================= */
.btn-filter {
    border: 1px solid var(--primary);
    color: var(--primary);
    border-radius: 50px;
    padding: 8px 20px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: 0.3s;
    background: transparent;
}

.btn-filter:hover, .btn-filter.active {
    background-color: var(--primary);
    color: #fff !important;
}

.gallery-card {
    transition: 0.3s;
}

.gallery-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important;
}

.gallery-card:hover img {
    transform: scale(1.1);
}

.img-wrapper {
    position: relative;
}

/* Animation d'apparition des items filtrés */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}


/* =========================
   STYLE PAGE RÉSULTATS
========================= */
.result-card {
    background: #fff;
    border-radius: 20px;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.result-card:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1) !important;
}

.result-badge {
    display: inline-block;
    padding: 5px 20px;
    background: var(--primary);
    color: var(--secondary);
    font-weight: 900;
    letter-spacing: 2px;
    border-radius: 5px;
    font-size: 0.8rem;
}

.result-card h2 {
    letter-spacing: -2px;
}

.result-card hr {
    height: 3px;
    background: var(--secondary);
    opacity: 1;
}

/* =========================
   STYLE BLOG & LECTURE CORRIGÉ
========================= */

/* Cartes de la liste (blog.php) */
.blog-card {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid #f0f0f0 !important;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(26, 42, 68, 0.12) !important;
    border-color: var(--secondary) !important;
}

.blog-category-tag {
    background: var(--secondary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 5px 15px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
}

/* Page de Lecture (lire_article.php) */
.article-content {
    font-size: 1.15rem;
    color: var(--text);
}

.article-content h3, .article-content h4 {
    color: var(--primary);
    font-weight: 800;
    margin-top: 2rem;
    margin-bottom: 1.2rem;
}

/* Navigation Précédent/Suivant */
.nav-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    transition: 0.3s;
    display: block;
}

.nav-card:hover {
    background: var(--light-bg);
    border-color: var(--secondary);
    transform: scale(1.02);
}

/* Zone Commentaires */
.comment-box .form-control {
    border: 2px solid transparent !important;
    transition: 0.3s;
}

.comment-box .form-control:focus {
    background: #fff !important;
    border-color: var(--secondary) !important;
    box-shadow: none;
}

/* Sidebar Widgets */
.sidebar-widget {
    background: #fff;
    border: 1px solid #f0f0f0;
}

.sidebar-widget hr {
    opacity: 0.1;
    margin: 15px 0;
}

/* Bouton Lire la suite dynamique */
.btn-read-more i {
    transition: 0.3s;
}

.btn-read-more:hover i {
    transform: translateX(8px);
}

/* Responsive */
@media (max-width: 768px) {
    .display-6 { font-size: 1.8rem; }
    .article-content { font-size: 1rem; }
}

/* Forcer l'affichage du haut des images (visages) */
.blog-card img, .article-header-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    object-position: top; /* C'est cette ligne qui permet de voir les têtes */
}

/* Style du bouton retour */
.btn-link:hover {
    color: var(--primary) !important;
    transform: translateX(-5px);
    transition: 0.3s;
}

/* Amélioration visuelle de la barre de recherche */
.sidebar-widget input::placeholder {
    font-size: 0.85rem;
    color: #a0aec0;
}

/* =========================
   STYLE PAGE CONTACT
========================= */
.contact-icon-mini {
    width: 45px;
    height: 45px;
    background: var(--light-bg);
    color: var(--secondary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.contact-card {
    background: #ffffff;
    transition: 0.3s;
}

.contact-card:hover {
    transform: translateY(-5px);
}

.custom-input {
    border: 1px solid #e2e8f0;
    padding: 12px 15px;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: 0.3s;
}

.custom-input:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.1);
}

/* Style de la Top Bar */
.top-bar .top-info {
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Ajustement Navbar quand elle est sous la Top Bar */
.fixed-top {
    z-index: 1030;
}

/* Responsive : On cache souvent la top-bar sur petit mobile pour gagner de la place */
@media (max-width: 768px) {
    .top-bar {
        display: none !important;
    }
}

