.project-selector__map-legend small {
    color: rgba(255, 245, 232, 0.68);
    font-size: 0.66rem;
    line-height: 1.3;
}

@keyframes atlasPulse {
    0%,
    100% {
        transform: rotate(0deg) scale(1);
        opacity: 0.8;
    }

    50% {
        transform: rotate(180deg) scale(1.04);
        opacity: 1;
    }
}

@media (max-width: 1180px) {
    .project-selector__scene--atlas {
        min-height: 980px;
    }

    .project-selector__map-board {
        min-height: 880px;
    }

    .project-selector__map-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-selector__map-route--campus,
    .project-selector__map-route--platform {
        width: 232px;
    }

    .project-selector__map-route--brand {
        width: 214px;
    }
}

@media (max-width: 920px) {
    .project-selector__scene--atlas {
        min-height: auto;
        padding: 1rem;
    }

    .project-selector__map-shell {
        gap: 0.9rem;
    }

    .project-selector__map-copy {
        width: 100%;
    }

    .project-selector__map-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-selector__map-board {
        min-height: auto;
        padding: 1rem;
        display: grid;
        gap: 0.9rem;
        border-radius: 30px;
    }

    .project-selector__map-board::before,
    .project-selector__map-board::after,
    .project-selector__map-glow,
    .project-selector__map-route,
    .project-selector__map-center-tag,
    .project-selector__map-compass {
        display: none;
    }

    .project-selector__map-region {
        position: static;
        width: 100%;
        height: auto;
        padding: 0.7rem;
        border-radius: 24px;
    }

    .project-selector__map-board {
        grid-template-columns: 1fr;
    }

    .project-selector__map-legend {
        position: static;
        grid-template-columns: 1fr;
    }

    .project-node {
        position: relative;
        left: auto;
        top: auto;
        width: 100%;
        padding: 0.9rem;
        border-radius: 24px;
        background:
            linear-gradient(180deg, rgba(255, 240, 219, 0.1), rgba(255, 240, 219, 0)),
            rgba(14, 18, 15, 0.84);
        border: 1px solid rgba(255, 236, 214, 0.12);
        box-shadow: 0 20px 34px rgba(0, 0, 0, 0.18);
        transform: none;
        grid-template-columns: 62px 1fr;
        grid-template-areas:
            "thumb info";
        column-gap: 0.9rem;
        justify-items: start;
        align-items: center;
    }

    .project-node::before {
        display: none;
    }

    .project-node::after {
        top: 10px;
        right: 10px;
    }

    .project-node__pulse,
    .project-node__dot {
        display: none;
    }

    .project-node__thumb {
        grid-area: thumb;
        position: relative;
        width: 62px;
        height: 62px;
        border-radius: 20px;
    }

    .project-node__card,
    .project-node--campus .project-node__card,
    .project-node--kedge .project-node__card,
    .project-node--metamorph .project-node__card,
    .project-node--roblox .project-node__card,
    .project-node--fortnite .project-node__card,
    .project-node--community .project-node__card,
    .project-node--minecraft .project-node__card {
        grid-area: info;
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        min-width: 0;
        padding: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
        opacity: 1;
        pointer-events: auto;
        transform: none;
    }

    .project-node--minecraft {
        width: 100%;
    }

    .project-node--minecraft .project-node__thumb {
        width: 70px;
        height: 70px;
        border-radius: 22px;
    }
}

@media (max-width: 680px) {
    .project-selector__scene--atlas {
        padding: 0.85rem;
    }

    .project-selector__map-copy {
        padding: 0.9rem;
        border-radius: 22px;
    }

    .project-selector__map-toolbar {
        grid-template-columns: 1fr;
    }

    .project-selector__map-board {
        padding: 0.85rem;
        border-radius: 24px;
    }

    .project-node {
        padding: 0.8rem;
        grid-template-columns: 58px 1fr;
    }

    .project-node__thumb {
        width: 58px;
        height: 58px;
        border-radius: 18px;
    }

    .project-node--minecraft .project-node__thumb {
        width: 66px;
        height: 66px;
        border-radius: 20px;
    }

    .project-node__card strong {
        font-size: 0.96rem;
    }

    .project-node__card small {
        font-size: 0.7rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .project-selector__scene--warp .project-selector__portal-ring,
    .project-selector__scene--warp .project-selector__core-ring,
    .project-selector__scene--warp .project-selector__core-crystal,
    .project-selector__scene--warp .iso-card,
    .project-node__pulse {
        animation: none !important;
    }
}

@media (max-width: 900px) {
    .eva-glyphs {
        display: none;
    }

    .arcade-launcher {
        left: 0.7rem;
        bottom: 0.7rem;
        width: min(290px, calc(100vw - 1.4rem));
    }

    .mascot-guide {
        max-width: 72px;
        bottom: 0.7rem;
    }

    .mascot-guide {
        max-width: min(220px, calc(100vw - 1.2rem));
    }

    .mascot-guide--right {
        right: 0.6rem;
    }

    .mascot-guide--left {
        left: 0.6rem;
    }

    .mascot-guide img {
        width: 68px;
        height: 68px;
    }

    .mascot-bubble {
        width: min(148px, 56vw);
        padding: 0.8rem 0.9rem;
        font-size: 0.72rem;
    }

    .secret-atlas__list li {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .secret-hotspot {
        width: 34px;
        height: 34px;
    }

    .mascot-guide {
        display: none;
    }

    .secret-hotspot--footer {
        right: 0.15rem;
        bottom: 0.15rem;
        width: 26px;
        height: 26px;
    }

    .arcade-launcher {
        width: min(260px, calc(100vw - 1.2rem));
    }

    .arcade-launcher__toggle {
        padding: 0.85rem 0.9rem;
        border-radius: 20px;
    }

    .arcade-launcher__panel {
        padding: 0.9rem;
        border-radius: 22px;
    }

    .secret-toast-stack {
        top: 0.7rem;
        right: 0.7rem;
        width: min(280px, calc(100vw - 1.4rem));
    }

    .secret-atlas {
        padding: 0.75rem;
    }

    .secret-atlas__panel {
        padding: 1.15rem;
        border-radius: 24px;
    }
}

@keyframes mascotHop {
    0%,
    100% {
        transform: translateY(0);
    }

    45% {
        transform: translateY(-10px);
    }
}

@keyframes mascotSpark {
    0% {
        opacity: 0;
        transform: scale(0.4);
    }

    20% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translateY(-18px) scale(1.8);
    }
}

@keyframes beeDrift {
    0% {
        opacity: 0.95;
        transform: translate(-50%, -50%) scale(0.75);
    }

    100% {
        opacity: 0;
        transform: translate(calc(-50% + (var(--randomX) - 0.5) * 56px), calc(-50% - 48px - var(--randomY) * 22px)) scale(1.25);
    }
}

@keyframes eggBurst {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.72) rotate(0deg);
    }

    42% {
        opacity: 1;
        transform: translate(calc(-50% + var(--tx-mid, 0px)), calc(-50% + var(--ty-mid, 0px))) scale(1.08) rotate(var(--rot, 80deg));
    }

    100% {
        opacity: 0;
        transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0.22) rotate(var(--rot, 80deg));
    }
}

@keyframes secretToastTimer {
    0% {
        transform: scaleX(1);
        opacity: 0.95;
    }

    100% {
        transform: scaleX(0);
        opacity: 0.45;
    }
}

@keyframes evaPulseFlash {
    0% {
        opacity: 0;
    }

    25% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@keyframes eggMeteor {
    0% {
        opacity: 0;
        transform: translate3d(0, 0, 0) rotate(24deg) scale(0.85);
    }

    8% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translate3d(calc(var(--meteor-distance) * 0.7), var(--meteor-distance), 0) rotate(24deg) scale(1.1);
    }
}

@keyframes legalGlow {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-2px);
    }
}

@keyframes popBurstFloat {
    0% {
        opacity: 0;
        transform: translate3d(0, 18px, 0) rotate(var(--burst-rotate, 0deg)) scale(0.86);
    }

    18% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translate3d(0, -34px, 0) rotate(var(--burst-rotate, 0deg)) scale(1.06);
    }
}

@keyframes secretRuneFloat {
    0%,
    100% {
        transform: translateY(0) scale(0.96);
    }

    50% {
        transform: translateY(-6px) scale(1.06);
    }
}

/* Hero 3D — prototype accueil */
.hero-cinematic__stack--3d {
    min-height: clamp(520px, 70vh, 720px);
    grid-template-rows: minmax(0, 1fr) auto;
    perspective: 1200px;
}

.hero-3d {
    position: relative;
    isolation: isolate;
    min-height: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 226, 204, 0.2);
    border-radius: 38px;
    background:
        radial-gradient(circle at 50% 44%, rgba(217, 112, 60, 0.24), transparent 0 34%),
        radial-gradient(circle at 78% 16%, rgba(97, 216, 177, 0.12), transparent 0 24%),
        linear-gradient(145deg, rgba(17, 30, 24, 0.66), rgba(4, 9, 7, 0.94));
    box-shadow:
        0 48px 120px rgba(4, 9, 7, 0.48),
        0 0 0 1px rgba(255, 139, 77, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(18px);
    transform: rotateY(-1.5deg) rotateX(0.5deg);
    transform-origin: center;
    transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.4s ease;
}

.hero-3d:hover {
    border-color: rgba(255, 177, 126, 0.34);
    transform: rotateY(0deg) rotateX(0deg) translateY(-3px);
}

.hero-3d::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 0;
    opacity: 0.32;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: linear-gradient(to bottom, transparent, #000 34%, #000);
    transform: perspective(420px) rotateX(58deg) scale(1.55) translateY(25%);
    transform-origin: bottom;
}

.hero-3d::after {
    content: '';
    position: absolute;
    z-index: 1;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 28%, rgba(4, 9, 7, 0.38)),
        repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.018) 0, rgba(255, 255, 255, 0.018) 1px, transparent 1px, transparent 4px);
    opacity: 0.72;
}

.hero-3d__canvas,
.hero-3d__fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-3d__canvas {
    z-index: 0;
    display: block;
    opacity: 0;
    transition: opacity 0.8s ease;
    cursor: crosshair;
}

.hero-3d--ready .hero-3d__canvas {
    opacity: 1;
}

.hero-3d__fallback {
    z-index: 0;
    display: grid;
    place-items: center;
    transition: opacity 0.5s ease;
}

.hero-3d--ready .hero-3d__fallback {
    opacity: 0;
}

.hero-3d__fallback-core {
    width: 28%;
    aspect-ratio: 1;
    border-radius: 34% 66% 58% 42% / 44% 38% 62% 56%;
    background: linear-gradient(145deg, #ffc193, #cc582f 60%, #671d14);
    box-shadow: 0 0 54px rgba(239, 119, 66, 0.52), inset -18px -20px 36px rgba(57, 12, 6, 0.4);
    transform: rotate(18deg);
    animation: hero3dCore 8s ease-in-out infinite;
}

.hero-3d__fallback-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 62%;
    aspect-ratio: 1;
    border: 1px solid rgba(255, 212, 179, 0.64);
    border-radius: 50%;
    transform: translate(-50%, -50%) rotateX(68deg) rotateZ(8deg);
    box-shadow: 0 0 22px rgba(237, 136, 84, 0.18);
    animation: hero3dRing 12s linear infinite;
}

.hero-3d__fallback-ring--two {
    width: 78%;
    opacity: 0.42;
    transform: translate(-50%, -50%) rotateY(68deg) rotateZ(28deg);
    animation-direction: reverse;
    animation-duration: 16s;
}

.hero-3d__topline,
.hero-3d__caption,
.hero-3d__labels {
    position: absolute;
    z-index: 2;
}

.hero-3d__labels {
    inset: 0;
    pointer-events: none;
}

.hero-3d__topline {
    top: 1.25rem;
    left: 1.35rem;
    right: 1.35rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: rgba(255, 248, 239, 0.68);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-3d__pulse {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    border: 0;
    background: none;
    color: rgba(255, 248, 239, 0.68);
    font: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    cursor: pointer;
    transition: color 0.25s ease;
}

.hero-3d__pulse:hover,
.hero-3d__pulse:focus-visible {
    color: #fff;
}

.hero-3d__pulse:focus-visible {
    outline: 2px solid rgba(243, 161, 111, 0.8);
    outline-offset: 5px;
    border-radius: 4px;
}

.hero-3d__pulse-icon {
    position: relative;
    width: 14px;
    height: 14px;
    border: 1px solid rgba(243, 161, 111, 0.72);
    border-radius: 50%;
}

.hero-3d__pulse-icon::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: #f3a16f;
    box-shadow: 0 0 10px rgba(243, 161, 111, 0.8);
}

.hero-3d__reticle {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 46%;
    width: clamp(205px, 44%, 280px);
    aspect-ratio: 1;
    border: 1px solid rgba(255, 218, 189, 0.11);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.hero-3d__reticle::before,
.hero-3d__reticle::after {
    content: '';
    position: absolute;
    background: rgba(255, 218, 189, 0.2);
}

.hero-3d__reticle::before {
    left: 50%;
    top: -9px;
    bottom: -9px;
    width: 1px;
    mask-image: linear-gradient(to bottom, #000 0 7px, transparent 7px calc(100% - 7px), #000 calc(100% - 7px));
}

.hero-3d__reticle::after {
    top: 50%;
    left: -9px;
    right: -9px;
    height: 1px;
    mask-image: linear-gradient(to right, #000 0 7px, transparent 7px calc(100% - 7px), #000 calc(100% - 7px));
}

.hero-3d__reticle span {
    position: absolute;
    inset: 12%;
    border: 1px dashed rgba(255, 218, 189, 0.1);
    border-radius: inherit;
    animation: hero3dReticle 24s linear infinite;
}

.hero-3d__coordinates {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    color: rgba(255, 248, 239, 0.34);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.55rem;
    letter-spacing: 0.11em;
    pointer-events: none;
    transform: translate(-44%, -50%) rotate(-90deg);
}
