/* ==========================================================================
   VARIABLES ET CONFIGURATION GLOBALE
   ========================================================================== */

:root {
    --bg-dark: #070708;
    --bg-card: #111113;
    --text-white: #F4F2F3;
    --text-muted: #8E8E93;
    --accent-red: #801918;
    --accent-burgundy: #370E14;
    --border-color: rgba(244, 242, 243, 0.08);
    --font-title: 'Syne', sans-serif;
    --font-body: 'Inter', sans-serif;
    --ease-premium: cubic-bezier(0.25, 1, 0.5, 1);
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
}

body {
    overflow-x: hidden;
    background-color: var(--bg-dark);
}

/* HALO LUMINEUX D'AMBIANCE (Effet créatif nocturne) */
.ambient-glow {
    position: fixed;
    top: -20%;
    right: -10%;
    width: 60vw;
    height: 60vh;
    background: radial-gradient(circle, rgba(128, 25, 24, 0.08) 0%, rgba(0,0,0,0) 70%);
    z-index: 0;
    pointer-events: none;
    animation: floatingGlow 12s ease-in-out infinite alternate;
}

@keyframes floatingGlow {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-5%, 8%); }
}

/* ==========================================================================
   BARRE DE NAVIGATION BARRE (FIXE ET FLUIDE)
   ========================================================================== */

header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
    background: rgba(7, 7, 8, 0.75);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 40px;
}

.logo {
    font-family: var(--font-title);
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text-white);
    text-decoration: none;
    letter-spacing: 1px;
}

.logo .dot {
    color: var(--accent-red);
}

header nav a {
    color: var(--text-white);
    text-decoration: none;
    margin-left: 40px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: color 0.4s var(--ease-premium);
}

header nav a:hover {
    color: var(--accent-red);
}

.nav-num {
    color: var(--accent-red);
    margin-right: 4px;
    font-weight: 400;
}

/* ==========================================================================
   SECTION HERO ACCUEIL (ENTRÉE CINÉMATIQUE)
   ========================================================================== */

#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 40px;
    z-index: 1;
}

.hero-wrapper {
    width: 100%;
    max-width: 1200px;
    padding: 100px 60px;
    position: relative;
    border: 1px solid var(--border-color);
}

/* Coins du viseur / Cropmarks style Fresh Frame */
.viewfinder-corners .corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent-red);
}
.tl { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.tr { top: -1px; right: -1px; border-left: none; border-bottom: none; }
.bl { bottom: -1px; left: -1px; border-right: none; border-top: none; }
.br { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.hero-title-container {
    overflow: hidden;
    margin-bottom: 30px;
}

.hero-title-container h1 {
    font-family: var(--font-title);
    font-size: clamp(3.5rem, 8vw, 7rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -3px;
    animation: revealUp 1.4s var(--ease-premium) forwards;
}

.accent-title {
    color: transparent;
    -webkit-text-stroke: 1px var(--text-white);
}

@keyframes revealUp {
    0% { transform: translateY(100%); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.hero-meta {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.hero-role {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 3px;
    color: var(--accent-red);
}

.hero-cv {
    font-size: 1rem;
    color: var(--text-muted);
}

.hero-philosophy {
    font-size: 1.1rem;
    max-width: 550px;
    line-height: 1.6;
    color: var(--text-muted);
    font-weight: 300;
}

/* Indicateur Scroll */
.scroll-indicator {
    position: absolute;
    bottom: -60px;
    left: 60px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.scroll-indicator .line {
    width: 40px;
    height: 1px;
    background-color: var(--accent-red);
    display: inline-block;
}

.scroll-txt {
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--text-muted);
}

/* ==========================================================================
   STRUCTURE EN-TÊTE DES SECTIONS
   ========================================================================== */

section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 140px 40px;
    position: relative;
    z-index: 2;
}

.section-header {
    display: flex;
    align-items: baseline;
    gap: 15px;
    margin-bottom: 60px;
}

.section-num {
    font-family: var(--font-body);
    color: var(--accent-red);
    font-size: 1.1rem;
}

.section-header h2 {
    font-family: var(--font-title);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -1px;
}

/* ==========================================================================
   GRILLE PORTFOLIO PRINCIPALE (ASYMÉTRIQUE EYE-CANDY)
   ========================================================================== */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 50px;
}

.project-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.project-card.large {
    grid-column: span 2;
    margin-bottom: 30px;
}

.project-card.large .card-image-wrapper {
    height: 550px;
}

.card-image-wrapper {
    width: 100%;
    height: 400px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.project-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.8s var(--ease-premium);
}

/* ==========================================================================
   LIENS VERS LES VRAIES IMAGES DE MINIATURES (PAGE D'ACCUEIL)
   ========================================================================== */

.bg-daftpunk { background-image: url('daftpunk1.jpg'); }
.bg-epicuriens { background-image: url('epicuriens1.jpg'); }
.bg-printemps { background-image: url('printemps1.jpg'); }
.bg-blokgrad { background-image: url('blokgrad1.jpg'); }
.bg-liebig { background-image: url('liebig1.jpg'); }
.bg-tomorrowland { background-image: url('tomorrowland1.jpg'); }
.bg-perso { background-image: url('perso1.jpg'); }
.bg-delaunay { background-image: url('delaunay1.jpg'); }

.card-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, transparent 40%, rgba(7,7,8,0.6));
    mix-blend-mode: multiply;
    transition: opacity 0.5s var(--ease-premium);
}

.project-card:hover .project-img {
    transform: scale(1.04);
}

.project-details {
    padding-top: 20px;
}

.project-category {
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--accent-red);
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.project-details h3 {
    font-family: var(--font-title);
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.project-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 600px;
    font-weight: 300;
}

/* ==========================================================================
   SECTION PROFIL ET TIMELINE DU CV
   ========================================================================== */

.about-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.about-bio .lead {
    font-size: 1.4rem;
    line-height: 1.5;
    color: var(--text-white);
    margin-bottom: 30px;
    font-weight: 400;
}

.about-bio p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-muted);
    font-weight: 300;
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    padding: 8px 16px;
    border: 1px solid var(--accent-red);
    color: var(--text-white);
    font-size: 0.8rem;
    border-radius: 20px;
    letter-spacing: 1px;
}

.timeline h3 {
    font-family: var(--font-title);
    font-size: 1.1rem;
    letter-spacing: 2px;
    color: var(--text-white);
    margin-bottom: 30px;
}

.timeline-item {
    position: relative;
    padding-left: 40px;
    border-left: 1px solid var(--border-color);
    padding-bottom: 40px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 5px;
    width: 7px;
    height: 7px;
    background-color: var(--accent-red);
    border-radius: 50%;
}

.time-date {
    font-size: 0.75rem;
    color: var(--accent-red);
    font-weight: 500;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 5px;
}

.timeline-item h4 {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.time-role {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ==========================================================================
   STYLE DES INNER PAGES PROJETS ASSOCIEES
   ========================================================================== */

.project-page {
    background-color: var(--bg-dark);
}

.project-hero {
    padding-top: 150px;
    padding-bottom: 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.project-tools {
    color: var(--accent-red);
    letter-spacing: 3px;
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.project-title {
    font-family: var(--font-title);
    font-size: clamp(3rem, 6vw, 5.5rem);
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 30px;
}

.project-subtitle {
    font-size: 1.3rem;
    color: var(--text-muted);
    font-weight: 300;
    max-width: 700px;
    line-height: 1.5;
    margin-bottom: 60px;
}

.project-hero-image {
    width: 100%;
    height: 60vh;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border-color);
}

.project-body {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 50px;
}

.project-text-block {
    max-width: 800px;
    margin: 0 auto 80px auto;
}

.project-text-block h2 {
    font-family: var(--font-title);
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.project-text-block p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-white);
    margin-bottom: 20px;
    font-weight: 300;
}

.project-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 100px;
}

.gallery-item {
    width: 100%;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border-color);
}

.next-project-footer {
    background-color: #020202;
    text-align: center;
    padding: 100px 40px;
    border-top: 1px solid var(--border-color);
}

.next-project-footer p {
    color: var(--text-muted);
    letter-spacing: 4px;
    font-size: 0.9rem;
    margin-bottom: -10px;
}

/* ==========================================================================
   FOOTERS IMMERSIFS (ACCUEIL & INTERNE)
   ========================================================================== */

footer {
    background-color: #020202;
    border-top: 1px solid var(--border-color);
    padding: 120px 40px 40px 40px;
    position: relative;
    z-index: 2;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-tag {
    font-size: 0.8rem;
    letter-spacing: 3px;
    color: var(--text-muted);
    display: block;
}

.huge-email {
    font-family: var(--font-title);
    font-size: clamp(3rem, 10vw, 7.5rem);
    font-weight: 800;
    color: var(--text-white);
    text-decoration: none;
    display: inline-block;
    margin: 20px 0 80px 0;
    letter-spacing: -3px;
    line-height: 1;
    transition: color 0.4s var(--accent-red);
}

.huge-email .arrow {
    color: var(--accent-red);
    margin-left: 20px;
    transition: transform 0.4s var(--ease-premium);
    display: inline-block;
}

.huge-email:hover {
    color: var(--accent-red);
}

.huge-email:hover .arrow {
    transform: translateX(15px);
    color: var(--text-white);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    font-size: 0.75rem;
    color: #444;
    letter-spacing: 1px;
}

/* ==========================================================================
   RESPONSIVE DESIGN (FLUIDE ADAPTATIF SMARTPHONE)
   ========================================================================== */

@media (max-width: 900px) {
    .projects-grid, .about-layout, .project-gallery {
        grid-template-columns: 1fr;
    }
    .project-card.large {
        grid-column: span 1;
    }
    .project-card.large .card-image-wrapper, .card-image-wrapper {
        height: 350px;
    }
    #hero { padding: 0 15px; }
    .hero-wrapper { padding: 60px 25px; }
    header nav { display: none; } /* Cache le menu desktop sur mobile */
    .about-layout { gap: 40px; }
}

/* ==========================================================================
   CURSEUR PERSONNALISÉ (CARRÉ ACCENT ROUGE)
   ========================================================================== */

/* On cache le curseur par défaut sur tout le site */
html, body, a, button {
    cursor: none !important;
}

/* Configuration du carré bordeaux */
.custom-cursor {
    width: 12px;
    height: 12px;
    background-color: var(--accent-red); /* Utilise ton rouge #801918 */
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none; /* Évite que le carré bloque les clics */
    z-index: 9999; /* Reste toujours au-dessus de tous les éléments */
    transform: translate(-50%, -50%); /* Centre le carré pile sur la pointe de la souris */
    transition: width 0.2s, height 0.2s, background-color 0.2s; /* Pour les effets au survol */
}

/* Optionnel : Effet "Wow" quand tu survoles un lien cliquable */
.custom-cursor.active {
    width: 24px;
    height: 24px;
    background-color: transparent;
    border: 1px solid var(--text-white);
}

/* ==========================================================================
   ÉCRAN DE CHARGEMENT (PRELOADER)
   ========================================================================== */

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #040405; /* Un noir extrêmement profond */
    z-index: 999999; /* Toujours au-dessus de tout le reste */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s var(--ease-premium), visibility 0.8s;
}

/* Le texte vide avec juste le contour (stroke) */
.loader-text {
    font-family: var(--font-title);
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 800;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.15);
    position: relative;
    letter-spacing: 2px;
}

/* L'animation de remplissage par-dessus */
.loader-text::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    color: var(--text-white);
    -webkit-text-stroke: 0px transparent;
    overflow: hidden;
    border-right: 2px solid var(--accent-red); /* La ligne rouge de scan */
    animation: loadReveal 2s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

@keyframes loadReveal {
    0% { width: 0%; }
    40% { width: 45%; } /* Petit temps d'arrêt pour l'effet réaliste */
    70% { width: 65%; }
    100% { width: 100%; }
}
