/* ==========================================================================
   1. DÉCLARATION DE LA POLICE (ANTON)
   ========================================================================== */
@font-face {
    font-family: 'Anton';
    src: url('../assets/fonts/Anton-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   2. VARIABLES & BLOCAGE DU SCROLL (100VH)
   ========================================================================== */
:root {
    /* Mise à jour pour utiliser la police 'Anton' définie ci-dessus */
    --font-main: 'Anton', Impact, sans-serif;
    --color-bg: #0a0a0a;
    --color-text: #ffffff;
    --color-accent: #0089D0;
    --menu-width: 25vw;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    min-height: 100vh; /* Remplace "height" par "min-height" pour autoriser l'agrandissement */
    overflow-x: hidden;
    /* On supprime overflow: hidden; pour réactiver le défilement vertical naturel */
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Maintient l'image de fond fixe pendant le scroll */
    
    /* Structure Flexbox pour gérer le positionnement du footer */
    display: flex;
    flex-direction: column; 
}

a {
    color: inherit;
    text-decoration: none;
}

/* ==========================================================================
   3. BOUTON MENU + TEXTE "MENU" & PANNEAU LATÉRAL (1/4 ÉCRAN)
   ========================================================================== */
.menu-toggle {
    position: fixed;
    top: 40px;
    left: 40px;
    z-index: 1001;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--color-text);
    font-family: var(--font-main);
    transition: gap 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.burger-lines {
    width: 40px;
    height: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.burger-lines span {
    display: block;
    width: 100%;
    height: 5px;
    background-color: var(--color-text);
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
}

.menu-label {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    max-width: 160px;
    padding: 4px 0;
    font-size: clamp(1.8rem, 2.2vw, 2.8rem);
    letter-spacing: clamp(1px, 0.2vw, 3px);
    line-height: 1;
    opacity: 1;
    transform: translateX(0);
    transition:
        color 0.3s ease,
        max-width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.25s ease,
        transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-toggle.active .burger-lines span:nth-child(1) {
    transform: translateY(12.5px) rotate(45deg);
    background-color: var(--color-accent);
}
.menu-toggle.active .burger-lines span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active .burger-lines span:nth-child(3) {
    transform: translateY(-12.5px) rotate(-45deg);
    background-color: var(--color-accent);
}
.menu-toggle.active .menu-label {
    color: var(--color-accent);
}

/* Rétractation du mot "MENU" au scroll (réapparaît en bleu si le menu est ouvert) */
.menu-toggle.is-scrolled:not(.active) {
    gap: 0;
}

.menu-toggle.is-scrolled:not(.active) .menu-label {
    max-width: 0;
    opacity: 0;
    transform: translateX(-18px);
    pointer-events: none;
}

/* Coupe temporairement les transitions pour afficher le menu ouvert sans saut au chargement */
.no-transition,
.no-transition * {
    transition: none !important;
}

/* Voile de fondu fluide entre les pages (au-dessus du contenu/footer, sous le menu) */
.page-transition-veil {
    position: fixed;
    inset: 0;
    background-color: var(--color-bg);
    opacity: 0;
    pointer-events: none;
    z-index: 950;
    transition: opacity 0.35s ease;
}

.page-transition-veil.is-active {
    opacity: 1;
    pointer-events: all;
    transition: opacity 0.22s ease;
}

.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--menu-width);
    min-width: 320px;
    height: 100vh;
    background-color: rgba(10, 10, 10, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-right: 3px solid var(--color-accent);
    box-shadow: 15px 0 40px rgba(0, 0, 0, 0.85);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 110px 45px 50px;
}

.side-menu.open {
    transform: translateX(0);
}

.side-menu ul {
    list-style: none;
    height: 100%;
    max-height: 75vh;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
}

.side-menu li {
    margin: 0;
}

.side-menu a {
    font-size: clamp(2.8rem, 3.4vw, 3.8rem);
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.95);
    transition: color 0.2s ease, padding-left 0.2s ease, transform 0.2s ease;
    display: block;
}

.side-menu a:hover {
    color: var(--color-accent);
    padding-left: 18px;
    transform: scale(1.03);
}

.side-menu a.is-active {
    color: var(--color-accent);
    padding-left: 18px;
    border-left: 4px solid var(--color-accent);
}

/* ==========================================================================
   5. PIED DE PAGE (FOOTER)
   ========================================================================== */
.site-footer {
    margin-top: auto;
    width: 100%;
    padding: 16px 20px;
    background: rgba(5, 5, 5, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-top: 3px solid var(--color-accent);
    text-align: center;
    z-index: 900;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.footer-socials {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
}

.footer-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #aaaaaa;
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-socials a:hover {
    color: var(--color-accent);
    transform: translateY(-2px);
}

.footer-socials svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.site-footer p {
    font-family: Arial, sans-serif;
    font-size: clamp(0.7rem, 1vw, 0.85rem);
    color: #777777;
    margin: 0;
}

.site-footer a {
    color: #aaaaaa;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: var(--color-accent);
}

/* ==========================================================================
   FOND SPÉCIFIQUE DES PAGES LÉGALES
   ========================================================================== */
body:has(.legal-main) {
    background-image: url('../assets/img/ui/bg-pages-legales.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Maintient l'image fixe pendant le scroll */
}

/* ==========================================================================
   7. PAGES TEXTES (MENTIONS LÉGALES & CONFIDENTIALITÉ)
   ========================================================================== */
.legal-main {
    width: clamp(320px, 90vw, 1000px);
    margin: clamp(100px, 15vh, 120px) auto clamp(40px, 8vh, 80px);
    background: rgba(10, 10, 10, 0.92);
    padding: clamp(20px, 4vw, 50px);
    border-left: 5px solid var(--color-accent);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.95);
    color: #cccccc;
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

.legal-main h1 {
    font-family: var(--font-main);
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    color: #ffffff;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.legal-main h2 {
    font-family: var(--font-main);
    font-size: clamp(1.5rem, 2vw, 2rem);
    color: var(--color-accent);
    margin: 30px 0 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.legal-main p, .legal-main ul {
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
    margin-bottom: 15px;
}

.legal-main ul {
    padding-left: 20px;
}

.legal-main li {
    margin-bottom: 8px;
}

.legal-main a {
    color: var(--color-accent);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.legal-main a:hover {
    color: #ffffff;
}

/* ==========================================================================
   4. RÈGLES MOBILE / TABLETTE (PLACÉES À LA FIN POUR PRIORITÉ ABSOLUE)
   ========================================================================== */
@media (max-width: 768px) {
    .side-menu {
        width: 100vw !important;
        min-width: 100vw !important;
        padding: 100px 20px 40px;
        justify-content: center;
        align-items: center;
        text-align: center;
    }
    .side-menu ul {
        max-height: 80vh;
        width: 100%;
    }
    .side-menu a.is-active {
        padding-left: 0;
        border-left: none;
    }
}

