:root {
    --mairie-blue: #1a365d;
    --mairie-accent: #e35d5d;
    --mairie-light: #f8fafc;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #334155;
    background-color: #fff;
}

h1,
h2,
h3 {
    font-family: 'Lora', serif;
    color: var(--mairie-blue);
}

/* NAVBAR MODERNE */
.navbar {
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e2e8f0;
}

/* HERO SECTION ADOUCIE */
.hero-section {
    padding: 100px 0;
    background: linear-gradient(rgba(26, 54, 93, 0.95), rgba(26, 54, 93, 0.75)),
        url('village.png');
    background-size: cover;
    background-position: center;
    border-radius: 0 0 50px 50px;
    /* Bordure arrondie en bas pour casser le côté rigide */
    color: white;
}

/* TUILES D'ACCÈS RAPIDE (Moins geek, plus pro) */
.action-card {
    border: none;
    border-radius: 20px;
    background: white;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    margin-top: -50px;
    /* Chevauchement sur le Hero pour lier les sections */
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(26, 54, 93, 0.1);
}

.icon-circle {
    width: 60px;
    height: 60px;
    background: var(--mairie-light);
    color: var(--mairie-blue);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
}

/* BADGES INFO */
.badge-news {
    background-color: var(--mairie-light);
    color: var(--mairie-blue);
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
}

.event-card {
    background: #fff;
    border-radius: 15px;
    transition: all 0.3s ease;
    border-color: #f1f5f9 !important;
}

.event-card:hover {
    border-color: var(--mairie-blue) !important;
    background: var(--mairie-light);
}

.event-date {
    min-width: 70px;
    padding: 10px;
    background: var(--mairie-blue);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(26, 54, 93, 0.2);
}

.event-date .month {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    opacity: 0.9;
}

.event-date .day {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
}

.event-content .badge {
    font-size: 0.7rem;
    letter-spacing: 0.5px;
}

/* Empêche le menu de se fermer quand on descend la souris */
.dropdown-menu {
    border-radius: 12px;
    animation: fadeInMenu 0.3s ease-out;
    
    margin-top: 0 !important; /* On colle le menu au bord du header */
    padding-top: 15px;      /* On crée une zone de sécurité */
    border-top: 3px solid transparent; /* Optionnel : pour l'esthétique */
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-out;
}

/* On s'assure que le menu ne disparait pas si on survole l'espace vide */
.nav-item.dropdown::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 20px; /* Le pont invisible */
    display: block;
}
/* Animation douce des menus déroulants */
.dropdown-menu {
    /* padding: 0.5rem; */
    /* margin-top: 10px !important; */
}

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

.dropdown-item {
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    transition: all 0.2s;
    color: #475569;
}

.dropdown-item:hover {
    background-color: var(--mairie-light);
    color: #090f57;
    padding-left: 1.5rem; /* Petit effet de décalage au survol */
}

/* Style des en-têtes de catégorie dans le menu */
.dropdown-header {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 1px;
    padding-top: 10px;
}

/* Sur grand écran, on peut ouvrir au survol (optionnel mais plus moderne) */
@media (min-width: 992px) {
    .nav-item.dropdown:hover .dropdown-menu {
        display: block;
    }
}

/* --- RESPONSIVE MENU --- */

@media (max-width: 991.98px) {
    /* On aère le menu mobile */
    .navbar-collapse {
        /* padding: 1rem 0; */
          /* On définit une hauteur maximale basée sur l'écran (ex: 85% de la hauteur) */
        max-height: 85vh; 
        /* On active le scroll vertical interne */
        overflow-y: auto; 
        /* Optionnel : pour un scroll plus fluide sur iPhone */
        -webkit-overflow-scrolling: touch; 
        
        background: white;
        padding: 15px;
        border-radius: var(--radius);
        margin-top: 10px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    }

    /* Les liens parents ne doivent pas être trop collés */
    .nav-item {
        border-bottom: 1px solid #f1f5f9;
    }

    /* On stylise les sous-menus pour qu'ils ne flottent pas mais s'intègrent à la liste */
    .dropdown-menu {
        position: static !important;
        float: none;
        width: 100%;
        margin: 0;
        background-color: var(--mairie-light); /* Fond gris très clair pour différencier */
        border: none;
        box-shadow: none !important;
        padding-left: 1rem; /* Décalage pour montrer la hiérarchie */
    }

    /* Le bouton "Espace Citoyen" prend toute la largeur sur mobile */
    .w-lg-auto {
        width: 100% !important;
    }
}

/* --- ANIMATION (Seulement sur Desktop) --- */
@media (min-width: 992px) {
    .nav-item.dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0;
    }
}
.navbar-brand {
    display: flex;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
}

.nav-link {
    /* Ajuste cette valeur (px) pour que le texte du menu 
       soit visuellement sur la même ligne que "Glanon" */
    line-height: 55px; 
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
/* 
.navbar-nav {
    --bs-nav-link-padding-y: 1.5rem !important;
} */
 .navbar-nav {
    display: flex;
    align-items: center; /* Aligne le texte des menus sur la ligne de "Glanon" */
    height: 100%;
}

.nav-link {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    /* En augmentant le padding du lien, on agrandit la zone cliquable 
       et on rapproche physiquement le menu déroulant */
}

.bulles-sidebar {
    position: fixed;
    right: 15px; /* Décollé du bord pour le côté "bulle flottante" */
    top: 50%;
    transform: translateY(-50%);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bulle {
    width: 45px;
    height: 45px;
    border-radius: 50%; /* Cercle parfait */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    border: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: transform 0.2s;
    /* border: 2px solid white; */
}

.bulle i {
    font-size: 1.2rem;
}

/* Couleurs douces mais identifiables */
.bulle.orange { background: #c90f0f; }
.bulle.blue   { background: #1877f2; }
.bulle.red    { background: #ff0000; }
.bulle.pink   { background: #e1306c; }

/* Petit effet au clic pour le retour visuel */
.bulle:active {
    transform: scale(0.9);
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 768px) {
    .bulles-sidebar {
        right: 10px;
        /* On les descend un peu sur mobile pour ne pas qu'elles soient sous les doigts lors du scroll */
        top: auto;
        bottom: 100px; 
        transform: none;
    }
    
    .bulle {
        width: 40px; /* Un peu plus petit sur mobile */
        height: 40px;
    }
}

.drapeau-francais {
    height: 4px;
    width: 100%;
    background: linear-gradient(to right, #002395 33.3%, #ffffff 33.3%, #ffffff 66.6%, #ed2939 66.6%);
    position: fixed; /* Ou absolute selon ton besoin */
    top: 0;
    z-index: 9999;
    border-bottom: 0.8px solid grey;
}