/* ========================================
   IMPORTS ET STYLES GÉNÉRAUX
======================================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@700&display=swap');

/* Reset global et prévention du scroll horizontal */
*, *:before, *:after {
    box-sizing: border-box;
    max-width: 100%;
}

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Empêche le scroll horizontal */
    width: 100%;
    max-width: 100%;
}

body {
    background-color: #FCFCFC;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: Arial, sans-serif;
}

/* ========================================
   BARRE DE NAVIGATION PRINCIPALE
======================================== */
.navbar {
    background-color: white;
    font-size: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    width: 100%;
    top: 0px;
    border-bottom: 1px solid #ccc;
    padding: 0 20px;
    position: sticky;
    z-index: 9000; /* Z-index élevé mais en dessous du menu */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    gap: 10px;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* ========================================
   LOGO ET NOM DU SITE
======================================== */
.logo-container {
    display: flex;
    align-items: center;
    margin-right: 15px; /* Réduit pour rapprocher du texte */
    flex-shrink: 0;
}

.logo-container a {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
}

.logo {
    height: auto;
    max-height: 60px; /* Augmenté de 55px à 60px */
    width: auto;
    max-width: 60px; /* Augmenté pour un logo moins rétréci */
}

.site-name {
    font-family: "Poppins", sans-serif;
    color: #007C70;
    font-size: 24px;
    font-weight: bold;
    margin-left: 5px; /* Réduit de 10px à 5px pour rapprocher */
    white-space: nowrap;
}

.site-name a {
    font-family: "Poppins", sans-serif;
    color: #007C70;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    padding-left: 15px; /* Réduit de 20px à 15px */
}

.site-name a:hover, .site-name a:focus {
    text-decoration: none;
}

/* ========================================
   NAVIGATION DESKTOP
======================================== */
.desktop-nav.nav-links {
    list-style-type: none;
    margin: 0;
    margin-left: auto; /* Pousse la navigation vers la droite */
    padding: 0;
    display: flex;
    gap: 25px; /* Augmenté de 20px à 25px pour plus d'espacement */
    justify-content: flex-end; /* Alignement à droite */
    max-width: none; /* Supprime la limite de largeur */
    margin-right: 15px; /* Rapproche du bord droit */
}

.desktop-nav.nav-links li {
    position: relative;
    text-align: center;
    font-family: "Arial Black", sans-serif;
}

.desktop-nav.nav-links li a {
    text-decoration: none;
    color: black;
    transition: color 0.3s;
    padding: 8px 12px; /* Augmenté de 5px 10px à 8px 12px */
    border: 2px solid transparent;
    background-color: transparent;
    margin: 0;
    white-space: nowrap;
}

.desktop-nav.nav-links li a:hover {
    color: #A9A9A9;
}

.desktop-nav.nav-links li a.active {
    color: #007C70;
}

/* ========================================
   MENU HAMBURGER (MOBILE)
======================================== */
.hamburger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    z-index: 999999 !important; /* Z-index maximum avec !important */
    cursor: pointer !important;
    padding: 10px;
    position: relative !important;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    transition: background-color 0.3s ease;
    pointer-events: auto !important; /* Force les événements de clic */
    touch-action: manipulation !important; /* Optimise pour le touch */
}

.hamburger-menu:hover {
    background: rgba(255, 255, 255, 0.2);
}

.hamburger-menu .bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    transition: all 0.3s ease;
    pointer-events: none; /* Les barres ne capturent pas les clics */
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    pointer-events: none; /* Les barres ne capturent pas les clics */
}

/* ========================================
   NAVIGATION MOBILE
======================================== */
.mobile-nav {
    position: fixed;
    top: 0;
    bottom: 0;
    left: -100%;
    width: 250px;
    max-width: 80vw;
    height: 100vh;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 999998 !important;
    transition: left 0.3s ease;
    overflow-y: auto;
    pointer-events: auto !important;
    visibility: hidden; /* ← remplace display:none */
    opacity: 0;
}

.mobile-nav.open {
    left: 0;
    visibility: visible;
    opacity: 1;
}

.mobile-nav.nav-links {
    display: flex;
    flex-direction: column;
    list-style-type: none;
    padding: 60px 0 0 0;
    margin: 0;
    border-bottom: 1px solid #d3d3d3;
}

.mobile-nav.nav-links li {
    text-align: left;
    width: 100%;
    border-bottom: 1px solid #d3d3d3;
}

.mobile-nav.nav-links li:first-child {
    border-top: 1px solid #d3d3d3;
}

.mobile-nav.nav-links li a {
    display: block;
    padding: 20px;
    text-align: left;
    font-size: 16px;
    width: 100%;
    text-decoration: none;
    font-family: Arial, sans-serif;
    font-weight: bold;
    color: #000;
    box-sizing: border-box;
    transition: color 0.3s ease;
}

.mobile-nav.nav-links li a:hover {
    color: #A9A9A9;
}

.mobile-nav.nav-links li a.active {
    color: #007C70;
}

/* ========================================
   CONTENU PRINCIPAL
======================================== */
.main-content {
    padding-top: 90px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* ========================================
   FOOTER (BAS DE PAGE)
======================================== */
.site-footer {
    background-color: #FBFBFB;
    font-family: Arial, sans-serif;
    width: 100%;
    max-width: 100%;
    margin-top: auto;
    border-top: 1px solid #D3D3D3;
    box-sizing: border-box;
    overflow-x: hidden; /* Empêche le débordement */
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Répartit l'espace */
    padding: 15px 20px;
    max-width: 100%;
    box-sizing: border-box;
    flex-wrap: wrap; /* Permet le passage à la ligne si nécessaire */
    gap: 15px;
}

.footer-link {
    font-size: 13px;
    text-decoration: none;
    color: #818589;
    display: flex;
    flex-direction: row;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-text {
    font-size: 14px;
    text-align: left;
    color: #D3D3D3;
    flex-shrink: 0;
}

/* Logo X Twitter - Correction du débordement */
.x-logo {
    margin-left: auto;
    display: flex;
    align-items: center;
    flex-shrink: 0; /* Empêche la compression */
    max-width: 40px; /* Limite la largeur */
}

.x-logo img {
    width: 30px;
    height: auto;
    max-width: 30px; /* Assure qu'il ne dépasse pas */
}

.footer-advice {
    font-size: 12px;
    padding: 5px 20px 10px 20px;
    color: gray;
    font-family: Arial, sans-serif;
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
}

.footer-advice a {
    color: gray;
    text-decoration: underline;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ========================================
   STYLES COOKIEYES
======================================== */
#cky-consent-container,
#cky-preference-popup,
#cookieyes-button {
    font-family: 'Poppins', sans-serif !important;
    font-size: 14px;
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE
======================================== */
@media (max-width: 800px) {
    /* Force la suppression du scroll horizontal sur mobile */
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Cache complètement la navigation desktop */
    .desktop-nav,
    .desktop-nav.nav-links {
        display: none !important;
    }

    /* Affiche le menu hamburger */
    .hamburger-menu {
        display: flex;
    }

    /* Navbar mobile - Layout correct */
    .navbar {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 10px 15px;
        height: 60px;
        position: sticky;
        gap: 15px;
    }

    /* Hamburger à gauche */
    .hamburger-menu {
        display: flex;
        order: 1;
        flex-shrink: 0;
    }

    /* Logo container repositionné pour mobile */
    .logo-container {
        display: flex;
        align-items: center;
        order: 2;
        margin: 0;
        padding: 0;
        flex-shrink: 0;
    }

    .logo-container a {
        display: flex;
        align-items: center;
        gap: 8px;
        padding-left: 0; /* Supprime le padding sur mobile */
    }

    /* Logo mobile */
    .logo {
        width: 45px;
        max-width: 45px;
        height: auto;
        order: 2;
        flex-shrink: 0;
    }

    /* BetproB à droite sur mobile */
    .site-name {
        font-size: 22px;
        margin: 0;
        margin-left: auto;
        order: 3;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .site-name a {
        font-size: 22px;
        margin: 0;
        padding: 0; /* Supprime le padding sur mobile */
    }

    /* Footer mobile - Correction majeure */
    .site-footer {
        text-align: center;
        padding: 0 10px;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding: 15px 10px;
        text-align: center;
    }

    .footer-link {
        font-size: 11px;
        justify-content: center;
        gap: 10px;
        flex-wrap: wrap;
        max-width: 100%;
    }

    .footer-text {
        font-size: 12px;
        text-align: center;
        margin: 5px 0;
    }

    .footer-advice {
        font-size: 11px;
        padding: 10px;
        text-align: center;
        margin: 0;
        line-height: 1.4;
    }

    /* Logo X mobile - Centré et sans débordement */
    .x-logo {
        margin: 10px auto 0 auto;
        display: flex;
        justify-content: center;
        width: 100%;
        max-width: 40px;
    }

    .x-logo img {
        width: 25px;
        max-width: 25px;
        height: auto;
    }

    /* Contenu principal mobile */
    .main-content {
        padding-top: 70px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Menu mobile responsive */
    .mobile-nav {
        width: 280px;
        max-width: 85vw;
    }

    .mobile-nav.nav-links li a {
        padding: 18px 15px;
        font-size: 15px;
    }
}