/* style.css - TRIX MUSIK V26_STABLE (COMPLET & RESTAURÉ) */

* { box-sizing: border-box; }

:root {
    --bg-color: #e6e6e6;
    --dark-section: #1a1a1a;
    --primary-color: #ffffff; /* Couleur par défaut (Accueil) */
    --text-color: #3b3b3e;
    --white: #ffffff;
    --matrix-green: #00ff41;
    
    /* Palette vibrante V26 demandée */
    --musik-blue: #00d2ff;      /* Bleu plus pétant */
    --mao-red: #ff3e3e;         /* Rouge vibrant */
    --quantum-green: #00ff41;   /* Vert Quantum d'origine */
}

/* --- LOGIQUE DE COULEUR DYNAMIQUE PAR SECTION --- */

/* 1. SECTION MUSIK (Articles, Histoire, Vidéos, Guides, Docus) */
body[data-page="musik"], 
body[data-page="articles"], 
body[data-page="histoire"], 
body[data-page="genres"], 
body[data-page="guide"], 
body[data-page="videos"], 
body[data-page^="docu-"] {
    --primary-color: var(--musik-blue);
}

/* 2. SECTION MAO (Hub, Tutos, Prod, Plugins, Samples) */
body[data-page="mao"], 
body[data-page="tutos"], 
body[data-page="prod"], 
body[data-page="plugins"], 
body[data-page="samples"] {
    --primary-color: var(--mao-red);
}

/* 3. SECTION QUANTUM (Hub, Softs, Demos, WIP) */
body[data-theme="quantum"], 
body[data-page^="soft-"] {
    --primary-color: var(--quantum-green);
}

/* 4. ACCUEIL (Style Blanc) */
body[data-page="accueil"] {
    --primary-color: #ffffff;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--dark-section);
    background-image: url('../img/general/background.png'); 
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    color: var(--text-color);
    margin: 0; padding: 0;
    line-height: 1.6;
    min-height: 100vh;
    display: flex; flex-direction: column;
}

/* Compatibilité d'image de fond pour les sous-dossiers d'un seul niveau */
body[data-page^="docu-"] , body[data-page^="soft-"] {
    background-image: url('../img/general/background.png');
}

/* --- THEME QUANTUM --- */
body[data-theme="quantum"] {
    background-image: url('../img/general/matrix-bg.gif'); 
    background-size: cover;
    background-attachment: fixed;
    color: #ddd;
}
body[data-page^="soft-"][data-theme="quantum"] {
    background-image: url('../img/general/matrix-bg.gif');
}

body[data-theme="quantum"] header { background: var(--dark-section) !important; border-bottom: none; }
body[data-theme="quantum"] .hero { border-bottom: 2px solid var(--matrix-green); }
body[data-theme="quantum"] .feature-card { background: #0a0a0a; border: 1px solid #004400; box-shadow: 0 0 15px rgba(0, 255, 65, 0.1); }
body[data-theme="quantum"] .feature-card h3 { color: var(--matrix-green); }
body[data-theme="quantum"] .badge-wip { background: var(--matrix-green); color: black; box-shadow: 0 0 10px var(--matrix-green); }
body[data-theme="quantum"] footer { border-top: 2px solid var(--matrix-green); }
body[data-theme="quantum"] .section-header { background: rgba(0,0,0,0.8); border: 1px solid var(--matrix-green); color: white; }
body[data-theme="quantum"] .section-header h2 { color: var(--matrix-green); }
body[data-theme="quantum"] .section-header p { color: #aaa; }

/* Slogan de l'accueil centré et élargi */
.welcome-banner { 
    margin-bottom: 2rem; 
    text-align: center; 
    max-width: 1000px; 
    margin-left: auto; 
    margin-right: auto; 
}
.welcome-banner h1 { 
    color: var(--white); 
    font-size: 2.2rem; 
    margin-bottom: 8px; 
}
.welcome-banner p { 
    color: rgba(255, 255, 255, 0.85); 
    font-size: 1.1rem; 
}

/* --- HEADER & NAV --- */
header {
    background: var(--dark-section); 
    position: sticky; top: 0; z-index: 1000;
    border-bottom: 2px solid var(--primary-color); 
    box-shadow: 0 4px 20px rgba(0,0,0,0.4); 
    padding: 0;
    transition: border-color 0.4s ease;
}
nav ul { display: flex; justify-content: center; list-style: none; gap: 20px; padding: 15px 0; margin: 0; align-items: center; flex-wrap: wrap; }
nav a { color: var(--white); text-decoration: none; font-weight: 600; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 1px; transition: 0.3s; display: flex; align-items: center; }
nav a:hover, nav a.active { color: var(--primary-color); text-shadow: 0 0 10px var(--primary-color); }
.nav-home-icon { width: 18px; height: 18px; fill: white; transition: 0.3s; }
nav a:hover .nav-home-icon, nav a.active .nav-home-icon { fill: var(--primary-color); }
.lang-btn { background: transparent; border: none; color: white; padding: 5px; cursor: pointer; font-size: 1.2rem; display: flex; align-items: center; gap: 5px; }

/* --- MASQUAGE MENU ACCUEIL --- */
body[data-page="accueil"] nav ul {
    visibility: hidden; 
}

/* --- MENU MOBILE FLUIDE SANS RETOUR À LA LIGNE --- */
@media (max-width: 600px) {
    nav ul {
        flex-wrap: nowrap !important;          
        justify-content: flex-start !important; 
        overflow-x: auto !important;           
        -webkit-overflow-scrolling: touch;     
        gap: 15px !important;
        padding: 10px 15px !important;
    }
    nav ul::-webkit-scrollbar {
        display: none; 
    }
    nav a {
        font-size: 0.75rem !important;
        white-space: nowrap !important;        
    }
    .nav-home-icon {
        width: 14px !important;
        height: 14px !important;
    }
}

/* --- HERO --- */
.hero { background: var(--dark-section); color: var(--white); text-align: center; padding: 0.5rem 0; border-bottom: none; }
.hero img.logo { width: 90%; max-width: 250px; height: auto; display: block; margin: 0 auto; }
.hero p { font-style: italic; opacity: 0.9; font-size: 0.95rem; font-weight: bold; letter-spacing: 1px; margin: -5px 0 2px 0; }

/* --- GLOBAL LAYOUT --- */
.container { max-width: 1450px; margin: 0 auto; padding: 2rem; flex: 1; width: 100%; position: relative; }
.section-header { margin-bottom: 2rem; border-left: 5px solid var(--primary-color); background: white; padding: 15px 25px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); transition: border-color 0.4s ease; }
.section-header.centered { display: table; margin: 0 auto 30px auto; text-align: center; border-left: none; border-top: 5px solid var(--primary-color); }
.section-header h2 { margin: 0 0 5px 0; color: #333; font-size: 1.6rem; }
.section-header p { margin: 0; color: #555; font-size: 1rem; }

/* --- GRILLES & CARTES --- */
.hub-grid, .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 30px; justify-content: center; padding-bottom: 40px; }
.feature-card { background: white; border-radius: 12px; overflow: hidden; text-align: center; box-shadow: 0 5px 15px rgba(0,0,0,0.05); display: flex; flex-direction: column; transition: 0.3s; position: relative; width: 100%; max-width: 400px; margin: 0 auto; cursor: pointer; }
.feature-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.15); }

.feature-img {     
    width: 100%;     
    height: auto;     
    aspect-ratio: 16 / 9; 
    object-fit: cover; 
    border-bottom: 4px solid var(--primary-color); 
    transition: border-color 0.4s ease;
}
.feature-card .video-wrapper { 
    width: 100%; 
    height: auto; 
    padding-bottom: 0; 
    aspect-ratio: 16 / 9; 
    border-bottom: 4px solid var(--primary-color); 
}
.feature-content { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.feature-card h3 { color: var(--primary-color); margin-bottom: 10px; font-size: 1.3rem; margin-top:0; transition: color 0.4s ease; }
.badge-wip { position: absolute; top: 10px; right: 10px; z-index: 10; background: #ff9800; color: black; font-weight: bold; padding: 3px 10px; border-radius: 4px; font-size: 0.7rem; text-transform: uppercase; }
.btn-feature { background: var(--text-color); color: white; padding: 10px 25px; border-radius: 50px; text-decoration: none; margin-top: 15px; display: inline-block; font-size: 0.9rem; transition: 0.3s; }
.btn-feature:hover { background: var(--primary-color); color: #000; }

/* --- CARTES HORIZONTALES SUR PC (UNIQUEMENT SUR LA PAGE ARTICLES) --- */
@media (min-width: 900px) {
    body[data-page="articles"] .hub-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
        max-width: 1100px;
        margin: 0 auto;
    }
    body[data-page="articles"] .feature-card {
        flex-direction: row !important; /* Force l'alignement horizontal */
        max-width: 100%;
        height: 220px;
        text-align: left;
        align-items: center;
        border: 1px solid transparent;
        border-radius: 4px !important;
        transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    }
    body[data-page="articles"] .feature-card:hover {
        transform: translateY(-4px) scale(1.01);
        box-shadow: 0 12px 30px rgba(2, 166, 207, 0.25);
        border-color: var(--primary-color);
    }
    body[data-page="articles"] .feature-img {
        width: 400px;
        height: 100%;
        aspect-ratio: 2 / 1; 
        border-bottom: none;
        border-right: 4px solid var(--primary-color);
    }
    body[data-page="articles"] .feature-content {
        padding: 1.5rem 2rem;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-start !important; /* Aligne le contenu vers le haut */
    }
    body[data-page="articles"] .feature-card h3 {
        color: #1C1C1C; 
        margin-top: 0 !important;
        margin-bottom: 8px !important;
    }
    body[data-page="articles"] .feature-card p {
        color: #555555; 
    }
    body[data-page="articles"] .btn-feature {
        display: none !important;
    }
}

/* Style du logo transparent sur les cartes d'accueil (V26 Restructuré) */
.card-inline-logo {
    width: 100% !important;
    max-width: 380px !important;      
    height: 120px !important;          
    object-fit: contain !important;   
    background-color: transparent !important; /* Fond noir supprimé */
    border-radius: 8px !important;   
    padding: 0 !important; /* Retrait padding */   
    margin: 0 auto 15px auto !important;
    display: block !important;
    box-shadow: none !important; /* Ombrage supprimé */
}

/* Division de la hauteur des cartes d'accueil sur Mobile (230px strict avec Espacements Pro) */
@media (max-width: 600px) {
    body[data-page="accueil"] .feature-card {
        height: 335px !important; /* Légèrement ré-augmenté pour accueillir l'image complète */
    }
    body[data-page="accueil"] .feature-img {
        height: 180px !important; /* Hauteur d'image augmentée pour éviter l'écrasement */
        aspect-ratio: auto !important; 
        object-fit: cover !important;
        object-position: center top !important;
    }
    body[data-page="accueil"] .feature-content {
        padding: 0.4rem 0.5rem 0.7rem 0.5rem !important; /* Ajout d'un espacement de sécurité de 10px en bas */
        justify-content: space-between !important;
    }
    body[data-page="accueil"] .card-inline-logo {
        max-width: 160px !important; 
        height: 60px !important;
        margin-bottom: 4px !important;
        padding: 0 !important;
    }
    body[data-page="accueil"] .feature-card h3 {
        font-size: 0.85rem !important;
        margin-top: 0 !important;
        margin-bottom: 2px !important;
    }
    body[data-page="accueil"] .feature-card p {
        font-size: 0.7rem !important;
        line-height: 1.1 !important;
        margin-bottom: 4px !important;
    }
    body[data-page="accueil"] .btn-feature {
        margin-top: 2px !important;
        padding: 4px 12px !important;
        font-size: 0.7rem !important;
    }
    /* Correction du titre mobile sur une seule ligne */
    .welcome-banner h1 {
        font-size: 1.4rem !important;
        white-space: nowrap !important;
        letter-spacing: -0.5px;
    }
    .welcome-banner p {
        font-size: 0.85rem !important;
        line-height: 1.3;
    }
}

/* --- NAVIGATION LATÉRALE --- */
.side-nav-btn { position: fixed; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.3); color: white; width: 50px; height: 100px; display: flex; align-items: center; justify-content: center; font-size: 2rem; text-decoration: none; z-index: 9999; border-radius: 8px; transition: 0.3s; cursor: pointer; }
.side-nav-left { left: 0; border-top-right-radius: 50px; border-bottom-right-radius: 50px; }
.side-nav-right { right: 0; border-top-left-radius: 50px; border-bottom-left-radius: 50px; }

/* Surbrillance et lueur spécifiques à la thématique de la section cible (V26) */
.side-nav-btn.target-theme-portal:hover { background: #ffffff; color: #000; box-shadow: 0 0 20px #ffffff; }
.side-nav-btn.target-theme-musik:hover { background: var(--musik-blue); color: #000; box-shadow: 0 0 20px var(--musik-blue); }
.side-nav-btn.target-theme-mao:hover { background: var(--mao-red); color: #000; box-shadow: 0 0 20px var(--mao-red); }
.side-nav-btn.target-theme-quantum:hover { background: var(--quantum-green); color: #000; box-shadow: 0 0 20px var(--quantum-green); }

/* Spécification Accueil : Invisibles par défaut, n'apparaissent qu'au survol ou toucher tactile */
body[data-page="accueil"] .side-nav-btn {
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}
body[data-page="accueil"] .side-nav-btn:hover {
    opacity: 1;
}

/* --- VIDEO WRAPPER & PLAY BUTTON --- */
.video-wrapper { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; background: #000; cursor: pointer; }
.video-wrapper iframe, .video-wrapper img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.play-button { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 0; height: 0; border-style: solid; border-width: 15px 0 15px 25px; border-color: transparent transparent transparent var(--primary-color); filter: drop-shadow(0 0 1px white); pointer-events: none; }

/* --- MASQUAGE DU BOUTON PLAY (PAGE MAO - 4 PREMIÈRES CARTES) --- */
body[data-page="mao"] .grid .feature-card:nth-child(-n+4) .play-button {
    display: none !important;
}

footer { background: var(--dark-section); color: var(--white); text-align: center; padding: 3rem 2rem; margin-top: auto; border-top: 2px solid var(--primary-color); transition: border-color 0.4s ease; }
.footer-links a { color: #aaa; text-decoration: none; margin: 0 10px; font-size: 0.9rem; }
.footer-links a:hover { color: var(--primary-color); }
.btn-donate { display: inline-block; color: white; padding: 10px 25px; margin: 5px; border-radius: 50px; text-decoration: none; font-weight: bold;}
.btn-paypal { background: #0070ba; } .btn-tipeee { background: #d63031; }

@media (max-width: 900px) { .side-nav-btn { display: none; } }

/* --- STYLE SPÉCIFIQUE : PAGE TRIX MAO (Glassmorphism & Effet Grow/Glow) --- */
body[data-page="mao"] .feature-card {
    background: rgba(255, 255, 255, 0.05); 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px); 
    border: 1px solid rgba(255, 255, 255, 0.2); 
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); 
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
                box-shadow 0.4s ease, 
                border-color 0.4s ease;
}
body[data-page="mao"] .feature-card h3 {
    color: var(--primary-color); 
    text-shadow: 0 0 10px rgba(255, 62, 62, 0.2); 
}
body[data-page="mao"] .feature-card p {
    color: rgba(255, 255, 255, 0.8); 
}
body[data-page="mao"] .feature-card:hover {
    transform: scale(1.03) translateY(-5px); 
    border-color: var(--primary-color); 
    box-shadow: 0 12px 30px rgba(255, 62, 62, 0.3);  
}

/* --- DESIGN ÉDITORIAL MAGAZINE (PAGES DOCU-*) --- */
body[data-page^="docu-"] .container {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}
body[data-page^="docu-"] .section-header {
    background: transparent;
    border-left: none;
    padding: 0;
    box-shadow: none;
    text-align: center;
    margin-bottom: 2rem;
}
body[data-page^="docu-"] .section-header h2 {
    font-size: 2.5rem;
    color: #fff;
    font-weight: 800;
}
body[data-page^="docu-"] .section-header p {
    color: #888;
    font-size: 1.2rem;
    margin-top: 10px;
}
body[data-page^="docu-"] .meta-info {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    margin-bottom: 1.5rem;
}
body[data-page^="docu-"] .meta-info span {
    margin: 0 10px;
}
body[data-page^="docu-"] .share-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 2.5rem;
}
body[data-page^="docu-"] .btn-share {
    padding: 8px 18px;
    border-radius: 4px;
    text-decoration: none;
    color: #fff;
    font-size: 0.8rem;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    transition: 0.2s;
}
body[data-page^="docu-"] .btn-fb { background: #3b5998; }
body[data-page^="docu-"] .btn-tw { background: #00aced; }

body[data-page^="docu-"] .docu-content {
    background: transparent;
    color: #e0e0e0;
    font-size: 1.15rem;
    line-height: 1.8;
}
body[data-page^="docu-"] .docu-content p {
    margin-bottom: 1.8rem;
    text-align: justify;
}
body[data-page^="docu-"] .docu-content h3 {
    font-size: 1.6rem;
    color: #fff;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 5px;
}
body[data-page^="docu-"] .large-cover {
    width: 100%;
    height: auto;
    object-fit: cover;
    margin-bottom: 2rem;
    border-radius: 4px;
}
body[data-page^="docu-"] .video-wrapper {
    margin: 2.5rem 0;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
/* --- MASQUAGE COMPLET DU HEADER SUR L'ACCUEIL --- */
body[data-page="accueil"] header {
    display: none !important;
}

/* ==========================================================================
   INTERACTIONS PORTAIL HAUT DE GAMME V26 (LES 4 IDÉES VISUELLES)
   ========================================================================== */

/* 1. Micro-élévation fluide & transition de desaturation globale */
.hub-grid {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.feature-card {
    position: relative;
    overflow: hidden; /* Nécessaire pour l'effet de balayage brillant (Shine Sweep) */
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
                box-shadow 0.4s ease, 
                border-color 0.4s ease, 
                opacity 0.4s ease, 
                filter 0.4s ease !important;
}

/* 2. Contraste asymétrique : Quand une carte a le focus, les autres s'estompent doucement */
.grid-has-focus .feature-card:not(.focused-card) {
    opacity: 0.6;
    filter: grayscale(30%) blur(0.5px);
}

/* 3. Micro-élévation sur-mesure pour l'état focus */
.feature-card.focused-card {
    transform: translateY(-8px) scale(1.02) !important;
    z-index: 10;
    opacity: 1 !important;
    filter: none !important;
}

/* 4. Lueurs respirantes thématiques (Pulse Animations) */
@keyframes pulseMusik {
    0% { box-shadow: 0 0 15px rgba(0, 210, 255, 0.2), 0 0 5px rgba(0, 210, 255, 0.1); }
    50% { box-shadow: 0 0 30px rgba(0, 210, 255, 0.6), 0 0 15px rgba(0, 210, 255, 0.3); }
    100% { box-shadow: 0 0 15px rgba(0, 210, 255, 0.2), 0 0 5px rgba(0, 210, 255, 0.1); }
}

@keyframes pulseMao {
    0% { box-shadow: 0 0 15px rgba(255, 62, 62, 0.2), 0 0 5px rgba(255, 62, 62, 0.1); }
    50% { box-shadow: 0 0 30px rgba(255, 62, 62, 0.6), 0 0 15px rgba(255, 62, 62, 0.3); }
    100% { box-shadow: 0 0 15px rgba(255, 62, 62, 0.2), 0 0 5px rgba(255, 62, 62, 0.1); }
}

@keyframes pulseQuantum {
    0% { box-shadow: 0 0 15px rgba(0, 255, 65, 0.2), 0 0 5px rgba(0, 255, 65, 0.1); }
    50% { box-shadow: 0 0 30px rgba(0, 255, 65, 0.6), 0 0 15px rgba(0, 255, 65, 0.3); }
    100% { box-shadow: 0 0 15px rgba(0, 255, 65, 0.2), 0 0 5px rgba(0, 255, 65, 0.1); }
}

/* Assignation des lueurs dynamiques et bordures thématiques colorées */
body[data-page="accueil"] .feature-card.card-theme-musik.focused-card {
    border: 2px solid var(--musik-blue) !important;
    animation: pulseMusik 2.5s infinite ease-in-out;
}

body[data-page="accueil"] .feature-card.card-theme-mao.focused-card {
    border: 2px solid var(--mao-red) !important;
    animation: pulseMao 2.5s infinite ease-in-out;
}

body[data-page="accueil"] .feature-card.card-theme-quantum.focused-card {
    border: 2px solid var(--quantum-green) !important;
    animation: pulseQuantum 2.5s infinite ease-in-out;
}

/* Allumage thématique des boutons pour l'état focus sur l'accueil (Spécificité renforcée) */
body[data-page="accueil"] .feature-card.card-theme-musik.focused-card .btn-feature {
    background: var(--musik-blue) !important;
    color: #000000 !important;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.6) !important;
}
body[data-page="accueil"] .feature-card.card-theme-mao.focused-card .btn-feature {
    background: var(--mao-red) !important;
    color: #000000 !important;
    box-shadow: 0 0 15px rgba(255, 62, 62, 0.6) !important;
}
body[data-page="accueil"] .feature-card.card-theme-quantum.focused-card .btn-feature {
    background: var(--quantum-green) !important;
    color: #000000 !important;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.6) !important;
}

/* 5. Balayage lumineux diagonal (Shine Sweep effect) */
.feature-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.25) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    pointer-events: none;
    transition: none;
}

/* Lancement de l'animation de balayage uniquement à l'état actif/focus */
.feature-card.focused-card::after {
    animation: shineSweep 0.85s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes shineSweep {
    0% { left: -150%; }
    100% { left: 150%; }
}