/*
Theme Name: NeCherchePlus - Survival Edition
Author: Raunok
Description: Template immersif pour blog de survie.
Version: 1.1 (Optimized)
*/

/* ==========================================================================
   01. VARIABLES & BASE
   ========================================================================== */
:root {
    --bg-dark: #121214;
    --card-bg: #1c1c1f;
    --accent: #FF6B35; /* Orange Feu */
    --text-main: #e1e1e6;
    --text-dim: #a0a0a5;
    --terminal-green: #00FF9D;
}

* {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden; /* Empêche tout scroll horizontal parasite */
    width: 100%;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
}

/* Effet Scanline Global */
body::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), 
                linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 9999;
    background-size: 100% 4px, 3px 100%;
    pointer-events: none;
}
/* On décale le contenu principal pour toutes les pages SAUF l'accueil */
body:not(.home) main, 
body:not(.home) .page-id-36 .bunker-monitor {
    margin-top: 100px; 
}

.container { max-width: 1400px; margin: 0 auto; padding: 0 20px; }

/* ==========================================================================
   02. ANIMATIONS (HUD & GLITCH)
   ========================================================================== */
@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

@keyframes blink {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.blink, .status-badge, .terminal-blink { animation: blink 1.5s infinite; }

/* ==========================================================================
   03. NAVIGATION (HEADER & MENU)
   ========================================================================== */
#main-header {
    position: fixed;
    top: 0; width: 100%; z-index: 1000;
    transition: all 0.4s ease-in-out;
    padding: 20px 0;
}

.header-transparent {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-scrolled {
    background: #000000 !important;
    padding: 10px 0 !important;
    border-bottom: 2px solid var(--terminal-green) !important;
    box-shadow: 0 5px 20px rgba(0, 255, 0, 0.2);
}

.header-flex { display: flex; justify-content: space-between; align-items: center; }

/* Logo */
.logo-brand { 
    font-family: 'Courier New', monospace !important; 
    font-size: 24px; text-decoration: none !important; 
    color: var(--terminal-green) !important;
    font-weight: 900; letter-spacing: 3px;
    border: 1px solid var(--terminal-green);
    padding: 5px 15px; display: inline-block;
    transition: all 0.3s ease;
}

.logo-brand span { color: #fff; }

.logo-brand:hover {
    background: var(--terminal-green) !important;
    color: #000 !important;
    box-shadow: 0 0 20px var(--terminal-green);
    animation: glitch 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
}

.logo-brand:hover span { color: #000 !important; }

/* Menu List */
/* Retire les puces sur tout le menu et les sous-menus */
.nav-list, 
.nav-list ul { 
    list-style: none !important; 
    margin: 0; 
    padding: 0; 
}

/* On s'assure que le sous-menu n'a aucun décalage interne qui ferait déborder le texte */
.nav-list .sub-menu {
    list-style: none !important;
    padding-left: 0 !important; /* Force la suppression du retrait de la puce */
}

.nav-list .sub-menu li {
    list-style-type: none !important;
}
.nav-list { list-style: none; display: flex; gap: 25px; margin: 0; }

.nav-list a {
    text-decoration: none; color: #fff; font-weight: bold;
    font-size: 0.9rem; text-transform: uppercase; letter-spacing: 2px;
    font-family: 'Courier New', monospace; padding: 5px 12px;
    border: 1px solid transparent; transition: all 0.3s ease;
}

.nav-list a:hover {
    color: #000 !important; background: var(--terminal-green);
    box-shadow: 0 0 10px var(--terminal-green);
}

.nav-list .current-menu-item a, .nav-list a.active {
    border: 1px solid var(--terminal-green); color: var(--terminal-green);
}

/* Sub-menu */
.nav-list li { position: relative; }
.nav-list .sub-menu {
    position: absolute; top: 100%; left: 0; background: #000;
    border: 1px solid var(--terminal-green); padding: 10px 0;
    min-width: 180px; display: none; z-index: 999;
}

.nav-list li:hover > .sub-menu { display: block; animation: fadeIn 0.3s ease-in-out; }
.nav-list .sub-menu li a { display: block; padding: 10px 15px; border: none !important; /* On évite de doubler les bordures à l'intérieur */ color: var(--terminal-green); }
.nav-list .sub-menu li a:hover { background: rgba(0, 255, 157, 0.1); /* Un léger fond vert au survol */ color: #fff !important; }

/* ==========================================================================
   04. RECHERCHE (TERMINAL STYLE)
   ========================================================================== */
.brand-group { display: flex; flex-direction: column; align-items: flex-start; }

.search-terminal input[type="search"] {
    background: #000; border: 1px solid var(--terminal-green);
    color: var(--terminal-green); font-family: 'Courier New', monospace;
    padding: 8px 15px; outline: none; width: 200px; transition: all 0.3s;
}

.search-terminal input[type="search"]:focus { width: 250px; box-shadow: 0 0 10px var(--terminal-green); }

.search-terminal input[type="submit"] {
    background: var(--terminal-green); color: #000; font-weight: bold;
    padding: 8px 15px; cursor: pointer; text-transform: uppercase; border: none;
}

/* ==========================================================================
   05. ACCUEIL (HERO & GRILLE)
   ========================================================================== */
.hero-survival {
    position: relative; height: 80vh; min-height: 500px;
    display: flex; align-items: center; overflow: hidden;
    background-size: cover; background-position: center;
}

.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(18, 18, 20, 0.9), rgba(18, 18, 20, 0.2));
}

.hero-content { position: relative; z-index: 10; }
.hero-content h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); color: #fff; margin: 0; }
.hero-content h1 span { color: var(--accent); }
.hero-content p { max-width: 600px; font-size: 1.2rem; color: var(--text-dim); margin: 20px 0; }

.hero-btns {
    margin-top: 30px;
    display: flex;
    gap: 20px;
}

/* Bouton Principal (Orange Feu) */
.btn-main {
    background-color: var(--accent);
    color: #fff !important;
    padding: 15px 30px;
    text-decoration: none !important;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 0px #b34a24; /* Petit effet 3D */
}

.btn-main:hover {
    background-color: #ff8557;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 107, 53, 0.4);
}

/* Bouton Alternatif (Bordure Grise/Verte) */
.btn-alt {
    border: 2px solid var(--text-dim);
    color: var(--text-main) !important;
    padding: 13px 28px; /* -2px pour compenser la bordure */
    text-decoration: none !important;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.btn-alt:hover {
    border-color: var(--terminal-green);
    color: var(--terminal-green) !important;
    box-shadow: 0 0 10px var(--terminal-green);
}
.post-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px; margin-top: 40px;
}

.survival-card { 
    border: 1px solid var(--terminal-green); 
    background: rgba(0, 0, 0, 0.8); 
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
    overflow: hidden; 
    position: relative;
}

.survival-card:hover { 
    border-color: var(--accent); 
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.2);
}

/* Petit scanline interne à la carte au survol */
.survival-card::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: var(--terminal-green);
    opacity: 0;
    pointer-events: none;
}

.survival-card:hover::after {
    animation: scan-card 1.5s linear infinite;
    opacity: 0.5;
}

@keyframes scan-card {
    0% { top: 0; }
    100% { top: 100%; }
}

.survival-card:hover h2 { color: var(--accent); transition: color 0.4s ease; }

.survival-card img { width: 100%; height: 210px; object-fit: cover; border-bottom: 2px solid var(--terminal-green); transition: border-color 0.4s ease; }

.survival-card:hover img { border-bottom-color: var(--accent); /* Elle passe à l'orange feu */
}
/* Style des boutons dans la grille d'articles */

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    /* On n'utilise plus align-items: center ici pour laisser le texte à gauche */
    align-items: flex-start; 
    text-align: left;
}

/* On force le titre et l'extrait à prendre toute la largeur pour rester à gauche */
.card-content h3, 
.card-content p {
    width: 100%;
    margin-bottom: 15px;
}

/* On centre UNIQUEMENT le bouton dans son parent */
.survival-card .btn-read {
    display: block;
    margin: 10px auto 5px; /* Le "auto" sur les côtés centre le bouton seul */
    padding: 12px 25px;
    background: transparent;
    color: var(--terminal-green) !important;
    border: 1px solid var(--terminal-green);
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    width: fit-content; /* Important pour que le margin: auto fonctionne */
    text-decoration: none !important;
}

.survival-card:hover .btn-read { border-color: var(--accent); color: var(--accent) !important; }

.survival-card .btn-read:hover {
    text-decoration: none !important;
    background: var(--terminal-green);
    color: #000 !important;
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.4);
    transform: scale(1.05); /* Petit effet de zoom au survol */
}

/* On s'assure que la liste d'articles ne cache pas les boutons */
.post-grid {
    list-style: none !important;
    padding: 0;
}
/* ==========================================================================
   06. PAGE ARTICLE (SINGLE.PHP)
   ========================================================================== */
#reading-progress {
    position: fixed; top: 0; left: 0; width: 0%; height: 4px;
    background: var(--accent); z-index: 1001; box-shadow: 0 0 10px var(--accent);
}

header.post-hero {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; min-height: 60vh; background-color: #000;
    background-size: contain; background-repeat: no-repeat; background-position: center;
}

header.post-hero h1 { color: #00ff00; text-shadow: 0 0 10px rgba(0, 255, 0, 0.7); }

.terminal-page {
    background: rgba(0, 20, 0, 0.9);
    border: 1px solid var(--terminal-green);
    padding: 20px; /* Réduit sur mobile */
    margin: 20px auto; /* Centre la page */
    max-width: 1400px; /* Empêche la page d'être trop large sur grand écran */
    width: 95%; /* Laisse une petite marge sur les côtés sur mobile */
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.1);
    box-sizing: border-box; /* Sécurité supplémentaire */
}

/* On repasse à 40px de padding seulement sur les grands écrans */
@media (min-width: 768px) {
    .terminal-page {
        padding: 40px;
    }
}

.post-layout { display: grid; grid-template-columns: 1fr 300px; gap: 50px; }
.post-content { font-size: 1.1rem; line-height: 1.8; }
.post-content h2 { border-left: 4px solid var(--accent); padding-left: 15px; margin-top: 40px; }

/* Sidebar Inventaire */
.sidebar-box { background: #1c1c1f; border: 1px solid #333; padding: 20px; position: sticky; top: 100px; }
.text-accent { color: var(--accent); font-weight: bold; }
.text-green { color: var(--terminal-green); font-weight: bold; }

/* Conteneur principal pour centrer et limiter la largeur si besoin */
.video-container {
    width: 100%;
    max-width: 900px; /* Tu peux ajuster la largeur max de ton moniteur ici */
    margin: 30px auto;
}

/* Le cadre "Moniteur" qui garde le format 16:9 */
.video-frame {
    position: relative;
    padding-bottom: 56.25%; /* Ratio 16:9 */
    height: 0;
    overflow: hidden;
    border: 8px solid #333; /* Cadre plastique du moniteur */
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.15); /* Lueur verte du terminal */
    background: #000;
}

/* Force l'iframe à remplir le cadre */
.video-frame iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }

/* Vidéo Frame */
.survival-video-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border: 2px solid #333; margin: 30px 0; }
.survival-video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* Appliquer à tout le site pour éviter les futurs débordements */
* {
    box-sizing: border-box;
}
/* --- STYLE DES ARTICLES DE RECONNAISSANCE --- */

/* 1. État Normal : On force le bleu */
body.category-reconnaissances .survival-card {
    border-color: #00d1ff !important;
}

body.category-reconnaissances .survival-card img {
    border-bottom: 2px solid #00d1ff !important;
}

/* 2. État Hover : La carte et l'image passent en Orange, mais pas le bouton */
body.category-reconnaissances .survival-card:hover {
    border-color: var(--accent) !important;
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.2) !important;
}

body.category-reconnaissances .survival-card:hover img {
    border-bottom-color: var(--accent) !important;
}

/* 3. Le Badge RECO (Utilise ::before pour ne pas gêner l'animation de scan) */
body.category-reconnaissances .survival-card::before {
    content: "RECO_TERRAIN" !important;
    position: absolute;
    top: 15px;
    left: 15px;
    background: #00d1ff !important;
    color: #000 !important;
    font-size: 10px !important;
    font-weight: bold !important;
    padding: 4px 10px !important;
    font-family: 'Courier New', monospace !important;
    z-index: 10 !important;
    letter-spacing: 1px;
    box-shadow: 2px 2px 0px rgba(0,0,0,0.5);
    pointer-events: none;
    line-height: 1.2;
    display: block !important;
}

/* 4. Le bouton Accéder : Reste Bleu Radar même au survol de la carte */
body.category-reconnaissances .survival-card .btn-read {
    color: #00d1ff !important;
    border-color: #00d1ff !important;
}

/* 5. Le bouton Accéder : Survol direct du bouton (Bleu plus brillant) */
body.category-reconnaissances .btn-read:hover {
    background: #00d1ff !important;
    color: #000 !important;
    box-shadow: 0 0 20px rgba(0, 209, 255, 0.4) !important;
    border-color: #00d1ff !important;
}

/* 6. On change la couleur de l'animation de scan pour le bleu */
body.category-reconnaissances .survival-card:hover::after {
    background: #00d1ff !important;
}

/* ==========================================================================
   07. FOOTER (SYSTÈME)
   ========================================================================== */
.survival-footer { background: #0a0a0b; border-top: 3px solid #333; padding: 60px 0 20px; margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-links ul { list-style: none; padding: 0; }
.footer-links a { color: var(--text-dim); text-decoration: none; font-size: 0.85rem; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { text-align: center; font-family: monospace; font-size: 0.7rem; margin-top: 50px; }

/* ==========================================================================
   08. RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    .post-layout { grid-template-columns: 1fr; }
    .post-sidebar { display: none; }
    .footer-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   09. STYLE DES LIENS (DANS LES ARTICLES)
   ========================================================================== */

/* Style par défaut (Vert Terminal pour les Protocoles) */
.post-content a {
    color: var(--terminal-green);
    text-decoration: none;
    font-weight: bold;
    border-bottom: 1px dashed var(--terminal-green);
    transition: all 0.3s ease;
}

.post-content a:hover {
    background: rgba(0, 255, 157, 0.1);
    border-bottom-style: solid;
    color: #fff;
    text-shadow: 0 0 8px var(--terminal-green);
}

/* Style spécifique pour les RECONNAISSANCES (Bleu Radar) */
body.category-reconnaissances .post-content a {
    color: #00d1ff;
    border-bottom-color: #00d1ff;
}

body.category-reconnaissances .post-content a:hover {
    background: rgba(0, 209, 255, 0.1);
    color: #fff;
    text-shadow: 0 0 8px #00d1ff;
    border-bottom-color: #00d1ff;
}

/* On retire le mauve des liens déjà visités */
.post-content a:visited {
    color: inherit;
}

/* --- FICHE TECHNIQUE TACTIQUE (SIDEBAR) --- */
.sidebar-specs {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #00d1ff;
    padding: 15px;
    margin-bottom: 25px;
    font-family: 'Courier New', monospace;
}

.sidebar-specs h4 {
    color: #00d1ff;
    font-size: 0.9rem;
    margin: 0 0 15px 0;
    border-bottom: 1px solid rgba(0, 209, 255, 0.3);
    padding-bottom: 5px;
    text-transform: uppercase;
}

.spec-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.8rem;
}

.spec-label {
    color: #888;
}

.spec-value {
    color: #fff;
    font-weight: bold;
    text-align: right;
}

/* Bouton Steam version compacte */
.btn-sidebar-steam {
    display: block;
    background: #00d1ff;
    color: #000 !important;
    text-align: center;
    padding: 8px;
    font-size: 0.75rem;
    font-weight: bold;
    text-decoration: none !important;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.btn-sidebar-steam:hover {
    background: #fff;
    box-shadow: 0 0 10px #00d1ff;
}
/* --- BOUTON STEAM DANS LA SIDEBAR --- */
.sidebar-specs .btn-sidebar-steam {
    display: block !important;
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    background: #00d1ff !important; /* Bleu Radar */
    color: #000 !important; /* Texte noir pour le contraste */
    text-align: center;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-decoration: none !important;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 0 #0088aa; /* Effet de profondeur bleu foncé */
}

.sidebar-specs .btn-sidebar-steam:hover {
    background: #ffffff !important; /* Devient blanc au survol */
    color: #000 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 209, 255, 0.5);
}

.sidebar-specs .btn-sidebar-steam:active {
    transform: translateY(1px);
    box-shadow: 0 2px 0 #0088aa;
}

/* --- STYLE PAGE PRESS KIT --- */
.press-kit-hero {
    text-align: center;
    padding: 60px 0;
    background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)), url('ton-image-de-fond.jpg');
    border-bottom: 2px solid var(--terminal-green);
    margin-bottom: 40px;
}

.press-kit-hero h1 {
    font-family: 'Courier New', monospace;
    font-size: 2.5rem;
    color: #fff;
}

.press-kit-hero span {
    color: var(--terminal-green);
}

.post-content blockquote {
    border: 1px solid var(--accent);
    background: rgba(255, 107, 53, 0.05);
    padding: 20px;
    margin: 30px 0;
    color: var(--accent);
    font-style: italic;
}

/* --- BANDEAU DE RAVITAILLEMENT (CTA) --- */
.supply-line-cta {
    background: rgba(20, 20, 22, 0.95);
    border: 2px dashed var(--accent);
    padding: 30px;
    margin: 50px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: border-pulse 2s infinite alternate;
}

@keyframes border-pulse {
    from { border-color: var(--accent); box-shadow: 0 0 5px rgba(255, 107, 53, 0.2); }
    to { border-color: #ff8557; box-shadow: 0 0 15px rgba(255, 107, 53, 0.4); }
}

.supply-line-cta h3 {
    color: var(--accent);
    font-family: 'Courier New', monospace;
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.supply-line-cta p {
    color: var(--text-main);
    font-size: 0.95rem;
    margin-bottom: 25px;
}

.cta-grid {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Bouton spécial Affiliation */
.btn-supply {
    background: var(--accent);
    color: #fff !important;
    padding: 12px 25px;
    text-decoration: none !important;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85rem;
    border: none;
    transition: all 0.3s ease;
}

.btn-supply:hover {
    background: #fff;
    color: var(--accent) !important;
    transform: scale(1.05);
}

/* Bouton spécial "Café/Don" */
.btn-support {
    border: 1px solid var(--text-dim);
    color: var(--text-dim) !important;
    padding: 12px 25px;
    text-decoration: none !important;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.btn-support:hover {
    border-color: var(--terminal-green);
    color: var(--terminal-green) !important;
}

/* STYLE DE LA MODALE TACTIQUE */
.video-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 10001; /* Doit être au-dessus du scanline */
    justify-content: center; align-items: center;
}

.modal-overlay {
    position: absolute; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-container {
    position: relative; width: 90%; max-width: 900px;
    background: #000; border: 2px solid var(--accent);
    box-shadow: 0 0 30px rgba(255, 107, 53, 0.3);
    animation: fadeIn 0.3s ease-out;
}

.modal-header {
    background: var(--accent); color: #000;
    padding: 10px 20px; display: flex; justify-content: space-between;
    font-family: 'Courier New', monospace; font-weight: bold;
}

.modal-close {
    background: transparent; border: 1px solid #000;
    cursor: pointer; font-family: 'Courier New', monospace;
    font-weight: bold; transition: all 0.3s;
}

.modal-close:hover { background: #000; color: var(--accent); }

.modal-content { position: relative; padding-bottom: 56.25%; height: 0; }
.modal-content iframe {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none;
}

.modal-footer {
    padding: 5px 15px; font-size: 10px; color: var(--accent);
    font-family: monospace; text-align: right; background: rgba(0,0,0,0.5);
}