/* --- 1. CONFIGURATION "LUXE NEUTRE" --- */
:root {
    /* NOUVEAU FOND NEUTRE : Anthracite Profond (pas noir) */
    
    /* CARTES : Un peu plus claires pour se détacher du fond */
    --card-bg: #222222;        
  --card-bg: #ffffff;    /* TEXTES */
    --text-main: #f0f0f0;      /* Blanc cassé (plus doux) */
  --text-main: #1a1a1a;    
  --text-muted: #6b6b6b;    --gold: #D4AF37;           /* Or classique */
    --line-color: rgba(255, 255, 255, 0.1); /* Lignes très subtiles */
    
    /* COULEURS DES THÈMES (Pour la fin) */
    --red-luxe: #8a0000;
    
    /* POLICES */
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Montserrat', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    /* On ajoute une texture subtile avec le gradient */

    color: var(--text-main);
    font-family: var(--font-sans);
    margin: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* --- 2. TYPOGRAPHIE & ÉLÉMENTS GRAPHIQUES --- */

h1, h2, h3 {
    font-family: var(--font-serif);
    font-weight: 400;
    letter-spacing: 0.5px;
    margin: 0;
}

.subtitle {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--gold);
    margin-bottom: 25px;
    opacity: 0.9;
}

/* Lignes décoratives fines */
.hairline {
    width: 80px;
    height: 1px;
    background-color: var(--gold);
    margin: 25px auto;
    border: none;
    opacity: 0.6;
}

/* --- 3. NAVIGATION (FONDUE) --- */
.navbar {
    padding: 30px 0;
    text-align: center;
    position: fixed;
    top: 0; width: 100%;
    z-index: 1000;
    /* Fond très léger pour que le texte reste lisible sur le défilement */
    background: linear-gradient(to bottom, rgba(26,26,26,0.95), transparent);
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-main);
}

.logo span { font-style: italic; color: var(--gold); font-family: var(--font-serif); }

/* --- 4. GESTION DES ÉCRANS --- */
.screen {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease, background 1s ease; /* Transition fluide pour la couleur */
    z-index: 0;
    padding-top: 60px; /* Espace navbar */
}

.screen.active { opacity: 1; pointer-events: all; z-index: 10; }

/* --- 5. ÉCRAN D'ACCUEIL (NEUTRE & CHIC) --- */
#home-screen {
    /* On force le fond neutre ici */
    background: transparent; 
}

.hero-content {
    text-align: center;
    max-width: 600px;
    padding: 0 30px;
}

.hero-title {
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 15px;
    color: #fff; /* Titre bien blanc pour contraster avec le gris */
}

.hero-desc {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 50px;
    font-weight: 300;
}

/* BOUTON "HAUTE COUTURE" */
.btn-luxe {
    background: transparent;
    color: var(--text-main);
    border: 1px solid rgba(255,255,255,0.3); /* Bordure subtile */
    padding: 18px 45px;
    font-family: var(--font-sans);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 2.5px;
    cursor: pointer;
    transition: all 0.4s ease;
}

.btn-luxe:hover {
    background: var(--text-main);
    color: var(--bg-color); /* Le texte prend la couleur du fond */
    border-color: var(--text-main);
}

/* --- 6. LE JEU (FOCUS SUR LES CARTES) --- */
#card-stack-wrapper {
    width: 100%;
    height: 60vh;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

#card-stack {
    width: 85%;
    max-width: 360px;
    height: 100%;
    position: relative;
}

.card {
    position: absolute;
    width: 100%; height: 100%;
    background-color: var(--card-bg);
    background-size: cover;
    background-position: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4); /* Ombre douce */
    border: 1px solid rgba(255,255,255,0.05); /* Micro bordure pour le détail */
    cursor: grab;
    overflow: hidden;
}

/* Overlay sombre pour le texte de la carte */
.card-gradient {
    position: absolute;
    bottom: 0; width: 100%; height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
}

.card-info {
    position: absolute;
    bottom: 35px; left: 0; width: 100%;
    text-align: center;
    padding: 0 20px;
}

.card-info h3 {
    font-size: 1.6rem;
    margin-bottom: 8px;
    color: #fff;
}

.card-info p {
    font-family: var(--font-sans);
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 2px;
    color: var(--gold);
}

/* INDICATEURS */
.action-indicator {
    position: absolute;
    top: 50%; 
    transform: translateY(-50%);
    font-family: var(--font-serif);
    font-size: 3rem;
    opacity: 0;
    z-index: 10;
    font-style: italic;
    transition: opacity 0.1s;
}
.ind-left { right: 30px; color: #a0a0a0; } /* NON (Gris) */
.ind-right { left: 30px; color: #fff; text-shadow: 0 0 10px rgba(255,255,255,0.5); } /* OUI (Blanc lumineux) */

/* CONTROLS (Bas) */
.controls {
    display: flex;
    gap: 60px;
    margin-top: 20px;
}

.control-btn {
    background: transparent;
    border: 1px solid var(--line-color);
    color: var(--text-muted);
    width: 55px; height: 55px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
    display: flex; align-items: center; justify-content: center;
}

.control-btn:hover {
    border-color: var(--text-main);
    color: var(--text-main);
    transform: scale(1.05);
}

/* --- 7. RÉSULTATS (TRANSFORMATION) --- */

#result-screen {
    /* Par défaut, il hérite du fond gris. La couleur sera écrasée par les classes thème */
    overflow-y: auto;
    padding-bottom: 60px;
}

.result-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

.psycho-text {
    margin: 30px 0;
    line-height: 1.8;
    color: var(--text-main);
    font-weight: 300;
    font-family: var(--font-serif);
    font-size: 1.1rem;
}

/* LISTE PRODUITS */
.amazon-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 40px;
}

.product-card {
    /* Fond semi-transparent qui s'adapte à la couleur derrière */
    background: rgba(0, 0, 0, 0.3); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    padding: 15px;
    text-decoration: none;
    color: white;
    transition: transform 0.3s, background 0.3s;
}

.product-card:hover { 
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--gold);
}

.product-img {
  width: 120px; height: 150px;    object-fit: cover;
    margin-right: 20px;
    /* Images légèrement désaturées pour le style, qui se recolorent au survol */
    filter: sepia(20%) contrast(90%); 
    transition: filter 0.3s;
}

.product-card:hover .product-img { filter: none; }

.product-details { text-align: left; }

.product-details strong {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    display: block;
    margin-bottom: 5px;
    font-weight: 400;
}

.shop-link {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gold);
    border-bottom: 1px solid var(--gold);
    padding-bottom: 2px;
}

/* --- 8. THÈMES D'IMMERSION (LE FINAL) --- */
/* Ces classes sont ajoutées par le JS à la fin */

/* THÈME ROUGE : Dégradé profond Rouge-Noir */
body.theme-rouge {
  background: linear-gradient(135deg, #8B0000 0%, #2d0a0a 100%) !important;}
bodybody.theme-rouge h2, .theme-rouge .psycho-text { color: #faf8f5 !important; text-shadow: 0 2px 20px rgba(0,0,0,0.5); }.theme-rouge .hairline { background-color: #ff4d4d; opacity: 0.5; }

/* THÈME NOIR : Retour au noir pur et brillant (Onyx) */
bodybody.theme-noir {
    background: radial-gradient(circle at center, #2b2b2b 0%, #000000 100%) !important;
}
body.theme-noir h2 { color: #fff !important; }
body.theme-noir .hairline { background-color: #fff; opacity: 0.3; }

/* THÈME OR : Dégradé Champagne */
body.theme-noirbody.theme-gold {
    background: radial-gradient(circle at center, #c4a048 0%, #5e4b1f 100%) !important;
}
/* Sur fond or, texte sombre pour contraste */
body.theme-noirbody.theme-gold h2, body.theme-noirbody.theme-gold .subtitle, body.theme-noirbody.theme-gold .psycho-text { color: #1a1a1a !important; text-shadow: none; }
body.theme-noirbody.theme-gold .hairline { background-color: #1a1a1a; }
body.theme-noirbody.theme-gold .product-card { background: rgba(255,255,255,0.2); border-color: rgba(0,0,0,0.1); color: #000; }
body.theme-noirbody.theme-gold .shop-link { color: #000; border-color: #000; }


/* --- 9. MODAL & FOOTER --- */
.modal-content {
    background: #1a1a1a; /* Gris anthracite */
    border: 1px solid var(--line-color);
    color: #ddd;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}

footer {
    position: fixed; bottom: 0; width: 100%;
    /* Fond semi-transparent identique à la navbar */
    background: linear-gradient(to top, rgba(26,26,26,0.95), transparent);
    padding: 15px;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    color: var(--text-muted);
    z-index: 100;
}

/* --- 10. BLOCAGE DU SCROLL PENDANT LE JEU --- */
body.game-locked {
  overflow: hidden;
  overscroll-behavior: none;
}

/* --- 11. VIDÉO BACKGROUND (OPTIONNELLE) --- */
.video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  opacity: 0.3; /* Subtil pour ne pas écraser le texte */
}