/*
Theme Name: NES Classic
Theme URI: https://www.tavernedesjeux.com
Author: Jimmy Langiny
Description: Thème WordPress inspiré de la Nintendo NES – style 8‑bits, ambiance cartouche grise.
Version: 1.0
*/

/* GLOBAL */
body {
    background:#000;
    color:#eee;
    font-family:'Press Start 2P', monospace;
    background-image: repeating-linear-gradient(
        to bottom,
        rgba(255,255,255,0.03) 0px,
        rgba(255,255,255,0.03) 2px,
        transparent 2px,
        transparent 4px
    );
}

a { color:#ffcc00; }

.container {
    background:#1a1a1a;
    padding:20px;
    border:6px solid #b0b0b0;
    box-shadow:0 0 20px #000 inset;
}

/* BUTTON NES */
.button-nes {
    display:inline-block;
    background:#b00000;
    color:#fff;
    padding:10px 20px;
    border:3px solid #fff;
    text-transform:uppercase;
}
.button-nes:hover {
    background:#ff0000;
    color:#ffcc00;
}

/* SIDEBAR */
.sidebar-nes {
    background:#111;
    padding:20px;
    border:4px solid #fff;
}
.nes-title {
    color:#ffcc00;
    border-bottom:2px solid #444;
    padding-bottom:5px;
}

/* CARDS */
.nes-card {
    background:#111;
    border:4px solid #b0b0b0;
    padding:20px;
    margin-bottom:20px;
    box-shadow:0 0 10px #000 inset;
}

/* HEADER CONSOLE NES */
.nes-console-header {
    background:#b0b0b0;
    border-bottom:6px solid #fff;
    box-shadow:0 10px 20px rgba(0,0,0,0.6);
}

/* Rainures NES */
.nes-header-top {
    display:flex;
    gap:6px;
    padding:10px;
}
.nes-ridge {
    flex:1;
    height:14px;
    background:#9a9a9a;
    border:2px solid #7a7a7a;
    box-shadow:inset 0 0 6px #000;
}

/* Header layout gauche */
.nes-header-body-left {
    display:flex;
    justify-content:flex-start;
    padding:20px;
}
.nes-header-left-block {
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:10px;
}

/* Logo NES */
.nes-logo {
    font-size:32px;
    color:#ff0000;
    text-shadow:2px 2px #000;
    text-align:left;
}
.nes-subtitle {
    font-size:14px;
    color:#333;
    letter-spacing:2px;
    text-align:left;
}

/* POWER / RESET */
.nes-buttons-left {
    display:flex;
    align-items:center;
    gap:15px;
}
.nes-btn-power,
.nes-btn-reset {
    background:#222;
    color:#fff;
    padding:10px 20px;
    border:3px solid #fff;
    font-size:12px;
    cursor:pointer;
    box-shadow:0 0 10px #000 inset;
}
.nes-btn-power:hover { background:#ff0000; }
.nes-btn-reset:hover { background:#555; }

/* LED carrée NES */
.nes-led {
    width: 14px;
    height: 14px;
    border-radius: 2px;
    background:#330000;
    border:2px solid #550000;
    box-shadow:0 0 4px #000 inset;
    transition: all 0.2s ease;
}
.nes-led.on {
    background:#ff0000;
    border-color:#ff4444;
    box-shadow:0 0 8px #ff0000, 0 0 12px #ff4444;
}
@keyframes nes-blink {
    0% { opacity:1; }
    50% { opacity:0.4; }
    100% { opacity:1; }
}
.nes-led.blink {
    animation: nes-blink 0.8s infinite;
}

/* FOOTER CONSOLE NES */
.nes-console-footer {
    margin-top:40px;
    background:#b0b0b0;
    border-top:6px solid #fff;
    box-shadow:0 -10px 20px rgba(0,0,0,0.6);
}
.nes-console-top {
    display:flex;
    gap:6px;
    padding:10px;
}
.nes-console-body {
    text-align:center;
    padding:20px 0;
}
.nes-text {
    font-size:14px;
    color:#333;
    letter-spacing:2px;
}
.nes-console-bottom {
    background:#8a8a8a;
    padding:10px;
    text-align:center;
    font-size:12px;
    border-top:3px solid #666;
}

/* WRAPPER POUR LA MANETTE + CONTOURS */
.nes-controller-wrapper {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}

/* Contour gris gauche */
.nes-controller-edge-left {
    position:absolute;
    top:-8px;
    left:-20px;
    width:40px;
    height:12px;
    background:#b0b0b0;
    border:2px solid #8a8a8a;
    border-radius:6px 0 0 6px;
    box-shadow:0 0 6px rgba(0,0,0,0.6);
}

/* Contour gris droite */
.nes-controller-edge-right {
    position:absolute;
    top:-8px;
    right:-20px;
    width:40px;
    height:12px;
    background:#b0b0b0;
    border:2px solid #8a8a8a;
    border-radius:0 6px 6px 0;
    box-shadow:0 0 6px rgba(0,0,0,0.6);
}

/* CONTROLLER NES */
.nes-controller {
    position: relative;

    transform: perspective(600px) rotateX(3deg) translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.7);

    max-width: 700px;
    margin: 0 auto;

    padding: 25px 30px;
    gap: 30px;

    background:#3a3a3a;
    border-top:4px solid #fff;
    border-bottom:4px solid #fff;

    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-wrap:wrap;
}

/* Socle NES */
.nes-controller::after {
    content: "";
    position: absolute;
    bottom: -18px;
    left: 0;
    right: 0;
    height: 18px;
    background: linear-gradient(#b0b0b0, #8a8a8a);
    border-bottom: 4px solid #666;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.6);
}

/* Câble NES */
.nes-controller::before {
    content: "";
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 60px;
    background: #111;
    border-radius: 8px;
    box-shadow:0 0 6px rgba(0,0,0,0.8), 0 0 12px rgba(0,0,0,0.6);
    clip-path: polygon(
        40% 0%, 60% 0%,
        100% 30%, 100% 70%,
        60% 100%, 40% 100%,
        0% 70%, 0% 30%
    );
}

/* Ombre du câble */
.nes-controller-cable-shadow {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 20px;
    background: rgba(0,0,0,0.4);
    filter: blur(12px);
    border-radius: 50%;
}

/* D-PAD animé */
.nes-dpad {
    position:relative;
    width:80px;
    height:80px;
}
.nes-dpad div {
    background:#111;
    position:absolute;
    transition:0.15s ease;
    box-shadow:inset 0 0 6px #000;
}
.nes-dpad-up { top:0; left:30px; width:20px; height:30px; }
.nes-dpad-down { bottom:0; left:30px; width:20px; height:30px; }
.nes-dpad-left { left:0; top:30px; width:30px; height:20px; }
.nes-dpad-right { right:0; top:30px; width:30px; height:20px; }
.nes-dpad-center { top:30px; left:30px; width:20px; height:20px; }

.nes-dpad-up:hover,
.nes-dpad-down:hover,
.nes-dpad-left:hover,
.nes-dpad-right:hover {
    background:#444;
    box-shadow:inset 0 0 10px #000, 0 0 6px #ff0000;
    transform:scale(1.05);
}
.nes-dpad div:hover ~ .nes-dpad-center,
.nes-dpad-center:hover {
    background:#222;
    box-shadow:inset 0 0 10px #000;
}

/* Buttons A/B */
.nes-buttons-ab {
    display:flex;
    gap:20px;
}
.nes-btn {
    width:50px;
    height:50px;
    border-radius:50%;
    background:#b00000;
    color:#fff;
    display:flex;
    justify-content:center;
    align-items:center;
    border:3px solid #fff;
    box-shadow:0 0 10px #000 inset;
    cursor:pointer;
}
.nes-btn:hover { background:#ff0000; }

/* START / SELECT */
.nes-buttons-start-select {
    display:flex;
    gap:20px;
}
.nes-btn-start,
.nes-btn-select {
    background:#777;
    padding:10px 20px;
    border-radius:8px;
    border:3px solid #fff;
    color:#fff;
    cursor:pointer;
    box-shadow:0 0 10px #000 inset;
}
.nes-btn-start:hover,
.nes-btn-select:hover {
    background:#999;
}

/* MENU LINKS */
.nes-menu-links {
    flex:1;
    text-align:right;
}
.nes-menu-links a {
    color:#fff;
    margin:0 10px;
    text-decoration:none;
    font-weight:bold;
}
.nes-menu-links a:hover { color:#ffcc00; }
/* Flash rouge NES */
.nes-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ff0000;
    opacity: 0;
    pointer-events: none;
    z-index: 99999;
    animation: nes-flash-anim 0.15s linear;
}

@keyframes nes-flash-anim {
    0% { opacity: 0; }
    20% { opacity: 1; }
    100% { opacity: 0; }
}

