/*
Theme Name: Gipsy Studio Theme Final
Author: Gipsy Studio
Description: Version V15 - Mobile Fixed & Helvetica Typography.
Version: 1.5
*/

/* --- 1. CONFIGURATION DE BASE --- */
:root {
    --bg-color: #F4F1EA;
    --text-color: #1a1a1a;
    --loader-bg: #333333;
    --font-main: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    
    --sidebar-closed-width: 60px;
    --sidebar-open-width: 320px;
    --border-color: #dcdcdc;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden; /* Empêche le scroll horizontal */
    -webkit-font-smoothing: antialiased;
    margin: 0;
    padding: 0;
}

/* --- 2. UTILITAIRES --- */
.hidden { display: none !important; }
.page-section { opacity: 0; animation: fadeIn 0.5s forwards; }
@keyframes fadeIn { to { opacity: 1; } }

/* --- 3. LOADER (Écran de chargement) --- */
#loader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--loader-bg); color: white;
    display: flex; justify-content: center; align-items: center;
    z-index: 9999; 
    transition: opacity 0.4s ease; opacity: 1; pointer-events: auto;
}
#loader .loader-logo { 
    font-weight: bold; font-size: 2.5rem; letter-spacing: -1px; 
}
#loader.hidden { opacity: 0; pointer-events: none; }

/* --- 4. SIDEBAR (Menu Gauche) --- */
.sidebar {
    position: fixed; top: 0; left: 0; 
    height: 100vh; width: var(--sidebar-closed-width);
    background-color: var(--bg-color); 
    border-right: 1px solid var(--border-color);
    display: flex; flex-direction: column; padding: 30px 0;
    transition: width 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 3000; /* Toujours au-dessus de tout */
    align-items: center;
}

body.menu-open .sidebar { 
    width: var(--sidebar-open-width); 
    padding: 40px; 
    align-items: flex-start; 
}

/* LOGOS */
.logo-container { margin-bottom: 40px; width: 100%; height: 30px; position: relative; }
.logo { 
    font-weight: bold; font-size: 1.6rem; cursor: pointer; letter-spacing: -0.5px;
    position: absolute; top: 0; left: 0; transition: opacity 0.3s;
    color: #1a1a1a; text-decoration: none;
}
.logo-short { opacity: 1; left: 50%; transform: translateX(-50%); }
.logo-full { opacity: 0; pointer-events: none; white-space: nowrap; }

body.menu-open .logo-short { opacity: 0; }
body.menu-open .logo-full { opacity: 1; pointer-events: auto; left: 0; transform: none; }

/* BOUTON MENU */
.menu-trigger {
    cursor: pointer; writing-mode: vertical-rl;
    text-orientation: mixed; transform: rotate(180deg); font-size: 0.75rem;
    letter-spacing: 2px; text-transform: uppercase; margin-top: 20px; transition: opacity 0.3s;
}
body.menu-open .menu-trigger { opacity: 0; pointer-events: none; }

/* CONTENU DU MENU (Liens) */
.nav-content {
    opacity: 0; display: flex; flex-direction: column; width: 100%; height: 100%;
    transform: translateX(-20px); transition: all 0.4s ease 0.1s; pointer-events: none;
    justify-content: space-between;
}
body.menu-open .nav-content { opacity: 1; transform: translateX(0); pointer-events: auto; }

.nav-links { display: flex; flex-direction: column; gap: 15px; }
.nav-links a { text-decoration: none; color: #1a1a1a; font-size: 1.1rem; cursor: pointer; }
.nav-links a:hover { color: #666; }

.nav-footer { display: flex; flex-direction: column; gap: 20px; margin-top: auto; }
.nav-footer-links a { display: block; text-decoration: none; color: #1a1a1a; font-size: 0.9rem; margin-bottom: 8px; cursor: pointer;}
.nav-icons { display: flex; gap: 15px; font-size: 1.2rem; border-top: 1px solid #ddd; padding-top: 20px; }

/* --- 5. CONTACT OVERLAY (Bannière qui descend) --- */
#contact-overlay {
    position: fixed; top: 0; 
    left: var(--sidebar-closed-width); 
    width: calc(100% - var(--sidebar-closed-width));
    height: auto; min-height: 55vh;
    background-color: #2e2e2e; color: #b3b3b3;
    padding: 0; 
    z-index: 2000; /* En dessous du menu (3000) mais au-dessus du contenu */
    transform: translateY(-100%); 
    transition: transform 0.5s ease, left 0.6s cubic-bezier(0.25, 1, 0.5, 1), width 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
}
#contact-overlay.open { transform: translateY(0); }

/* Décalage Desktop quand menu ouvert */
body.menu-open #contact-overlay { 
    left: var(--sidebar-open-width); 
    width: calc(100% - var(--sidebar-open-width)); 
}

.contact-wrapper { display: flex; width: 100%; padding: 60px; }

.contact-col-left { 
    width: 40%; border-right: 1px solid #555; padding-right: 40px; 
    display: flex; flex-direction: column; justify-content: space-between; 
}
.contact-col-right { 
    width: 60%; padding-left: 60px; 
    display: flex; flex-direction: column; justify-content: center; 
}

.contact-title { font-size: 0.7rem; letter-spacing: 1px; margin-bottom: 20px; color: #eee; text-transform: uppercase; }
.contact-info p { margin-bottom: 5px; font-size: 0.9rem; line-height: 1.5; color: #aaa; }
.contact-group { margin-bottom: 40px; }
.social-links a { display: block; color: #aaa; text-decoration: underline; font-size: 0.9rem; margin-bottom: 5px; text-underline-offset: 3px; }

.newsletter-form-dark input {
    background: transparent; border: none; border-bottom: 1px solid #555; 
    color: white; width: 100%; padding: 10px 0; outline: none; margin-bottom: 20px; font-family: var(--font-main);
}
.legal-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; cursor: pointer; }
.legal-row input { margin-top: 4px; }
.legal-row span { font-size: 0.75rem; color: #aaa; line-height: 1.4; }

/* --- 6. CONTENU PRINCIPAL --- */
.main-content {
    margin-left: var(--sidebar-closed-width);
    width: calc(100% - var(--sidebar-closed-width));
    transition: margin-left 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    min-height: 100vh; position: relative;
    display: flex; flex-direction: column;
}
body.menu-open .main-content { margin-left: var(--sidebar-open-width); }

/* --- 7. HOME SLIDER --- */
.slider-container { 
    height: 50vh; width: 100%; position: relative; overflow: hidden; 
    background-color: #1a1a1a; /* Fond noir pour éviter le flash blanc */
}
.slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center; opacity: 0; 
    transition: opacity 1.2s ease-in-out;
    display: flex; align-items: flex-end; padding: 60px; z-index: 1;
}
.slide.active { opacity: 1; z-index: 2; }
.slide-content { position: relative; z-index: 3; }
.slide-content h2 { color: white; font-size: 1.5rem; font-weight: normal; }

/* --- 8. HOME GRID (Grille Accueil) --- */
.home-grid { 
    padding: 60px; 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 20px; 
    align-items: start; /* Alignement HAUT pour le bloc gris */
}
.home-grid img { width: 100%; height: 300px; object-fit: cover; display: block; }

/* Bloc gris réduit */
.text-block-dark { 
    background-color: #333; color: white; padding: 30px; 
    display: flex; align-items: center; justify-content: flex-start; 
    height: 150px; 
}
.text-block-dark p { font-size: 1.1rem; line-height: 1.4; }

.grid-item-text { margin-top: 15px; }
.grid-item-text p { font-size: 1rem; margin-bottom: 8px; line-height: 1.4; }
.discover-link { font-size: 0.9rem; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; color: #1a1a1a; }

/* --- 9. STYLES PAGES INTERNES --- */
.page-header { padding: 40px 60px 0 60px; border-bottom: 1px solid #ddd; padding-bottom: 20px; margin-bottom: 40px;}
.page-title { font-size: 1rem; font-weight: bold; text-transform: uppercase; }

.projects-grid { padding: 0 60px 60px 60px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.project-card { position: relative; width: 100%; cursor: pointer; }
.project-card img { width: 100%; height: 350px; object-fit: cover; display: block; transition: opacity 0.3s; }
.project-card:hover img { opacity: 0.9; }
.project-overlay { position: absolute; bottom: 20px; right: 20px; color: white; font-size: 1rem; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }

.about-container { display: flex; min-height: 80vh; }
.about-image { width: 50%; height: auto; }
.about-image img { width: 100%; height: 100%; object-fit: cover; }
.about-text { width: 50%; padding: 60px; display: flex; flex-direction: column; justify-content: center; }
.about-name { font-size: 2rem; margin-bottom: 30px; font-weight: normal; }
.about-desc { font-size: 1.1rem; line-height: 1.6; color: #333; margin-bottom: 40px; }
.about-subtitle { font-size: 1.2rem; font-weight: bold; margin-bottom: 15px; }

.shop-container { display: flex; justify-content: center; align-items: center; height: 80vh; font-size: 1.5rem; color: #888; }

/* --- 10. FOOTER GLOBAL --- */
.site-footer { 
    border-top: 1px solid var(--border-color); 
    padding: 60px; 
    display: flex; justify-content: space-between; 
    font-size: 0.8rem; 
    background-color: var(--bg-color);
    margin-left: var(--sidebar-closed-width);
    width: calc(100% - var(--sidebar-closed-width));
    transition: margin-left 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}
body.menu-open .site-footer { margin-left: var(--sidebar-open-width); width: calc(100% - var(--sidebar-open-width)); }

.footer-left, .footer-right { width: 45%; }
.footer-title { font-weight: bold; text-transform: uppercase; margin-bottom: 15px; font-size: 0.75rem; }
.footer-text { margin-bottom: 30px; line-height: 1.6; color: #555; }

/* ========================================= */
/* --- 11. RESPONSIVE MOBILE (CORRECTIFS) --- */
/* ========================================= */
@media (max-width: 768px) {
    /* Stop au scroll horizontal et marges parasites */
    html, body { margin: 0 !important; padding: 0 !important; overflow-x: hidden; }
    
    .slider-container { height: 40vh; }
    .home-grid, .projects-grid { grid-template-columns: 1fr; padding: 20px; gap: 20px; }
    
    .about-container { flex-direction: column; }
    .about-image, .about-text { width: 100%; }
    .about-image { height: 50vh; }

    /* Footer Mobile */
    .site-footer { 
        flex-direction: column; gap: 40px; padding: 40px 20px;
        margin-left: 60px; width: calc(100% - 60px);
    }
    
    /* Menu Mobile & Contenu */
    body.menu-open .sidebar { width: 85%; box-shadow: 10px 0 30px rgba(0,0,0,0.5); }
    body.menu-open .main-content { margin-left: 60px; /* Pas de push sur mobile */ }
    body.menu-open .site-footer { margin-left: 60px; width: calc(100% - 60px); }

    /* --- CONTACT MOBILE FIX --- */
    #contact-overlay { 
        position: fixed !important;
        top: 60px !important; /* Sous le logo */
        left: 0 !important; 
        width: 100vw !important;
        height: auto !important;
        min-height: calc(100vh - 60px);
        z-index: 2500 !important; /* Au-dessus du contenu */
        padding: 0 !important;
        overflow-y: auto; /* Scrollable si trop long */
        display: flex;
        flex-direction: column;
    }
    
    /* Empêche le menu ouvert de décaler le contact sur mobile */
    body.menu-open #contact-overlay { left: 0 !important; width: 100vw !important; }

    .contact-wrapper { 
        flex-direction: column; 
        padding: 40px 30px 80px 30px; /* Padding interne */
        width: 100%;
    }
    
    .contact-col-left { 
        width: 100%; 
        border-right: none; 
        border-bottom: 1px solid #555; 
        padding-right: 0; 
        padding-bottom: 30px; 
        margin-bottom: 30px; 
    }
    
    .contact-col-right { 
        width: 100%; padding-left: 0; 
    }
}