/*
Theme Name: Mode Landing Page - 3D Version
Theme URI: https://votre-site.com
Author: Votre Nom
Description: Thème minimaliste avec arrivée 3D et parallaxe fluide.
Version: 2.1 3D
*/

:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    /* Courbe "Ease Out Expo" pour un mouvement très rapide au début et un atterrissage très lent */
    --ease-premium: cubic-bezier(0.19, 1, 0.22, 1); 
    --anim-duration: 1.8s; /* Durée un peu plus longue pour apprécier le mouvement 3D */
}

/* --- Reset --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    overflow-x: hidden;
    overscroll-behavior-y: none; 
}

/* --- Section Principale --- */
#home-lookbook-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 20px;
    
    /* --- NOUVEAU : Perspective 3D --- */
    /* Définit la "distance" de la caméra. Plus c'est petit, plus l'effet est dramatique. */
    perspective: 1200px; 
    /* Assure que le point de fuite est au centre de l'écran */
    perspective-origin: center center; 
}

/* --- Logo Central & Texte --- */
.logo-container {
    position: relative;
    z-index: 50;
    text-align: center;
    display: flex;
    flex-direction: column; /* Empile le logo et le texte verticalement */
    align-items: center;
    justify-content: center;
    /* On retire l'animation globale du conteneur pour animer les enfants séparément */
    opacity: 1; 
}

/* Le Logo */
.logo-gif {
    width: 30vw;
    max-width: 80vw;
    height: auto;
    display: block;
    /*margin-bottom: 15px;  Espace entre le logo et le texte */
    
    /* Animation d'entrée : Fade In + glissement vers le haut */
    opacity: 0;
    animation: fadeUpContent 1s ease forwards 0.5s; /* Commence à 0.5s */
}

/* Le Nouveau Texte (Baseline) */
.brand-tagline {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 0.85rem;      /* Taille discrète et élégante */
    line-height: 1.6;        /* Bonne aération entre les lignes */
    letter-spacing: 0.08em;  /* Espacement des lettres (signature du luxe) */
    font-weight: 400;        /* Police fine (Light) */
    color: rgba(255, 255, 255, 0.85); /* Blanc légèrement atténué (plus doux pour l'œil) */
    
    max-width: 450px;        /* Limite la largeur pour une belle lecture */
    width: 100%;              /* Sécurité sur mobile */
    margin: 0 auto;
    
    /* Animation d'entrée : Arrive APRÈS le logo */
    opacity: 0;
    animation: fadeUpContent 1s ease forwards 0.8s; /* Commence à 0.8s (décalage) */
}

/* Définition de l'animation partagée */
@keyframes fadeUpContent {
    from {
        opacity: 0;
        transform: translateY(20px); /* Part de 20px plus bas */
    }
    to {
        opacity: 1;
        transform: translateY(0);    /* Arrive à sa place finale */
    }
}

/* Ajustement Mobile */
@media (max-width: 768px) {
    .logo-gif {
        width: 180px;
        margin-bottom: 10px;
    }
    
    .brand-tagline {
        font-size: 0.75rem; /* Un peu plus petit sur mobile */
        max-width: 350px;
        line-height: 1.5;
    }
    
    /* On remonte un peu le tout sur mobile pour laisser place aux images */
    .logo-container {
        margin-bottom: 40px; 
    }
}

/* --- Images Lookbook (Base et État INITIAL 3D) --- */
.image-wrapper {
    position: absolute;
    overflow: hidden;
    background-color: #1a1a1a;
    z-index: 10;

    /* --- ETAT INITIAL (Avant JS) --- */
    opacity: 0;
    /* Le flou aide à l'effet de profondeur */
    filter: blur(15px); 
    
    /* La magie 3D : */
    /* 1. On les recule dans l'écran (Z) */
    /* 2. On les incline vers l'arrière (rotateX) */
    /* 3. On les réduit légèrement (scale) */
    transform: translateZ(-150px) rotateX(30deg) scale(0.9);
    
    /* Optimisation des performances */
    will-change: transform, opacity, filter;
    /* Création d'un contexte d'empilement 3D pour cet élément */
    transform-style: preserve-3d; 
    
    transition: 
        opacity var(--anim-duration) ease,
        transform var(--anim-duration) var(--ease-premium),
        filter var(--anim-duration) ease;
}

/* --- État FINAL (Ajouté par le JS) --- */
.image-wrapper.is-revealed {
    opacity: 1;
    filter: blur(0);
    /* On remet tout à plat : position Z=0, rotation X=0, taille normale */
    transform: translateZ(0) rotateX(0) scale(1);
}


.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Important pour éviter des glitchs sur les bords pendant la rotation 3D */
    backface-visibility: hidden; 
}

/* --- Positions Desktop (Grille éparse) --- */
@media (min-width: 769px) {
    .pos-1 { width: 12vw; aspect-ratio: 3/4; top: 15%; left: 4%; }
    .pos-2 { width: 11vw; aspect-ratio: 3/4; top: 5%; left: 30%; }
    .pos-3 { width: 14vw; aspect-ratio: 3/4; top: 10%; right: 18%; }
    .pos-4 { width: 14vw; aspect-ratio: 3/4; bottom: 15%; left: 10%; }
    .pos-5 { width: 9vw; aspect-ratio: 3/4; bottom: 5%; left: 40%; }
    .pos-6 { width: 12vw; aspect-ratio: 3/4; bottom: 10%; right: 25%; }
    .pos-7 { width: 12vw; aspect-ratio: 3/4; top: 48%; right: 2%; }
}

/* --- Mobile / Tablette (< 768px) --- */
@media (max-width: 768px) {
    /* Sur mobile, on garde l'animation 3D, c'est joli aussi ! */
    #home-lookbook-section {
        flex-direction: column;
        height: auto;
        min-height: auto;
        padding-top: 40px;
        padding-bottom: 60px;
        /* Perspective légèrement ajustée pour les petits écrans */
        perspective: 1000px; 
    }

    .logo-container {
        margin-bottom: 50px;
        order: 1;
    }
    
    .logo-gif {
        width: 80vw;
    }

    .lookbook-grid {
        display: flex;
        flex-direction: column;
        width: 100%;
        position: relative;
        order: 2;
        /* Nécessaire pour que les enfants en absolute/fixed ne cassent pas tout */
        transform-style: preserve-3d;
    }

    .image-wrapper {
        position: relative; 
        top: auto !important; left: auto !important; right: auto !important; bottom: auto !important;
        margin-bottom: 30px;
        box-shadow: none;
        /* État initial mobile : Juste un translateY pour simplifier, plus l'inclinaison 3D */
        transform: translateY(50px) rotateX(20deg); 
    }
    
    .image-wrapper.is-revealed {
        transform: translateY(0) rotateX(0);
    }

    /* Ordre ZigZag Mobile */
    .pos-2 { order: 2; width: 45%; margin-left: 5%; margin-right: auto; }
    .pos-3 { order: 3; width: 48%; margin-left: auto; margin-right: 5%; margin-top: -15%; z-index: 11; }
    .pos-1 { order: 4; width: 45%; margin-left: 5%; margin-right: auto; }
    .pos-7 { order: 5; width: 45%; margin-left: auto; margin-right: 5%; margin-top: -10%; }
    .pos-4 { order: 6; width: 48%; margin-left: 5%; margin-right: auto; }
    .pos-6 { order: 7; width: 45%; margin-left: auto; margin-right: 5%; margin-top: -15%; z-index: 11;}
    .pos-5 { order: 8; width: 80%; margin: 20px auto 0 auto; }
}