/* --- VARIABLES GLOBALES --- */
:root {
    /* Couleurs */
    --color-bg-primary: #0a0a0a;
    --color-bg-secondary: #111111;
    --color-text-main: #e0e0e0;
    --color-text-muted: #888888;

    /* Accents */
    --color-accent-alert: #cc0000;
    --color-accent-silver: #c0c0c0; 
    
    /* Layout et Polices */
    --grid-gap: 0px;
    --border-width: 2px;
    --border-color: #2a2a2a;
    --font-display: 'Anton', sans-serif;
    --font-mono: 'Space Mono', monospace;
}

/* --- RESET ET BASE --- */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

body {
    cursor: url("src/img/cursor.png") 16 16, auto;
    background-color: var(--color-bg-primary);
    color: var(--color-text-main);
    font-family: var(--font-mono);
    overflow-x: hidden;
    line-height: 1.5;
}

/* Changement curseur au clic */
body.is-grabbing { 
    cursor: url("src/img/grab.png") 16 16, grabbing; 
}

/* --- EFFETS VISUELS (RETRO) --- */

/* Lignes de balayage animées (Scanlines) */
.crt-scanlines {
    position: fixed; inset: 0; pointer-events: none; z-index: 90;
    background-position: 0 0; 
    background: repeating-linear-gradient(
        to bottom, transparent 0px, transparent 1px, rgba(253, 0, 0, 0.2) 2px
    );
    background-size: 100% 4px; 
    animation: scanlines-move 6s linear infinite;
    opacity: 0.7; 
}

@keyframes scanlines-move {
    from { background-position: 0 0; }
    to { background-position: 0 4px; }
}

/* Lignes statiques */
.ui-scanlines {
    position: fixed; inset: 0; pointer-events: none; z-index: 90;
    background: repeating-linear-gradient(
        to bottom, transparent 0px, transparent 2px, rgba(0, 0, 0, 0.1) 3px
    );
}

/* Ombre sur les bords (Vignette) */
.ui-vignette {
    position: fixed; inset: 0; pointer-events: none; z-index: 91;
    background: radial-gradient(circle, transparent 60%, rgba(0,0,0,0.4) 100%);
}

/* Grain / Bruit visuel */
.ui-noise {
    position: fixed; inset: 0; pointer-events: none; z-index: 89;
    background-image: url("https://www.transparenttextures.com/patterns/stardust.png");
    opacity: 0.05;
}

/* --- MISE EN PAGE (GRILLE) --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    border: var(--border-width) solid var(--border-color);
    margin-bottom: 5rem;
}

.grid-item {
    position: relative;
    border-bottom: var(--border-width) solid var(--border-color);
    overflow: hidden;
}

/* Gestion des colonnes */
.span-full { grid-column: 1 / -1; }
.span-double { grid-column: span 2; }
.span-single { grid-column: span 1; }
.border-right { border-right: var(--border-width) solid var(--border-color); }

/* Utilitaires texte */
.text-alert { color: var(--color-accent-alert); }
.text-silver { color: var(--color-accent-silver); }
.text-highlight { color: #fff; text-decoration: underline decoration-color var(--color-accent-alert); }

/* --- EN-TÊTE (HEADER) --- */
.header-panel {
    padding: 3rem 2rem;
    background: radial-gradient(circle at top, #1a1a1a, #000);
    text-align: center;
}

.panel-meta {
    display: flex; 
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem; 
    text-transform: uppercase; 
    letter-spacing: 1px;
    border-bottom: 1px solid #333; 
    padding-bottom: 1rem; 
    margin-bottom: 2rem;
    color: var(--color-text-muted);
}

/* Bouton Retour (Style Alerte) */
.btn-home-alert {
    background-color: var(--color-accent-alert);
    color: var(--color-bg-primary);
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    margin-left: auto;
    padding: 0.5rem 1.5rem; 
    font-size: 1rem;
    border: 2px solid var(--color-accent-alert);
    transition: all 0.5s ease;
}

.btn-home-alert:hover {
    background-color: #a30000;
    color: #fff;
}

/* --- LOGOS ET TITRES --- */
.hero-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5rem;
    margin-bottom: 0.5rem;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(4rem, 10vw, 8rem);
    line-height: 0.9; margin: 0;
    text-transform: uppercase;
    letter-spacing: -2px;
}

.hero-subtitle {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--color-text-muted);
    margin-top: -0.5rem;
}

/* Animation 3D des logos */
.hero-logo {
    --mirror-scale: 1; 
    height: clamp(3rem, 8vw, 6rem); 
    width: auto;
    object-fit: contain;
    opacity: 0.5;
    
    border: 3px solid var(--color-text-main); 
    border-radius: 10px;
    box-shadow: 
        0 0 10px rgba(192, 192, 192, 0.8), 
        0 0 5px rgba(255, 255, 255, 0.5) inset; 
    
    transition: all 0.3s ease-in-out;
}

.hero-logo.left {
    --mirror-scale: -1; 
    transform: scaleX(var(--mirror-scale));
}

.hero-title-wrapper:hover .hero-logo,
.hero-logo:hover {
    opacity: 1; 
    box-shadow: 
        0 0 20px rgba(192, 192, 192, 1),
        0 0 10px rgba(255, 255, 255, 0.7) inset;
        
    animation: spin-3d 3s linear infinite;
}

@keyframes spin-3d {
    0% { transform: perspective(300px) rotateY(0deg) scaleX(var(--mirror-scale, 1)); }
    50% { transform: perspective(300px) rotateY(180deg) scaleX(var(--mirror-scale, 1)); }
    100% { transform: perspective(300px) rotateY(360deg) scaleX(var(--mirror-scale, 1)); }
}

/* --- BANDEAU DÉFILANT (TICKER) --- */
.ticker-panel {
    background: var(--color-accent-alert);
    color: #000;
    font-family: var(--font-display);
    font-size: 1.5rem;
    padding: 0.5rem 0;
    white-space: nowrap; 
    overflow: hidden; 
}

.ticker-track { 
    display: inline-block; 
    animation: scroll 10s linear infinite; 
}

@keyframes scroll { 
    from {transform: translateX(0);} 
    to {transform: translateX(-50%);} 
}

/* --- SECTIONS DE CONTENU --- */
.content-panel {
    padding: 3rem;
    display: flex; flex-direction: column; justify-content: center;
}

.panel-heading {
    font-family: var(--font-display); font-size: 2.5rem; margin-bottom: 1.5rem; line-height: 1;
}

.panel-text { font-size: 1rem; max-width: 65ch; margin-bottom: 2rem; }

/* Grille de données (Chiffres) */
.data-grid { display: flex; gap: 4rem; }
.data-value { font-family: var(--font-display); font-size: 3.5rem; line-height: 1; display: block; }
.data-label { font-size: 0.75rem; color: var(--color-text-muted); letter-spacing: 1px; }

/* Conteneur Modèle 3D */
.model-panel { background: #000; min-height: 300px; }

.overlay-label {
    position: absolute; bottom: 1rem; right: 1rem;
    background: rgba(0,0,0,0.7); padding: 0.2rem 0.5rem;
    font-size: 0.7rem; border: 1px solid #333;
}

/* --- CARTES DE NAVIGATION --- */
.nav-card {
    display: flex; flex-direction: column; justify-content: flex-end;
    height: px; /* Note: Valeur px vide présente dans l'original */
    padding: 2rem;
    text-decoration: none; color: var(--color-text-main);
    background: var(--color-bg-secondary);
    transition: background 0.3s ease;
}

.card-bg-img {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    opacity: 0.1; filter: grayscale(100%); transition: 0.4s;
    z-index: 0;
}

.card-body { position: relative; z-index: 1; margin-top: auto; }
.card-icon { font-size: 2rem; margin-bottom: 0.5rem; display: block; }
.card-icon img { width: 48px; height: 48px; }

.card-title {
    font-family: var(--font-display); font-size: 2.5rem; line-height: 1; margin-bottom: 0.5rem;
}

.card-hover-reveal {
    max-height: 0; opacity: 0; overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 2px solid var(--color-accent-alert);
    padding-left: 1rem;
}

.btn-arrow { font-size: 1.5rem; color: var(--color-accent-alert); }

/* Effets au survol de la carte */
.nav-card:hover { background: #151515; }
.nav-card:hover .card-bg-img { opacity: 0.3; filter: grayscale(0%); }
.nav-card:hover .card-title { color: #fff; text-shadow: 0 0 10px rgba(255,255,255,0.2); }
.nav-card:hover .card-hover-reveal { max-height: 60px; opacity: 1; margin-top: 1rem; }

/* --- SECTION HERO BAS (Tux) --- */
.hero-panel {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 5rem; background: radial-gradient(circle at center, #111, #000);
    height: 400px;
}

.hero-content { flex: 1; }
.hero-title-small { font-family: var(--font-display); font-size: 4rem; line-height: 1; }
.model-wrapper { width: 425px; height: 425px; }

/* --- PIED DE PAGE (FOOTER) --- */
.footer-panel {
    padding: 2rem; background: #050505;
    display: flex; justify-content: space-between;
    border-top: 4px solid var(--color-accent-alert);
}

.gif-centered {
    display: flex; align-items: center; justify-content: center;
}

.align-right { text-align: right; }
.footer-col strong { display: block; font-family: var(--font-display); font-size: 1.2rem; }
.footer-col small { color: var(--color-text-muted); font-size: 0.8rem; }

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 900px) {
    .grid-container { grid-template-columns: 1fr; }
    .span-full, .span-double, .span-single { grid-column: 1 / -1; }
    .border-right { border-right: none; }
    .hero-panel { flex-direction: column; padding: 2rem; height: auto; text-align: center; }
    .data-grid { justify-content: center; }
    
    .hero-title-wrapper { gap: 1rem; }
    .hero-logo { height: clamp(2rem, 6vw, 4rem); border-width: 2px; }
}

.attentionEmoji {
    width: 24px; height: 24px; vertical-align: middle; margin: 0 5px;
}

/* --- BOUTONS SPÉCIFIQUES --- */

/* Bouton "Forge" (Glow inversé) */
.btn-forge {
    background-color: var(--color-bg-secondary, #1a1a1a);
    color: var(--color-accent-alert, #ff6b6b);
    text-decoration: none;
    font-family: inherit;
    font-weight: 800;
    font-size: 1.1rem;
    padding: 12px 30px;
    
    border: 2px solid var(--color-accent-alert, #ff6b6b);
    box-shadow: 0 0 10px var(--color-accent-alert, #ff6b6b), 
                0 0 20px rgba(255, 107, 107, 0.5); 
    
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    
    transition: all 0.2s ease-in-out;
}

.btn-forge:hover {
    background-color: var(--color-accent-alert, #ff6b6b);
    color: var(--color-bg-primary, #000); 
    box-shadow: 0 0 15px var(--color-accent-alert, #ff6b6b),
                0 0 30px rgba(255, 107, 107, 0.8);
    transform: scale(1.02); 
}

/* Bouton Footer Retro (Clignotant) */
.btn-footer-retro {
    font-family: var(--font-mono); 
    font-size: 0.9rem;
    font-weight: 700;
    
    color: var(--color-text-main, #e0e0e0); 
    background: transparent;
    text-decoration: none;
    text-transform: uppercase;
    
    padding: 0.5rem 1rem;
    
    border: 2px solid var(--color-text-main, #e0e0e0);
    box-shadow: 0 0 5px rgba(224, 224, 224, 0.4);
    
    transition: all 0.2s ease-in-out;
    display: inline-block;
}

/* Curseur clignotant */
.btn-footer-retro > span:last-child {
    font-weight: 900;
    animation: blinker 1s step-end infinite;
}

.btn-footer-retro:hover {
    color: var(--color-bg-primary, #000); 
    background: var(--color-accent-alert, #cc0000); 
    border-color: var(--color-accent-alert, #cc0000); 
    box-shadow: 0 0 15px var(--color-accent-alert, #cc0000); 
    transform: translateY(-2px); 
}

@keyframes blinker {
    50% { opacity: 0; }
}