/* =========================================
   1. VARIABLES ET RESET
   ========================================= */
li, ul {list-style: none;}
:root {
    --warning: #ffcc00;
    --blood: #8b0000;
    --freshblood: #cc0000;
    --darkness: #050505;
    --grime: #111111;
    --text-main: #d1d5db; /* gris clair */
    --text-muted: #9ca3af; /* gris moyen */
    --border-color: #1f2937;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--darkness);
    color: var(--text-main);
    font-family: 'Rajdhani', sans-serif;
    overflow-x: hidden;
    line-height: 1.5;
}

::selection {
    background-color: var(--warning);
    color: black;
}

a { text-decoration: none; }
button { border: none; background: none; font-family: inherit; cursor: pointer; }

/* =========================================
   2. UTILITAIRES TEXTE ET COULEURS
   ========================================= */
.font-display { font-family: 'Orbitron', sans-serif; }
.font-sans { font-family: sans-serif; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-light { font-weight: 300; }
.italic { font-style: italic; }
.uppercase { text-transform: uppercase; }
.text-center { text-align: center; }
.text-left { text-align: left; }

.text-warning { color: var(--warning); }
.text-blood { color: var(--blood); }
.text-freshblood { color: var(--freshblood); }
.text-white { color: white; }
.text-muted { color: var(--text-muted); }
.text-gray { color: #6b7280; }

/* =========================================
   3. EFFETS SPECIAUX ET ANIMATIONS
   ========================================= */
/* Lignes de balayage (Scanlines) */
.scanlines {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.2));
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 50;
    opacity: 0.4;
}

/* Bandes de quarantaine */
.hazard-tape {
    height: 1rem;
    width: 100%;
    background: repeating-linear-gradient(45deg, var(--warning), var(--warning) 15px, #000 15px, #000 30px);
}

/* Vignette sombre sur les bords */
.vignette {
    box-shadow: inset 0 0 150px rgba(0,0,0,0.9);
}

/* Animation Glitch */
.glitch-text {
    position: relative;
}
.glitch-text::before, .glitch-text::after {
    content: attr(data-text); position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; background: transparent;
}
.glitch-text::before {
    left: 2px; text-shadow: -1px 0 red;
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
    clip: rect(24px, 550px, 90px, 0);
}
.glitch-text::after {
    left: -2px; text-shadow: -1px 0 var(--warning);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
    clip: rect(85px, 550px, 140px, 0);
}
@keyframes glitch-anim-1 {
    0% { clip: rect(20px, 9999px, 85px, 0); }
    20% { clip: rect(92px, 9999px, 11px, 0); }
    40% { clip: rect(43px, 9999px, 76px, 0); }
    60% { clip: rect(12px, 9999px, 34px, 0); }
    80% { clip: rect(87px, 9999px, 56px, 0); }
    100% { clip: rect(65px, 9999px, 23px, 0); }
}
@keyframes glitch-anim-2 {
    0% { clip: rect(15px, 9999px, 90px, 0); }
    20% { clip: rect(45px, 9999px, 22px, 0); }
    40% { clip: rect(78px, 9999px, 10px, 0); }
    60% { clip: rect(33px, 9999px, 66px, 0); }
    80% { clip: rect(99px, 9999px, 44px, 0); }
    100% { clip: rect(55px, 9999px, 88px, 0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .7; transform: scale(0.95); }
}
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

.backdrop-blur { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

/* =========================================
   4. COMPOSANTS GLOBAUX
   ========================================= */
/* Boutons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.75rem 2rem; font-family: 'Orbitron', sans-serif;
    font-weight: bold; text-transform: uppercase; letter-spacing: 0.05em;
    transition: all 0.3s; border-radius: 2px;
}
.btn-black-warning {
    background: black; border: 1px solid var(--warning); color: var(--warning);
}
.btn-black-warning:hover { background: var(--warning); color: black; }

.btn-grime-muted {
    background: var(--grime); border: 1px solid #4b5563; color: var(--text-muted);
}
.btn-grime-muted:hover { background: black; }

.btn-blood {
    background: var(--blood); border: 1px solid var(--blood); color: white;
    box-shadow: 0 0 15px rgba(139,0,0,0.4);
}
.btn-blood:hover { background: var(--freshblood); border-color: var(--freshblood); }

.btn-dark {
    background: #1f2937; border: 1px solid #374151; color: white;
}
.btn-dark:hover { background: #374151; }

.icon-sm { width: 1rem; height: 1rem; }
.icon-md { width: 1.25rem; height: 1.25rem; }
.icon-lg { width: 2rem; height: 2rem; }
.icon-xl { width: 5rem; height: 5rem; }
.ml-3 { margin-left: 0.75rem; }
.mr-2 { margin-right: 0.5rem; }

/* =========================================
   5. STRUCTURE DU SITE
   ========================================= */
#main-content {
    display: none;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

/* Portail d'âge */
.age-gate-wrapper {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(0,0,0,0.95);
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
}
.age-gate-modal {
    max-width: 32rem; width: 100%;
    background: var(--grime); border: 2px solid var(--warning);
    border-radius: 4px; box-shadow: 0 0 50px rgba(255,204,0,0.1);
    text-align: center; position: relative; overflow: hidden;
    max-height: 95vh; overflow-y: auto;
}
.age-gate-body { padding: 1.5rem; position: relative; }
.age-blood-splash {
    position: absolute; top: -2.5rem; right: -2.5rem;
    width: 8rem; height: 8rem; background: var(--blood);
    border-radius: 50%; mix-blend-mode: multiply;
    filter: blur(24px); opacity: 0.5;
}
.age-gate-icon {
    color: var(--warning); margin: 0 auto 1.5rem;
    filter: drop-shadow(0 0 10px rgba(255,204,0,0.5));
}
.age-gate-title { font-size: 1.875rem; letter-spacing: 0.1em; margin-bottom: 0.5rem; }
.age-gate-subtitle { font-size: 1.125rem; letter-spacing: 0.05em; margin-bottom: 1.5rem; }
.age-gate-desc { margin-bottom: 2rem; }
.age-gate-buttons { display: flex; flex-direction: column; gap: 1rem; justify-content: center; }

/* Navigation */
.navbar {
    position: fixed; width: 100%; z-index: 40;
    background: rgba(5,5,5,0.9); border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 30px rgba(0,0,0,0.8);
}
.nav-container {
    max-width: 80rem; margin: 0 auto; padding: 0 1rem;
    display: flex; justify-content: space-between; align-items: center; height: 5rem;
}
.nav-logo {
    height: 3rem; width: auto; transition: transform 0.3s;
    filter: drop-shadow(0 0 15px rgba(139,0,0,0.6));
}
.nav-logo:hover { transform: scale(1.05); }
.nav-desktop { display: none; align-items: center; gap: 2rem; }
.nav-link {
    color: var(--text-muted); font-size: 0.875rem; font-weight: bold;
    text-transform: uppercase; letter-spacing: 0.1em; transition: color 0.3s;
    display: flex; align-items: center; gap: 0.25rem;
}
.nav-link:hover { color: var(--warning); }
.nav-support-btn {
    padding: 0.5rem 1rem; background: var(--blood); color: white;
    font-size: 0.75rem; font-weight: bold; text-transform: uppercase;
    letter-spacing: 0.1em; border-radius: 2px; transition: background 0.3s;
}
.nav-support-btn:hover { background: var(--freshblood); }
.nav-divider {
    height: 0.25rem; width: 100%;
    background: linear-gradient(to right, var(--blood), var(--darkness), var(--blood));
    opacity: 0.5;
}

/* Menu Déroulant (Desktop) */
.nav-dropdown { position: relative; }
.dropdown-content {
    position: absolute; left: 0; top: 100%; width: 12rem;
    background: var(--grime); border: 1px solid var(--border-color);
    border-radius: 0 0 4px 4px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: all 0.3s; z-index: 50; padding: 0.5rem 0;
}
.nav-dropdown:hover .dropdown-content { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown:hover svg { transform: rotate(180deg); }
.dropdown-item {
    display: block; padding: 0.75rem 1rem; color: var(--text-muted);
    font-size: 0.875rem; font-weight: bold; text-transform: uppercase;
    letter-spacing: 0.1em; border-bottom: 1px solid var(--border-color);
    transition: background 0.3s, color 0.3s;
}
.dropdown-item:last-child { border-bottom: none; }
.dropdown-item:hover { background: black; color: var(--warning); }

/* Menu Mobile */
.nav-mobile-btn { color: var(--text-muted); display: flex; }
.nav-mobile-btn:hover { color: var(--warning); }
.nav-mobile-menu {
    display: none; position: absolute; width: 100%;
    background: var(--darkness); border-bottom: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.9); z-index: 50;
}
.nav-mobile-menu.active { display: block; }
.mobile-link {
    display: block; padding: 0.75rem 1rem; color: var(--text-muted);
    font-size: 1rem; font-weight: bold; text-transform: uppercase;
    letter-spacing: 0.1em; text-align: center; transition: background 0.3s;
}
.mobile-link:hover { background: var(--grime); color: var(--warning); }
.mobile-support-btn { margin: 1rem auto 1.5rem; width: max-content; }

/* Section Hero */

.hero-bg {
    position: absolute; inset: 0; z-index: 0; opacity: 0.9;
    background: radial-gradient(ellipse at center, transparent, var(--darkness));
}

.hero-bg-STGFTZ {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Remplace 'ton-image.jpg' par le chemin de ton image */
    background-image: url('img/banner_bg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

.hero-bg-PARADOX {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Remplace 'ton-image.jpg' par le chemin de ton image */
    background-image: url('img/bgsophie2.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

.hero-STGFTZ {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;

}


#particle-canvas {
    position: absolute; /* Crucial : ne prend plus de place physique */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;         /* Derrière le texte */
    pointer-events: none; /* Laisse passer les clics vers les boutons */
}
/* Section Hero - Le parent */
.hero {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--darkness);
}

.hero-content {
    position: relative;
    z-index: 10; /* Doit être supérieur au z-index du canvas */
    text-align: center;
    max-width: 56rem;
    padding: 0 1rem;
    margin: 0 auto;
}
.hero-pre { font-size: 0.875rem; letter-spacing: 0.3em; margin-bottom: 1rem; }
.hero-title { font-size: 3rem; font-weight: 900; letter-spacing: -0.05em; margin-bottom: 1.5rem; }
.hero-desc { font-size: 1.125rem; margin-bottom: 2.5rem; max-width: 42rem; margin-left: auto; margin-right: auto; }

.hero-buttons { display: flex; flex-direction: column; gap: 1rem; justify-content: center; }
.btn-hero-explore {
    padding: 1rem 2rem; border: 2px solid var(--warning); background: rgba(255,204,0,0.1);
    color: var(--warning); box-shadow: 0 0 20px rgba(255,204,0,0.1);
}
.btn-hero-explore svg { transition: transform 0.3s; }
.btn-hero-explore:hover { background: var(--warning); color: black; box-shadow: 0 0 30px rgba(255,204,0,0.4); }
.btn-hero-explore:hover svg { transform: translateX(4px); }

.btn-hero-support {
    padding: 1rem 2rem; border: 2px solid var(--blood); background: rgba(139,0,0,0.2);
    color: white; box-shadow: 0 0 20px rgba(139,0,0,0.2);
}
.btn-hero-support svg { transition: transform 0.3s; }
.btn-hero-support:hover { background: var(--blood); box-shadow: 0 0 30px rgba(139,0,0,0.6); }
.btn-hero-support:hover svg { transform: scale(1.1); }

.hero-seo { margin-top: 2rem; font-size: 0.75rem; color: var(--text-gray); letter-spacing: 0.025em; opacity: 0.6; }

/* Section Jeux */
.section-games { padding: 4rem 0; background: var(--darkness); position: relative; scroll-margin-top: 5rem; }
.container { max-width: 80rem; margin: 0 auto; padding: 0 1rem; position: relative; z-index: 10; }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-title { font-size: 2.25rem; margin-bottom: 1rem; }
.section-divider { width: 6rem; height: 0.25rem; background: var(--blood); margin: 0 auto; }

.games-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; }
.game-card {
    background: var(--grime); border: 1px solid var(--border-color); border-radius: 4px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); overflow: hidden; position: relative;
    transition: border-color 0.5s; scroll-margin-top: 6rem;
}
.game-card-hover { position: absolute; inset: 0; opacity: 0; transition: opacity 0.5s; pointer-events: none; }
.game-card.sophie1:hover { border-color: var(--warning); }
.game-card.sophie1:hover .game-card-hover { opacity: 0.05; background: var(--warning); }
.game-card.sophie2:hover { border-color: var(--blood); }
.game-card.sophie2:hover .game-card-hover { opacity: 0.1; background: var(--blood); }

.game-cover {
    height: 16rem; width: 100%; background: black; position: relative;
    display: flex; align-items: center; justify-content: center;
    border-bottom: 1px solid var(--border-color); overflow: hidden;
}
.game-cover-bg {inset: 0; }
.game-card.sophie1 .game-cover-bg { background: radial-gradient(ellipse at center, #713f12, black); }
.game-card.sophie2 .game-cover-bg { background: radial-gradient(ellipse at center, #7f1d1d, black); }

.game-icon { width: 8rem; height: 8rem; opacity: 0.4; transition: all 0.7s; }
.game-card.sophie1 .game-icon { color: var(--warning); }
.game-card.sophie2 .game-icon { color: var(--blood); }
.game-card:hover .game-icon { opacity: 0.8; transform: scale(1.1); }

.game-tags { position: absolute; top: 1rem; right: 1rem; display: flex; gap: 0.5rem; }
.game-tags-bottom { position: absolute; bottom: 1rem; left: 1rem; display: flex; gap: 0.5rem; }
.tag {
    padding: 0.25rem 0.5rem; background: black; font-size: 0.75rem; font-weight: bold;
    text-transform: uppercase; letter-spacing: 0.05em; border-radius: 2px;
}
.tag-blood { color: var(--freshblood); border: 1px solid var(--freshblood); }
.tag-muted { color: var(--text-muted); border: 1px solid #4b5563; }

.game-hazard { position: absolute; bottom: 0; left: 0; width: 100%; height: 0.5rem; }
.game-classified {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    opacity: 0.2; font-family: monospace; font-size: 1.25rem; font-weight: bold;
    color: var(--blood); transform: rotate(12deg); pointer-events: none;
}

.game-body { padding: 2rem; position: relative; z-index: 10; }
.game-title { font-size: 1.875rem; margin-bottom: 0.5rem; transition: color 0.3s; }
.game-card.sophie1:hover .game-title { color: var(--warning); }
.game-card.sophie2:hover .game-title { color: var(--freshblood); }
.game-sub { font-size: 0.875rem; font-weight: bold; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1rem; }
.game-card.sophie1 .game-sub { color: var(--warning); }
.game-card.sophie2 .game-sub { color: var(--blood); }
.game-desc { font-size: 1.125rem; margin-bottom: 1.5rem; }

.game-quote { font-style: italic; border-left: 2px solid var(--blood); padding-left: 0.5rem; margin-top: 1rem; display: block; }

.btn-game-play {
    background: black; color: white; border: 1px solid #374151; padding: 0.5rem 1.5rem;
}
.btn-game-play:hover { background: var(--warning); color: black; border-color: var(--warning); }
.btn-game-disabled {
    background: var(--darkness); color: #4b5563; border: 1px solid var(--border-color);
    padding: 0.5rem 1.5rem; cursor: not-allowed;
}

/* Section About */
.section-about { padding: 6rem 0; background: var(--grime); position: relative; border-top: 1px solid var(--border-color); scroll-margin-top: 5rem; }
.about-container { max-width: 56rem; margin: 0 auto; padding: 0 1rem; text-align: center; }
.about-box {
    text-align: left; background: rgba(0,0,0,0.6); padding: 2rem; border-radius: 4px;
    border: 1px solid var(--border-color); box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); margin-bottom: 4rem;
}
.about-p { font-size: 1.125rem; margin-bottom: 1rem; }
.about-p-bold { font-size: 1.25rem; font-weight: bold; color: var(--text-main); margin-bottom: 2.5rem; }
.about-q { font-size: 1.25rem; color: var(--warning); margin-bottom: 1rem; letter-spacing: 0.05em; }
.about-quote { border-left: 4px solid var(--blood); padding-left: 1rem; font-size: 1.125rem; }
.about-buttons { display: flex; flex-direction: column; gap: 1rem; justify-content: center; margin-top: 1.5rem; }

/* Footer */
.footer { background: black; padding: 2.5rem 0; border-top: 1px solid var(--border-color); text-align: center; position: relative; z-index: 10; }
.footer-logo { height: 4rem; width: auto; opacity: 0.7; filter: grayscale(100%); transition: all 0.5s; margin: 0 auto 1.5rem; }
.footer-logo:hover { filter: grayscale(0); }
.footer-warning { font-size: 0.875rem; color: #4b5563; margin-bottom: 0.5rem; }
.footer-copy { font-size: 0.75rem; color: #374151; margin-bottom: 2rem; }

/* Menu de traduction flottant */
.lang-wrapper { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 100; }
.lang-btn {
    display: flex; align-items: center; justify-content: space-between;
    border-radius: 4px; border: 1px solid #374151; padding: 0.5rem 1rem;
    background: rgba(0,0,0,0.8); color: var(--text-main); font-weight: bold;
    box-shadow: 0 0 15px rgba(0,0,0,0.8); min-width: 140px; transition: all 0.3s;
}
.lang-wrapper:hover .lang-btn { color: var(--warning); border-color: var(--warning); }
.lang-wrapper:hover svg { transform: rotate(180deg); }
.lang-menu {
    position: absolute; bottom: 100%; right: 0; margin-bottom: 0.5rem;
    width: 100%; min-width: 140px; border-radius: 4px; background: black;
    border: 1px solid var(--border-color); box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    opacity: 0; visibility: hidden; transition: all 0.3s;
}
.lang-wrapper:hover .lang-menu { opacity: 1; visibility: visible; }
.lang-item {
    display: block; width: 100%; padding: 0.5rem 1rem; font-size: 0.875rem;
    color: var(--text-muted); border-bottom: 1px solid var(--border-color);
    transition: background 0.3s, color 0.3s; text-align: left;
}
.lang-item:last-child { border-bottom: none; }
.lang-item:hover { background: var(--grime); color: var(--warning); }
/* Styles pour la page Personnages */
.char-card {
    position: relative;
    background: var(--grime);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s;
}

.char-card:hover {
    transform: translateY(-10px);
    border-color: var(--warning);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.char-img-container {
    position: relative;
    aspect-ratio: 3/4; /* Format portrait type fiche */
    overflow: hidden;
    background: #000;
}

.char-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(30%) contrast(1.1);
    transition: filter 0.3s, transform 0.5s;
}

.char-card:hover .char-img {
    filter: grayscale(0%) contrast(1);
    transform: scale(1.05);
}

.char-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 40%);
}

.char-info {
    padding: 1.5rem;
    text-align: center;
}

.char-name {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.char-line {
    width: 40px;
    height: 2px;
    background: var(--blood);
    margin: 0 auto;
    transition: width 0.3s;
}

.char-card:hover .char-line {
    width: 80px;
    background: var(--warning);
}
/* =========================================
   6. RESPONSIVE DESIGN (Media Queries)
   ========================================= */
@media (min-width: 640px) { /* sm */
    .age-gate-body { padding: 2rem; }
    .hero-buttons { flex-direction: row; }
    .about-buttons { flex-direction: row; }
    .age-gate-buttons { flex-direction: row; }
    .nav-logo { height: 4rem; }
}
@media (min-width: 768px) { /* md */
    .nav-desktop { display: flex; }
    .nav-mobile-btn { display: none; }
    .hero-pre { font-size: 1rem; }
    .hero-title { font-size: 4.5rem; }
    .hero-desc { font-size: 1.5rem; }
    .section-title { font-size: 3rem; }
    .games-grid { grid-template-columns: 1fr 1fr; }
}