/* Eckmühl — la nuit des sirènes
   Étape 1 + carte interactive */

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

html, body {
    height: 100%;
    overflow: hidden;
    background: #0a0a0a;
    color: #f0eee8;
    font-family: "Times New Roman", Times, serif;
}

/* ---------- Écrans ---------- */
.screen {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.7s ease;
}

.screen.active {
    display: flex;
    opacity: 1;
    z-index: 10;
}

/* ---------- Vidéo d'ouverture ---------- */
.intro-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.08) brightness(0.82);
    z-index: 0;
}

.intro-veil {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: radial-gradient(
        ellipse at center,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.55) 55%,
        rgba(0, 0, 0, 0.82) 100%
    );
    pointer-events: none;
}

/* ---------- Titre centré ---------- */
.title-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
}

.main-title {
    font-family: "Times New Roman", Times, serif;
    font-weight: 400;
    font-size: clamp(2.8rem, 10vw, 5.8rem);
    letter-spacing: 0.32em;
    text-transform: uppercase;
    line-height: 1.05;
    color: #f5f3ee;
    text-shadow: 0 2px 28px rgba(0, 0, 0, 0.75);
}

.subtitle {
    margin-top: 0.4em;
    font-family: "Times New Roman", Times, serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1.15rem, 3.4vw, 1.85rem);
    letter-spacing: 0.14em;
    color: #e8e4dc;
    opacity: 0.92;
    text-shadow: 0 1px 14px rgba(0, 0, 0, 0.6);
}

/* ---------- Bouton Entrer ---------- */
.btn {
    font-family: "Times New Roman", Times, serif;
    background: transparent;
    border: none;
    color: #f0eee8;
    cursor: pointer;
    transition: opacity 0.25s ease, letter-spacing 0.25s ease;
}



/* ---------- Grain léger ---------- */
.grain-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    opacity: 0.06;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 180px 180px;
}

/* ========== CARTE INTERACTIVE ========== */
#map-screen {
    background: #050505;
}

.map-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    overflow: hidden;
}

.map-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    user-select: none;
    -webkit-user-drag: none;
    filter: contrast(1.05) brightness(0.92);
}

/* Points roses cliquables */
.hotspot {
    position: absolute;
    transform: translate(-50%, -50%);
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 5;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    min-width: 44px;
    min-height: 44px;
}

.hotspot-dot {
    display: block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ff4da6;
    box-shadow:
        0 0 0 3px rgba(255, 77, 166, 0.35),
        0 0 12px rgba(255, 77, 166, 0.6);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hotspot:hover .hotspot-dot,
.hotspot:focus .hotspot-dot {
    transform: scale(1.35);
    box-shadow:
        0 0 0 5px rgba(255, 77, 166, 0.45),
        0 0 18px rgba(255, 77, 166, 0.85);
}

.hotspot-label {
    font-family: "Times New Roman", Times, serif;
    font-size: clamp(0.7rem, 1.6vw, 0.95rem);
    font-style: italic;
    color: #ff7eb8;
    letter-spacing: 0.04em;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
    white-space: nowrap;
    opacity: 0.95;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.hotspot:hover .hotspot-label {
    opacity: 1;
    transform: translateY(-2px);
}

/* Labels positionnés pour éviter le chevauchement */
.hotspot[data-scene="scene-transformation"] .hotspot-label {
    transform: translateX(-8px);
}
.hotspot[data-scene="scene-digue"] .hotspot-label {
    transform: translateY(4px);
}
.hotspot[data-scene="scene-chapelle"] .hotspot-label {
    transform: translateY(-4px);
}

/* ---------- Scènes narratives ---------- */
.scene-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-color: #111;
    filter: grayscale(100%) contrast(1.05) brightness(0.75);
    z-index: 0;
}

.text-box {
    position: absolute;
    bottom: 7.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: min(520px, 88vw);
    padding: 1.35rem 1.6rem;
    background: rgba(8, 8, 8, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2;
}

.narrative {
    font-family: "Times New Roman", Times, serif;
    font-size: clamp(1rem, 2.4vw, 1.15rem);
    line-height: 1.65;
    color: #eae6de;
    text-align: center;
}

.next-btn {
    position: absolute;
    bottom: 2.8rem;
    right: 2.5rem;
    z-index: 2;
    font-size: 0.95rem;
    letter-spacing: 0.14em;
    padding: 0.65rem 1.4rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    opacity: 0.9;
}

.next-btn:hover {
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.5);
}

/* ---------- Responsive ---------- */
@media (max-width: 700px) {
    .next-btn {
        bottom: 2.2rem;
        right: 1.4rem;
        left: 1.4rem;
        text-align: center;
    }

    .text-box {
        bottom: 6.2rem;
        padding: 1.15rem 1.3rem;
    }

    .main-title {
        letter-spacing: 0.18em;
    }

    .enter-btn {
        letter-spacing: 0.18em;
    }

    .hotspot-dot {
        width: 12px;
        height: 12px;
    }

    .hotspot-label {
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    /* Sur très petit écran, masquer les labels pour éviter le surplus */
    .hotspot-label {
        display: none;
    }
}

/* ========== JOURNAL DE BORD ========== */
#journal-screen {
    background: #050505;
}

.journal-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.journal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: contrast(1.05) brightness(0.7);
}

.journal-veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        rgba(5, 5, 5, 0.88) 0%,
        rgba(5, 5, 5, 0.72) 42%,
        rgba(5, 5, 5, 0.45) 100%
    );
    pointer-events: none;
}

.journal-panel {
    position: relative;
    z-index: 2;
    width: min(420px, 90vw);
    margin-right: auto;
    margin-left: 6vw;
    padding: 2.2rem 1.6rem 1.8rem;
}

.journal-eyebrow {
    font-family: "Times New Roman", Times, serif;
    font-size: 0.72rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #9a9890;
    margin-bottom: 0.35rem;
}

.journal-title {
    font-family: "Times New Roman", Times, serif;
    font-weight: 400;
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    letter-spacing: 0.1em;
    color: #f0eee8;
    margin-bottom: 0.3rem;
}

.journal-hint {
    font-family: "Times New Roman", Times, serif;
    font-style: italic;
    font-size: 0.9rem;
    color: #8a8880;
    margin-bottom: 1.6rem;
}

.journal-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.journal-item {
    display: grid;
    grid-template-columns: 1.1rem 1.4rem 1fr auto;
    align-items: center;
    gap: 0.55rem 0.7rem;
    padding: 0.75rem 0.9rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.journal-icon {
    font-size: 0.95rem;
    line-height: 1;
    opacity: 0.75;
    text-align: center;
    color: #c8c4bc;
}

.journal-item.visited .journal-icon {
    opacity: 1;
    color: #ff7eb8;
}

.journal-item:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.22);
}

.journal-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
}

.journal-item.visited .journal-status {
    background: #ff4da6;
    border-color: #ff4da6;
    box-shadow: 0 0 8px rgba(255, 77, 166, 0.5);
}

.journal-name {
    font-family: "Times New Roman", Times, serif;
    font-size: 1rem;
    letter-spacing: 0.04em;
    color: #e8e4dc;
}

.journal-state {
    font-family: "Times New Roman", Times, serif;
    font-style: italic;
    font-size: 0.8rem;
    color: #7a7870;
}

.journal-item.visited .journal-state {
    color: #ff7eb8;
}

.journal-footer {
    margin-top: 1.5rem;
    font-family: "Times New Roman", Times, serif;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    color: #6a6860;
}

@media (max-width: 700px) {
    .journal-panel {
        margin-left: auto;
        margin-right: auto;
        width: min(400px, 92vw);
    }
}


/* ---------- Retour au site portfolio ---------- */
.site-return {
    position: fixed;
    top: 1.5rem;
    left: 1.7rem;
    z-index: 100;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 0.9rem;
    color: rgba(240, 238, 232, 0.88);
    background: rgba(8, 8, 8, 0.48);
    border: 1px solid rgba(240, 238, 232, 0.28);
    text-decoration: none;
    font-family: "Times New Roman", Times, serif;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.site-return:hover,
.site-return:focus-visible {
    color: #fff;
    background: rgba(8, 8, 8, 0.78);
    border-color: rgba(240, 238, 232, 0.65);
}

.site-return span {
    font-size: 1rem;
    line-height: 1;
}

@media (max-width: 700px) {
    .site-return {
        top: 1rem;
        left: 1rem;
        padding: 0.6rem 0.75rem;
        font-size: 0.68rem;
    }
}

/* ========================================
   POINT CINÉMATIQUE — CHAPELLE
======================================== */

.chapel-cinematic-hotspot {
    position: absolute;
    left: 56%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* ========================================
   CINÉMATIQUE — CHAPELLE DE LA JOIE
======================================== */

.cinematic-screen {
    background: #080909;
    overflow: hidden;
}

.cinematic-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.55) contrast(1.08) brightness(0.68);
    z-index: 0;
}

.cinematic-veil {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(
            to top,
            rgba(0,0,0,0.78),
            transparent 65%
        ),
        radial-gradient(
            ellipse at center,
            transparent 20%,
            rgba(0,0,0,0.35) 100%
        );
    pointer-events: none;
}

/* Sous-titres */

.cinematic-subtitle-container {
    position: absolute;
    z-index: 3;
    bottom: 13%;
    left: 50%;
    transform: translateX(-50%);
    width: min(850px, 84vw);
    text-align: center;
}

.cinematic-subtitle {
    color: #f0eee8;
    font-family: "Times New Roman", Times, serif;
    font-size: clamp(1.05rem, 2.2vw, 1.5rem);
    line-height: 1.6;
    text-shadow: 0 2px 15px rgba(0,0,0,0.9);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 1s ease, transform 1s ease;
}

.cinematic-subtitle.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Navigation */

.cinematic-back,
.cinematic-replay {
    position: absolute;
    z-index: 4;
    bottom: 2rem;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    padding: 0.7rem 1rem;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(0,0,0,0.35);
}

.cinematic-back {
    left: 2rem;
}

.cinematic-replay {
    right: 2rem;
}

@media (max-width: 700px) {

    .cinematic-subtitle-container {
        width: 90vw;
        bottom: 18%;
    }

    .cinematic-subtitle {
        font-size: 1rem;
    }

    .cinematic-back {
        left: 1rem;
        bottom: 1rem;
    }

    .cinematic-replay {
        right: 1rem;
        bottom: 1rem;
    }

}

/* ========================================
   EXTENSION DE LA CARTE — MANOIR DES GOËLANDS
======================================== */

.map-extension-line {
    position: absolute;
    left: 62%;
    top: 0;
    height: 9%;
    border-left: 1px dashed rgba(255, 126, 184, 0.65);
    z-index: 4;
    pointer-events: none;
}

.manor-hotspot {
    left: 62%;
    top: -2%;
    z-index: 6;
}

.manor-hotspot .hotspot-label {
    position: absolute;
    top: -2.2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(0.75rem, 1.5vw, 0.95rem);
    color: #ffb0d2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.manor-hotspot:hover .hotspot-label {
    transform: translateX(-50%) translateY(-2px);
}

/* ========================================
   MANOIR DES GOËLANDS — MARQUEUR SECRET
======================================== */

.manor-hotspot {
    position: absolute;
    left: 62%;
    top: 8%;

    width: 90px;
    height: 90px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 30;

    transform: translate(-50%, -50%);
}

/* Petit symbole presque invisible */

.secret-ring {
    width: 22px;
    height: 22px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255, 143, 196, 0.35);
    border-radius: 50%;

    background: rgba(30, 12, 27, 0.12);

    opacity: 0.35;
    transition: all 0.4s ease;
}

.secret-cross {
    color: rgba(255, 190, 220, 0.7);
    font-size: 13px;
    line-height: 1;
}

/* Texte caché par défaut */

.secret-label {
    position: absolute;
    top: 48px;
    left: 50%;
    transform: translate(-50%, 5px);

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;

    padding: 6px 10px;

    background: rgba(15, 12, 17, 0.9);
    border: 1px solid rgba(255, 143, 196, 0.5);

    color: #ffd4e8;
    white-space: nowrap;
    pointer-events: none;

    opacity: 0;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.secret-label strong {
    font-size: 10px;
    letter-spacing: 0.18em;
}

.secret-label small {
    font-size: 9px;
    color: #e9b6cf;
}

/* Apparition au survol */

.manor-hotspot:hover .secret-ring,
.manor-hotspot:focus-visible .secret-ring {
    opacity: 1;
    transform: scale(1.3);

    border-color: #ff8fc4;
    background: rgba(255, 143, 196, 0.2);

    box-shadow: 0 0 15px rgba(255, 100, 180, 0.5);
}

.manor-hotspot:hover .secret-cross,
.manor-hotspot:focus-visible .secret-cross {
    color: #ffd4e8;
}

.manor-hotspot:hover .secret-label,
.manor-hotspot:focus-visible .secret-label {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ========================================
   TYPOGRAPHIE DES POINTS DE LA CARTE
======================================== */

/* Typographie commune */
.hotspot-label {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translate(-50%, 5px);

    font-family: "DM Sans", sans-serif;
    font-size: 10px;
    font-weight: 400;
	font-style: normal !important;
    letter-spacing: 0.14em;
    text-transform: uppercase;

    opacity: 0;
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
}

/* Apparition au survol des points lumineux */
.hotspot:hover .hotspot-label,
.hotspot:focus-visible .hotspot-label {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* Le Manoir conserve sa typographie spécifique */
.manor-hotspot .secret-label {
    font-family: "DM Sans", sans-serif;
}

/* ========================================
   LE PASSAGE — POINT CINEMATIC
======================================== */

.passage-cinematic-hotspot {
    position: absolute;
    left: 65%;
    top: 48%;
    z-index: 20;
}

/* Apparition du texte au survol */
.passage-cinematic-hotspot .hotspot-label {
    top: 25px;
    font-family: "DM Sans", sans-serif;
    font-style: normal !important;
}

.passage-cinematic-hotspot {
    position: absolute;
    left: 65%;
    top: 48%;
    z-index: 100;
    pointer-events: auto;
    cursor: pointer;
}

.passage-cinematic-hotspot .hotspot-dot {
    pointer-events: none;
}

.passage-cinematic-hotspot .hotspot-label {
    pointer-events: none;
}

#scene-passage .scene-image {
    pointer-events: none;
}

/* ========================================
   COMMANDES CINEMATIC — CHAPELLE ET PASSAGE
======================================== */

.cinematic-back,
.cinematic-replay {
    position: absolute;
    bottom: 2rem;
    z-index: 20;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;
    padding: 0.7rem 1.2rem;

    font-family: "DM Sans", sans-serif;
    font-size: 10px;
    font-weight: 400;
    font-style: normal;
    letter-spacing: 0.14em;
    text-transform: uppercase;

    color: rgba(240, 238, 232, 0.9);
    background: rgba(8, 8, 8, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.28);

    cursor: pointer;
    opacity: 1;
    visibility: visible;

    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        color 0.3s ease;
}

.cinematic-back {
    left: 2rem;
    right: auto;
}

.cinematic-replay {
    right: 2rem;
    left: auto;
}

.cinematic-back:hover,
.cinematic-replay:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.65);
    color: #ffffff;
}

/* Les commandes restent au-dessus de la vidéo et du grain */
.cinematic-screen .cinematic-back,
.cinematic-screen .cinematic-replay {
    z-index: 20;
}

@media (max-width: 700px) {
    .cinematic-back,
    .cinematic-replay {
        bottom: 1rem;
        padding: 0.65rem 0.8rem;
        font-size: 9px;
        letter-spacing: 0.08em;
    }

    .cinematic-back {
        left: 1rem;
    }

    .cinematic-replay {
        right: 1rem;
    }
}

/* ========================================
   ACCÈS AU JOURNAL DE BORD — CARTE
======================================== */

.map-journal-trigger {
    position: fixed;
    top: 28px;
    right: 35px;
    z-index: 1000;

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 10px 13px;

    background: rgba(8, 8, 8, 0.72);
    border: 1px solid rgba(240, 238, 232, 0.25);

    color: rgba(240, 238, 232, 0.85);
    font-family: "DM Sans", sans-serif;
    text-align: left;

    cursor: pointer;
    opacity: 0.8;
    visibility: visible;

    transition: opacity 0.3s ease,
                border-color 0.3s ease,
                background 0.3s ease;
}

.map-journal-trigger:hover {
    opacity: 1;
    border-color: rgba(240, 238, 232, 0.6);
    background: rgba(8, 8, 8, 0.9);
}

.map-journal-icon {
    font-family: "Times New Roman", serif;
    font-size: 27px;
    font-weight: 300;
    line-height: 1;
    opacity: 0.85;
}

.map-journal-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.map-journal-text strong {
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.16em;
}

.map-journal-text small {
    font-size: 9px;
    font-weight: 300;
    opacity: 0.65;
}

.map-journal-key {
    margin-left: 8px;
    padding: 3px 6px;
    border: 1px solid rgba(240, 238, 232, 0.25);
    font-size: 9px;
}

@media (max-width: 700px) {
    .map-journal-trigger {
        top: 75px;
        right: 15px;
        padding: 8px 10px;
    }

    .map-journal-text small {
        display: none;
    }
}

/* ---------- Bouton Entrer ---------- */

.enter-btn {
    display: block;
    position: relative;
    z-index: 5;

    margin: 22px auto 0;
    padding: 8px 18px;

    background: transparent;
    border: none;

    font-family: "DM Sans", sans-serif;
    font-size: 17px;
    font-weight: 300;
    font-style: normal;
    letter-spacing: 0.28em;

    color: rgba(240, 238, 232, 0.8);

    opacity: 1;
    filter: blur(0);

    cursor: pointer;

    animation: enterEmergence 6s ease-in-out infinite alternate;

    transition:
        color 1s ease,
        filter 1s ease;
}

.enter-btn:hover {
    color: #ffffff;
    filter: blur(0);
}

@keyframes enterEmergence {
    from {
        opacity: 0.55;
        filter: blur(2px);
        transform: translateY(2px);
    }

    to {
        opacity: 0.95;
        filter: blur(0);
        transform: translateY(-1px);
    }
}

/* ========================================
   LIEU SECRET — PSYCHOSE
======================================== */

.game-secret-hotspot {
    position: absolute !important;
    left: 94%;
    top: 50%;

    width: 90px;
    height: 90px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: transparent;
    border: none;
    padding: 0;

    cursor: pointer;
    z-index: 50;

    transform: translate(-50%, -50%);
}

/* Apparence discrète du sigle */
.game-secret-hotspot .secret-ring {
    opacity: 0.35;
}

/* Libellé */
.game-secret-hotspot .secret-label {
    position: absolute;
    top: 48px;
    left: 50%;
    right: auto;

    transform: translate(-50%, 5px);
    opacity: 0;
}

/* Apparition au survol */
.game-secret-hotspot:hover .secret-ring,
.game-secret-hotspot:focus-visible .secret-ring {
    opacity: 1;
    transform: scale(1.3);
    border-color: #ff8fc4;
    background: rgba(255, 143, 196, 0.2);
    box-shadow: 0 0 15px rgba(255, 100, 180, 0.5);
}

.game-secret-hotspot:hover .secret-label,
.game-secret-hotspot:focus-visible .secret-label {
    opacity: 1;
    transform: translate(-50%, 0);
}


/* ========================================
   MINI-JEU — PSYCHOSE
======================================== */

.psychose-game {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 50% 45%, #29232c 0%, #111015 65%, #08080b 100%);
    color: #eee6eb;
    font-family: "DM Sans", sans-serif;
}

.psychose-game.is-open {
    display: flex;
}

.psychose-header {
    position: absolute;
    top: 35px;
    left: 5%;
    right: 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    letter-spacing: 0.2em;
    color: rgba(240, 220, 232, 0.65);
}

.psychose-title {
    letter-spacing: 0.35em;
}

.psychose-score {
    font-variant-numeric: tabular-nums;
}

.psychose-score strong {
    color: #f4c4dc;
    font-weight: 400;
}

#psychose-canvas {
    display: block;
    width: 100%;
    height: 600px;
    max-width: 1100px;
    touch-action: manipulation;
}


.psychose-instructions {
    position: absolute;
    bottom: 55px;
    font-size: 9px;
    letter-spacing: 0.18em;
    color: rgba(235, 215, 225, 0.4);
    text-align: center;
}

.psychose-exit {
    position: absolute;
    bottom: 28px;
    right: 5%;
    background: transparent;
    border: none;
    color: rgba(235, 215, 225, 0.55);
    font: inherit;
    font-size: 10px;
    letter-spacing: 0.12em;
    cursor: pointer;
}

.psychose-exit:hover {
    color: #fff;
}

.psychose-gameover {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 30px;
    background: rgba(10, 8, 13, 0.88);
    border: 1px solid rgba(240, 190, 215, 0.2);
    text-align: center;
}

.psychose-gameover.is-visible {
    display: flex;
}

.psychose-gameover p {
    font-size: 11px;
    letter-spacing: 0.25em;
    color: #e9c2d8;
}

#psychose-final-score {
    font-size: 32px;
    font-weight: 300;
}

#psychose-restart {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid rgba(240, 190, 215, 0.4);
    color: #f2dce8;
    font: inherit;
    font-size: 10px;
    letter-spacing: 0.15em;
    cursor: pointer;
}

#psychose-restart:hover {
    background: rgba(240, 190, 215, 0.12);
}

/* Descendre les rectangles des lieux secrets */
.manor-hotspot .secret-label,
.game-secret-hotspot .secret-label {
    top: 68px;
}

/* ========================================
   UNIFORMISATION — TOUS LES BOUTONS RETOUR
======================================== */

.cinematic-back,
.cinematic-replay,
.btn.next-btn,
.site-return,
button[data-next],
button[data-previous],
.back-btn,
.return-btn {

    font-family: "DM Sans", sans-serif !important;
    font-size: 10px !important;
    font-weight: 400 !important;
    font-style: normal !important;
    letter-spacing: 0.14em !important;
    text-transform: uppercase;

    color: rgba(240, 238, 232, 0.9);

    background: rgba(8, 8, 8, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.28);

    padding: 0.7rem 1.2rem;
    min-height: 42px;

    cursor: pointer;

    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        color 0.3s ease;
}

.cinematic-back:hover,
.cinematic-replay:hover,
.btn.next-btn:hover,
.site-return:hover,
button[data-next]:hover,
button[data-previous]:hover,
.back-btn:hover,
.return-btn:hover {

    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.65);
    color: #ffffff;
}

/* ========================================
   CURSEUR — POINT LUMINEUX
======================================== */

@media (hover: hover) and (pointer: fine) {

    body,
    a,
    button,
    [role="button"] {
        cursor: none !important;
    }

    #custom-cursor {
        position: fixed;
        top: 0;
        left: 0;
        width: 4px;
        height: 4px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
        pointer-events: none;
        z-index: 99999;
        transform: translate(-50%, -50%);
        transition:
            width 0.25s ease,
            height 0.25s ease,
            background 0.25s ease,
            box-shadow 0.25s ease;
    }

    #custom-cursor.is-hovering {
        width: 12px;
        height: 12px;
        background: rgba(255, 255, 255, 0.18);
        border: 1px solid rgba(255, 255, 255, 0.95);
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.65);
    }
}

/* Masquer Retour au site lorsque le journal est ouvert */
body:has(#journal-screen.active) .site-return {
    display: none;
}

/* PRÉLUDE — phrases finales */

#prelude-subtitle.is-emphasis {
    font-weight: 700;
}

/* Bouton passer — prélude */

.cinematic-skip {
    position: absolute;
    z-index: 10;
    right: 3rem;
    bottom: 2.5rem;
    padding: 0.6rem 0;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    font-family: inherit;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: lowercase;
    cursor: pointer;
    transition: color 0.3s ease;
}

.cinematic-skip:hover {
    color: #fff;
}

@media (max-width: 768px) {
    .cinematic-skip {
        right: 1.5rem;
        bottom: 1.5rem;
    }
}

.hotspot-label {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.hotspot-label .chapter-number {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    margin-bottom: 0.15rem;
    opacity: 1;
}

.hotspot-label .chapter-title {
    font-size: inherit;
    line-height: 1.1;
}

.hotspot-label {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    margin-top: 4px;
}

.hotspot.is-locked {
    display: none;
}

/* Progression des chapitres */
.hotspot.is-locked {
    display: none;
}

.abyss-hotspot {
    left: 12%;
    top: 12%;
}

/* ========================================
   LIEU SECRET — ABYSSES
======================================== */

.abyss-hotspot {
    position: absolute !important;
    left: 12%;
    top: 12%;

    width: 90px;
    height: 90px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: transparent;
    border: none;
    padding: 0;

    cursor: pointer;
    z-index: 50;

    transform: translate(-50%, -50%);
}

/* Cercle discret */
.abyss-hotspot .secret-ring {
    opacity: 0.35;
}

/* Libellé caché */
.abyss-hotspot .secret-label {
    position: absolute;
    top: 68px;
    left: 50%;
    right: auto;

    transform: translate(-50%, 5px);
    opacity: 0;

    font-family: "DM Sans", sans-serif;
}

/* Apparition au survol */
.abyss-hotspot:hover .secret-ring,
.abyss-hotspot:focus-visible .secret-ring {
    opacity: 1;
    transform: scale(1.3);

    border-color: #ff8fc4;
    background: rgba(255, 143, 196, 0.2);

    box-shadow: 0 0 15px rgba(255, 100, 180, 0.5);
}

.abyss-hotspot:hover .secret-label,
.abyss-hotspot:focus-visible .secret-label {
    opacity: 1;
    transform: translate(-50%, 0);
}
/* PRÉLUDE — TITRE CENTRÉ */

#prelude-screen .prelude-title-container {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

#prelude-screen .prelude-title {
    margin: 0;
    color: #f0eee8;
    font-family: "Times New Roman", Times, serif;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 400;
    letter-spacing: 0.16em;
    text-align: center;
    opacity: 0;
    transition: opacity 1s ease;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.9);
}

#prelude-screen .prelude-title-container.visible .prelude-title {
    opacity: 1;
}

.cinematic-skip {
    font-family: Arial, Helvetica, sans-serif;
}

.cinematic-subtitle {
    white-space: pre-line;
}

/* ========================================
   CINÉMATIQUE FINALE
======================================== */

#final-cinematic-screen {
    position: fixed;
    inset: 0;
    z-index: 100;
    overflow: hidden;
    background: #000;
    opacity: 1;
    transition: opacity 1.8s ease;
}

#final-cinematic-screen.final-fade-out {
    opacity: 0;
    pointer-events: none;
}

.final-layer {
    position: absolute;
    inset: 0;
    display: none;
    overflow: hidden;
    background: #000;
}

.final-layer.is-visible {
    display: block;
}

.final-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 01 — Grattage 16 mm */

#final-film {
    background: #000;
}

/* 02 — Océan en tempête */

#final-ocean {
    background: #000;
}

.final-ocean-veil {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.22);
    pointer-events: none;
}

.final-subtitle {
    position: absolute;
    z-index: 2;
    left: 8%;
    right: 8%;
    bottom: 13%;
    text-align: center;
    color: #f0eee8;
    font-family: "Times New Roman", Times, serif;
    font-size: clamp(1.05rem, 1.8vw, 1.5rem);
    line-height: 1.7;
    letter-spacing: 0.025em;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 1.5s ease, transform 1.5s ease;
}

.final-subtitle.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 03 — Autoportrait */

#final-portrait {
    background: #000;
}

#final-portrait.is-visible {
    display: flex;
    align-items: center;
    justify-content: center;
}

.final-portrait-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    animation: portrait-flash 1.5s ease forwards;
}

@keyframes portrait-flash {
    0% { opacity: 0; }
    20% { opacity: 1; }
    75% { opacity: 1; }
    100% { opacity: 0; }
}

/* 04 — Cliquetis du Monde */

#final-cliquetis {
    background: #000;
}

/* 05 — Générique */

#final-credits {
    background: #000;
}

.credits-content {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    padding: 0 8vw;
    box-sizing: border-box;
    text-align: center;
    color: #f0eee8;
    font-family: "Times New Roman", Times, serif;
    animation: credits-scroll 65s linear forwards;
}

.credits-content h2 {
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    font-weight: normal;
    letter-spacing: 0.18em;
    margin-bottom: 5rem;
}

.credits-intro {
    font-size: 0.9rem;
    letter-spacing: 0.12em;
    color: #aaa;
}

.credits-content h3 {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: normal;
    letter-spacing: 0.08em;
    margin-bottom: 6rem;
}

.credits-section {
    margin-bottom: 6rem;
}

.credits-section p {
    font-size: clamp(0.85rem, 1.3vw, 1rem);
    line-height: 2;
    letter-spacing: 0.08em;
}

.credits-section h4 {
    font-size: 0.8rem;
    font-weight: normal;
    letter-spacing: 0.18em;
    color: #999;
    margin-bottom: 2rem;
}

.credits-section em {
    font-style: italic;
}

.credits-end {
    margin-top: 8rem;
    margin-bottom: 100vh;
    font-size: 0.8rem;
    line-height: 2.2;
    letter-spacing: 0.1em;
    color: #aaa;
}

@keyframes credits-scroll {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(calc(-100% - 100vh));
    }
}

/* 06 — Retour au journal */

#journal-screen.journal-fade-in {
    animation: journal-appearance 1.8s ease forwards;
}

@keyframes journal-appearance {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Adaptation mobile */

@media (max-width: 700px) {
    .final-subtitle {
        left: 6%;
        right: 6%;
        bottom: 16%;
        font-size: 1rem;
    }

    .credits-content {
        padding: 0 6vw;
    }

    .credits-section {
        margin-bottom: 4rem;
    }

    .credits-content h2 {
        letter-spacing: 0.1em;
    }
}