/* Justification globale des paragraphes */
p {
    text-align: justify;
    text-justify: inter-word;
}
/* --- RESET & BASES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* 1. FOND STABLE (Correction iPhone/Mobile) */
html {
    background-color: #f4f1ea; 
    overflow-x: hidden;
}

body {
    background-color: transparent;
    min-height: 100vh;
    min-height: 100dvh; 
    
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

/* 2. IMAGE DE FOND FIXE (Ne bouge jamais) */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    
    background-image: url('fond-sakuri.png');
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    
    z-index: -1; 
    will-change: transform;
    pointer-events: none;
}

/* --- LE HEADER --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px; 
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* Laisse passer le clic */
}
/* On réactive le clic sur le logo */
.site-header img { pointer-events: auto; }

/* =========================================
   --- NAVIGATION ---
   ========================================= */

/* BOUTON BURGER */
.menu-toggle {
    position: fixed;
    top: 25px;
    left: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 2000; /* Au-dessus de tout */
    display: flex;
    flex-direction: column;
    gap: 6px;
    pointer-events: auto;
}

.menu-toggle span {
    display: block;
    width: 30px;
    height: 2px;
    /* DÉFAUT : NOIR (sur le fond clair du site) */
    background-color: #1a1a1a; 
    transition: all 0.3s ease;
}

/* QUAND ACTIF : BLANC (sur le fond sombre de l'overlay) */
.menu-toggle.active span {
    background-color: #ffffff;
}

/* Animation de la croix */
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* SIDEBAR (Le Menu) */
.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 250px;
    height: 100vh;
    
    /* Fond transparent, on laisse l'overlay gérer l'assombrissement */
    background-color: transparent;
    
    padding-top: 100px;
    padding-left: 40px;
    transition: left 0.4s ease;
    z-index: 1500;
}

.sidebar.active { left: 0; }
.sidebar ul { list-style: none; }
.sidebar ul li { margin-bottom: 20px; }

.sidebar ul li a {
    text-decoration: none;
    
    /* CORRECTION : Retour à la taille normale (1.2rem au lieu de 1.5rem) */
    font-size: 1.2rem;
    
    /* TEXTE BLANC (Pour la visibilité demandée) */
    color: #ffffff; 
    
    font-weight: 300;
    transition: color 0.3s;
}

.sidebar ul li a:hover { color: #cccccc; }

/* OVERLAY (Le fond sombre) */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* On assombrit un peu plus (0.85) pour bien voir le texte blanc */
    background: rgba(0,0,0,0.85);
    
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 1400;
}
.overlay.active { opacity: 1; visibility: visible; }


/* --- CONTENEUR GLOBAL --- */
.container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4rem;
    padding: 2rem;
    margin-top: 100px; 
    padding-bottom: 6rem; 
    flex: 1; 
}

/* --- ÉLÉMENTS GLOBAUX --- */
body.fade-out {
    opacity: 0;
    transform: scale(1.1);
}

.logo {
    max-width: 350px;
    width: 90%;
    height: auto;
    animation: fadeIn 1s ease-in;
    image-rendering: -webkit-optimize-contrast;
}

.btn-modern {
    display: inline-block;
    padding: 0.75rem 2.5rem;
    font-size: 1rem;
    font-weight: 400;
    text-decoration: none;
    color: #1a1a1a;
    background: transparent;
    border: 1.5px solid #1a1a1a;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 10;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-modern:hover::before { left: 0; }
.btn-modern:hover { color: #edebe8; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Footer Mentions Légales (global) --- */
.legal-footer {
    position: static;
    width: 100%;
    text-align: center;
    margin-top: 2rem;
    padding: 1.5rem 0 1rem;
}

@media (min-width: 769px) {
    .legal-footer {
        position: fixed;
        bottom: 1rem;
        left: 0;
        width: 100%;
        z-index: 100;
        margin-top: 0; /* avoid extra spacing affecting viewport */
        padding: 0.5rem 0;
    }
}

.legal-footer a {
    font-size: 0.7rem;
    color: #1a1a1a;
    text-decoration: none;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.legal-footer a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* --- PETIT LOGO HEADER --- */
.header-logo {
    width: 180px;
    height: auto;
}

/* =========================================
   --- SPÉCIAL PAGE ABOUT (Le Polaroïd) ---
   ========================================= */

.about-grid {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 4rem;
    width: 100%;
    max-width: 1000px;
}

.polaroid-wrapper {
    background-color: #fff;
    padding: 15px 15px 25px 15px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transform: rotate(-2deg);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 320px; 
    flex-shrink: 0;
    position: relative; 
    overflow: hidden; 
}

.polaroid-wrapper::before {
    content: "";
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 10;
}

.polaroid-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease; 
}

.polaroid-caption {
    position: absolute;
    bottom: 35px; 
    left: 50%;
    transform: translateX(-50%); 
    
    background-color: #1a1a1a;
    color: #fff;
    padding: 8px 15px;
    font-size: 0.8rem;
    border-radius: 4px;
    text-align: center;
    font-family: monospace;
    white-space: nowrap; 
    
    opacity: 0;
    transition: opacity 0.3s ease, bottom 0.3s ease;
    z-index: 5;
}

.polaroid-wrapper:hover .polaroid-caption {
    opacity: 1;
    bottom: 40px; 
}

.polaroid-wrapper:hover img {
    transform: scale(1.02);
}

.about-text {
    flex: 1;
    text-align: left;
    padding-top: 20px;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.about-text p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: #333;
}

/* --- MEDIA QUERIES (MOBILE) --- */
@media (max-width: 900px) {
    .about-grid {
        flex-direction: column;
        align-items: center;
        gap: 3rem;
    }

    .polaroid-wrapper {
        transform: rotate(0deg);
        width: 100%;
        max-width: 350px;
    }
    
    .about-text {
        padding-top: 0;
    }
}

@media (max-width: 768px) {
    .site-header { height: 70px; }
    .container { 
        padding: 1.5rem; 
        margin-top: 80px;
        gap: 3rem;
    }
    .logo { max-width: 250px; }
    .header-logo { width: 120px; }
    .about-text h2 { font-size: 2rem; }
}

@media (max-width: 480px) {
    .header-logo { width: 100px; }
}