@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap");

/* Styles généraux */
body {
    font-family: "Space Grotesk", Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1f1f1f; /* Couleur de fond par défaut pour le dark mode */
    color: #e0e0e0; /* Couleur de texte par défaut pour le dark mode */
}
body.dark-mode header {
    background-color: #002347;
    color: #e0e0e0;
}

/* ---------------------------------- */
/* Styles pour la barre de navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1200;
}

body.dark-mode .navbar {
    background: linear-gradient(120deg, #0a1e3f, #0b3570);
    color: #f8fafc;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 14px 30px rgba(6, 24, 56, 0.35);
}

body.light-mode .navbar {
    background: linear-gradient(120deg, #f6f7fb, #ffffff);
    color: #0f172a;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

/* Styles pour le logo */
.logo {
    width: 9vh;
    height: 2.2vh;
    background-image: url("../images/meta/logo.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    padding: 12px 20px;
    margin-left: 6px;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.35));
}

/* Styles pour les liens de navigation */
.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 6px;
}

.nav-item {
    position: relative;
}

/* Les liens de niveau supérieur sont cliquables */
.nav-item a {
    text-decoration: none;
    padding: 14px 16px;
    display: block;
    font-weight: 600;
    letter-spacing: 0.01em;
    border-radius: 10px;
    position: relative;
    transition: 0.2s ease;
}

body.dark-mode .nav-item a {
    color: #f8fafc;
}

body.light-mode .nav-item a {
    color: #0f172a;
}

.nav-item a::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 8px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #1d4ed8, #f8fafc 50%, #d12b2f);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

body.dark-mode .nav-item a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

body.light-mode .nav-item a:hover {
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
}

.nav-item a:hover::after {
    transform: scaleX(1);
}

/* Styles pour les sous-menus */
.dropdown {
    display: none; /* Cache par defaut */
    position: absolute;
    top: 45px;
    left: 0;
    list-style: none;
    padding: 8px;
    margin: 0;
    transition: all 0.3s ease; /* Ajout de la transition */
    width: max-content;
    z-index: 10;
    border-radius: 12px;
}

body.dark-mode .dropdown {
    background: #0f2344;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 36px rgba(5, 18, 42, 0.45);
}

body.light-mode .dropdown {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.dropdown li a {
    display: block;
    background-color: transparent;
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 500;
}

body.dark-mode .dropdown li a {
    color: #e2e8f0;
}

body.light-mode .dropdown li a {
    color: #0f172a;
}

body.dark-mode .dropdown li a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

body.light-mode .dropdown li a:hover {
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

.subnav-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    background: linear-gradient(90deg, rgba(17, 75, 155, 0.16), rgba(255, 255, 255, 0.6), rgba(209, 43, 47, 0.16));
    backdrop-filter: blur(10px);
}

body.dark-mode .subnav-bar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(90deg, rgba(17, 75, 155, 0.35), rgba(10, 30, 63, 0.6), rgba(209, 43, 47, 0.35));
}

.subnav-link {
    color: inherit;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 600;
    transition: 0.2s ease;
    white-space: nowrap;
}

.subnav-link:hover {
    background: rgba(15, 23, 42, 0.08);
}

body.dark-mode .subnav-link:hover {
    background: rgba(255, 255, 255, 0.12);
}

.subnav-link.is-active {
    background: rgba(17, 75, 155, 0.18);
    color: #0f172a;
}

body.dark-mode .subnav-link.is-active {
    background: rgba(255, 255, 255, 0.12);
    color: #f8fafc;
}

.subnav-separator {
    color: rgba(15, 23, 42, 0.4);
}

@media (max-width: 1100px) {
    .subnav-bar {
        flex-wrap: wrap;
        row-gap: 8px;
    }
}

body.dark-mode .subnav-separator {
    color: rgba(248, 250, 252, 0.5);
}

.subnav-weather {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    position: relative;
    justify-content: flex-start;
}

.subnav-track {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    white-space: nowrap;
    width: max-content;
    animation: subnav-marquee 26s linear infinite;
}

.subnav-track:hover {
    animation-play-state: paused;
}

.subnav-ticker {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    white-space: nowrap;
}

.subnav-ticker-group {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
}

body.dark-mode .subnav-ticker-group {
    background: rgba(255, 255, 255, 0.08);
}

.subnav-ticker-label {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: inherit;
}

.weather-tile {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px;
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.75);
    color: #0f172a;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

body.dark-mode .weather-tile {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    box-shadow: 0 10px 20px rgba(5, 18, 42, 0.35);
}

.weather-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: 0.95rem;
    font-weight: 700;
    background: rgba(15, 23, 42, 0.08);
}

body.dark-mode .weather-icon {
    background: rgba(255, 255, 255, 0.1);
}

.weather-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.weather-title {
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: capitalize;
}

.weather-sub {
    font-size: 0.72rem;
    opacity: 0.8;
}

.weather-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.weather-ech {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.75;
}

.weather-level {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.7);
    color: #0f172a;
}

body.dark-mode .weather-level {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.6);
    color: #f8fafc;
}

.weather-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: rgba(255, 255, 255, 0.7);
    color: #0f172a;
    justify-content: center;
}

body.dark-mode .weather-badge {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.6);
    color: #f8fafc;
}

.weather-badge.level-1 { background: rgba(34, 197, 94, 0.2); border-color: rgba(34, 197, 94, 0.35); }
.weather-badge.level-2 { background: rgba(250, 204, 21, 0.25); border-color: rgba(250, 204, 21, 0.45); }
.weather-badge.level-3 { background: rgba(249, 115, 22, 0.25); border-color: rgba(249, 115, 22, 0.45); }
.weather-badge.level-4 { background: rgba(239, 68, 68, 0.25); border-color: rgba(239, 68, 68, 0.45); }

body.dark-mode .weather-badge.level-1 { background: rgba(34, 197, 94, 0.18); }
body.dark-mode .weather-badge.level-2 { background: rgba(250, 204, 21, 0.2); }
body.dark-mode .weather-badge.level-3 { background: rgba(249, 115, 22, 0.2); }
body.dark-mode .weather-badge.level-4 { background: rgba(239, 68, 68, 0.2); }

/* Bouton toggle météo */
.weather-toggle-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(15, 23, 42, 0.12);
    color: inherit;
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    white-space: nowrap;
}

body.dark-mode .weather-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.12);
}

.weather-toggle-btn:hover {
    background: rgba(15, 23, 42, 0.12);
    transform: translateY(-1px);
}

body.dark-mode .weather-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.weather-toggle-btn.weather-active {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    color: #3b82f6;
}

body.dark-mode .weather-toggle-btn.weather-active {
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.5);
}

/* Mode compact de la subnav-bar */
.subnav-bar.subnav-bar-compact {
    padding: 0;
    position: fixed;
    top: 60px;
    right: 10px;
    width: auto;
    background: transparent;
    border: none;
    justify-content: flex-end;
    z-index: 1100;
}

.subnav-bar.subnav-bar-compact .subnav-link,
.subnav-bar.subnav-bar-compact .subnav-separator,
.subnav-bar.subnav-bar-compact .subnav-weather {
    display: none;
}

.subnav-bar.subnav-bar-compact .weather-toggle-btn {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Météo cachée */
.subnav-weather.weather-hidden {
    display: none;
}

/* Styles pour l'icône du changement de thème */
#theme-toggle {
    padding: unset;
    background: none;
    border: none;
    color: #e0e0e0;
    font-size: 1.5em;
    cursor: pointer;
}

#theme-toggle:hover {
    color: #93c5fd;
}

body.light-mode #theme-toggle {
    color: #0f172a;
}

/* Styles pour les boutons d'authentification */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 10px;
}

.auth-buttons button {
    border: none;
    color: #fff;
    /* padding: 10px 20px; */
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
}

#login-button {
    background: linear-gradient(120deg, #1d4ed8, #0ea5e9);
    padding: 10px 20px;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: 0 10px 20px rgba(7, 89, 133, 0.35);
}

#login-button:hover {
    filter: brightness(1.05);
}

.small-item {
    display: none !important; 
}
/* ---------------------------------- */
/* Styles pour le menu de profil */
/* ---------------------------------- */
.profile-menu {
    position: relative;
    display: inline-block;
}

.profile-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    outline: none;
}

.profile-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #bb86fc;
    transition: box-shadow 0.2s;
    object-fit: cover;
}

.profile-icon:hover, .profile-btn:focus .profile-icon {
    box-shadow: 0 0 0 3px #bb86fc55;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 54px;
    background: #23243a;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    z-index: 1000;
    border-radius: 12px;
    min-width: 220px;
    padding: 0;
    overflow: hidden;
    border: 1px solid #333;
    animation: fadeInMenu 0.2s;
}

.profile-menu.open .dropdown-content {
    display: block;
}

.profile-header {
    display: flex;
    align-items: center;
    padding: 16px;
    background: #1a1b2e;
}

.profile-dropdown-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #bb86fc;
    margin-right: 12px;
    object-fit: cover;
}

.profile-dropdown-info {
    display: flex;
    flex-direction: column;
}

.profile-dropdown-name {
    font-weight: bold;
    color: #fff;
    font-size: 1.1em;
}

.profile-dropdown-role {
    color: #bb86fc;
    font-size: 0.95em;
}

.dropdown-divider {
    height: 1px;
    background: #333;
    margin: 0;
    border: none;
}

.dropdown-content a {
    color: #e0e0e0;
    text-decoration: none;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1em;
    transition: background 0.15s;
    border: none;
    background: none;
}

.dropdown-content a:hover {
    background: #333;
    color: #bb86fc;
}

body.light-mode .dropdown-content {
    background: #fff;
    border: 1px solid #eee;
}
body.light-mode .profile-header {
    background: #f4f4f4;
}
body.light-mode .profile-dropdown-name {
    color: #23243a;
}
body.light-mode .profile-dropdown-role {
    color: #bb86fc;
}
body.light-mode .dropdown-content a {
    color: #23243a;
}
body.light-mode .dropdown-content a:hover {
    background: #f0f0f0;
    color: #bb86fc;
}


/* Styles pour les sous-menus en mode PC */
@media (min-width: 993px) {
    .nav-item:hover .dropdown:has(li a:not(.small-item)) {
        display: block;
    }

    .menu-toggle {
        display: none; /* Cacher le bouton de menu sur les écrans larges */
    }
}

/* Styles pour les tablettes */
@media (max-width: 992px) {
    .navbar {
        padding: 0;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 1000;
        margin: 0;
        padding: 0;
        border-radius: 0;
    }

    body.dark-mode .nav-links {
        background: linear-gradient(180deg, #0a2a5c, #051b3d);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 12px 24px rgba(5, 18, 42, 0.5);
    }

    body.light-mode .nav-links {
        background: linear-gradient(180deg, #f0f4f8, #e8eef7);
        border-bottom: 1px solid rgba(15, 23, 42, 0.08);
        box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.3rem;
        cursor: pointer;
        padding: 8px 12px;
        border-radius: 8px;
        transition: 0.2s ease;
    }

    body.dark-mode .menu-toggle {
        color: #f8fafc;
    }

    body.light-mode .menu-toggle {
        color: #0f172a;
    }

    .menu-toggle:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    body.light-mode .nav-item {
        border-bottom-color: rgba(15, 23, 42, 0.05);
    }

    .nav-item a {
        padding: 16px 20px !important;
        border-radius: 0 !important;
        transition: 0.2s ease;
    }

    body.dark-mode .nav-item a {
        color: #f8fafc;
    }

    body.dark-mode .nav-item a:hover {
        background: rgba(255, 255, 255, 0.12);
    }

    .nav-item a::after {
        display: none;
    }

    .auth-buttons i, #theme-toggle {
        font-size: 1.2em;
    }

    .dropdown {
        display: none;
        position: static;
        background: transparent;
        border: none;
        box-shadow: none;
        width: 100%;
        padding: 0;
        margin: 0;
        border-radius: 0;
    }

    .dropdown.active {
        display: flex;
        flex-direction: column;
    }

    body.dark-mode .dropdown.active {
        background: rgba(255, 255, 255, 0.04);
    }

    body.light-mode .dropdown.active {
        background: rgba(15, 23, 42, 0.02);
    }

    .dropdown li {
        width: 100%;
    }

    .dropdown li a {
        padding: 12px 20px 12px 40px !important;
        border-radius: 0;
        font-weight: 500;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    }

    body.dark-mode .dropdown li a {
        color: #cbd5e1;
    }

    body.dark-mode .dropdown li a:hover {
        background: rgba(255, 255, 255, 0.08);
        color: #f8fafc;
    }

    .dropdown .small-item {
        display: block !important;
        padding-left: 20px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        font-weight: 600;
        opacity: 0.9;
    }
}

/* For screens less than 480px wide (small mobile devices) */
@media (max-width: 480px) {
    .navbar {
        padding: 0;
        gap: 8px;
    }

    .logo {
        width: 7vh;
        height: auto;
        padding: 10px 12px;
    }

    .nav-links {
        top: 100%;
        font-size: 0.95rem;
    }

    .nav-item a {
        padding: 14px 16px !important;
        font-size: 0.95rem;
        font-weight: 600;
    }

    .dropdown li a {
        padding: 11px 16px 11px 36px !important;
        font-size: 0.9rem;
    }

    .dropdown .small-item {
        padding-left: 16px !important;
        font-size: 0.9rem;
    }

    .auth-buttons {
        gap: 6px;
        margin-right: 8px;
    }

    .auth-buttons button {
        font-size: 0.8em;
        padding: 8px 12px;
    }

    .auth-buttons i, #theme-toggle {
        font-size: 1.1em;
    }

    .menu-toggle {
        padding: 6px 10px;
        font-size: 1.2rem;
    }

    .subnav-bar {
        font-size: 0.6rem;
        padding: 0;
        gap: 0;
    }

    .subnav-link {
        padding: 0;
        font-size: 0.7rem;
    }

    .subnav-weather {
        gap: 8px;
    }

    .weather-tile {
        padding: 4px;
        gap: 2px;
    }

    .weather-icon {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
    }

    .weather-title {
        font-size: 0.75rem;
    }

    .weather-sub {
        font-size: 0.65rem;
    }

    .weather-modal-content {
        width: 94%;
    }

    .weather-grid {
        grid-template-columns: 1fr;
    }

    .weather-map {
        height: 240px;
    }

    #weather-map-container {
        height: 300px;
    }
}

/* ---------------------------------- */
/* Styles pour le footer */
footer {
    position: relative;
    bottom: 0;
    padding: 48px 0 0;
    margin-top: 60px;
}

body.dark-mode footer {
    background: linear-gradient(135deg, #0a1e3f, #0b2547);
    color: #e2e8f0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

body.light-mode footer {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    color: #334155;
    border-top: 1px solid rgba(15, 23, 42, 0.1);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 8px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

body.dark-mode .footer-title {
    color: #f8fafc;
    border-bottom: 2px solid rgba(29, 78, 216, 0.6);
    padding-bottom: 8px;
}

body.light-mode .footer-title {
    color: #0f172a;
    border-bottom: 2px solid rgba(29, 78, 216, 0.4);
    padding-bottom: 8px;
}

.footer-description {
    font-size: 0.9rem;
    line-height: 1.6;
    opacity: 0.85;
    margin: 0;
}

.footer-logo-small {
    width: 120px;
    height: 28px;
    background-image: url("../images/meta/logo.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left center;
    margin-top: 12px;
    opacity: 0.8;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: inline-block;
    position: relative;
    padding-left: 0;
}

body.dark-mode .footer-links a {
    color: #cbd5e1;
}

body.light-mode .footer-links a {
    color: #475569;
}

.footer-links a::before {
    content: '→';
    position: absolute;
    left: -20px;
    opacity: 0;
    transition: all 0.2s ease;
}

.footer-links a:hover::before {
    left: -16px;
    opacity: 1;
}

body.dark-mode .footer-links a:hover {
    color: #60a5fa;
    padding-left: 8px;
}

body.light-mode .footer-links a:hover {
    color: #1d4ed8;
    padding-left: 8px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px;
    margin-top: 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

body.dark-mode .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

body.light-mode .footer-bottom {
    border-top: 1px solid rgba(15, 23, 42, 0.1);
}

.footer-bottom p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.75;
}

.footer-social {
    display: flex;
    gap: 16px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
}

body.dark-mode .footer-social a {
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.light-mode .footer-social a {
    background: rgba(15, 23, 42, 0.05);
    color: #475569;
    border: 1px solid rgba(15, 23, 42, 0.1);
}

body.dark-mode .footer-social a:hover {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

body.light-mode .footer-social a:hover {
    background: rgba(29, 78, 216, 0.1);
    color: #1d4ed8;
    border-color: rgba(29, 78, 216, 0.3);
    transform: translateY(-2px);
}

.small-footer {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    margin-top: 0;
}

@media (max-height: 810px) {
    .small-footer {
        position: relative;
    }
}

@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    footer {
        padding: 32px 0 0;
        margin-top: 40px;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-logo-small {
        margin: 12px auto 0;
    }
    
    .footer-links {
        align-items: center;
    }
    
    .footer-links a::before {
        display: none;
    }
}

/* ---------------------------------- */
/* Styles pour la page */
.section {
    padding: 20px;
    background-color: #333; /* Couleur de fond pour le dark mode */
    margin: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.section h1, .section h2, .section h3, form h2 {
    border-bottom: 2px solid #bb86fc; /* Couleur d'accentuation pour le dark mode */
    padding-bottom: 10px;
    color: #bb86fc;
}

h1 {
    font-size: 2em;
    margin-bottom: 20px;
}

.container {
    width: 80%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* ---------------------------------- */
/* Styles pour le changement de thème */
body.light-mode {
    background-color: #f4f4f4;
    color: #000;
}

header.light-mode {
    background-color: #004080;
    color: #fff;
}

/* Styles pour le mode clair */
body.light-mode nav ul li ul {
    background-color: #fff;
}

body.dark-mode nav ul li ul li a:hover {
    background-color: #f0f0f0;
    color: #004080;
}

body.light-mode nav ul li ul li a:hover {
    background-color: #f0f0f0;
    color: #004080;
}

body.light-mode .dropdown-content {
    background-color: #f4f4f4;
}

body.light-mode .dropdown-content a {
    color: #333;
}

body.light-mode .dropdown-content a:hover {
    background-color: #f0f0f0;
}

.section.light-mode {
    background-color: #fff !important;
    color: #333;
    border: none;
}

.section.light-mode a {
    color: #004080;
}

/* Styles pour le chronomètres */
.timer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-family: 'Arial', sans-serif;
}

.timer-container {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.time-unit {
    color: #f0f0f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #333;
    border-radius: 8px;
    padding: 10px 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    min-width: 80px;
}

.time-value {
    font-size: 2rem;
    font-weight: bold;
}

.time-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-top: 5px;
    letter-spacing: 1px;
}

.timer .time-unit:nth-child(odd) {
    background-color: #444;
}

.timer .time-unit:nth-child(even) {
    background-color: #555;
}

@media (max-width: 1024px) {
    /* .container h1, main:first-of-type h1 {
        width: 70% !important;
    } */
    .timer {
        text-align: center;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    h2 {
        margin-bottom: 15px;
        justify-content: center;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: unset;
        width: unset;
        padding: 5px;
    }

    body.light-mode nav ul li ul li a {
        color: #004080;
    }
}

@media (max-width: 768px) {
    /* .container h1, main:first-of-type h1 {
        width: 95% !important;
        font-size: 1.5em;
    } */
    .timer-container {
        gap: 10px;
    }
    .time-unit {
        padding: 5px;
        min-width: 60px;
    }
}

@media (max-width: 480px) {
    .section{
        padding: 10px;
    }
    .timer-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        justify-items: center;
    }

    /* Placer heures, minutes, secondes sur la même ligne */
    .timer-container .time-unit:nth-child(n+3) {
        grid-column: span 2;
        display: flex;
        justify-content: space-around;
        width: 80%;
        flex-direction: row;

    }
}

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

@media (prefers-reduced-motion: reduce) {
    .subnav-track {
        animation: none;
    }
}

/* Weather Day Filter Buttons */
.weather-filter-btn {
    padding: 8px 16px;
    border: 2px solid #cbd5e1;
    background: white;
    color: #334155;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.weather-filter-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.weather-filter-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #2563eb;
}

body.dark-mode .weather-filter-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.2);
}

body.dark-mode .weather-filter-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

body.dark-mode .weather-filter-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #2563eb;
}
/* Modal Meteo Detailed */
.weather-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.weather-modal.is-open { display: flex; }

.weather-modal-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top, rgba(15, 23, 42, 0.45), rgba(0, 0, 0, 0.8));
    backdrop-filter: blur(6px);
}

.weather-modal-content {
    position: relative;
    width: min(92vw, 820px);
    max-height: 82vh;
    background: #68a7e5;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 60px -20px rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

body.dark-mode .weather-modal-content {
    background: #0b162b;
    color: #f8fafc;
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow: 0 30px 70px -22px rgba(2, 6, 23, 0.7);
}

.weather-modal-header {
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    background: linear-gradient(120deg, rgba(29, 78, 216, 0.12), rgba(248, 250, 252, 0.9));
}

body.dark-mode .weather-modal-header {
    border-bottom-color: rgba(148, 163, 184, 0.2);
    background: linear-gradient(120deg, rgba(37, 99, 235, 0.3), rgba(15, 23, 42, 0.9));
}

.weather-modal-header h3 {
    margin: 0;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.weather-modal-close {
    background: rgba(15, 23, 42, 0.08);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.6rem;
    cursor: pointer;
    color: inherit;
    display: grid;
    place-items: center;
}

body.dark-mode .weather-modal-close {
    background: rgba(248, 250, 252, 0.12);
}

.weather-modal-body {
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    gap: 18px;
}

.weather-map-wrap {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.12));
}

body.dark-mode .weather-map-wrap {
    border-color: rgba(148, 163, 184, 0.2);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.4), rgba(2, 6, 23, 0.9));
}

.weather-map {
    height: 320px;
    width: 100%;
}

.weather-map-legend {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(15, 23, 42, 0.12);
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

body.dark-mode .weather-map-legend {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(148, 163, 184, 0.2);
    color: #f8fafc;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.legend-item::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 3px;
    display: inline-block;
    background: #e5e7eb;
}

.legend-item.level-2::before { background: #facc15; }
.legend-item.level-3::before { background: #fb923c; }
.legend-item.level-4::before { background: #ef4444; }

.weather-map-icon {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 0.95rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(15, 23, 42, 0.2);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.2);
}

body.dark-mode .weather-map-icon {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(255, 255, 255, 0.2);
}

.weather-map-icon.level-2 { border-color: rgba(250, 204, 21, 0.9); }
.weather-map-icon.level-3 { border-color: rgba(249, 115, 22, 0.9); }
.weather-map-icon.level-4 { border-color: rgba(239, 68, 68, 0.9); }

 .weather-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.weather-summary-card {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.7);
    border: 1px solid rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

body.dark-mode .weather-summary-card {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(148, 163, 184, 0.2);
}

.weather-summary-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.7;
}

.weather-summary-value {
    font-size: 1.1rem;
    font-weight: 700;
}

.weather-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.weather-section-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    opacity: 0.8;
}

.weather-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.weather-card {
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.weather-card[data-dept] {
    cursor: pointer;
}

.weather-card[data-dept]:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.14);
}

body.dark-mode .weather-card {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow: 0 12px 24px rgba(2, 6, 23, 0.4);
}

body.dark-mode .weather-card[data-dept]:hover {
    box-shadow: 0 16px 30px rgba(2, 6, 23, 0.6);
}

.weather-card.level-1 {
    background: rgba(34, 197, 94, 0.8);
    border-color: rgba(34, 197, 94, 0.35);
}

.weather-card.level-2 {
    background: rgba(250, 204, 21, 0.8);
    border-color: rgba(250, 204, 21, 0.45);
}

.weather-card.level-3 {
    background: rgba(249, 115, 22, 0.8);
    border-color: rgba(249, 115, 22, 0.45);
}

.weather-card.level-4 {
    background: rgba(239, 68, 68, 0.8);
    border-color: rgba(239, 68, 68, 0.45);
}

body.dark-mode .weather-card.level-1 {
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.4);
}

body.dark-mode .weather-card.level-2 {
    background: rgba(250, 204, 21, 0.2);
    border-color: rgba(250, 204, 21, 0.5);
}

body.dark-mode .weather-card.level-3 {
    background: rgba(249, 115, 22, 0.2);
    border-color: rgba(249, 115, 22, 0.5);
}

body.dark-mode .weather-card.level-4 {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}

.weather-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.weather-card-title {
    font-weight: 700;
    text-transform: capitalize;
}

.weather-card-meta {
    font-size: 0.78rem;
    opacity: 0.8;
}

.weather-card-times {
    font-size: 0.75rem;
    opacity: 0.75;
}
#weather-map-container {
    height: 680px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: #f0f4f8;
    z-index: 10;
    display: grid;
    place-items: center;
}
body.dark-mode #weather-map-container {
    background: #0f172a;
    border-color: rgba(148, 163, 184, 0.2);
}

.weather-loader {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(15, 23, 42, 0.7);
}

body.dark-mode .weather-loader {
    color: rgba(248, 250, 252, 0.7);
}

.leaflet-interactive {
    cursor: pointer !important;
}

#weather-details-list h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-color);
    border-left: 4px solid #1d4ed8;
    padding-left: 10px;
}

/* Couleurs de vigilance */
.map-dept-vert { fill: #22c55e; fill-opacity: 0.6; stroke: #fff; stroke-width: 1; }
.map-dept-jaune { fill: #facc15; fill-opacity: 0.7; stroke: #fff; stroke-width: 1; }
.map-dept-orange { fill: #f97316; fill-opacity: 0.8; stroke: #fff; stroke-width: 1; }
.map-dept-rouge { fill: #ef4444; fill-opacity: 0.9; stroke: #fff; stroke-width: 1; }

.dept-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    background: rgba(0,0,0,0.03);
}

body.dark-mode .dept-row { background: rgba(255,255,255,0.05); }

.dept-badge {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 700;
}

.dept-info { flex: 1; }
.dept-name { font-weight: 600; font-size: 1rem; }
.dept-phenomenon { font-size: 0.85rem; opacity: 0.8; }