/* =========================================
   1. VARIABLES & THÈMES
   ========================================= */
@import url('https://api.fontshare.com/v2/css?f[]=clash-display@400,500,600&display=swap');

:root {
    --color-pink: #ff669d;
    --color-orange: #f95319;
    
    --bg-main: #121616;
    --text-main: #fffaf5;
    
    --glass-bg: rgba(255, 250, 245, 0.03);
    --glass-border: rgba(255, 250, 245, 0.08);
    --glass-blur: 20px;
    
    --card-width: 340px;
    --card-height: 220px;
    --radius-l: 32px;
    --radius-m: 16px;
    --dock-width: 70px;
    --content-max-width: 1000px; 
}

[data-theme="light"] {
    --bg-main: #e8e8e8;     
    --text-main: #121616;    
    --glass-bg: rgba(255, 255, 255, 0.65); 
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-blur: 30px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    transition: background-color 0.4s ease, color 0.4s ease;
    height: 100vh; width: 100vw;
}

h1, h2, h3, .page-title, .contact-title, .project-title, .archive-index {
    font-family: 'Clash Display', sans-serif;
    letter-spacing: 0.02em;
}

body.home-body { overflow: hidden; }
body.page-scrollable { overflow-y: auto; overflow-x: hidden; height: auto; }

/* =========================================
   2. NAVIGATION SIDEBAR (CENTRÉE)
   ========================================= */
.dock-menu {
    position: fixed; top: 50%; left: 2rem; transform: translateY(-50%);
    display: flex; flex-direction: column; 
    justify-content: space-between; align-items: center;
    padding: 2rem 0; 
    height: auto; min-height: 500px; width: var(--dock-width);
    background: var(--glass-bg); backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border); border-radius: var(--radius-l);
    z-index: 1000; transition: all 0.3s ease;
}

/* GROUPE CENTRAL */
.dock-center-group { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }

.logo-btn {
    width: calc(var(--dock-width) - 12px);
    height: auto;
    min-height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    border-radius: var(--radius-m);
    transition: background 0.3s ease;
    padding: 4px;
}

/* Style de l'image du logo */
.logo-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Effet Hover sur le Logo */
.logo-btn:hover .logo-img {
    transform: scale(1.06); /* Léger zoom, sans rotation pour un logo texte */
}

/* Style spécifique pour la flèche retour (Projets) */
.back-arrow-icon {
    font-size: 1.5rem;
    color: var(--text-main);
    transition: transform 0.3s ease, color 0.3s ease;
}

.logo-btn:hover .back-arrow-icon {
    transform: translateX(-3px); /* La flèche bouge vers la gauche au survol */
    color: var(--color-orange);
}
.dock-links { list-style: none; display: flex; flex-direction: column; gap: 1.2rem; }

.dock-item {
    display: flex; justify-content: center; align-items: center;
    width: 44px; height: 44px; border-radius: 50%;
    color: var(--text-main); opacity: 0.5; font-size: 1.3rem;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1); 
    background: transparent; border: none; cursor: pointer; text-decoration: none;
}
.dock-item:hover, .dock-item.active { 
    background-color: rgba(255, 102, 157, 0.08); 
    color: var(--color-pink); opacity: 1; transform: scale(1.05);
}

.dock-separator { width: 20px; height: 1px; background-color: var(--glass-border); opacity: 0.6; }

.theme-toggle { cursor: pointer; opacity: 0.7; }
.theme-toggle:hover { opacity: 1; color: var(--color-orange); transform: rotate(15deg); }

.clock-vertical { 
    font-size: 0.7rem; writing-mode: vertical-lr; transform: rotate(180deg); 
    opacity: 0.4; font-family: 'Inter', sans-serif; letter-spacing: 1px;
}

/* =========================================
   3. SCÈNE 3D (HOME)
   ========================================= */
.scene { height: 100vh; display: flex; justify-content: center; align-items: center; perspective: 1000px; margin-left: var(--dock-width); }
.carousel { width: var(--card-width); height: var(--card-height); position: relative; transform-style: preserve-3d; }
.card { position: absolute; width: 100%; height: 100%; left: 0; top: 0; transform-style: preserve-3d; cursor: pointer; border-radius: var(--radius-m); }
.card-face { position: absolute; width: 100%; height: 100%; left: 0; top: 0; backface-visibility: hidden; border-radius: var(--radius-m); overflow: hidden; box-shadow: 0 15px 40px rgba(0,0,0,0.2); }
.card-front { background-size: cover; background-position: center; }
.card-front::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0) 60%); z-index: 1; }
.card-content { position: absolute; bottom: 0; left: 0; width: 100%; padding: 1.5rem; z-index: 2; display: flex; flex-direction: column; gap: 0.3rem; }
.tag { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 2px; color: rgba(255, 255, 255, 0.7); font-weight: 500; font-family: 'Inter', sans-serif;}
.card-content h3 { font-size: 1.1rem; font-weight: 500; color: #fff; margin: 0; }
.card-back { background-color: var(--color-orange); color: #fff; transform: rotateY(180deg); display: flex; justify-content: center; align-items: center; }
.view-project { font-size: 0.9rem; font-weight: 500; display: flex; align-items: center; gap: 8px; }

/* =========================================
   4. PAGE PROJET (CENTRÉE)
   ========================================= */
.project-wrapper { padding-left: calc(var(--dock-width) + 2rem); padding-right: 2rem; padding-top: 4rem; padding-bottom: 4rem; width: 100%; }
.project-container { max-width: var(--content-max-width); margin: 0 auto; }
.glass-panel { background: var(--glass-bg); border: 1px solid var(--glass-border); backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur)); border-radius: var(--radius-l); padding: 2.5rem; margin-bottom: 3rem; }
.project-title { font-size: 3rem; font-weight: 500; margin: 0; line-height: 1.1; color: var(--text-main); }
.project-meta-grid { display: flex; gap: 3rem; border-top: 1px solid var(--glass-border); padding-top: 1.5rem; margin-top: 2rem; flex-wrap: wrap;}
.meta-item .label { color: var(--color-orange); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 1px; display: block; margin-bottom: 0.3rem; }
.meta-item .value { font-size: 0.9rem; }
.project-hero { width: 100%; height: 60vh; border-radius: var(--radius-l); overflow: hidden; margin-bottom: 3rem; }
.project-hero img { width: 100%; height: 100%; object-fit: cover; }
.project-description { display: grid; grid-template-columns: 1fr 2fr; gap: 4rem; }
.desc-text p { font-size: 1.1rem; line-height: 1.7; opacity: 0.9; margin-bottom: 1.5rem; font-weight: 400; }
.project-gallery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 2rem; }
.gallery-large { grid-column: span 2; height: 600px; }
.gallery-small { grid-column: span 1; height: 400px; }
.gallery-img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-m); background: #222;}

/* =========================================
   5. PAGE ARCHIVE (DESIGN ÉDITORIAL 12 COLS)
   ========================================= */
.archive-wrapper {
    margin-left: calc(var(--dock-width) + 2rem);
    padding: 6rem 4rem 10rem 4rem;
    max-width: 1600px;
}

.archive-header { margin-bottom: 6rem; }
.page-title { font-size: clamp(3rem, 5vw, 5rem); font-weight: 600; margin-bottom: 0.5rem; color: var(--text-main); }
.page-subtitle { color: var(--color-orange); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px; font-weight: 600; font-family: 'Inter', sans-serif;}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: auto;
    column-gap: 2rem; row-gap: 6rem;
}

.archive-item {
    position: relative; display: flex; flex-direction: column; gap: 1rem; cursor: default;
    opacity: 0; transform: translateY(30px);
}

.archive-thumb {
    width: 100%; border-radius: var(--radius-m); overflow: hidden; position: relative;
    background-color: var(--glass-border);
    transition: transform 0.6s cubic-bezier(0.1, 1, 0.2, 1), box-shadow 0.6s ease;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}
.archive-item:hover .archive-thumb { transform: translateY(-10px) scale(1.02); box-shadow: 0 30px 60px rgba(0,0,0,0.15); z-index: 2; }

/* Typo Index Géante */
.archive-index {
    position: absolute; top: -3rem; left: -2rem; font-size: 6rem; font-weight: 600;
    color: var(--text-main); opacity: 0.05; z-index: 0; line-height: 1; pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.archive-item:hover .archive-index { opacity: 0.2; transform: translateX(10px); }

.archive-info {
    display: flex; justify-content: space-between; align-items: center; font-size: 0.9rem;
    color: var(--text-main); padding-top: 0.5rem; border-top: 1px solid var(--glass-border);
    position: relative; z-index: 1;
}
.archive-year { opacity: 0.5; font-family: 'Inter', sans-serif; }

/* Grille Editoriale */
.item-1 { grid-column: 1 / span 7; } .item-1 .archive-thumb { aspect-ratio: 16/9; }
.item-2 { grid-column: 9 / span 4; margin-top: 4rem; } .item-2 .archive-thumb { aspect-ratio: 3/4; }
.item-3 { grid-column: 2 / span 4; margin-top: -2rem; } .item-3 .archive-thumb { aspect-ratio: 1/1; }
.item-4 { grid-column: 6 / span 7; } .item-4 .archive-thumb { aspect-ratio: 21/9; }
.item-5 { grid-column: 1 / span 4; margin-top: 2rem; } .item-5 .archive-thumb { aspect-ratio: 4/5; }
.item-6 { grid-column: 7 / span 5; margin-top: -5rem; } .item-6 .archive-thumb { aspect-ratio: 4/3; }

/* =========================================
   6. PAGE À PROPOS (Layout Final)
   ========================================= */
.apropos-wrapper {
    padding: 6rem 2rem 4rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.apropos-container {
    max-width: 800px; /* Largeur contenue pour que le texte reste lisible */
    width: 100%;
    margin-bottom: auto;
    z-index: 2;
}

.apropos-header {
    text-align: center;
    margin-bottom: 4rem;
}

.apropos-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.apropos-subtitle {
    font-size: 1.1rem;
    color: var(--color-orange);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 500;
}

/* GRILLE PRINCIPALE */
.apropos-content {
    display: grid;
    /* 2 colonnes égales pour le haut (Photo | Services) */
    grid-template-columns: 1fr 1fr; 
    gap: 3rem 4rem; /* Espace vertical / horizontal */
    align-items: center; 
}

/* 1. PHOTO */
.apropos-image {
    width: 100%;
    max-width: 320px; /* Taille maîtrisée */
    aspect-ratio: 3/4;
    border-radius: var(--radius-m);
    overflow: hidden;
    transform: rotate(-3deg);
    transition: transform 0.5s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin: 0 auto; /* Centré dans sa colonne */
}

.apropos-image:hover {
    transform: rotate(0deg) scale(1.02);
}

.apropos-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 2. SERVICES */
.apropos-services {
    /* S'aligne à gauche de sa colonne */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.apropos-services h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    color: var(--color-orange);
    letter-spacing: 1px;
}

.services-list {
    list-style: none;
    padding: 0;
    opacity: 0.9;
    line-height: 2.2;
    font-size: 1.1rem;
    font-weight: 500;
}

/* 3. TEXTE (PREND TOUTE LA LARGEUR) */
.apropos-text {
    /* C'est ici que la magie opère : de la colonne 1 à la fin (-1) */
    grid-column: 1 / -1; 
    
    margin-top: 1rem;
    font-size: 1.15rem;
    line-height: 1.8;
    opacity: 0.9;
    text-align: justify; /* Joli bloc de texte */
}

.apropos-text p {
    margin-bottom: 1.5rem;
}

/* MOBILE */
@media (max-width: 768px) {
    .apropos-content {
        grid-template-columns: 1fr; /* Tout en une seule colonne */
        gap: 2rem;
        text-align: center;
    }
    
    .apropos-image {
        transform: rotate(0deg);
        max-width: 280px;
    }
    
    .apropos-services {
        align-items: center; /* Centre les services sur mobile */
    }

    .apropos-text {
        text-align: left; /* Reste aligné à gauche pour la lecture */
    }
    
    .apropos-title { font-size: 2.2rem; }
}

/* =========================================
   7. PAGE CONTACT (Nouveau Design)
   ========================================= */
.contact-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 2rem 2rem calc(var(--dock-width) + 2rem);
    position: relative;
    overflow: hidden;
}

.contact-content {
    width: 100%;
    max-width: 900px;
    z-index: 5;
    text-align: left; /* Alignement à gauche pour le style "Liste" */
}

.contact-intro { margin-bottom: 4rem; }

.contact-title {
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: 1;
    margin-bottom: 1rem;
    font-weight: 700;
}

.contact-subtitle {
    font-size: 1.2rem;
    color: var(--color-orange);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* GROS LIENS INTERACTIFS */
.big-link-container {
    display: flex;
    flex-direction: column;
}

.big-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.5s ease;
    group: hover;
}

.big-link:last-child { border-bottom: 1px solid rgba(255,255,255,0.1); }

[data-theme="light"] .big-link { border-color: rgba(0,0,0,0.1); }

.link-label {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 400;
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.link-arrow {
    font-size: 2rem;
    opacity: 0;
    transform: translateX(-20px) rotate(-45deg);
    color: var(--color-orange);
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

/* Hover Effect */
.big-link:hover .link-label { transform: translateX(20px); color: var(--color-orange); }
.big-link:hover .link-arrow { opacity: 1; transform: translateX(0) rotate(0deg); }


/* L'ORBE DE FOND (ANIMATION) */
.background-orb {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 60vw;
    height: 60vw;
    max-width: 700px;
    max-height: 700px;
    background: radial-gradient(circle, var(--color-orange) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
    opacity: 0.15;
    filter: blur(80px);
    animation: floatOrb 15s infinite ease-in-out;
}

[data-theme="light"] .background-orb {
    opacity: 0.1;
    background: radial-gradient(circle, #ff0055 0%, rgba(255,255,255,0) 70%);
}

@keyframes floatOrb {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-40%, -60%) scale(1.1); }
    100% { transform: translate(-50%, -50%) scale(1); }
}
/* =========================================
   7. RESPONSIVE MOBILE
   ========================================= */
@media (max-width: 768px) {
    :root { --card-width: 280px; --card-height: 200px; --dock-width: 0px; }
    
    .dock-menu { top: auto; bottom: 1.5rem; left: 50%; transform: translateX(-50%); width: 90%; max-width: 400px; height: 70px; min-height: auto; flex-direction: row; justify-content: space-between; padding: 0 1.5rem; background: var(--glass-bg); backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px); border: 1px solid var(--glass-border); }
    .dock-top, .dock-bottom { display: none; }
    .logo-btn { display: flex; width: 44px; height: 44px; min-height: unset; padding: 6px; flex-shrink: 0; }
    .logo-img { width: 100%; height: 100%; object-fit: contain; }
    .dock-center-group { flex-direction: row; gap: 1rem; width: 100%; justify-content: center; }
    .dock-links { flex-direction: row; gap: 1rem; }
    .dock-separator { width: 1px; height: 24px; background-color: var(--glass-border); }
    
    .scene { margin-left: 0; }
    .project-wrapper, .archive-wrapper, .about-wrapper { padding: 6rem 1.5rem 12rem 1.5rem; margin-left: 0; }
    
    /* Archive Mobile */
    .archive-grid { display: flex; flex-direction: column; gap: 4rem; }
    .archive-item { margin-top: 0 !important; }
    .archive-thumb { aspect-ratio: 4/3 !important; }
    .archive-index { font-size: 4rem; top: -2rem; left: 0; }
    
    .project-description, .about-layout { grid-template-columns: 1fr; gap: 2rem; }
    .desc-sidebar { display: none; }
    .project-hero { height: 40vh; }
    .project-gallery-grid { grid-template-columns: 1fr; }
    .gallery-large, .gallery-small { grid-column: span 1; height: 300px; }
    .about-photo-card { height: 350px; transform: rotate(0deg); }
    .life-grid { grid-template-columns: 1fr; }
    .contact-wrapper { margin-left: 0; height: auto; min-height: 100vh; padding: 8rem 1.5rem 12rem 1.5rem; align-items: flex-start; justify-content: flex-start; }
    .contact-job { margin-bottom: 3rem; font-size: 0.9rem; }
    .contact-title { font-size: 3.5rem; }
    .big-link { padding: 1.5rem 0; font-size: 1.4rem; }
    .big-link:hover .link-text { transform: translateX(20px); }
}

/* --- LOADER (ÉCRAN DE CHARGEMENT) --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0a0a0a; /* Fond noir profond */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.8s cubic-bezier(0.76, 0, 0.24, 1);
    overflow: hidden;
}

/* Le Halo Orange/Rose */
.loader-halo {
    position: absolute;
    width: 50vw;  /* Taille relative à l'écran */
    height: 50vw;
    max-width: 600px;
    max-height: 600px;
    /* Le dégradé Rose vers Orange demandé */
    background: radial-gradient(circle, rgba(255,105,180,0.3) 0%, rgba(255,165,0,0.2) 40%, rgba(0,0,0,0) 70%);
    filter: blur(80px); /* Flou très doux */
    border-radius: 50%;
    z-index: 0;
    opacity: 0;
    animation: halo-pulse 2.5s ease-out forwards;
}

@keyframes halo-pulse {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Conteneur Texte */
.loader-container {
    text-align: center;
    color: #fff;
    z-index: 1;
    position: relative;
}

.reveal-line {
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.loader-text {
    display: block;
    transform: translateY(110%);
    animation: text-reveal 1.2s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

/* --- TYPOGRAPHIE LOADER (CLASH DISPLAY) --- */
.loader-text.name {
    font-family: 'Clash Display', sans-serif; /* La nouvelle police */
    font-weight: 600; /* 600 = SemiBold (Idéal pour Clash) */
    font-size: 3.5rem; 
    letter-spacing: 1px; /* Un peu d'air pour le style */
    text-transform: uppercase; /* Souvent plus beau en majuscules pour cette font, sinon enlève cette ligne */
    color: #ffffff;
    margin-bottom: 0.5rem;
}

/* Le sous-titre reste propre et technique */
.loader-text.job {
    font-size: 0.85rem;
    font-weight: 400;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-family: sans-serif; 
    animation-delay: 0.2s;
}

@keyframes text-reveal {
    0% { transform: translateY(110%); }
    100% { transform: translateY(0); }
}

/* Classe pour cacher le loader vers le haut */
.loader-hidden {
    transform: translateY(-100%);
}

/* --- FOOTER (Sur toutes les pages) --- */
.site-footer {
    width: 100%;
    text-align: center;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
    opacity: 0.4;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .apropos-content { grid-template-columns: 1fr; }
    .apropos-title { font-size: 2.2rem; }
}

/* --- FOOTER SPÉCIAL ACCUEIL (FIXED) --- */
.home-footer {
    position: fixed; /* Il flotte par dessus le reste */
    bottom: 1rem;    /* À 1rem du bas de l'écran */
    left: 50%;       /* Centré horizontalement */
    transform: translateX(-50%); /* Correction du centrage */
    z-index: 10;     /* Au-dessus du fond mais sous le menu si besoin */
    width: auto;     /* Juste la largeur du texte */
    margin: 0;       /* On annule les marges du footer classique */
    padding: 0;
    pointer-events: none; /* Laisse cliquer au travers si ça gêne le carrousel */
}

/* On s'assure que le texte est lisible */
.home-footer p {
    font-size: 0.75rem;
    opacity: 0.5;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5); /* Petite ombre si le fond est clair */
}

/* Si tu as un Dock en bas, on remonte un peu le footer pour pas qu'ils se chevauchent */
/* Décommente la ligne ci-dessous si le footer touche ton menu */
/* .home-footer { bottom: 4rem; } */