@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;1,500&family=Montserrat:wght@200;300;400;600&display=swap');

body { 
    color: var(--coffee-cream); 
    background: linear-gradient(to top, var(--coffee-dark) 80%, var(--coffee-brown) 96%, var(--coffee-light) 100%); 
    min-height: 100vh; 
    font-family: var(--font-body);
    overflow-x: hidden;
}

/* Texture bois en overlay */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('https://www.transparenttextures.com/patterns/wood-pattern.png');
    opacity: 0.01;
    pointer-events: none;
    z-index: 0;
}

/* --- 2. LOADER (Dimensions ajustées & Vapeur centrée) --- */
.loader-wrapper {
    position: fixed;
    inset: 0;
    background-color: var(--coffee-dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s;
}

.loader-hidden { opacity: 0; visibility: hidden; }

.cup-container {
    position: relative;
    width: 80px;
    height: 70px;
}

.coffee-cup {
    width: 100%;
    height: 100%;
    border: 5px solid var(--coffee-light2);
    border-bottom-left-radius: 35px;
    border-bottom-right-radius: 35px;
    position: relative;
    overflow: hidden;
    z-index: 2;
}

.coffee-liquid {
    position: absolute;
    top: 100%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-color: var(--coffee-brown2);
    border-radius: 40%;
    animation: fillAndWave 4s infinite ease-in-out;
}

@keyframes fillAndWave {
    0% {
        top: 100%;
        transform: rotate(0deg);
    }
    50% {
        top: 0%; /* Tasse pleine */
        transform: rotate(180deg);
    }
    100% {
        top: -10%; /* Déborde légèrement ou reste plein */
        transform: rotate(360deg);
    }
}

.cup-handle {
    width: 20px;
    height: 30px;
    border: 5px solid var(--coffee-light2);
    border-left: none;
    border-radius: 0 15px 15px 0;
    position: absolute;
    top: 35px;
    right: -25px;
}

.steam-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-bottom: 10px;
}

.steam-line {
    width: 4px;
    height: 20px;
    background-color: var(--coffee-cream);
    border-radius: 10px;
    opacity: 0;
    animation: steamRise 2s infinite ease-in-out;
}

@keyframes steamRise {
    0% { transform: translateY(0); opacity: 0; }
    50% { transform: translateY(-10px); opacity: 0.5; }
    100% { transform: translateY(-20px); opacity: 0; }
}

/* --- 3. HEADER (Identique Index) --- */
header {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
}

.logo-container {
    position: relative;
    width: 90%;
    max-width: 800px;
    z-index: 10;
}

/* Conteneur du Logo Massif */
.logo-container {
    position: relative;
    z-index: 10; 
    width: 95%; /* Prend presque toute la largeur sur mobile */
    max-width: 800px; /* Très grand sur PC comme la maquette */
    margin-top: 10px;
}

.logo-img {
    width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 10; /* Passe devant le marbre et les lignes */
    opacity: 0; /* On force l'invisibilité au départ */
}

body.loaded .logo-img { animation: fadeInUp 0.8s ease forwards; }

.header-bg-image {
    position: absolute;
    top: -50px; left: 50%;
    transform: translateX(-50%);
    width: 100vw; height: 60%;
    background: linear-gradient(rgba(243, 182, 31, 0.2), rgba(243, 182, 31, 0.2)), 
                url('./img/marble.jpg') center top / cover no-repeat;
    z-index: 1;
}

/* --- 4. CONTENU LÉGAL (Harmonisé Bento) --- */
.legal-container {
    /* Aligné sur la largeur max du Bento (1400px) ou plus serré pour la lecture (1000px) */
    max-width: 1000px; 
    margin: 40px auto;
    
    /* On reprend exactement le style des bento-item */
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
    padding: 60px; /* Padding généreux comme sur PC */
    border-radius: 5px;
    
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(20px);
}

body.loaded .legal-container { 
    animation: fadeInUp 0.8s ease forwards; 
}

.legal-container h1 {
    font-family: var(--font-titles);
    font-size: 2.5rem;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 40px;
}

.legal-container h2 {
    color: var(--coffee-light2);
    margin-top: 35px;
    border-left: 3px solid var(--coffee-light);
    padding-left: 15px;
    font-size: 1.6rem;
}

.legal-container p, .legal-container li {
    font-size: 0.95rem;
    color: var(--coffee-cream);
    margin-bottom: 15px;
    line-height: 1.8;
}

.legal-container ul { padding-left: 20px; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- 5. FOOTER & RESPONSIVE --- */
footer { padding: 40px; text-align: center; font-size: 0.8rem; }
footer a { color: var(--coffee-light); text-decoration: none; }

/* --- 6. RESPONSIVE --- */

/* Tablettes et PC portables */
@media (max-width: 1100px) {
.legal-container {
        max-width: 900px;
        margin: 0px 15px;
        padding: 40px;
    }
}

/* Mobiles et Tablettes portrait */
@media (max-width: 768px) {
    
    header {
        min-height: 380px;
        padding-top: 10px;
        margin-bottom: 0;
    }

    /* Le décor s'ajuste par rapport à la taille du logo container */
    .header-bg-image {
        height: 60%; /* Ancrage relatif au logo */
        background-position: center top; 
        background-size: 200%;
    }

    .header-lines-container {
        top: calc(56% - 30px); /* Suit la fin du marbre */
        gap: 8px;
    }

    .line1 { height: 6px; }
    .line2 { height: 12px; }

    .logo-container {
        margin-top: 0;
        margin-bottom: 0;
    }

.legal-container {
        margin: 0px 15px;
        padding: 30px 20px; /* On réduit le padding pour laisser de la place au texte */
    }
    
    .legal-container h1 {
        font-size: 1.8rem;
    }
    
    .legal-container h2 {
        font-size: 1.3rem;
    }
}

/* Petits Mobiles */
@media (max-width: 480px) {
    header {
        min-height: 300px;
        margin-bottom: 0;
    }

    .header-bg-image {
        height: 60%; 
        background-size: 250%;
    }

    .header-lines-container {
        top: calc(51% - 20px);
        gap: 5px;
    }

    .line1 { height: 4px; }
    .line2 { height: 8px; }


.legal-container {
        margin: 0px 15px;
        padding: 25px 15px;
        border-radius: 5px;
    }

    .legal-container p, .legal-container li {
        font-size: 0.9rem;
    }

}