/*
Theme Name: Second Coming
Theme URI: https://deter-mi.net/second-coming/
Author: tlloancy
Author URI: https://deter-mi.net
Description: Matrix-style FSE child theme. Cyberpunk, animated rain, mobile-first.
Version: 1.1.8
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: second-coming
Tags: blog, custom-menu, custom-logo, custom-background, translation-ready
Template: twentytwentyfive
*/

@font-face {
    font-family: "Inria Sans";
    src: url("assets/fonts/InriaSans-Regular.woff2") format("woff2");
    font-weight: normal;
    font-display: swap;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: #000; color: #0f0; font-family: "Inria Sans", monospace; overflow-x: hidden; }
a { color: #0f0; text-decoration: none; }
a:hover { color: #fff; text-shadow: 0 0 15px #0f0; }

/* Skip link */
.skip-link {
    position: absolute; top: -40px; left: 6px; background: #0f0; color: #000; padding: 8px 16px; z-index: 1000; font-weight: bold;
}
.skip-link:focus { top: 6px; }

/* Topbar */
.topbar { background: #111; padding: 8px 0; border-bottom: 1px solid #0f0; }
.topbar__menu { gap: 12px; }

/* Navigation */
.nav-container { padding: 16px 0; }
.nav-desktop { display: none; }
@media (min-width: 768px) {
    .nav-desktop { display: flex; gap: 24px; }
    .nav-mobile { display: none; }
}
.nav-desktop a, .mobile-menu-links a { color: #0f0; font-weight: bold; }
.nav-desktop a:hover, .mobile-menu-links a:hover { color: #fff; text-shadow: 0 0 10px #0f0; }

/* === MENU + SOUS-MENU CYBERPUNK + GLITCH + BLEU-VERT === */

/* === MENU PRINCIPAL === */
.nav-desktop .wp-block-navigation__container {
    gap: 32px;
    font-weight: 600;
    font-size: 1.1rem;
}

.nav-desktop a {
    color: #0f0;
    text-decoration: none;
    position: relative;
    transition: all 0.2s;
    display: inline-block;
}

.nav-desktop a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: #0f0;
    box-shadow: 0 0 10px #0f0;
    transition: width 0.3s ease;
}

.nav-desktop a:hover {
    color: #fff;
    text-shadow: 0 0 15px #0f0;
}

.nav-desktop a:hover::after {
    width: 100%;
}

/* === GLITCH AU HOVER === */
.glitch {
    position: relative;
    color: #0f0;
    text-shadow: 0 0 10px #0f0;
}

.glitch:hover {
    animation: glitch 0.3s infinite;
}

@keyframes glitch {
    0%, 100% { 
        text-shadow: 0.03em 0 0 #0f0, -0.03em -0.02em 0 #00f, 0.02em 0.03em 0 #f00;
        transform: translate(0);
    }
    20% { 
        text-shadow: -0.03em 0.02em 0 #0f0, 0.03em 0 0 #00f, -0.02em -0.03em 0 #f00;
        transform: translate(-0.02em, 0.02em);
    }
    40% { 
        text-shadow: 0.02em -0.03em 0 #0f0, -0.02em 0.03em 0 #00f, 0.03em 0 0 #f00;
        transform: translate(0.03em, -0.03em);
    }
    60% { 
        text-shadow: -0.02em 0 0 #0f0, 0.02em -0.02em 0 #00f, -0.03em 0.03em 0 #f00;
        transform: translate(-0.03em, 0);
    }
}

/* === SOUS-MENU BLEU-VERT (SURPRISE) === */
.wp-block-navigation__submenu-container {
    background: rgba(0, 20, 30, 0.95) !important;
    border: 1px solid #00ffcc !important;
    border-radius: 8px;
    padding: 12px 0 !important;
    margin-top: 8px !important;
    box-shadow: 0 0 25px rgba(0, 255, 204, 0.4), inset 0 0 15px rgba(0, 255, 204, 0.1);
    backdrop-filter: blur(8px);
    min-width: 200px;
}

.wp-block-navigation__submenu-container .wp-block-navigation-item {
    padding: 8px 20px !important;
}

.wp-block-navigation__submenu-container a {
    color: #00ffcc !important;
    font-weight: 500;
    font-size: 1rem;
    text-shadow: 0 0 8px #00ffcc;
    position: relative;
    transition: all 0.3s ease;
}

.wp-block-navigation__submenu-container a::before {
    content: '> ';
    opacity: 0;
    transition: opacity 0.3s;
}
/*
.wp-block-navigation__submenu-container a:hover {
    color: #00ffff !important;
    text-shadow: 
        0 0 10px #00ffcc,
        0 0 20px #00ffcc,
        0 0 30px #00ffcc,
        0 0 40px #00ffcc;
    transform: translateX(8px);
    animation: pulse-glow 1.5s infinite;
}
*/

/* === FNAF STATIC GLITCH HOVER === */
.wp-block-navigation__submenu-container a {
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.wp-block-navigation__submenu-container a:hover {
    color: #00ffcc !important;
    text-shadow: 
        0 0 10px #00ffcc,
        0 0 20px #00ffcc,
        0 0 30px #00ffcc,
        0 0 50px #00ffcc;
    transform: translateX(8px);
    animation: 
        fnaf-flicker 0.1s infinite alternate,
        color-shift 3s infinite,
        static-bg 0.15s infinite steps(8);
    z-index: 1;
}

/* Clignotement FNAF */
@keyframes fnaf-flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Changement de couleur subtil (bleu → rose cyber) */
@keyframes color-shift {
    0%, 100% { color: #00ffcc; text-shadow: 0 0 20px #00ffcc, 0 0 40px #00ffcc; }
    50% { color: #ff00ff; text-shadow: 0 0 20px #ff00ff, 0 0 40px #ff00ff, 0 0 60px #ff00ff; }
}

/* Statique TV en fond */
.wp-block-navigation__submenu-container a::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(255,255,255,0.03) 2px,
            rgba(255,255,255,0.03) 4px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(255,255,255,0.02) 2px,
            rgba(255,255,255,0.02) 4px
        );
    opacity: 0;
    pointer-events: none;
    z-index: -1;
    transition: opacity 0.2s;
}

.wp-block-navigation__submenu-container a:hover::before {
    opacity: 1;
    animation: static-bg 0.15s infinite steps(8);
}

@keyframes static-bg {
    0% { background-position: 0 0, 0 0; }
    100% { background-position: 8px 8px, 8px 8px; }
}

.wp-block-navigation__submenu-container a:hover::before {
    opacity: 1;
}

/* === SCAN EFFECT SURPRISE (comme un terminal) === */
.wp-block-navigation__submenu-container a {
    position: relative;
    overflow: hidden;
}

.wp-block-navigation__submenu-container a::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 204, 0.2), transparent);
    animation: scan 2s infinite;
    pointer-events: none;
}

@keyframes scan {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* === MOBILE MENU === */
.mobile-menu-links a {
    font-size: 1.8rem;
    font-weight: bold;
    color: #0f0;
    text-shadow: 0 0 12px #0f0;
    margin: 14px 0;
}

.mobile-menu-links a:hover {
    color: #0f0;
    text-shadow: 0 0 25px #0f0;
    transform: scale(1.05);
}

/* === MENU MOBILE - FOND NOIR + POLICE VERTE === */
.wp-block-navigation__responsive-container {
    z-index: 9999;
    background: #000 !important;
    color: #0f0 !important;
    border: 1px solid #0f0 !important;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.3) !important;
}

.wp-block-navigation__responsive-container a {
    color: #0f0 !important;
    font-weight: bold;
    text-shadow: 0 0 10px #0f0;
}

.wp-block-navigation__responsive-container a:hover {
    color: #0f0 !important;
    text-shadow: 0 0 20px #0f0, 0 0 40px #0f0;
}

/* Bouton X */
.close-menu {
    color: #0f0 !important;
    font-size: 2.5rem !important;
    text-shadow: 0 0 15px #0f0;
}

.close-menu:hover {
    color: #fff !important;
    text-shadow: 0 0 25px #0f0;
}

/* Bouton hamburger */
.navTrigger {
    color: #0f0 !important;
    font-size: 28px !important;
    text-shadow: 0 0 10px #0f0;
}

/* Logo */
.logo, .logo-mobile { filter: drop-shadow(0 0 10px #0f0); }

/* Footer */
.footer-container { background: #111; padding: 40px 20px; border-top: 2px solid #0f0; }
.footer__widgets { gap: 32px; text-align: center; }
.footer__widgets address { font-style: normal; }
#map { height: 300px; margin: 30px 0; border: 2px solid #0f0; box-shadow: 0 0 20px #0f0; }
.map-link { display: block; margin: 16px 0; font-weight: bold; }
.footer__copyright { font-size: 0.9rem; color: #0a0; }

/* Responsive */
@media (max-width: 767px) {
    .topbar__menu { justify-content: center; }
}
/* === FOOTER FULL WIDTH - CYBERPUNK PRO === */
.footer-container {
    background: #111;
    padding: 60px 0 40px;
    border-top: 2px solid #0f0;
    margin: 80px 0 0;
    width: 100vw !important;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    box-shadow: 0 -10px 30px rgba(0, 255, 0, 0.1);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Colonnes */
.footer__widgets {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

.footer__contact-details,
.footer__social,
.footer__links {
    text-align: center;
    font-size: 1rem;
    line-height: 1.7;
}

.footer__contact-details address {
    font-style: normal;
    font-weight: bold;
    color: #0f0;
    text-shadow: 0 0 8px #0f0;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.footer__contact-details p {
    margin: 8px 0;
}

.footer__contact-details a {
    color: #0f0;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer__contact-details a:hover {
    color: #fff;
    text-shadow: 0 0 15px #0f0;
}

/* Icônes */
.footer__social ul {
    justify-content: center !important;
    gap: 20px;
}

.footer__social svg {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 0 12px #0f0);
    transition: all 0.3s ease;
}

.footer__social a:hover svg {
    filter: drop-shadow(0 0 25px #0f0);
    transform: scale(1.3) rotate(5deg);
}

/* Menu */
.footer__links .wp-block-navigation__container {
    justify-content: center !important;
    gap: 18px;
    flex-wrap: wrap;
}

.footer__links a {
    color: #0f0;
    font-weight: 600;
    font-size: 0.98rem;
    transition: all 0.3s;
}

.footer__links a:hover {
    color: #fff;
    text-shadow: 0 0 12px #0f0;
    transform: translateY(-2px);
}

/* Carte */
#map {
    width: 100% !important;
    max-width: 1200px;
    height: 380px;
    margin: 0 auto 30px;
    border: 2px solid #0f0;
    box-shadow: 0 0 35px #0f0, inset 0 0 25px rgba(0, 255, 0, 0.15);
    border-radius: 10px;
    overflow: hidden;
}

/* Lien Google */
.map-link {
    text-align: center;
    margin: 0 auto 30px;
    max-width: 1200px;
    padding: 0 20px;
}

.map-link a {
    color: #0f0;
    font-weight: bold;
    font-size: 1.15rem;
    text-decoration: underline;
    text-underline-offset: 5px;
    transition: all 0.3s;
}

.map-link a:hover {
    color: #fff;
    text-shadow: 0 0 18px #0f0;
}

/* Copyright */
.footer__copyright {
    text-align: center;
    font-size: 0.9rem;
    color: #0a0;
    opacity: 0.85;
    letter-spacing: 1.2px;
}

/* Responsive */
@media (max-width: 992px) {
    .footer__widgets {
        grid-template-columns: 1fr;
        gap: 35px;
    }
    #map { height: 320px; }
}

@media (max-width: 480px) {
    .footer-container { padding: 40px 0 30px; }
    .footer-inner { padding: 0 15px; }
    #map { height: 260px; }
    .map-link a { font-size: 1rem; }
}
/* Skip link - WP.org obligatoire */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #0f0;
    color: #000;
    padding: 8px 16px;
    z-index: 1000;
    font-weight: bold;
    transition: top 0.3s;
}
.skip-link:focus {
    top: 6px;
}
/* === HEADER PROPRE & CENTRÉ === */
.topbar {
    background: #111;
    padding: 8px 0;
    border-bottom: 1px solid #0f0;
    text-align: center;
}

.topbar-text {
    color: #0f0;
    font-size: 0.9rem;
    margin: 0;
    text-shadow: 0 0 8px #0f0;
}

/* Logo */
.header-logo {
    filter: drop-shadow(0 0 12px #0f0);
}

/* Icônes sociales dans header */
.header-inner .wp-block-social-links {
    gap: 12px;
}

.header-inner .wp-block-social-links svg {
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 0 10px #0f0);
    transition: all 0.3s;
}

.header-inner .wp-block-social-links a:hover svg {
    filter: drop-shadow(0 0 20px #0f0);
    transform: scale(1.2);
}

/* Responsive */
@media (max-width: 768px) {
    .header-inner {
        justify-content: center !important;
        flex-wrap: wrap;
    }
    .header-logo {
        order: 1;
        flex-basis: 100%;
        text-align: center;
        margin-bottom: 12px;
    }
    .nav-desktop {
        order: 3;
        flex-basis: 100%;
        margin-top: 12px;
    }
    .header-inner > div {
        order: 2;
    }
}
/* === DIGITAL RAIN - VISIBILITÉ FORCÉE === */
/*html, body {
    position: fixed;*/  /* ← C'EST LA CLÉ */
/*    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    pointer-events: none;
    background: transparent;
}

canvas {
    position: fixed !important;
    top: 0; left: 0;
    width: 100% !important;
    height: 100% !important;
    z-index: -1 !important;
    pointer-events: none;
    opacity: 0.85;
    mix-blend-mode: screen;
}*/
/* === DIGITAL RAIN - VISIBILITÉ SÉCURISÉE === */
body {
    position: relative;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: transparent;
}

/* Canvas derrière tout */
canvas {
    position: fixed !important;
    top: 0; left: 0;
    width: 100% !important;
    height: 100% !important;
    z-index: -1 !important;
    pointer-events: none;
    opacity: 0.9;
    mix-blend-mode: screen;
}

/* Force le contenu au-dessus */
.wp-site-blocks,
.wp-block-template-part,
main,
footer {
    position: relative;
    z-index: 1;
}
/* === GESTURE HANDLING - STYLE CYBER === */
.leaflet-gesture-handling-touch,
.leaflet-gesture-handling-scroll {
    background: rgba(0, 0, 0, 0.9) !important;
    color: #0f0 !important;
    border: 1px solid #0f0 !important;
    padding: 10px 14px !important;
    font-family: monospace;
    font-size: 0.95rem !important;
    text-shadow: 0 0 10px #0f0;
    border-radius: 6px;
    box-shadow: 0 0 20px #0f0, inset 0 0 10px rgba(0, 255, 0, 0.3);
    z-index: 1000;
    max-width: 90%;
    margin: 10px auto;
    text-align: center;
}
/* === CACHE LE MENU FOOTER EN MOBILE === */
@media (max-width: 767px) {
    .footer__links, .mobile-menu-links {
        display: none !important;
    }
    
    /* Optionnel : centre les autres colonnes */
    .footer__widgets {
        grid-template-columns: 1fr 1fr !important;
        justify-items: center;
    }
    
    .footer__contact-details,
    .footer__social {
        text-align: center;
    }
}
/* ——— SOUS-MENU PLEIN ÉCRAN — CACHÉ ABSOLUMENT ——— */
body.mobile-menu-open .wp-block-navigation__submenu-container {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: #000 !important;
    z-index: 999999 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateX(-100%) !important;
    transition: 
        opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
        transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    overflow-y: auto;
    padding-top: 80px !important;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    backdrop-filter: blur(12px);
}

/* OUVERT → TOUT S’AFFICHE */
body.mobile-menu-open .wp-block-navigation__submenu-container.is-open {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateX(0) !important;
}

/* ——— FLÈCHE SIMPLE & PRO — À DROITE DU NOM ——— */
body.mobile-menu-open .wp-block-navigation__submenu-icon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin-left: 8px !important;
    width: 20px !important;
    height: 20px !important;
    font-size: 14px !important;
    color: #0f0 !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    transition: transform 0.3s ease !important;
    pointer-events: auto !important;
}

/* Flèche vers le bas par défaut */
body.mobile-menu-open .wp-block-navigation__submenu-icon svg {
    width: 12px !important;
    height: 12px !important;
    fill: none !important;
    stroke: #0f0 !important;
    stroke-width: 2 !important;
    transition: transform 0.3s ease !important;
}

/* Quand le sous-menu est ouvert → flèche vers le haut */
body.mobile-menu-open .wp-block-navigation__submenu-container.is-open ~ .wp-block-navigation__submenu-icon svg,
body.mobile-menu-open .wp-block-navigation-submenu.is-open .wp-block-navigation__submenu-icon svg {
    transform: rotate(180deg) !important;
}

/* Hover léger */
body.mobile-menu-open .wp-block-navigation__submenu-icon:hover {
    color: #fff !important;
}
body.mobile-menu-open .wp-block-navigation__submenu-icon:hover svg {
    stroke: #fff !important;
}

/* EMPÊCHE LE LIEN PAR DÉFAUT SUR LE <li> */
body.mobile-menu-open .wp-block-navigation-submenu {
    pointer-events: none;
}

body.mobile-menu-open .wp-block-navigation-submenu * {
    pointer-events: auto;
}

/* Le label et la flèche restent cliquables */
body.mobile-menu-open .wp-block-navigation-item__content,
body.mobile-menu-open .wp-block-navigation__submenu-icon {
    pointer-events: auto !important;
}
/* BOUTON RETOUR — HAUT GAUCHE */
.submenu-back-btn {
    position: absolute !important;
    top: 20px !important;
    left: 20px !important;
    background: transparent !important;
    border: none !important;
    color: #0f0 !important;
    font-size: 1.1rem !important;
    font-weight: bold !important;
    cursor: pointer !important;
    z-index: 999999 !important;
    padding: 8px 12px !important;
    transition: color 0.3s ease !important;
}

.submenu-back-btn:hover {
    color: #fff !important;
}

/* ESPACE POUR LE BOUTON */
body.mobile-menu-open .wp-block-navigation__submenu-container.is-open {
    padding-top: 80px !important;
    position: relative !important;
}
/* MENU MOBILE AU-DESSUS — UNIQUEMENT MOBILE — RIEN NE CASSE */
body.mobile-menu-open .wp-block-navigation__responsive-container {
    position: relative !important;
    margin-top: -50%;
    width: 100%;
}
