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

body {
    background: #0a0a0a;
    overflow: hidden;
}

/* ============================================
   INTRO SCREEN - Terminal/TV Effect
   ============================================ */

.intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #0a0a0a;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* TV Static noise */
.tv-static {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.05;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    animation: static-flicker 0.1s steps(1) infinite;
}

@keyframes static-flicker {
    0%, 100% { opacity: 0.03; }
    50% { opacity: 0.06; }
}

/* Scanlines */
.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.3) 2px,
        rgba(0, 0, 0, 0.3) 4px
    );
    z-index: 10;
}

/* Glitch overlay */
.glitch-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    animation: glitch-skew 4s steps(1) infinite;
}

@keyframes glitch-skew {
    0%, 100% { transform: skew(0deg); }
    20% { transform: skew(-0.5deg); }
    40% { transform: skew(0.5deg); }
    60% { transform: skew(-0.3deg); }
    80% { transform: skew(0.3deg); }
}

/* Terminal content */
.terminal-content {
    position: relative;
    z-index: 20;
    text-align: center;
    padding: 40px;
    max-width: 800px;
}

.terminal-header {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9rem;
    color: #C9A962;
    letter-spacing: 0.3em;
    margin-bottom: 60px;
    text-shadow: 0 0 10px rgba(201, 169, 98, 0.5);
}

.terminal-header .blink {
    animation: blink 1s steps(1) infinite;
    margin-right: 10px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.typed-container {
    font-family: 'VT323', monospace;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: #e0e0e0;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    white-space: pre-line;
    text-align: center;
    line-height: 1.6;
}

.typed-text {
    animation: text-glitch 3s steps(1) infinite;
}

@keyframes text-glitch {
    0%, 100% { 
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
        transform: translate(0);
    }
    92% { 
        text-shadow: -2px 0 #ff0000, 2px 0 #00ffff;
        transform: translate(-2px, 1px);
    }
    94% { 
        text-shadow: 2px 0 #ff0000, -2px 0 #00ffff;
        transform: translate(2px, -1px);
    }
    96% { 
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
        transform: translate(0);
    }
}

.cursor {
    animation: cursor-blink 0.7s steps(1) infinite;
    color: #C9A962;
    margin-left: 2px;
}

@keyframes cursor-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.enter-prompt {
    margin-top: 80px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    color: #666;
    letter-spacing: 0.1em;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.enter-prompt.visible {
    opacity: 1;
    animation: pulse-prompt 2s ease-in-out infinite;
}

@keyframes pulse-prompt {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Hint desktop */
.desktop-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: #444;
    letter-spacing: 0.05em;
    opacity: 0.6;
    text-align: center;
}

@media (min-width: 769px) {
    .desktop-hint {
        display: none;
    }
}

/* TV Frame vignette */
.tv-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 15;
    box-shadow: inset 0 0 150px rgba(0, 0, 0, 0.9);
    border-radius: 20px;
}

/* Transition OUT */
.intro-screen.fade-out {
    animation: tv-turn-off 0.8s ease-in forwards;
}

@keyframes tv-turn-off {
    0% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1, 0.01);
        filter: brightness(2);
    }
    100% {
        transform: scale(0, 0);
        filter: brightness(0);
        opacity: 0;
    }
}

/* ============================================
   SCENE PRINCIPALE - Hôtel
   ============================================ */

.scene {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    perspective: 1000px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.scene.visible {
    opacity: 1;
}

.bg-image {
    width: 105%;
    height: 110%;
    object-fit: cover;
    object-position: center;
    position: absolute;
    top: -5%;
    left: -2.5%;
    will-change: transform;
}

.banners-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    perspective: 1000px;
}

.banner {
    position: absolute;
    will-change: transform;
    transform-style: preserve-3d;
    transform-origin: top center;
    cursor: pointer;
    transition: transform 1.5s ease;
}

.banner:hover {
    animation: swing 1.5s ease-in-out;
}

@keyframes swing {
    0% { transform: rotateX(0deg); }
    25% { transform: rotateX(8deg); }
    50% { transform: rotateX(-5deg); }
    75% { transform: rotateX(3deg); }
    100% { transform: rotateX(0deg); }
}

.banner img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
}

/* Positionnement des banners - géré dynamiquement en JS */
.banner {
    width: 14%;
}

/* ============================================
   MINECRAFT SERVER BADGE
   ============================================ */

.minecraft-badge {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    text-decoration: none;
    z-index: 999;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.minecraft-badge:hover {
    background: rgba(0, 0, 0, 0.85);
    border-color: rgba(201, 169, 98, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.minecraft-badge img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.minecraft-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.server-ip {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9rem;
    color: #C9A962;
    letter-spacing: 0.05em;
}

.server-version {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    color: #666;
}

.copy-tooltip {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: #C9A962;
    color: #0a0a0a;
    padding: 6px 14px;
    border-radius: 4px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.copy-tooltip.show {
    opacity: 1;
}

/* Fade overlay pour transition */
.fade-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    opacity: 0;
    pointer-events: none;
    z-index: 2000;
    transition: opacity 0.6s ease;
}

.fade-overlay.active {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .terminal-content {
        padding: 20px;
    }
    
    .typed-container {
        font-size: 1.3rem;
        min-height: 80px;
    }
}

/* ============================================
   PAGE ACCUEIL - VERSION MOBILE
   ============================================ */
@media (max-width: 900px) {
    /* Adapter l'image de fond */
    .bg-image {
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        object-fit: cover;
        object-position: center 30%;
    }
    
    /* Positions des bannières en mobile */
    .banner {
        width: 37% !important;
    }
    
    #banner-1 {
        left: -3% !important;
        top: 35% !important;
    }
    
    #banner-2 {
        left: 32% !important;
        top: 35% !important;
    }
    
    #banner-3 {
        left: 66% !important;
        top: 34% !important;
    }
    
    #banner-4 {
        left: 1% !important;
        top: 69% !important;
        width: 27% !important;
    }
    
    /* Badge Minecraft adapté pour mobile */
    .minecraft-badge {
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        width: 85%;
        max-width: 320px;
        justify-content: center;
    }
}

/* ============================================
   EVIDENCE BOARD - Page Membres
   ============================================ */

/* Page membres - body style */
.membres-page {
    background: rgba(196, 151, 85, 0.82);
    min-height: 100vh;
    overflow: hidden;
    animation: fadeIn 2s ease-out;
}

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;  /* SOUS le board */
    background-image: url('Assets/noisy.png');
    background-repeat: repeat;
    opacity: 0.25;
}


.back-btn {
    position: fixed;
    top: 15px;
    left: 15px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.7);
    color: #C9A962;
    text-decoration: none;
    font-family: monospace;
    border: 1px solid rgba(201, 169, 98, 0.3);
    border-radius: 4px;
    z-index: 1001;
}

.back-btn:hover {
    background: rgba(201, 169, 98, 0.2);
}

.board-content {
    position: relative;
    width: 100vw;
    height: 108vh;
    background-image: url('Assets/evidenceBg.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 2;  
}

.board-content img {
    position: absolute;
    height: auto;
}

/* ============================================
   PAGE ÉNIGMES
   ============================================ */

.enigmes-page {
    min-height: 100vh;
    background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.4)), url('Assets/Enigmes/GameBg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden; 
}

.enigmes-header {
    position: absolute;
    top: -30px;
    text-align: center;
}



.enigmes-cards {
    display: flex;
    gap: 25px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 60px;
}

.enigme-card {
    position: relative;
    cursor: pointer;
    transition: transform 0.4s ease, filter 0.3s ease;
}


.enigme-card:hover {
    transform: translateY(-10px) scale(1.02);
}


.enigme-card.completed {
    filter: none;
}

.enigme-card.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-10px); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(-10px); }
    80% { transform: translateX(10px); }
}

/* ============================================
   PAGE SCÈNE D'ÉNIGME (jeu hidden object)
   ============================================ */

.enigme-scene-page {
    min-height: 100vh;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.scene-header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.scene-logo {
    height: 60px;
}

/* Bouton pour revoir l'énigme */
.enigme-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    cursor: pointer;
    z-index: 200;
    transition: transform 0.3s ease;
}

.enigme-btn.hidden {
    display: none;
}

.enigme-btn:hover {
    transform: scale(1.1);
}

.enigme-btn img {
    height: 180px;
}

/* Overlay Popup (instructions, énigme, succès) */
.overlay-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.overlay-popup.hidden {
    display: none;
}

.popup-content {
    max-width: 80%;
    max-height: 70vh;
    object-fit: contain;
}

.popup-content.clickable {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.popup-content.clickable:hover {
    transform: scale(1.02);
}

.popup-btn {
    margin-top: 30px;
    padding: 15px 40px;
    background: linear-gradient(135deg, #c9a962 0%, #8b6914 100%);
    color: #1a1a1a;
    border: none;
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.popup-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(201, 169, 98, 0.4);
}

/* Scène de jeu */
.game-scene {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1; /* En arrière-plan */
}

.scene-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Zone cliquable pour l'objet caché (nouvelle méthode) */
.object-zone {
    position: absolute;
    cursor: default;
    z-index: 500;
    pointer-events: none;
    opacity: 0;
    /* Mode debug : décommenter pour voir les zones */
    /* background: rgba(255, 0, 0, 0.3); */
}

.object-zone.active {
    pointer-events: auto;
}

/* Écran de rotation pour mobile */
.rotate-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #0a0a0a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    box-sizing: border-box;
}

.rotate-screen.hidden {
    display: none;
}

.rotate-icon-img {
    /* width: 120px;
    height: 120px; */
    margin-bottom: 30px;
    display: block;
}

.rotate-text {
    color: #FFF3B0;
    font-family: 'Cinzel', serif;
    font-size: 18px;
    text-align: center;
    letter-spacing: 1px;
}

/* Blocage mobile pour la page énigmes */
.mobile-block {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 10, 10, 0.95);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 20px;
    box-sizing: border-box;
}

.mobile-block-content {
    text-align: center;
    max-width: 400px;
    padding: 40px 30px;
    background: rgba(27, 27, 27, 0.9);
    border: 2px solid rgba(201, 169, 98, 0.3);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.mobile-block-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.mobile-block-title {
    font-family: 'Cinzel', serif;
    font-size: 24px;
    color: #C9A962;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.mobile-block-text {
    font-family: 'Special Elite', monospace;
    font-size: 14px;
    color: #FFF3B0;
    line-height: 1.6;
    margin-bottom: 30px;
}

.mobile-block-btn {
    display: inline-block;
    padding: 12px 30px;
    background: rgba(201, 169, 98, 0.2);
    color: #C9A962;
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-size: 14px;
    border: 1px solid rgba(201, 169, 98, 0.5);
    border-radius: 6px;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.mobile-block-btn:hover {
    background: rgba(201, 169, 98, 0.3);
    border-color: rgba(201, 169, 98, 0.8);
    transform: scale(1.05);
}

@media screen and (max-width: 768px) {
    .mobile-block {
        display: flex;
    }
    
    .enigmes-page .enigmes-header,
    .enigmes-page .enigmes-cards,
    .enigmes-page .back-btn {
        display: none !important;
    }
}

/* Masquer le contenu en mode portrait sur mobile */
@media screen and (max-width: 768px) {
    /* Pour les pages d'énigmes individuelles */
    .enigme-scene-page.portrait-mode .game-scene,
    .enigme-scene-page.portrait-mode .object-zone,
    .enigme-scene-page.portrait-mode .overlay-popup,
    .enigme-scene-page.portrait-mode .enigme-btn,
    .enigme-scene-page.portrait-mode .back-btn {
        display: none !important;
    }
    
    /* Pour la page de sélection des énigmes */
    .enigmes-page.portrait-mode .enigmes-header,
    .enigmes-page.portrait-mode .enigmes-cards,
    .enigmes-page.portrait-mode .back-btn {
        display: none !important;
    }
}