/* ============================================
   ESCAPE GAME - TEMPLATE CSS v2.1
   Template v2.0 + Interactive Break
   ============================================ */

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #1a1a2e;
    color: white;
    overflow: hidden;
}

/* === WRAPPER PRINCIPAL === */
.main-wrapper {
    display: flex;
    width: 100vw;
    height: 100vh;
}

.main-wrapper.no-inventory .game-container {
    width: 100%;
}

.main-wrapper.no-inventory .inventory-panel {
    display: none;
}

/* === CONTAINER PRINCIPAL === */
.game-container {
    flex: 1;
    height: 100vh;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* === INVENTAIRE === */
.inventory-panel {
    width: 200px;
    min-width: 200px;
    height: 100vh;
    background: linear-gradient(180deg, #2d3436 0%, #1a1a2e 100%);
    border-left: 3px solid #4a4a6a;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
}

.inventory-header {
    padding: 20px 15px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid #4a4a6a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.inventory-header .inventory-icon {
    font-size: 1.5em;
}

.inventory-header h3 {
    font-size: 1.1em;
    font-weight: 600;
    color: #fff;
}

.inventory-slots {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
}

.inventory-slot {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.inventory-slot:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateX(-3px);
}

.inventory-slot.selected {
    background: rgba(102, 126, 234, 0.3);
    border-color: #667eea;
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.4);
}

.inventory-slot img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.inventory-slot .item-name {
    font-size: 0.9em;
    color: #ddd;
    flex: 1;
}

.inventory-hint {
    padding: 15px;
    font-size: 0.8em;
    color: #888;
    text-align: center;
    border-top: 1px solid #4a4a6a;
}

.inventory-hint.active {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

/* Effet visuel quand un objet est sélectionné */
.game-container.item-selected .clickable-object.accepts-item {
    animation: glowPulse 1.5s infinite;
}

/* ============================================
   INVENTAIRE FLOTTANT (étage 15 — matériel de bord)
   ============================================ */

.main-wrapper.inventory-floating .game-container {
    width: 100%;
}

.main-wrapper.inventory-floating .inventory-panel {
    position: fixed;
    top: 70px;
    right: 18px;
    width: auto;
    min-width: 0;
    height: auto;
    max-height: calc(100vh - 110px);
    background: linear-gradient(180deg,
                rgba(20, 26, 38, 0.88) 0%,
                rgba(12, 16, 24, 0.92) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(200, 200, 220, 0.15);
    border-radius: 14px;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    z-index: 80;
    padding: 0;
    animation: invFloatIn 0.4s ease-out;
}

@keyframes invFloatIn {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

.main-wrapper.inventory-floating .inventory-header {
    padding: 10px 14px;
    background: transparent;
    border-bottom: 1px solid rgba(200, 200, 220, 0.12);
}

.main-wrapper.inventory-floating .inventory-header h3 {
    font-size: 0.78em;
    font-weight: 600;
    color: #d5dde8;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin: 0;
}

.main-wrapper.inventory-floating .inventory-header .inventory-icon {
    width: 22px;
    height: 22px;
}

.main-wrapper.inventory-floating .inventory-header .inventory-icon svg {
    width: 100%;
    height: 100%;
}

.main-wrapper.inventory-floating .inventory-slots {
    padding: 10px;
    gap: 8px;
    display: flex;
    flex-direction: column;
    min-width: 110px;
    max-width: 140px;
}

.main-wrapper.inventory-floating .inventory-slot {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px 6px;
    gap: 6px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(200, 200, 220, 0.12);
    border-radius: 10px;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.main-wrapper.inventory-floating .inventory-slot:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(200, 200, 220, 0.3);
    transform: translateX(0) translateY(-2px);
}

.main-wrapper.inventory-floating .inventory-slot.selected {
    background: rgba(120, 160, 220, 0.22);
    border-color: rgba(160, 200, 255, 0.6);
    box-shadow: 0 0 18px rgba(120, 180, 255, 0.35);
}

.main-wrapper.inventory-floating .inventory-slot img {
    width: 44px;
    height: 44px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.main-wrapper.inventory-floating .inventory-slot .item-name {
    font-size: 0.72em;
    color: #c8d0dc;
    letter-spacing: 0.04em;
    line-height: 1.2;
}

.main-wrapper.inventory-floating .inventory-hint {
    padding: 8px 12px;
    font-size: 0.7em;
    color: #8c97a8;
    font-style: italic;
    border-top: 1px solid rgba(200, 200, 220, 0.1);
    background: transparent;
}

.main-wrapper.inventory-floating .inventory-hint.active {
    color: #9fc1ff;
    background: rgba(120, 160, 220, 0.08);
}

.main-wrapper.inventory-floating .inventory-empty {
    padding: 14px 10px;
    text-align: center;
    font-size: 0.75em;
    color: #6f7888;
    font-style: italic;
}

@keyframes glowPulse {
    0%, 100% { filter: brightness(1) drop-shadow(0 0 5px rgba(102, 126, 234, 0.5)); }
    50% { filter: brightness(1.3) drop-shadow(0 0 15px rgba(102, 126, 234, 0.8)); }
}

/* Message de collecte */
.collect-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 20px 40px;
    border-radius: 15px;
    border: 2px solid #667eea;
    z-index: 500;
    animation: collectAnim 1.5s ease forwards;
    pointer-events: none;
}

.collect-message span {
    font-size: 1.2em;
    color: white;
}

@keyframes collectAnim {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    20% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
    80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -70%) scale(0.9); }
}

/* === GESTION DES SCÈNES === */
.scene {
    position: absolute;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.scene.active {
    display: flex;
    opacity: 1;
}

/* === ÉCRAN DE DÉMARRAGE === */
.start-screen {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    flex-direction: column;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.start-content {
    background: rgba(0, 0, 0, 0.6);
    padding: 50px 70px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.start-content h1 {
    font-size: 2.8em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.start-content p {
    font-size: 1.2em;
    margin-bottom: 30px;
    opacity: 0.9;
}

.start-button {
    padding: 18px 50px;
    font-size: 1.4em;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.start-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* === SCÈNE AVEC IMAGE DE FOND === */
.image-scene {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    flex-direction: column;
}

/* === SCÈNE AVEC VIDÉO DE FOND === */
.video-scene {
    background: black;
}

.video-scene-stage {
    position: absolute;
    inset: 0;
}

.video-scene.with-bg .video-scene-stage {
    height: 100%;
    width: auto;
    aspect-ratio: 1176 / 1756;
    left: 50%;
    right: auto;
    top: 0;
    transform: translateX(-50%);
    overflow: hidden;
}

@media (max-aspect-ratio: 1176/1756) {
    .video-scene.with-bg .video-scene-stage {
        width: 100%;
        height: auto;
        aspect-ratio: 1176 / 1756;
        left: 0;
        transform: none;
    }
}

.video-scene-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.video-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 2;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-scene.with-bg .video-container video {
    background: transparent;
    object-fit: cover;
}

.video-clickable-zone {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.video-clickable-zone .clickable-object {
    pointer-events: auto;
}

.skip-button {
    position: absolute;
    bottom: 30px;
    right: 30px;
    z-index: 20;
    padding: 12px 30px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.skip-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* === SCÈNE ÉNIGME (PUZZLE) === */
.puzzle-scene {
    background-size: cover;
    background-position: center;
    flex-direction: column;
    padding: 20px;
}

.puzzle-content {
    background: rgba(0, 0, 0, 0.75);
    padding: 40px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    max-width: 550px;
    text-align: center;
}

.puzzle-content h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
}

.puzzle-content .puzzle-text {
    font-size: 1.1em;
    margin-bottom: 25px;
    line-height: 1.6;
}

.puzzle-input {
    width: 100%;
    padding: 15px;
    font-size: 1.2em;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.puzzle-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.puzzle-button {
    padding: 15px 40px;
    font-size: 1.1em;
    background: white;
    color: #1e3c72;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.puzzle-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.feedback {
    margin-top: 15px;
    padding: 12px;
    border-radius: 10px;
    font-weight: bold;
    display: none;
}

.feedback.success {
    background: rgba(76, 175, 80, 0.3);
    color: #4CAF50;
    display: block;
}

.feedback.error {
    background: rgba(244, 67, 54, 0.3);
    color: #f44336;
    display: block;
}

/* === ÉCRAN DE FIN === */
.end-screen {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    flex-direction: column;
    text-align: center;
    background-size: cover;
    background-position: center;
}

.end-content {
    background: rgba(0, 0, 0, 0.5);
    padding: 50px 70px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.end-content h1 {
    font-size: 2.8em;
    margin-bottom: 20px;
}

.end-content p {
    font-size: 1.3em;
    margin-bottom: 30px;
}

.restart-button {
    padding: 15px 40px;
    font-size: 1.2em;
    background: white;
    color: #11998e;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.restart-button:hover {
    transform: scale(1.05);
}

/* === OBJETS CLIQUABLES === */
.clickable-objects-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.clickable-object {
    position: absolute;
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.clickable-object img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.clickable-object:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
}

/* Zone cliquable invisible (transparente) */
.clickable-object.invisible {
    background: transparent;
}

.clickable-object.invisible:hover {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.2);
    transform: none;
    filter: none;
}

/* Animation de pulsation */
.clickable-object.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.clickable-object.aura img {
    animation: aura-glow 2s ease-in-out infinite;
}

.clickable-object.aura:hover img {
    animation-duration: 1.2s;
}

@keyframes aura-glow {
    0%, 100% {
        filter:
            drop-shadow(0 0 6px rgba(255, 230, 130, 0.85))
            drop-shadow(0 0 18px rgba(255, 200, 80, 0.6))
            drop-shadow(0 0 32px rgba(255, 170, 40, 0.35));
    }
    50% {
        filter:
            drop-shadow(0 0 14px rgba(255, 240, 160, 1))
            drop-shadow(0 0 32px rgba(255, 210, 90, 0.85))
            drop-shadow(0 0 56px rgba(255, 180, 50, 0.55));
    }
}

/* ============================================
   SCÈNE INTERACTIVE-BREAK (casser un objet)
   ============================================ */

.interactive-break-scene {
    background: black;
}

/* Image de base à casser */
.break-base-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    cursor: pointer;
    transition: opacity 2s;
}

/* Couche des fissures */
.break-crack-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    transition: opacity 2s;
}

.break-crack-layer img {
    position: absolute;
    pointer-events: none;
}

/* Image finale après cassage */
.break-final-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 3;
    display: none;
}

/* Débris de verre qui tombent */
.glass-piece {
    position: absolute;
    width: 200px;
    height: 200px;
    background-size: cover;
    pointer-events: none;
    opacity: 0.95;
    z-index: 500;
    animation: glassFall 1.7s linear forwards;
}

@keyframes glassFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(120vh) rotate(720deg);
        opacity: 0;
    }
}

/* Bouton qui apparaît après cassage */
.break-continue-button {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    padding: 20px 50px;
    font-size: 1.5em;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    z-index: 6;
    display: none;
    opacity: 0;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: buttonPulse 1.5s infinite;
}

.break-continue-button.show {
    display: block;
    opacity: 1;
}

.break-continue-button:hover {
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

@keyframes buttonPulse {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.05); }
}

/* ============================================
   SCÈNE FLASH (alternance horreur)
   ============================================ */

.flash-scene {
    background: black;
    position: relative;
}

.flash-base-image,
.flash-horror-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: black;
}

.flash-base-image {
    z-index: 1;
}

.flash-horror-image {
    z-index: 2;
    opacity: 0;
    transition: opacity 0.03s linear;
}

/* Overlay blanc pour simuler le flash lumineux */
.flash-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.15);
    z-index: 3;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.03s linear;
}

.flash-clickable-zone {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
}

/* ============================================
   SCÈNE CINEMATIC-WALK (personnage s'éloigne)
   ============================================ */

.cinematic-walk-scene {
    background: black;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.walk-character-container {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    transform-origin: bottom center;
    z-index: 5;
    pointer-events: none;
}

.walk-character {
    display: block;
    width: auto;
    object-fit: contain;
}

.walk-clickable-zone {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

/* ============================================
   SCÈNE DIALOG (introduction narrative hôtel)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,400;0,600;1,400&display=swap');

.dialog-scene {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.dialog-scene-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center,
                rgba(0, 0, 0, 0.55) 0%,
                rgba(0, 0, 0, 0.85) 100%);
    z-index: 1;
    pointer-events: none;
}

.dialog-scene-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem 1rem;
    width: 100%;
    max-width: 780px;
}

.hotel-dialog-box {
    width: 100%;
    background: #0d0d0d;
    border: 3px solid #c8a04a;
    border-radius: 4px;
    position: relative;
    box-shadow:
        inset 0 0 0 2px #1a1008,
        4px 4px 0 #8b6a20,
        0 0 40px rgba(200, 160, 74, 0.25);
    cursor: pointer;
    animation: hotelDialogIn 0.7s ease-out;
}

.hotel-dialog-inner {
    border: 2px solid #8b6a20;
    margin: 4px;
    padding: 22px 28px 36px;
    border-radius: 2px;
    min-height: 120px;
    max-height: 55vh;
    overflow-y: auto;
}

.hotel-dialog-text {
    font-family: 'Crimson Pro', Georgia, serif;
    font-size: 19px;
    color: #e8d8a8;
    line-height: 1.7;
    font-style: italic;
    text-shadow: 0 0 8px rgba(200, 160, 74, 0.15);
}

.hotel-dialog-cursor {
    display: inline-block;
    width: 9px;
    height: 14px;
    background: #c8a04a;
    margin-left: 3px;
    vertical-align: middle;
    animation: hotelBlink 0.8s step-end infinite;
}

.hotel-dialog-arrow {
    position: absolute;
    bottom: 10px;
    right: 16px;
    font-size: 14px;
    color: #c8a04a;
    animation: hotelBounce 0.6s ease-in-out infinite alternate;
    display: none;
}

.hotel-dialog-button {
    font-family: 'Crimson Pro', Georgia, serif;
    font-size: 1.2em;
    letter-spacing: 0.1em;
    background: #1a1008;
    color: #c8a04a;
    border: 2px solid #c8a04a;
    padding: 12px 36px;
    cursor: pointer;
    border-radius: 2px;
    box-shadow:
        inset 0 0 0 2px #0d0d0d,
        3px 3px 0 #8b6a20,
        0 0 25px rgba(200, 160, 74, 0.35);
    transition: background 0.15s, transform 0.15s, box-shadow 0.2s;
    opacity: 0;
    text-transform: uppercase;
}

.hotel-dialog-button.show {
    opacity: 1;
    animation: hotelButtonIn 0.5s ease-out;
}

.hotel-dialog-button:hover {
    background: #2e1f08;
    transform: translateY(-2px);
    box-shadow:
        inset 0 0 0 2px #0d0d0d,
        3px 5px 0 #8b6a20,
        0 0 35px rgba(200, 160, 74, 0.55);
}

.hotel-dialog-button:active {
    transform: translateY(1px);
    box-shadow:
        inset 0 0 0 2px #0d0d0d,
        2px 2px 0 #8b6a20;
}

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

@keyframes hotelBounce {
    from { transform: translateY(0); }
    to { transform: translateY(3px); }
}

@keyframes hotelDialogIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes hotelButtonIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dialog-skip-button {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 10;
    font-family: 'Crimson Pro', Georgia, serif;
    font-size: 0.95em;
    letter-spacing: 0.05em;
    background: rgba(13, 13, 13, 0.75);
    color: #c8a04a;
    border: 2px solid #c8a04a;
    padding: 8px 18px;
    cursor: pointer;
    border-radius: 2px;
    backdrop-filter: blur(6px);
    box-shadow: 2px 2px 0 #8b6a20;
    transition: background 0.15s, transform 0.15s;
}

.dialog-skip-button:hover {
    background: rgba(46, 31, 8, 0.9);
    transform: translateY(-1px);
}

.dialog-skip-button:active {
    transform: translateY(1px);
    box-shadow: 1px 1px 0 #8b6a20;
}

/* ============================================
   SCÈNE PSEUDO (saisie du prénom du joueur)
   ============================================ */

.pseudo-scene {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.pseudo-scene-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at center,
            rgba(0, 0, 0, 0.55) 0%,
            rgba(0, 0, 0, 0.92) 100%);
    z-index: 1;
    pointer-events: none;
}

.pseudo-scene-fog {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 60%, rgba(200, 160, 74, 0.08), transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(200, 160, 74, 0.05), transparent 50%);
    z-index: 1;
    pointer-events: none;
    animation: pseudoFog 12s ease-in-out infinite alternate;
}

@keyframes pseudoFog {
    from { opacity: 0.6; transform: translate(0, 0); }
    to   { opacity: 1;   transform: translate(-2%, 1%); }
}

.pseudo-scene-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 2rem 1rem;
}

.pseudo-frame {
    width: min(620px, 92%);
    background: #0d0d0d;
    border: 3px solid #c8a04a;
    border-radius: 4px;
    box-shadow:
        inset 0 0 0 2px #1a1008,
        4px 4px 0 #8b6a20,
        0 0 60px rgba(200, 160, 74, 0.28);
    animation: pseudoFrameIn 0.9s ease-out;
}

.pseudo-frame-inner {
    border: 2px solid #8b6a20;
    margin: 4px;
    padding: 36px 32px 32px;
    border-radius: 2px;
    text-align: center;
    font-family: 'Crimson Pro', Georgia, serif;
}

.pseudo-glyph {
    color: #c8a04a;
    line-height: 0;
    margin: 0 auto 14px;
    width: 32px;
    height: 40px;
    filter: drop-shadow(0 0 8px rgba(200, 160, 74, 0.55));
    animation: pseudoGlyphPulse 3s ease-in-out infinite;
}

.pseudo-glyph svg {
    width: 100%;
    height: 100%;
    display: block;
}

@keyframes pseudoGlyphPulse {
    0%, 100% { opacity: 0.85; filter: drop-shadow(0 0 6px rgba(200, 160, 74, 0.4)); }
    50%      { opacity: 1;    filter: drop-shadow(0 0 14px rgba(200, 160, 74, 0.85)); }
}

.pseudo-title {
    margin: 0 0 14px;
    font-size: 1.6rem;
    color: #e8d8a8;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 600;
    text-shadow: 0 0 14px rgba(200, 160, 74, 0.35);
}

.pseudo-prompt {
    margin: 0 0 26px;
    font-size: 1.05rem;
    color: #c9b884;
    font-style: italic;
    line-height: 1.6;
    text-shadow: 0 0 8px rgba(200, 160, 74, 0.15);
}

.pseudo-input-wrapper {
    position: relative;
    margin: 0 auto 14px;
    width: min(420px, 100%);
}

.pseudo-input {
    width: 100%;
    background: #1a1008;
    border: 2px solid #8b6a20;
    border-radius: 2px;
    padding: 14px 18px;
    font-family: 'Crimson Pro', Georgia, serif;
    font-size: 1.4rem;
    color: #e8d8a8;
    letter-spacing: 0.08em;
    text-align: center;
    outline: none;
    box-shadow:
        inset 0 0 0 1px #0d0d0d,
        inset 0 0 20px rgba(0, 0, 0, 0.7);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pseudo-input::placeholder {
    color: #6b5a30;
    font-style: italic;
    letter-spacing: 0.05em;
}

.pseudo-input:focus {
    border-color: #c8a04a;
    box-shadow:
        inset 0 0 0 1px #0d0d0d,
        inset 0 0 20px rgba(0, 0, 0, 0.7),
        0 0 22px rgba(200, 160, 74, 0.5);
}

.pseudo-input.shake {
    animation: pseudoShake 0.45s ease-in-out;
    border-color: #a04040;
}

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

.pseudo-error {
    min-height: 1.4em;
    margin-bottom: 14px;
    font-size: 0.95rem;
    color: #d96666;
    font-style: italic;
    opacity: 0;
    transition: opacity 0.25s;
    text-shadow: 0 0 8px rgba(217, 102, 102, 0.4);
}

.pseudo-error.show {
    opacity: 1;
}

.pseudo-button {
    font-family: 'Crimson Pro', Georgia, serif;
    font-size: 1.15em;
    letter-spacing: 0.12em;
    background: #1a1008;
    color: #c8a04a;
    border: 2px solid #c8a04a;
    padding: 12px 36px;
    cursor: pointer;
    border-radius: 2px;
    text-transform: uppercase;
    box-shadow:
        inset 0 0 0 2px #0d0d0d,
        3px 3px 0 #8b6a20,
        0 0 25px rgba(200, 160, 74, 0.35);
    transition: background 0.15s, transform 0.15s, box-shadow 0.2s;
}

.pseudo-button:hover {
    background: #2e1f08;
    transform: translateY(-2px);
    box-shadow:
        inset 0 0 0 2px #0d0d0d,
        3px 5px 0 #8b6a20,
        0 0 35px rgba(200, 160, 74, 0.55);
}

.pseudo-button:active {
    transform: translateY(1px);
    box-shadow:
        inset 0 0 0 2px #0d0d0d,
        2px 2px 0 #8b6a20;
}

@keyframes pseudoFrameIn {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================
   DIALOGUE EN BAS DE PAGE (séquence)
   ============================================ */

.bottom-dialogue {
    position: absolute;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%) translateY(30px);
    width: min(820px, 92%);
    z-index: 50;
    display: flex;
    align-items: stretch;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(13, 13, 13, 0.92);
    border: 3px solid #c8a04a;
    border-radius: 4px;
    box-shadow:
        inset 0 0 0 2px #1a1008,
        4px 4px 0 #8b6a20,
        0 0 40px rgba(200, 160, 74, 0.3);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    backdrop-filter: blur(6px);
}

.bottom-dialogue.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.bottom-dialogue.hide {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
}

.bottom-dialogue-avatar {
    flex-shrink: 0;
    width: 92px;
    height: 92px;
    border: 2px solid #8b6a20;
    background: #1a1008;
    overflow: hidden;
    box-shadow: inset 0 0 0 2px #0d0d0d;
}

.bottom-dialogue-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.bottom-dialogue-body {
    flex: 1;
    border: 2px solid #8b6a20;
    padding: 10px 14px;
    background: #0d0d0d;
    position: relative;
    min-height: 92px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bottom-dialogue-name {
    font-family: 'Crimson Pro', Georgia, serif;
    font-size: 16px;
    font-weight: 600;
    color: #c8a04a;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.bottom-dialogue-text {
    font-family: 'Crimson Pro', Georgia, serif;
    font-size: 18px;
    color: #e8d8a8;
    line-height: 1.55;
    font-style: italic;
}

.bottom-dialogue-cursor {
    display: inline-block;
    width: 8px;
    height: 13px;
    background: #c8a04a;
    margin-left: 3px;
    vertical-align: middle;
    animation: hotelBlink 0.8s step-end infinite;
}

.bottom-dialogue-next {
    position: absolute;
    bottom: 6px;
    right: 12px;
    font-size: 14px;
    color: #c8a04a;
    animation: hotelBounce 0.6s ease-in-out infinite alternate;
}

/* Variante visuelle selon le speaker */
.bottom-dialogue[data-speaker="joueur"] {
    flex-direction: row-reverse;
    border-color: #6a90c8;
    box-shadow:
        inset 0 0 0 2px #08111a,
        4px 4px 0 #20578b,
        0 0 40px rgba(106, 144, 200, 0.3);
}

.bottom-dialogue[data-speaker="joueur"] .bottom-dialogue-avatar {
    border-color: #20578b;
}

.bottom-dialogue[data-speaker="joueur"] .bottom-dialogue-body {
    border-color: #20578b;
    text-align: right;
}

.bottom-dialogue[data-speaker="joueur"] .bottom-dialogue-name {
    color: #a8c8e8;
}

.bottom-dialogue[data-speaker="joueur"] .bottom-dialogue-text {
    color: #d8e0e8;
}

.bottom-dialogue[data-speaker="joueur"] .bottom-dialogue-next {
    color: #a8c8e8;
    right: auto;
    left: 12px;
}

/* Dialogue statique affiché en permanence (sans interaction de clic) */
.bottom-dialogue.static-dialogue {
    cursor: default;
}

/* ============================================
   SCÈNE TYPEWRITER (message sanglant sur miroir)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Special+Elite&family=Creepster&display=swap');

.typewriter-scene {
    background-color: #000;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.typewriter-text-wrapper {
    position: absolute;
    z-index: 5;
    pointer-events: auto;
    cursor: pointer;
    max-height: 55%;
    overflow: hidden;
}

.typewriter-text {
    font-family: 'Special Elite', 'Creepster', 'Courier New', monospace;
    font-size: clamp(1.3em, 1.8vw, 1.9em);
    color: #c40000;
    line-height: 1.45;
    text-align: center;
    text-shadow:
        0 0 6px rgba(255, 30, 30, 0.55),
        0 0 14px rgba(140, 0, 0, 0.55),
        0 2px 2px rgba(0, 0, 0, 0.85);
    letter-spacing: 0.02em;
    user-select: none;
}

.tw-char {
    display: inline;
    opacity: 0;
    transition: opacity 0.55s ease-out, filter 0.55s ease-out;
    filter: blur(2px);
}

.tw-char.visible {
    opacity: 1;
    filter: blur(0);
}

.typewriter-cursor {
    display: none;
}

.typewriter-arrow-right {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    width: 80px;
    height: 80px;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(40, 0, 0, 0.7);
    border: 2px solid #b30000;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    z-index: 10;
    box-shadow:
        0 0 25px rgba(255, 0, 0, 0.5),
        inset 0 0 12px rgba(120, 0, 0, 0.5);
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.5s, background 0.2s;
}

.typewriter-arrow-right.show {
    opacity: 1;
    animation: typewriterArrowIn 0.7s ease-out, typewriterArrowPulse 1.6s ease-in-out 0.7s infinite;
}

.typewriter-arrow-right:hover {
    background: rgba(80, 0, 0, 0.9);
    transform: translateY(-50%) translateX(6px);
    box-shadow:
        0 0 40px rgba(255, 0, 0, 0.8),
        inset 0 0 18px rgba(180, 0, 0, 0.6);
}

.typewriter-arrow-icon {
    font-family: 'Nosifer', Arial, sans-serif;
    font-size: 2.4em;
    color: #b30000;
    text-shadow:
        0 0 10px rgba(255, 0, 0, 0.9),
        0 3px 0 #4a0000;
    line-height: 1;
}

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

@keyframes typewriterArrowIn {
    from { opacity: 0; transform: translateY(-50%) translateX(40px); }
    to { opacity: 1; transform: translateY(-50%) translateX(0); }
}

@keyframes typewriterArrowPulse {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50% { transform: translateY(-50%) translateX(8px); }
}

/* ============================================
   SCÈNE ELEVATOR (panneau de boutons d'ascenseur)
   ============================================ */

.elevator-scene {
    background: #000;
    padding: 0;
    overflow: hidden;
}

.elevator-container {
    position: absolute;
    inset: 0;
}

.elevator-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
    pointer-events: none;
}

.elevator-zone {
    position: absolute;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    z-index: 5;
}

.elevator-zone.oval {
    border-radius: 40%;
}

.elevator-zone:hover {
    background: rgba(255, 215, 0, 0.25);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.elevator-zone:active {
    background: rgba(255, 215, 0, 0.5);
    transform: scale(0.95);
}

.elevator-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    z-index: 50;
}

.elevator-popup-overlay.active {
    display: flex;
    animation: fadeIn 0.25s ease;
}

.elevator-popup-content {
    max-width: 90%;
    max-height: 70vh;
}

.elevator-popup-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
}

.elevator-popup-buttons {
    display: flex;
    gap: 20px;
}

.elevator-popup-btn {
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    text-transform: uppercase;
    color: white;
}

.elevator-popup-close {
    background: linear-gradient(135deg, #666, #444);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.elevator-popup-close:hover {
    background: linear-gradient(135deg, #888, #666);
    transform: scale(1.05);
}

.elevator-popup-go {
    background: linear-gradient(135deg, #FFD700, #B8860B);
    color: #3a2a00;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.45);
}

.elevator-popup-go:hover {
    background: linear-gradient(135deg, #FFE55C, #DAA520);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.65);
}

/* ============================================
   SOUS-JEU EN IFRAME (mini-escapes ascenseur)
   ============================================ */

.subgame-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: #000;
    display: none;
}

.subgame-overlay.active {
    display: block;
    animation: fadeIn 0.25s ease;
}

/* Sous-jeu verrouillé : plus aucun moyen de quitter (cache la croix et le bouton skip) */
.subgame-overlay.locked .subgame-close,
.subgame-overlay.locked .subgame-skip {
    display: none !important;
}

.subgame-frame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: #000;
}

.subgame-intro-stage {
    position: absolute;
    inset: 0;
    z-index: 2002;
    display: none;
}

.subgame-intro-stage.active {
    display: block;
}

.subgame-intro-stage.with-bg {
    height: 100vh;
    width: auto;
    aspect-ratio: 1176 / 1756;
    left: 50%;
    right: auto;
    top: 0;
    transform: translateX(-50%);
    overflow: hidden;
    background: #000;
}

@media (max-aspect-ratio: 1176/1756) {
    .subgame-intro-stage.with-bg {
        width: 100vw;
        height: auto;
        aspect-ratio: 1176 / 1756;
        left: 0;
        transform: none;
    }
}

.subgame-intro-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
    display: none;
}

.subgame-intro-stage.with-bg .subgame-intro-bg {
    display: block;
}

.subgame-intro-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    display: none;
    z-index: 2;
}

.subgame-intro-stage.active .subgame-intro-video,
.subgame-intro-video.active {
    display: block;
}

.subgame-intro-stage.with-bg .subgame-intro-video {
    background: transparent;
    object-fit: cover;
}

.subgame-skip {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2003;
    padding: 10px 22px;
    font-size: 0.95em;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 25px;
    cursor: pointer;
    display: none;
    transition: background 0.15s ease, transform 0.15s ease;
}

.subgame-skip.active {
    display: inline-block;
}

.subgame-skip:hover {
    background: rgba(80, 80, 80, 0.9);
    transform: scale(1.05);
}

.subgame-close {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 2001;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.6);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 1.5em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, background 0.15s ease;
}

.subgame-close:hover {
    background: rgba(180, 0, 0, 0.85);
    transform: scale(1.08);
}

/* === CONFIRMATION DE FERMETURE D'UN ÉTAGE === */
.subgame-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 2100;
    display: none;
    align-items: center;
    justify-content: center;
}

.subgame-confirm-overlay.active {
    display: flex;
    animation: subgameConfirmFadeIn 0.2s ease;
}

@keyframes subgameConfirmFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.subgame-confirm-box {
    background: linear-gradient(180deg, #1a0a0a 0%, #0d0d0d 100%);
    border: 2px solid #aa3333;
    border-radius: 10px;
    padding: 30px 35px;
    max-width: 460px;
    width: calc(100% - 40px);
    box-shadow: 0 0 40px rgba(180, 30, 30, 0.4);
    text-align: center;
    color: #e0c8c8;
}

.subgame-confirm-box h2 {
    color: #cc5555;
    font-size: 1.5em;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.subgame-confirm-box p {
    font-size: 1em;
    line-height: 1.5;
    margin-bottom: 25px;
    color: #c8b8b8;
}

.subgame-confirm-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.subgame-confirm-btn {
    padding: 10px 20px;
    font-size: 1em;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.subgame-confirm-no {
    background: rgba(60, 60, 60, 0.6);
    color: #e0d0d0;
    border: 2px solid #555;
}

.subgame-confirm-no:hover {
    background: rgba(90, 90, 90, 0.8);
    border-color: #888;
}

.subgame-confirm-yes {
    background: rgba(120, 20, 20, 0.8);
    color: white;
    border: 2px solid #aa3333;
}

.subgame-confirm-yes:hover {
    background: rgba(180, 30, 30, 0.9);
    box-shadow: 0 0 12px rgba(200, 50, 50, 0.5);
}

/* === OVERLAY DESCENTE (séquence étage 3) === */
.descente-overlay {
    position: fixed;
    inset: 0;
    z-index: 2100;
    background: #000;
    display: none;
}

.descente-overlay.active {
    display: block;
    animation: fadeIn 0.25s ease;
}

.descente-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

/* La dialog box du joueur réutilise .bottom-dialogue ; on relève le z-index pour passer au-dessus de l'overlay descente */
.descente-dialogue {
    z-index: 2102;
    cursor: default;
}

.descente-back {
    position: absolute;
    bottom: 160px;
    right: 24px;
    z-index: 2103;
    width: 96px;
    height: 96px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    animation: descente-pulse 1.6s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
}

.descente-back img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: rotate(90deg);
}

.descente-back:hover {
    filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.95));
}

@keyframes descente-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}

/* État verrouillé des boutons de l'ascenseur (après descente) */
.elevator-zone.disabled {
    pointer-events: none;
    cursor: not-allowed;
    opacity: 0.4;
}

/* === POPUP === */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.popup-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.popup-content {
    background: linear-gradient(135deg, #2d3436 0%, #000000 100%);
    padding: 40px;
    border-radius: 20px;
    max-width: 550px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: slideIn 0.3s ease;
}

.popup-content h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
}

.popup-content p, .popup-content div {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 15px;
}

.popup-content img {
    width: 100%;
    max-width: 350px;
    border-radius: 10px;
    margin: 15px auto;
    display: block;
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid white;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5em;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
}

.popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.popup-button {
    padding: 12px 35px;
    font-size: 1.1em;
    background: white;
    color: #333;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
    transition: all 0.2s;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.popup-button:hover {
    transform: scale(1.05);
}

/* === CONTRÔLE DU VOLUME === */
.volume-control {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    background: rgba(0, 0, 0, 0.7);
    padding: 12px 18px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(10px);
}

.volume-icon {
    font-size: 1.3em;
    cursor: pointer;
}

.volume-slider {
    width: 80px;
    cursor: pointer;
    accent-color: #667eea;
}

.volume-value {
    font-size: 0.85em;
    min-width: 35px;
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .main-wrapper {
        flex-direction: column;
    }
    
    .inventory-panel {
        width: 100%;
        min-width: 100%;
        height: auto;
        max-height: 150px;
        border-left: none;
        border-top: 3px solid #4a4a6a;
        order: 2;
    }
    
    .inventory-header {
        padding: 10px 15px;
    }
    
    .inventory-slots {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 10px;
        gap: 8px;
        overflow-x: auto;
    }
    
    .inventory-slot {
        flex-direction: column;
        padding: 8px;
        min-width: 70px;
    }
    
    .inventory-slot .item-name {
        font-size: 0.75em;
        text-align: center;
    }
    
    .inventory-hint {
        display: none;
    }
    
    .game-container {
        height: calc(100vh - 150px);
    }
    
    .start-content, .end-content {
        padding: 30px 40px;
    }
    
    .start-content h1, .end-content h1 {
        font-size: 2em;
    }
    
    .puzzle-content {
        padding: 25px;
        max-width: 95%;
    }
    
    .popup-content {
        padding: 25px;
    }
    
    .volume-control {
        padding: 10px 12px;
    }
    
    .volume-slider {
        width: 60px;
    }
}
