/* ==========================================================================
   XTNT_SYSTEM_GLOBAL - STYLE.CSS
   ========================================================================== */

:root {
    --bg-dark: #0a0a0a;
    --text-on-dark: #e0e0e0;
    --accent-green: #00ff41;
    --bg-light: #f0f0f0; /* Gris très clair pour le fond moodboard */
    --card-bg: #ffffff;
    --header-height: 60px;
}

/* --- RESET & BASE --- */
* { box-sizing: border-box; }
a { text-decoration: none; color: inherit; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }

/* ==========================================================================
   MODE 1 : INDEX (TERMINAL VERT)
   ========================================================================== */
body.mode-index {
    margin: 0; padding-top: var(--header-height);
    background-color: var(--bg-dark);
    color: var(--text-on-dark);
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

/* Header Index (Fixe) */
.terminal-header {
    position: fixed; top: 0; left: 0; width: 100%; height: var(--header-height);
    background: var(--bg-dark); border-bottom: 2px solid var(--text-on-dark);
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 20px; z-index: 2000;
}
.status span { color: var(--accent-green); text-shadow: 0 0 5px var(--accent-green); }

/* Intro & Grille Index */
.intro-manifesto { padding: 40px 20px; border-bottom: 2px solid #333; max-width: 1200px; margin: 0 auto; }
.intro-title { font-size: 2rem; color: #fff; margin-bottom: 10px; }
.intro-subtitle { font-size: 1.1rem; color: var(--accent-green); margin-bottom: 20px; font-weight: bold; }
.intro-text { color: #ccc; font-size: 0.95rem; max-width: 800px; margin-bottom: 20px; font-family: 'Arial', sans-serif; }
.client-target { font-family: 'Courier New'; font-size: 0.8rem; color: #666; border: 1px solid #333; display: inline-block; padding: 10px; margin-top: 10px; }

.data-grid { width: 100%; display: flex; flex-direction: column; }
.header-row { display: flex; padding: 15px 20px; border-bottom: 1px solid var(--text-on-dark); font-weight: bold; color: var(--accent-green); }
.action-row { display: flex; padding: 15px 20px; border-bottom: 1px solid #333; position: relative; }
.action-row:hover { background: #111; border-left: 5px solid var(--accent-green); }
.action-row:hover .cell.name { color: var(--accent-green); }
.cell { flex: 1; } .cell.id { max-width: 80px; color: #fff; } .cell.name { flex: 2; font-weight: bold; } .cell.legal { text-align: right; color: var(--accent-green); }

/* Popup Index */
.hover-popup { display: none; position: absolute; top: 100%; left: 0; width: 100%; height: 280px; background-color: #000; border: 2px solid #fff; z-index: 9999; box-shadow: 0 30px 60px rgba(0,0,0,1); flex-direction: row; }
.action-row:hover .hover-popup { display: flex; }
.popup-slide { flex: 1; border-right: 1px solid #333; background-size: cover; background-position: center; position: relative; background-color: #111; }
.data-content { height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; color: #fff; }

/* ==========================================================================
   MODE 2 : PAGES PROJETS (MOODBOARD / GRILLE BLANCHE)
   ========================================================================== */
body.mode-moodboard {
    background-color: var(--bg-light);
    color: #111;
    font-family: 'Courier New', Courier, monospace;
    margin: 0; padding: 40px; /* Pas de header fixe, padding autour */
}

/* Header spécifique Moodboard */
.moodboard-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 50px; border-bottom: 2px solid #000; padding-bottom: 20px;
}
.btn-back {
    display: inline-block; padding: 10px 20px;
    background: #fff; border: 2px solid #000;
    font-weight: 800; text-transform: uppercase; font-size: 0.9rem;
    cursor: pointer; transition: 0.2s;
}
.btn-back:hover { background: #000; color: #fff; }

.project-info { text-align: right; }
.project-title { font-size: 1.8rem; font-weight: 900; margin: 0 0 5px 0; letter-spacing: -1px; }
.project-tags span {
    background: #e0e0e0; color: #555; padding: 2px 6px; font-size: 0.75rem; font-weight: bold; margin-left: 5px;
}

/* Grille Masonry (Colonnes style Pinterest) */
.masonry-grid {
    column-count: 3;
    column-gap: 20px;
}

/* Carte "Polaroid" */
.polaroid-card {
    background: var(--card-bg);
    margin-bottom: 20px;
    break-inside: avoid; /* Empêche de couper une carte en deux */
    border: 1px solid #ccc; /* Bordure fine grise */
    box-shadow: 4px 4px 0px rgba(0,0,0,0.1); /* Ombre dure subtile */
    overflow: hidden;
}

.card-img {
    width: 100%; display: block;
    border-bottom: 2px solid #000;
}

.card-body { padding: 25px; }

/* Typo dans les cartes */
.card-title {
    font-size: 1rem; font-weight: 900; text-transform: uppercase;
    border-bottom: 1px dashed #999; padding-bottom: 10px; margin-bottom: 15px;
    color: #000;
}
.card-text {
    font-family: 'Arial', sans-serif; font-size: 0.9rem; line-height: 1.6; color: #444;
}
.highlight { background-color: #ffffcc; padding: 2px 5px; } /* Surlignage jaune */

/* Tableaux de données dans les cartes */
.data-table {
    width: 100%; background: #eee; padding: 10px;
    font-family: 'Courier New', monospace; font-size: 0.8rem;
    margin-top: 15px; border: 1px solid #ccc;
}
.data-row { display: flex; justify-content: space-between; margin-bottom: 5px; }
.data-label { font-weight: bold; }

/* Responsive */
@media (max-width: 1024px) { .masonry-grid { column-count: 2; } }
@
/* ==========================================================================
   GLOBAL LIGHTBOX (AJOUTER À LA FIN DE STYLE.CSS)
   ========================================================================== */
.lightbox-overlay {
    display: none; /* Caché par défaut */
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95); /* Fond noir quasi opaque */
    z-index: 10000; /* Au-dessus de tout */
    justify-content: center; align-items: center;
    cursor: zoom-out;
    padding: 20px;
    backdrop-filter: blur(5px); /* Petit effet de flou sympa derrière */
}

.lightbox-overlay img {
    max-width: 95%;
    max-height: 95%;
    border-radius: 4px;
    box-shadow: 0 0 50px rgba(255,255,255,0.1);
    object-fit: contain;
    animation: zoomIn 0.3s ease; /* Petite animation d'ouverture */
}

/* Animation d'ouverture */
@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Curseur loupe sur les images cliquables */
.card-img, .playing-card, .mass-gallery-container img {
    cursor: zoom-in;
}
/* LIGHTBOX GLOBALE */
.lightbox-overlay {
    display: none; /* Caché par défaut */
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95); /* Fond noir */
    z-index: 10000; /* Très important : au-dessus de tout */
    justify-content: center; align-items: center;
    cursor: zoom-out;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.lightbox-overlay img {
    max-width: 95%;
    max-height: 95%;
    border-radius: 4px;
    box-shadow: 0 0 50px rgba(255,255,255,0.1);
    object-fit: contain;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Curseur Loupe */
.card-img, .playing-card, .mass-gallery-container img {
    cursor: zoom-in;
}
/* MINI CARTES POUR L'INDEX */
.mini-card {
    position: absolute;
    width: 60px; /* Beaucoup plus petit que la vraie page */
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    border: 1px solid #ddd;
    background: #fff;
    object-fit: cover;
    top: -100px; /* Départ hors champ */
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}
/* --- ANIMATION SLIDESHOW XT_10 (INDEX) --- */
/* Cette classe fait tourner les 3 images en boucle */
.slideshow-xt10 {
    animation: posterCycle 9s infinite; /* 3 secondes par image */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

@keyframes posterCycle {
    0%   { background-image: url('assets/xt10_hero.jpg'); }
    33%  { background-image: url('assets/XT_10-revoltaffiche.jpg'); }
    66%  { background-image: url('assets/XT_10-discoaffiche.jpg'); }
    100% { background-image: url('assets/xt10_hero.jpg'); }
}
/* --- LE LIVRE INTERACTIF (VERSION PAYSAGE) --- */
.book-overlay {
    display: none;
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 20000;
    justify-content: center; align-items: center;
    perspective: 2000px; /* Profondeur 3D accentuée */
}

.book-container {
    position: relative;
    /* Format Paysage adapté à vos images (ratio approx 4/3 large) */
    width: 800px;
    height: 550px;
    transform-style: preserve-3d;
}

.book-page {
    position: absolute;
    width: 100%; height: 100%;
    top: 0; left: 0;
    transform-origin: left center; /* Pivot sur la reliure de gauche */
    transition: transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
    backface-visibility: hidden; /* Important pour cacher le dos */
}

.book-page img {
    width: 100%; height: 100%; object-fit: contain; background: #000;
}

/* Quand la page est tournée */
.book-page.flipped {
    transform: rotateY(-180deg);
    opacity: 0; /* On la fait disparaître une fois tournée pour voir la suivante */
}

/* Empilement (Z-Index) pour que la 1 soit au dessus de la 2, etc. */
/* On génère une pile de 13 pages */
.book-page:nth-child(1) { z-index: 13; }
.book-page:nth-child(2) { z-index: 12; }
.book-page:nth-child(3) { z-index: 11; }
.book-page:nth-child(4) { z-index: 10; }
.book-page:nth-child(5) { z-index: 9; }
.book-page:nth-child(6) { z-index: 8; }
.book-page:nth-child(7) { z-index: 7; }
.book-page:nth-child(8) { z-index: 6; }
.book-page:nth-child(9) { z-index: 5; }
.book-page:nth-child(10) { z-index: 4; }
.book-page:nth-child(11) { z-index: 3; }
.book-page:nth-child(12) { z-index: 2; }
.book-page:nth-child(13) { z-index: 1; }

.close-book {
    position: absolute; top: 30px; right: 40px;
    color: #fff; font-size: 1.5rem; cursor: pointer; z-index: 20001;
    font-family: 'Courier New'; border: 1px solid #fff; padding: 5px 15px;
}
.close-book:hover { background: #fff; color: #000; }

/* Mobile : On réduit la taille mais on garde le ratio */
@media (max-width: 900px) {
    .book-container { width: 95%; height: auto; aspect-ratio: 4/3; }
}
/* VIDÉO DANS POPUP */
.video-wrapper {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1; /* Derrière le texte */
    background: #000;
}

.popup-video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Remplit tout l'espace sans déformation */
}
/* --- GESTION BILINGUE --- */

/* Le sélecteur dans le header */
.lang-selector {
    font-family: 'Courier New', monospace;
    cursor: pointer;
    margin-right: 20px;
    font-weight: bold;
}

.lang-btn { opacity: 0.5; transition: opacity 0.3s; }
.lang-btn:hover { opacity: 1; color: #00ff41; }
.lang-btn.active { opacity: 1; text-decoration: underline; color: #00ff41; }

/* LOGIQUE D'AFFICHAGE */
/* Par défaut (sans classe sur le body), on affiche FR et on cache EN */
.lang-en { display: none; }
.lang-fr { display: inline-block; } /* ou inline selon le contexte */

/* Quand le body a la classe "mode-english" */
body.mode-english .lang-fr { display: none; }
body.mode-english .lang-en { display: inline-block; }
/* Style spécifique pour la page Contact */
.mode-contact {
    background-color: #000;
    margin: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Courier New', Courier, monospace;
}

/* Bouton Retour identique au modèle */
.back-link-box {
    position: absolute;
    top: 50px;
    left: 150px;
    border: 2px solid #fff;
    padding: 20px 40px;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
}

.back-link-box:hover {
    background-color: #fff;
    color: #000;
}

/* Conteneur Vidéo */
.contact-video-box {
    position: relative;
    width: 500px; /* Taille ajustée pour être plus petite au centre */
    display: flex;
    justify-content: center;
    align-items: center;
}

.contact-video-box video {
    width: 100%;
    height: auto;
}

/* Texte vert avec contour noir pour lisibilité maximale */
.typewriter-overlay {
    position: absolute;
    width: 120%; /* Déborde légèrement sur le noir si besoin */
    color: #39ff14; /* Vert néon strict */
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1.4;
    text-align: left;
    pointer-events: none;
    
    /* Le secret de la lisibilité : triple ombre noire */
    text-shadow:
        3px 3px 0 #000,
        -2px -2px 0 #000,
        2px -2px 0 #000,
        -2px 2px 0 #000,
        0px 0px 10px rgba(0,0,0,0.8);
}

/* Curseur clignotant */
.typewriter-overlay::after {
    content: "_";
    animation: blink-cursor 0.8s infinite;
}

@keyframes blink-cursor {
    50% { opacity: 0; }
}
.nav-contact-link {
    margin-left: 20px;
    color: #39ff14; /* Vert néon identique au terminal */
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.nav-contact-link:hover {
    background-color: #39ff14;
    color: #000;
    padding: 0 5px;
    text-shadow: none;
}

/* Optionnel : faire clignoter le lien contact pour plus de visibilité */
.nav-contact-link {
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}
#texte-sommeil {
    color: #ffffff !important; /* Force la couleur blanche */
    text-align: center;
    width: 100%;
    position: absolute;
    top: 150px; /* Ajustez cette valeur pour le descendre ou le monter */
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    z-index: 110; /* S'assure qu'il passe devant le reste */
    margin: 0;
    padding: 0 20px;
    box-sizing: border-box;
}
/* --- STYLE SECTION BIO --- */
.bio-container {
    background-color: #000;
    padding: 80px 40px;
    border-top: 2px solid #333;
    font-family: 'Courier New', Courier, monospace;
}

.bio-grid {
    display: flex;
    gap: 50px;
    max-width: 1100px;
    margin: 0 auto;
}

.bio-column {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.bio-title {
    color: #39ff14; /* Vert néon strict */
    font-size: 1.1rem;
    border-bottom: 1px solid #39ff14;
    padding-bottom: 10px;
    margin-bottom: 25px;
    letter-spacing: 1px;
}

.bio-profile-wrap {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.bio-photo {
    width: 100%;
    max-width: 250px;
    filter: grayscale(1) contrast(1.5); /* Contraste fort */
    border: 1px solid #39ff14;
    display: block;
}

/* L'effet de lignes de scan par-dessus la photo */
.bio-profile-wrap::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
                linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

.bio-content p {
    color: #fff;
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 15px;
    text-align: justify;
}

.bio-stamp {
    margin-top: 30px;
    border: 1px dashed #ff0000; /* Tampon rouge discret pour l'esprit dossier */
    color: #ff0000;
    display: inline-block;
    padding: 5px 10px;
    font-size: 0.7rem;
    transform: rotate(-2deg);
}

/* Ajustement mobile */
@media (max-width: 768px) {
    .bio-grid { flex-direction: column; }
    .bio-photo { float: none; margin: 0 auto 20px; display: block; }
}
/* Conteneur de l'image */
.image-container {
    position: relative;
    width: 100%;
    max-width: 300px; /* Taille de base */
    cursor: crosshair;
    overflow: hidden;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #333;
}

/* Image par défaut : N&B et Scanlines */
.bio-photo {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(1) contrast(1.2); /* Noir et blanc brut */
    transition: filter 0.5s ease;
}

/* Effet au survol (HOVER) */
.image-container:hover {
    transform: scale(1.1); /* L'image s'agrandit légèrement */
    z-index: 10;
    border-color: #39ff14; /* Le cadre devient vert */
}

.image-container:hover .bio-photo {
    filter: grayscale(0) contrast(1); /* Passage à la couleur */
}

/* Le sous-titre style cinéma */
.subtitle-overlay {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
    color: #fff;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    font-weight: bold;
    text-align: center;
    text-shadow: 2px 2px 4px #000; /* Ombre pour lisibilité sur l'image */
    opacity: 0; /* Caché par défaut */
    transition: opacity 0.4s ease 0.2s; /* Délai pour laisser l'image s'agrandir */
}

.image-container:hover .subtitle-overlay {
    opacity: 1; /* Apparaît au hover */
}
