/* ======================================================
   1. POLICE D'ÉCRITURE
====================================================== */
@font-face {
    font-family: 'Mythology';
    src: url('../fonts/Mythology.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* ======================================================
   2. VARIABLES & RESET
====================================================== */
:root {
    --sm-accent: #ffd000;
    --sm-white: #ffffff;
    --sm-black: #000000;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    background-color: var(--sm-black);
    color: var(--sm-white);
    font-family: 'Inter', -apple-system, sans-serif;
}

/* ======================================================
   3. TITRE FIXE EN FOND
====================================================== */
.hero-title-section {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    pointer-events: none;
}

.scroll-float-text {
    font-family: 'Mythology', serif;
    font-size: clamp(3rem, 12vw, 120px);
    font-weight: 900;
    color: var(--sm-white);
    text-transform: uppercase;
    letter-spacing: 10px;
    margin: 0;
    text-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

/* ======================================================
   4. SPACERS
====================================================== */
.scroll-spacer-title { height: 100vh; }
.scroll-spacer-video { height: 100vh; }

/* ======================================================
   5. VIDEO FIXE
====================================================== */
.hero-video-section {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    overflow: hidden;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
}

.hero-video-section video {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    filter: brightness(0.6);
}

/* ======================================================
   6. SPLINE SECTION
====================================================== */
.spline-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    padding: 80px 0;
    background-color: var(--sm-black);
    z-index: 300;
    opacity: 0;
}

.spline-background {
    position: relative;
    width: 90%;
    max-width: 1080px;
    height: 607px;
    border-radius: 40px;
    overflow: hidden;
}

.spline-background iframe {
    width: 100%;
    height: calc(100% + 60px);
    border: none;
    display: block;
    margin-bottom: -60px;
}

.spline-watermark-mask {
    position: absolute;
    bottom: 0; right: 0;
    width: 220px; height: 60px;
    background-color: var(--sm-black);
    border-radius: 0 0 40px 0;
    z-index: 20;
    pointer-events: none;
}

/* ======================================================
   6b. HERO SUBTITLE
====================================================== */
.hero-subtitle {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: clamp(0.85rem, 2vw, 1.1rem);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-align: center;
    opacity: 0;
}

/* ======================================================
   7. CONTENU PRINCIPAL
====================================================== */
.main-content {
    position: relative;
    z-index: 400;
    background-color: var(--sm-black);
    min-height: 100vh;
    padding: 100px 32px;
    box-shadow: 0 -50px 100px rgba(0, 0, 0, 0.9);
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

/* ======================================================
   8. HEADER FIXE
====================================================== */
.staggered-menu-header {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    z-index: 500;
    color: var(--sm-white);
    background: transparent;
}

.sm-logo {
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -1px;
    text-transform: uppercase;
}

/* ======================================================
   9. BOUTON MENU
====================================================== */
.sm-toggle {
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--sm-white);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
    position: relative;
    z-index: 600;
    padding: 0;
}

.sm-toggle-label {
    color: inherit;
    transition: color 0.3s ease;
}

.sm-icon-svg {
    width: 40px; height: 40px;
    overflow: visible;
    color: var(--sm-white);
    transition: color 0.3s ease;
}

body.menu-open .staggered-menu-panel { pointer-events: all; }

body.menu-open .sm-icon-svg { color: var(--sm-black); }
body.menu-open .sm-toggle-label { color: var(--sm-black); }

/* ======================================================
   10. PRÉ-COUCHES DU MENU
====================================================== */
.sm-prelayers {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: clamp(280px, 40vw, 480px);
    z-index: 440;
    pointer-events: none;
}

.sm-prelayer { position: absolute; inset: 0; }

/* ======================================================
   11. PANNEAU MENU
====================================================== */
.staggered-menu-panel {
    pointer-events: none;
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: clamp(280px, 40vw, 480px);
    background: var(--sm-white);
    z-index: 450;
    padding: 112px 40px 48px 40px;
    display: flex;
    flex-direction: column;
    color: var(--sm-black);
    box-sizing: border-box;
    overflow-y: auto;
}

.sm-panel-list {
    list-style: none;
    padding: 0; margin: 0;
    counter-reset: smItem;
}

.sm-panel-itemWrap {
    overflow: hidden;
    margin-bottom: 12px;
    line-height: 1;
}

.sm-panel-item {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 800;
    text-decoration: none;
    color: var(--sm-black);
    display: inline-block;
    letter-spacing: -2px;
    text-transform: uppercase;
    transition: color 0.3s ease;
    position: relative;
    padding-right: 48px;
}

.sm-panel-item:hover { color: var(--sm-accent); }

.sm-panel-item::after {
    counter-increment: smItem;
    content: counter(smItem, decimal-leading-zero);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: var(--sm-accent);
    position: absolute;
    top: 5px; right: 0;
    font-weight: 400;
    letter-spacing: 0;
}

/* ======================================================
   12. CURSEUR CUSTOM (desktop uniquement)
====================================================== */
@media (hover: hover) and (pointer: fine) {
    *, *::before, *::after { cursor: none !important; }

    .cursor {
        position: fixed;
        top: 0; left: 0;
        pointer-events: none;
        z-index: 9999;
        transform: translate(-50%, -50%);
        will-change: transform;
        width: 14px; height: 14px;
        border-radius: 50%;
        background: #c0c0c0;
        transition:
            width  0.35s cubic-bezier(0.23, 1, 0.32, 1),
            height 0.35s cubic-bezier(0.23, 1, 0.32, 1),
            background 0.35s cubic-bezier(0.23, 1, 0.32, 1),
            border 0.35s cubic-bezier(0.23, 1, 0.32, 1),
            opacity 0.2s ease;
    }

    body.cursor-hover .cursor {
        width: 48px; height: 48px;
        background: hsla(0, 0%, 35%, 0.118);
        border: 1px solid #ebebeb4b;
    }

    body.cursor-click .cursor {
        width: 10px; height: 10px;
        background: #ffe600;
    }

    body.cursor-hover.cursor-click .cursor {
        width: 38px; height: 38px;
    }
}

/* ======================================================
   13. OVERLAY IFRAME
====================================================== */
.iframe-cursor-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: auto;
    background: transparent;
}

/* ======================================================
   14. PAGE TRANSITION
====================================================== */
#page-transition {
    position: fixed;
    inset: 0;
    z-index: 10000;
    pointer-events: none;
}

#pt-svg {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
}

#pt-path { fill: #ffc400; }

/* ======================================================
   15. SCROLL INDICATOR
====================================================== */
#scroll-indicator {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px; height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 25px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 1000;
    pointer-events: none;
}

#scroll-thumb {
    width: 6px; height: 10px;
    margin-top: 4px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 3px;
    animation: scroll-thumb-move 3s infinite;
}

@keyframes scroll-thumb-move {
    0%   { transform: translateY(0);    opacity: 1; }
    50%  { transform: translateY(20px); opacity: 0.4; }
    100% { transform: translateY(0);    opacity: 1; }
}

/* ======================================================
   16. HEADER LEFT
====================================================== */
.header-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* ======================================================
   17. SEARCH BAR
====================================================== */
#search-form {
    position: relative;
    display: flex;
    align-items: center;
}

#search-input {
    width: 0; height: 40px;
    padding: 0 10px;
    border: 2px solid #fff;
    border-radius: 20px;
    background: transparent;
    color: #fff;
    font-size: 15px;
    outline: none;
    opacity: 0;
    transition: width 0.35s ease, opacity 0.25s ease;
    pointer-events: none;
}

#search-input.expanded {
    width: 200px;
    opacity: 1;
    pointer-events: auto;
}

#search-btn {
    width: 40px; height: 40px;
    border: none;
    background: transparent;
    position: relative;
}

#search-btn::before {
    content: "";
    position: absolute;
    width: 16px; height: 16px;
    border: 2px solid #fff;
    border-radius: 50%;
    top: 50%; left: 50%;
    transform: translate(-65%, -65%);
}

#search-btn::after {
    content: "";
    position: absolute;
    width: 10px; height: 2px;
    background: #fff;
    top: 50%; left: 50%;
    transform: translate(30%, 120%) rotate(45deg);
    transform-origin: left center;
    border-radius: 2px;
}

/* ======================================================
   18. SEARCH PAGE
====================================================== */
.search-page-container {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
}

.search-page-form { position: relative; width: 100%; }

.search-page-input {
    width: 100%;
    padding: 15px 60px 15px 24px;
    font-size: 20px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50px;
    background: transparent;
    color: #fff;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.search-page-input::placeholder { color: rgba(255,255,255,0.4); }
.search-page-input:focus { border-color: var(--sm-white); }

.search-page-btn {
    position: absolute;
    right: 10px; top: 50%;
    transform: translateY(-50%);
    width: 44px; height: 44px;
    border: none;
    background: none;
}

.search-page-btn::before {
    content: "";
    position: absolute;
    width: 20px; height: 20px;
    border: 2px solid #fff;
    border-radius: 50%;
    top: 50%; left: 50%;
    transform: translate(-65%, -65%);
}

.search-page-btn::after {
    content: "";
    position: absolute;
    width: 12px; height: 2px;
    background: #fff;
    top: 50%; left: 50%;
    transform: translate(35%, 130%) rotate(45deg);
    transform-origin: left center;
    border-radius: 2px;
}

/* ======================================================
   19. SEARCH LOADER
====================================================== */
#search-loader {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#search-reload-icon {
    width: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ======================================================
   20. PAGE REPONSE_RECHERCHE
====================================================== */
#reponse-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    padding: 150px 32px 80px;
    color: #fff;
    text-align: center;
}

#reponse-page h1 {
    font-size: 2.8rem;
    margin-bottom: 16px;
    font-family: 'Mythology', serif;
    letter-spacing: 4px;
    text-transform: uppercase;
}

#reponse-page p {
    font-size: 1.1rem;
    margin-bottom: 40px;
    color: rgba(255,255,255,0.7);
}

.table-wrapper {
    width: 100%;
    max-width: 800px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 48px;
    border-radius: 12px;
}

#reponse-page table {
    border-collapse: collapse;
    width: 100%;
    min-width: 400px;
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font-size: 1rem;
}

#reponse-page th,
#reponse-page td {
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 16px 20px;
    text-align: left;
}

#reponse-page th {
    background: rgba(255, 255, 255, 0.08);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.6);
}

#reponse-page td { color: var(--sm-white); }

#reponse-page .new-search-btn {
    position: relative;
    display: inline-block;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    border: 1.5px solid rgba(255,255,255,0.5);
    border-radius: 50px;
    overflow: hidden;
    transition: border-color 0.3s ease;
    letter-spacing: 0.5px;
}

#reponse-page .new-search-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: #fff;
    z-index: 0;
    transition: left 0.3s ease;
}

#reponse-page .new-search-btn:hover::before { left: 0; }
#reponse-page .new-search-btn:hover { border-color: #fff; }

#reponse-page .new-search-btn span {
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

#reponse-page .new-search-btn:hover span { color: #000; }

/* ======================================================
   21. ESPACE 3D — listing.php
====================================================== */

#space-main {
    position: fixed;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    background: #00000e;
}

#space-canvas {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    display: block;
}

#space-ui {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
}

/* ── Flèches mythologie ── */
.space-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px; height: 48px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.22);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    pointer-events: all;
    transition: color 0.25s ease;
}
.space-arrow:hover { color: rgba(255,255,255,0.75); }
.space-arrow svg   { width: 22px; height: 22px; }
.space-arrow--left  { left: 18px; }
.space-arrow--right { right: 18px; }

/* ── Label constellation ── */
#space-label {
    position: absolute;
    bottom: 52px;
    left: 52px;
    pointer-events: none;
    transition: opacity 0.7s ease;
}
#space-label-myth {
    display: block;
    font-size: 9px;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    margin-bottom: 6px;
}
#space-label-name {
    font-family: 'Mythology', serif;
    font-size: clamp(1.4rem, 3vw, 2.4rem);
    font-weight: 900;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: #fff;
    margin: 0;
    line-height: 1;
    opacity: .82;
}

/* ── Scroll hint ── */
#space-scroll-hint {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    transition: opacity 0.5s ease;
}
#space-scroll-hint span {
    font-size: 8px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.22);
}
.scroll-hint-line {
    width: 1px;
    height: 32px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.25));
    animation: scrollPulse 2.2s ease-in-out infinite;
}
@keyframes scrollPulse {
    0%, 100% { opacity: .3; transform: scaleY(1); }
    50%       { opacity: .9; transform: scaleY(1.2); }
}

/* ── Dots navigation ── */
#space-dots {
    position: absolute;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: all;
}
.space-dot {
    width: 4px; height: 4px;
    border-radius: 50%;
    background: rgba(255,255,255,0.22);
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}
.space-dot.active {
    background: #fff;
    transform: scale(1.6);
}

/* ======================================================
   BOUTON SYSTÈME SOLAIRE — #filter-container
   Bas droite. 5 états SVG animés (GSAP).
   Tout blanc, zéro doré.
====================================================== */
#filter-container {
    position: absolute;
    bottom: 36px;
    right: 40px;
    pointer-events: all;
    z-index: 20;
}

/* Wrapper avec label au-dessus */
.orb-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* Label mythologie active */
.orb-label {
    font-size: 8px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    white-space: nowrap;
    pointer-events: none;
    transition: color 0.4s ease;
    user-select: none;
}

/* Bouton rond */
.orb-btn {
    width: 64px;
    height: 64px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
    transition: background 0.35s ease, border-color 0.35s ease,
                box-shadow 0.35s ease;
    /* GSAP gère la rotation */
}

.orb-btn:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.22);
    box-shadow: 0 0 28px rgba(255,255,255,0.08);
}

.orb-btn:active {
    background: rgba(255,255,255,0.12);
}

/* SVG interne */
.orb-svg {
    width: 44px;
    height: 44px;
    overflow: visible;
}

/* ── Mobile ── */
@media (max-width: 576px) {
    #filter-container { bottom: 20px; right: 16px; }
    .orb-btn  { width: 52px; height: 52px; }
    .orb-svg  { width: 34px; height: 34px; }
    .orb-label{ font-size: 7px; letter-spacing: 2px; }
}

/* ── Tooltip ── */
#sky-tooltip {
    position: fixed;
    pointer-events: none;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.18s ease;
}
#sky-tooltip.visible { opacity: 1; }

.tooltip-inner {
    background: rgba(0,0,5,0.94);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 14px 18px;
    min-width: 180px;
    max-width: 260px;
    backdrop-filter: blur(8px);
}
.tooltip-myth {
    font-size: 8px; letter-spacing: 3px; text-transform: uppercase;
    color: rgba(255,255,255,0.38); margin: 0 0 5px 0;
}
.tooltip-name {
    font-family: 'Mythology', serif;
    font-size: 1.25rem; letter-spacing: 2px; text-transform: uppercase;
    color: #fff; margin: 0 0 4px 0; line-height: 1;
}
.tooltip-role {
    font-size: 9px; letter-spacing: 1px;
    color: rgba(255,255,255,0.4); margin: 0; text-transform: uppercase;
}

/* ── Modale personnage ── */
#sky-overlay {
    position: fixed; inset: 0;
    z-index: 20000;
    background: rgba(0,0,0,0);
    display: flex; align-items: center; justify-content: center;
    padding: 20px; box-sizing: border-box;
    pointer-events: none;
    transition: background 0.35s ease;
}
#sky-overlay.open {
    background: rgba(0,0,14,0.82);
    pointer-events: all;
}
#sky-modal {
    position: relative;
    width: 100%; max-width: 680px;
    background: rgba(6,6,18,0.98);
    border: 1px solid rgba(255,255,255,0.07);
    display: flex; flex-direction: row;
    overflow: hidden;
    backdrop-filter: blur(20px);
    opacity: 0;
    transform: translateY(24px) scale(0.97);
    transition: opacity 0.4s cubic-bezier(0.23,1,0.32,1),
                transform 0.4s cubic-bezier(0.23,1,0.32,1);
}
#sky-overlay.open #sky-modal {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.modal-img {
    width: 220px; flex-shrink: 0;
    position: relative; overflow: hidden;
    background: rgba(255,255,255,0.03);
}
.modal-img img {
    width: 100%; height: 100%;
    object-fit: cover; display: block; filter: brightness(0.85);
}
.modal-img-placeholder {
    width: 100%; height: 100%; min-height: 280px;
    display: flex; align-items: center; justify-content: center;
}
.modal-img-placeholder span {
    font-family: 'Mythology', serif;
    font-size: 5rem; opacity: .12; color: #fff;
    text-transform: uppercase; user-select: none;
}
.modal-img::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to right, transparent 60%, rgba(6,6,18,0.98));
}
.modal-body {
    flex: 1; padding: 40px 36px 36px;
    display: flex; flex-direction: column; gap: 14px;
    overflow-y: auto; max-height: 70vh;
}
.modal-myth-tag { font-size: 9px; letter-spacing: 4px; text-transform: uppercase; margin: 0; }
.modal-name {
    font-family: 'Mythology', serif;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    letter-spacing: 3px; text-transform: uppercase;
    color: #fff; margin: 0; line-height: 0.95;
}
.modal-role   { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,0.3); margin: 0; }
.modal-divider{ height: 1px; background: rgba(255,255,255,0.07); flex-shrink: 0; }
.modal-desc   { font-size: 13px; line-height: 1.9; color: rgba(255,255,255,0.55); margin: 0; flex: 1; }
.modal-const  { padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.05); }
.modal-const-label { font-size: 9px; letter-spacing: 3px; text-transform: uppercase; color: rgba(255,255,255,0.18); margin: 0 0 4px 0; }
.modal-const-name  { font-family: 'Mythology', serif; font-size: 0.95rem; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,0.32); margin: 0; }
.modal-close {
    position: absolute; top: 16px; right: 16px;
    width: 32px; height: 32px;
    background: rgba(255,255,255,0.06); border: none; border-radius: 50%;
    color: rgba(255,255,255,0.5); font-size: 14px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 10;
    transition: background 0.2s, color 0.2s;
}
.modal-close:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* ── Mobile ── */
@media (max-width: 576px) {
    .filter-btn { width: 44px; height: 44px; }
    .filter-svg { width: 28px; height: 28px; }
    .filter-label { display: none; }
    .space-arrow { width: 40px; height: 40px; }
    .space-arrow--left  { left: 6px; }
    .space-arrow--right { right: 6px; }
    #space-label { left: 20px; bottom: 60px; }
    #space-label-name { font-size: clamp(1.2rem, 6vw, 1.8rem); }
    #space-dots { right: 14px; }
    #sky-modal { flex-direction: column; max-width: 100%; }
    .modal-img { width: 100%; height: 160px; }
    .modal-img-placeholder { min-height: 160px; }
    .modal-img::after { background: linear-gradient(to bottom, transparent 60%, rgba(6,6,18,0.98)); }
    .modal-body { padding: 24px 20px; max-height: 52vh; }
}

/* ======================================================
   22. INTRO MYTHOLOGIES — CLEAN / NO GOLD
====================================================== */

.myth-intro {
    width: 100%;
    padding: 180px 5% 160px;
    position: relative;
    z-index: 400;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--sm-black);
    box-sizing: border-box;
    overflow: hidden;
}

.myth-intro-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 100px;
    max-width: 1400px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.myth-text {
    flex: 1;
    color: var(--sm-white);
}

.myth-decrypt-block {
    display: block;
    font-family: 'Mythology', serif;
    font-size: clamp(1.6rem, 2.8vw, 2.8rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 6px;
    line-height: 1.25;
    color: var(--sm-white);
    opacity: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.myth-decrypt-block .char-scramble {
    color: rgba(255, 255, 255, 0.22);
    display: inline-block;
}

.myth-decrypt-block .char-resolved {
    color: var(--sm-white);
    display: inline-block;
}

.myth-line {
    position: relative;
    height: 1px;
    margin-top: 44px;
    width: 0;
    background: rgba(255, 255, 255, 0.18);
}

.myth-video {
    flex: 1.1;
    position: relative;
}

.myth-video-frame {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
}

.myth-video-frame video {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 20px;
    display: block;
    filter: brightness(0.9) contrast(1.04);
    transition: filter 0.8s ease, transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform;
}

.myth-video-frame:hover video {
    filter: brightness(1) contrast(1.02);
    transform: scale(1.02);
}

/* ======================================================
   RESPONSIVE — 900px tablette
====================================================== */
@media (max-width: 900px) and (min-width: 577px) {
    .myth-intro-container { flex-direction: column; gap: 60px; }
    .myth-text { text-align: center; }
    .myth-line { margin-left: auto; margin-right: auto; }
    .myth-decrypt-block { font-size: clamp(1.3rem, 5vw, 2rem); letter-spacing: 4px; }
}

/* ======================================================
   RESPONSIVE — 576px mobile
====================================================== */
@media (max-width: 576px) {

    /* Header */
    .staggered-menu-header { padding: 16px 20px; }
    .header-left { flex-shrink: 0; order: -1; }
    #search-input, #search-input.expanded { display: none; }
    .sm-logo { font-size: 16px; }
    .sm-toggle-label { display: none; }
    .sm-icon-svg { width: 34px; height: 34px; }
    .sm-prelayers { width: 100%; height: 100vh; top: 0; right: 0; }
    .staggered-menu-panel {
    pointer-events: none; width: 100%; height: 100vh; top: auto; bottom: 0; right: 0; padding: 80px 28px 48px 28px; }
    .sm-panel-item { font-size: clamp(28px, 10vw, 40px); letter-spacing: -1px; padding-right: 36px; }

    /* Hero */
    .scroll-float-text { font-size: clamp(1rem, 11.5vw, 2.5rem); letter-spacing: 3px; text-align: center; padding: 0 12px; white-space: nowrap; }
    .scroll-spacer-title { height: 60vh; }
    .scroll-spacer-video { height: 60vh; }
    .hero-video-section { display: none; }

    /* Spline */
    .spline-section { padding: 40px 16px; gap: 20px; box-sizing: border-box; }
    .spline-background { width: 100%; max-width: 100%; height: 260px; border-radius: 20px; }
    .spline-watermark-mask { width: 160px; height: 50px; border-radius: 0 0 20px 0; }
    .hero-subtitle { font-size: 0.75rem; letter-spacing: 2px; }
    .main-content { padding: 60px 16px; }

    /* Scroll indicator */
    #scroll-indicator { width: 24px; height: 40px; bottom: 14px; }
    #scroll-thumb { width: 5px; height: 8px; }

    /* Search */
    .search-page-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 0 20px; box-sizing: border-box; transform: none; }
    .search-page-input { font-size: 16px; padding: 14px 52px 14px 20px; }
    .search-page-btn { width: 38px; height: 38px; }

    /* Réponse recherche */
    #reponse-page { padding: 100px 16px 60px; }
    #reponse-page h1 { font-size: 1.6rem; letter-spacing: 2px; }
    #reponse-page p  { font-size: 0.95rem; margin-bottom: 24px; }
    .table-wrapper { margin-bottom: 32px; border-radius: 8px; }
    #reponse-page table { font-size: 0.85rem; }
    #reponse-page th, #reponse-page td { padding: 12px 14px; }
    #reponse-page .new-search-btn { font-size: 0.9rem; padding: 12px 24px; }

    /* Curseur */
    .cursor { display: none; }

    /* ── Espace 3D — listing.php ── */

    /* Flèches : plus petites, collées aux bords */
    .space-arrow { width: 36px; height: 36px; }
    .space-arrow svg { width: 18px; height: 18px; }
    .space-arrow--left  { left: 4px; }
    .space-arrow--right { right: 4px; }

    /* Label constellation : bas gauche, taille réduite */
    #space-label { left: 16px; bottom: 80px; }
    #space-label-myth { font-size: 8px; letter-spacing: 3px; margin-bottom: 4px; }
    #space-label-name { font-size: clamp(1rem, 5.5vw, 1.5rem); letter-spacing: 3px; }

    /* Scroll hint : masqué sur mobile */
    #space-scroll-hint { display: none; }

    /* Dots : plus proches du bord, légèrement plus grands */
    #space-dots { right: 10px; gap: 8px; }
    .space-dot { width: 5px; height: 5px; }

    /* Orbe : plus petit, mieux positionné */
    #filter-container { bottom: 16px; right: 12px; }
    .orb-btn  { width: 48px; height: 48px; }
    .orb-label{ font-size: 7px; letter-spacing: 2px; }

    /* Tooltip : masqué sur mobile (remplacé par la modale au tap) */
    #sky-tooltip { display: none; }

    /* Modale personnage : plein écran sur mobile */
    #sky-overlay { padding: 0; align-items: flex-end; }
    #sky-modal {
        flex-direction: column;
        max-width: 100%;
        width: 100%;
        border-radius: 20px 20px 0 0;
        max-height: 80vh;
        transform: translateY(100%) scale(1) !important;
    }
    #sky-overlay.open #sky-modal {
        transform: translateY(0) scale(1) !important;
    }
    .modal-img { width: 100%; height: 140px; flex-shrink: 0; }
    .modal-img-placeholder { min-height: 140px; }
    .modal-img::after {
        background: linear-gradient(to bottom, transparent 50%, rgba(6,6,18,0.98));
    }
    .modal-body {
        padding: 20px 20px 32px;
        max-height: calc(80vh - 140px);
        gap: 10px;
    }
    .modal-name { font-size: clamp(1.5rem, 6vw, 2rem); }
    .modal-desc { font-size: 12px; line-height: 1.75; }
    .modal-close { top: 12px; right: 12px; width: 28px; height: 28px; font-size: 12px; }

    /* Intro mythologies */
    .myth-intro { padding: 100px 5% 80px; }
    .myth-decrypt-block { font-size: clamp(1.1rem, 6vw, 1.5rem); letter-spacing: 3px; }
}