/* =========================================
   RESET ET SYSTEME DE DESIGN GLOBALE
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&family=Inter:wght@300;400;500;600;700&family=Press+Start+2P&display=swap');

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

html {
    color-scheme: dark;
    scrollbar-width: thin;
    scrollbar-color: #00BFFF #0f172a;
}

body {
    background: url('spawn.jpg') no-repeat center center fixed;
    background-size: cover;
    color: #e2e8f0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* =========================================
   BARRE DE NAVIGATION DU SITE
   ========================================= */
nav {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 191, 255, 0.3);
    border-radius: 50px;
    padding: 10px 28px;
    margin-bottom: 30px;
    display: flex;
    gap: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 191, 255, 0.15);
    transition: all 0.3s ease;
}

nav:hover {
    border-color: #00BFFF;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 25px rgba(0, 191, 255, 0.3);
}

nav a {
    color: #94a3b8;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 20px;
    border-radius: 30px;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

nav a:hover, nav a.active {
    background: rgba(0, 191, 255, 0.25);
    color: #00f0ff;
    box-shadow: 0 0 15px rgba(0, 191, 255, 0.3);
}

/* =========================================
   PANNEAUX GLASSMORPHISM ET TYPOGRAPHIE
   ========================================= */
.glass-panel {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 191, 255, 0.05);
    padding: 30px 25px;
    margin-bottom: 25px;
    width: 100%;
    max-width: 1250px;
    text-align: center;
}

h1 { 
    font-family: 'Press Start 2P', cursive, sans-serif;
    font-size: 2rem; 
    font-weight: 700; 
    color: #00BFFF; 
    text-shadow: 0 0 15px rgba(0, 191, 255, 0.5); 
    margin-bottom: 15px; 
    line-height: 1.4;
}
h2 { 
    font-family: 'Press Start 2P', cursive, sans-serif;
    font-size: 1.3rem; 
    font-weight: 600; 
    color: #00BFFF; 
    margin-bottom: 20px; 
    line-height: 1.4;
    text-shadow: 0 0 15px rgba(0, 191, 255, 0.6), 0 4px 12px rgba(0, 0, 0, 0.9);
}
h3 {
    font-family: 'Press Start 2P', cursive, sans-serif;
    font-size: 1rem;
    line-height: 1.4;
}

/* Grille de Plugins */
.plugin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin-top: 15px;
}
.plugin-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.2s ease;
    color: #e2e8f0;
}
.plugin-card:hover {
    transform: translateY(-4px);
    background: rgba(0, 191, 255, 0.1);
    border-color: rgba(0, 191, 255, 0.4);
    box-shadow: 0 5px 15px rgba(0, 191, 255, 0.2);
}
.player-count {
    display: inline-flex;
    align-items: center;
    background: rgba(0,0,0,0.4);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.95rem;
    margin-top: 15px;
    border: 1px solid rgba(255,255,255,0.1);
}
.status-dot {
    width: 10px;
    height: 10px;
    background-color: #27c93f;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px #27c93f;
}

/* =========================================
   EXPLORATEUR WINDOWS (STYLE SOMBRE AUTHENTIQUE)
   ========================================= */
.win-explorer {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 75vh;
    min-height: 600px;
    /* FOND NOIR/SOMBRE OPAQUE, FINI LE TRANSPARENT */
    background: #202020;
    border: 1px solid #444;
    border-radius: 8px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

/* Barre de Titre de la Fenêtre Windows */
.win-titlebar {
    background: #000000;
    height: 35px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}

.win-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #ffffff;
}

.win-controls {
    display: flex;
    gap: 8px;
}

.win-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}
.win-btn.close { background: #ff5f56; }
.win-btn.min { background: #ffbd2e; }
.win-btn.max { background: #27c93f; }

/* Barre de Commande & Fil d'ariane Top Toolbar */
.win-toolbar {
    background: #191919;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #333;
    flex-wrap: wrap;
}

.nav-actions {
    display: flex;
    gap: 4px;
}

.tool-btn {
    background: transparent;
    border: 1px solid transparent;
    color: #e5e5e5;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.1s;
}

.tool-btn:hover:not(:disabled) {
    background: #333333;
    color: #fff;
}

.tool-btn.active {
    background: #333333;
    border: 1px solid #444;
}

.tool-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Fil d'ariane Stylisé (Address Bar) */
.win-address-bar {
    flex: 1;
    min-width: 250px;
    background: #2d2d2d;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 4px 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.88rem;
    overflow-x: auto;
    white-space: nowrap;
}

.win-address-bar::-webkit-scrollbar { height: 3px; }
.win-address-bar::-webkit-scrollbar-thumb { background: #555; }

.crumb-pill {
    cursor: pointer;
    color: #e5e5e5;
    padding: 2px 6px;
    border-radius: 3px;
    transition: background 0.1s;
    display: flex;
    align-items: center;
    gap: 5px;
}
.crumb-pill:hover {
    background: #444;
    color: #fff;
}

.crumb-sep {
    color: #777;
    font-size: 0.8rem;
    padding: 0 4px;
}

/* Zone de Recherche */
.win-search-box {
    position: relative;
    width: 220px;
}

.win-search-box input {
    width: 100%;
    background: #2d2d2d;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 5px 10px 5px 28px;
    color: #fff;
    font-size: 0.85rem;
    outline: none;
}

.win-search-box input:focus {
    border-color: #00BFFF;
}

.win-search-icon {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 0.85rem;
    pointer-events: none;
}

/* Layout Principal Corps de l'Explorateur (2 colonnes) */
.win-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* Sidebar Gauche (Accès Rapide & Navigation) */
.win-sidebar {
    width: 220px;
    background: #191919;
    border-right: 1px solid #333;
    display: flex;
    flex-direction: column;
    padding: 10px 4px;
    user-select: none;
}

.sidebar-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    font-weight: 600;
    padding: 8px 12px 8px 12px;
}

/* Arborescence Récursive (Tree View) */
.sidebar-tree {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
}

.tree-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    cursor: pointer;
    color: #cccccc;
    font-size: 0.85rem;
    transition: background 0.1s;
    user-select: none;
    white-space: nowrap;
    border-radius: 4px;
}

.tree-row:hover {
    background: #2d2d2d;
    color: #fff;
}

.tree-row.active {
    background: #333333;
    color: #fff;
    font-weight: 500;
}

.tree-caret {
    display: inline-block;
    width: 16px;
    text-align: center;
    color: #888;
    font-size: 0.75rem;
    transition: transform 0.2s;
}
.tree-caret:hover { color: #fff; }
.tree-caret.empty { visibility: hidden; }

.tree-icon {
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
}

.sidebar-footer {
    margin-top: auto;
    padding: 10px;
    background: #202020;
    border-top: 1px solid #333;
    font-size: 0.75rem;
    color: #aaa;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Zone Principale Droite (Fichiers ou Éditeur) */
.win-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #202020;
}

/* Mode Vue Dossier (Tableau Windows Explorer) */
.explorer-table-container {
    flex: 1;
    overflow-y: auto;
    padding: 5px;
}

.file-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
}

.file-table th {
    padding: 8px 12px;
    color: #cccccc;
    font-weight: 500;
    border-bottom: 1px solid #333;
    font-size: 0.8rem;
    user-select: none;
    position: sticky;
    top: 0;
    background: #202020;
    z-index: 10;
}

.file-table td {
    padding: 6px 12px;
    color: #cccccc;
    border-bottom: 1px solid transparent; /* Pas de ligne visible en temps normal */
    white-space: nowrap;
}

.file-row {
    cursor: pointer;
    border-radius: 4px;
}

.file-row:hover {
    background: #2d2d2d;
}

.file-row.active-row {
    background: #37373d;
    color: #fff;
}

.file-cell-name {
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-icon {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
}

/* Badges réduits pour mieux coller au style OS */
.tag-badge {
    color: #ccc;
    font-size: 0.8rem;
}
.tag-yml { color: #fbbf24; }
.tag-json { color: #60a5fa; }
.tag-props { color: #c084fc; }
.tag-folder { color: #34d399; }

/* Mode Visionneuse de Fichier / Éditeur IDE (Style VS Code) */
.editor-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #1e1e1e; /* Fond classique VS Code */
}

.editor-tabs {
    background: #252526;
    height: 35px;
    display: flex;
    align-items: flex-end;
    padding: 0;
    gap: 1px;
}

.editor-tab {
    background: #2d2d2d;
    height: 35px;
    padding: 0 15px;
    font-size: 0.85rem;
    color: #969696;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.editor-tab.active {
    background: #1e1e1e;
    color: #ffffff;
    border-top: 1px solid #00BFFF;
}

.editor-tab-close {
    opacity: 0.6;
    border-radius: 4px;
    padding: 2px 4px;
    font-size: 0.75rem;
}
.editor-tab-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.editor-meta-bar {
    background: #1e1e1e;
    padding: 6px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #cccccc;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    z-index: 5;
}

.editor-code-wrapper {
    flex: 1;
    display: flex;
    overflow: auto;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Colonne des Numéros de Ligne IDE */
.line-numbers {
    padding: 10px;
    background: #1e1e1e;
    color: #858585;
    text-align: right;
    user-select: none;
    border-right: 1px solid #333;
    font-size: 0.85rem;
    white-space: pre;
}

/* Zone Code Texte */
.code-area, pre[class*="language-"] {
    flex: 1;
    padding: 10px 15px !important;
    color: #d4d4d4 !important;
    overflow-x: auto;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    white-space: pre;
    tab-size: 4;
    border-radius: 0 !important;
    box-shadow: none !important;
    user-select: text !important;
    -webkit-user-select: text !important;
}

/* Mode Grille d'icônes */
.grid-view-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
    padding: 15px;
    overflow-y: auto;
}

.grid-card {
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 15px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-align: center;
}

.grid-card:hover {
    background: #2d2d2d;
    border-color: #444;
}

.grid-card-icon {
    font-size: 2.5rem;
}

.grid-card-title {
    font-size: 0.82rem;
    color: #cccccc;
    word-break: break-word;
    line-height: 1.2;
}

/* Status Bar en Bas de l'Explorateur */
.win-statusbar {
    height: 25px;
    background: #007acc; /* Bleu VS Code (ou #191919 pour Windows classique) */
    color: #ffffff;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    user-select: none;
}

/* Scrollbars personnalisées globales */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb { background: #1e293b; border: 1px solid rgba(0, 191, 255, 0.3); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #00BFFF; box-shadow: 0 0 10px #00BFFF; }

/* Adaptabilité responsive mobile */
@media (max-width: 900px) {
    .win-sidebar { display: none; }
    .win-search-box { width: 150px; }
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.2rem;
        line-height: 1.5;
    }
    h2 {
        font-size: 1rem;
    }
    h3 {
        font-size: 0.85rem;
    }
    .feature-icon {
        font-size: 2.5rem;
    }
    .glass-panel {
        padding: 20px 15px;
    }
    .feature-card, .transparency-card {
        padding: 20px;
    }
    body {
        padding: 10px;
    }
    footer {
        padding: 25px 15px !important;
        border-radius: 20px !important;
    }
    .hide-on-mobile {
        display: none !important;
    }
}

/* =========================================
   NOUVEAUX STYLES POUR LA LANDING PAGE
   ========================================= */

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes glowPulse {
    0% { box-shadow: 0 0 10px rgba(0, 191, 255, 0.2); }
    50% { box-shadow: 0 0 25px rgba(0, 191, 255, 0.6); }
    100% { box-shadow: 0 0 10px rgba(0, 191, 255, 0.2); }
}

.animate-fade-in {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* Badges (Types de jeu) */
.game-badges {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.game-badge {
    background: rgba(0, 191, 255, 0.15);
    border: 1px solid rgba(0, 191, 255, 0.4);
    color: #00f0ff;
    padding: 6px 15px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 10px rgba(0, 191, 255, 0.2);
}

/* Grille des Nouvelles Fonctionnalités */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.feature-card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px 25px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(0,191,255,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 191, 255, 0.5);
    box-shadow: 0 15px 40px rgba(0, 191, 255, 0.2);
}

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    display: inline-block;
    animation: float 4s ease-in-out infinite;
}

.feature-card h3 {
    color: #00BFFF;
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.feature-card p {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* Carte Transparence Spéciale */
.transparency-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(0, 191, 255, 0.1));
    border: 1px solid #00BFFF;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    margin-top: 40px;
    box-shadow: 0 10px 40px rgba(0, 191, 255, 0.15);
}

.btn-primary {
    display: inline-block;
    background: linear-gradient(90deg, #00BFFF, #007acc);
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 191, 255, 0.4);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 191, 255, 0.6);
}

/* Carte IP Géante */
.ip-card {
    background: linear-gradient(135deg, rgba(0, 191, 255, 0.15), rgba(15, 23, 42, 0.8));
    border: 1px solid rgba(0, 191, 255, 0.4);
    border-radius: 20px;
    padding: 25px 40px;
    display: inline-block;
    margin-top: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 191, 255, 0.15);
    position: relative;
    overflow: hidden;
}

.ip-card:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 15px 40px rgba(0, 191, 255, 0.4);
    border-color: #00f0ff;
}

.ip-icon { font-size: 2.5rem; margin-bottom: 10px; }
.ip-text { color: #00f0ff; font-size: 1.8rem; font-weight: 700; letter-spacing: 1px; }
.ip-hint { color: #94a3b8; font-size: 0.95rem; margin-top: 10px; text-transform: uppercase; letter-spacing: 1px; }