/* RESET */


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Sylfaen', sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
}

/* HEADER */
.header {
    background: rgba(0, 94, 153, 0.85);
    backdrop-filter: blur(6px);
    color: #FFCD19;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 20px;
    transition: padding 0.3s ease;
}

.header-container {
    max-width: 1200px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    color: #FFCD19;
    font-family: 'cinzel', serif;
    text-transform: uppercase;
    font-size: 26px;
    font-weight: bold;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s ease;
}

.site-title:hover {
    transform: scale(1.05);
}

.logo {
    height: 40px;
}

/* NAV DESKTOP */
.nav-desktop {
    font-family: 'Sylfaen', sans-serif;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-desktop > a,
.nav-desktop .dropbtn {
    font-size: 18px;
    font-family: 'Sylfaen', sans-serif;
    color: #FFCD19;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 20px;
    transition: background 0.3s ease, color 0.3s ease;
    background: none;
    border: none;
    cursor: pointer;
    /* Ajout pour aligner correctement */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.nav-desktop > a:hover,
.nav-desktop .dropdown:hover > .dropbtn {
    background-color: #FFD700;
    color: #003F66;
}

/* PROGRAMMATION */


.dropdown {
    position: relative;
    display: inline-block; /* Important pour l'alignement */
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%; /* Changé de 120% à 100% pour coller au bouton */
    left: 50%;
    transform: translateX(-50%);
    background: white;
    min-width: 200px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    opacity: 0;
    pointer-events: none; /* Empêche les interactions quand caché */
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 1001;
    /* Ajout d'un petit espace pour éviter que le menu se ferme */
    margin-top: 2px;
}

.dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.dropdown-content a {
    color: black;
    padding: 10px 14px;
    display: block;
    text-decoration: none;
    font-size: 16px;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.dropdown-content a:hover {
    background: #f5f5f5;
}

/* Animation améliorée */
@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Zone de tolérance pour éviter la fermeture du menu */
.dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 5px;
    background: transparent;
    z-index: 999;
}

/* MENU MOBILE */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger {
    width: 28px;
    height: 20px;
    position: relative;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: white;
    border-radius: 3px;
    position: absolute;
    transition: all 0.3s ease;
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 8px; }
.hamburger span:nth-child(3) { top: 16px; }

.mobile-menu-btn.active .hamburger span:nth-child(1) {
    top: 8px;
    transform: rotate(45deg);
}

.mobile-menu-btn.active .hamburger span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger span:nth-child(3) {
    top: 8px;
    transform: rotate(-45deg);
}

.nav-mobile {
    display: none;
    flex-direction: column;
    background: rgba(0, 94, 153, 0.95);
    backdrop-filter: blur(5px);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

.nav-mobile.show {
    max-height: 500px;
    opacity: 1;
}

.nav-mobile a,
.mobile-dropdown-btn {
    padding: 12px;
    color: #FFCD19;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 205, 25, 0.2);
    transition: background 0.3s ease;
}

.nav-mobile a:hover,
.mobile-dropdown-btn:hover {
    background: #FFD700;
    color: #003F66;
}

.mobile-dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-dropdown.active .mobile-dropdown-content {
    max-height: 300px;
}

/* FOOTER */
.footer {
    background: #003F66;
    color: white;
    padding: 40px 20px 20px;
}

.footer-container {
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.footer-col h4 {
    font-size: 18px;
    margin-bottom: 15px;
    border-bottom: 2px solid #FFCD19;
    padding-bottom: 5px;
}

.footer-logo img {
    width: 180px;
    margin-bottom: 10px;
}

.footer-links a,
.footer-socials a {
    display: block;
    color: white;
    margin: 5px 0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer-links a:hover,
.footer-socials a:hover {
    color: #FFCD19;
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 14px;
}

.footer-bottom a {
    color: #FFCD19;
}

@media (max-width: 1049px) {
    .nav-desktop { display: none; }
    .mobile-menu-btn { display: block; }
    .nav-mobile { display: flex; }
}

@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
}