/* =========================================================
   SECTION SKY MAP
   Carte du ciel tactile / souris
   ========================================================= */

.sky-section {
    position: relative;
    overflow: hidden;
    padding: 140px 0;

    background:
            radial-gradient(
                    circle at 50% 0%,
                    rgba(212, 175, 55, .12),
                    transparent 34%
            ),
            linear-gradient(
                    180deg,
                    #050505 0%,
                    #020205 100%
            );
}

.sky-section::before {
    content: "";

    position: absolute;
    inset: 0;

    opacity: .22;

    pointer-events: none;

    background-image:
            radial-gradient(
                    circle,
                    rgba(255, 255, 255, .75) 0 1px,
                    transparent 1.4px
            );

    background-size: 92px 92px;

    -webkit-mask-image:
            linear-gradient(
                    to bottom,
                    black,
                    transparent 90%
            );

    mask-image:
            linear-gradient(
                    to bottom,
                    black,
                    transparent 90%
            );
}

.sky-section::after {
    content: "";

    position: absolute;

    left: 50%;
    top: 38%;

    width: 780px;
    height: 780px;

    border-radius: 50%;

    background:
            rgba(47, 58, 110, .10);

    filter:
            blur(150px);

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

    pointer-events: none;
}


/* =========================================================
   EN-TÊTE
   ========================================================= */

.sky-header {
    position: relative;
    z-index: 2;

    max-width: 850px;

    margin-bottom: 46px;
}

.sky-header h2 {
    margin: 0 0 24px;

    font-size:
            clamp(
                    2.6rem,
                    5vw,
                    5.4rem
            );

    line-height: .96;

    letter-spacing: -.055em;

    text-transform: uppercase;
}

.sky-header p {
    max-width: 720px;

    margin: 0;

    color:
            rgba(255, 255, 255, .72);

    font-size: 1.08rem;
    line-height: 1.8;
}


/* =========================================================
   EXPÉRIENCE
   ========================================================= */

.sky-experience {
    position: relative;
    z-index: 2;

    width: 100%;
    min-height: 680px;

    overflow: hidden;

    isolation: isolate;

    border:
            1px solid rgba(255, 255, 255, .10);

    border-radius: 32px;

    background:
            radial-gradient(
                    circle at 50% 46%,
                    rgba(47, 58, 110, .20),
                    transparent 45%
            ),
            linear-gradient(
                    180deg,
                    rgba(5, 7, 18, .92),
                    rgba(1, 2, 7, .98)
            );

    box-shadow:
            0 42px 120px rgba(0, 0, 0, .55),
            inset 0 1px 0 rgba(255, 255, 255, .06);
}

.sky-experience::before {
    content: "";

    position: absolute;
    z-index: 0;
    inset: 0;

    pointer-events: none;

    background:
            radial-gradient(
                    circle at 50% 50%,
                    transparent 42%,
                    rgba(0, 0, 0, .30) 100%
            );
}

.sky-experience::after {
    content: "";

    position: absolute;
    z-index: 1;
    inset: 0;

    pointer-events: none;

    background:
            linear-gradient(
                    120deg,
                    transparent 0%,
                    rgba(255, 255, 255, .018) 36%,
                    transparent 66%
            );
}


/* =========================================================
   CANVAS
   ========================================================= */

#youandplaySkyCanvas {
    position: absolute;
    z-index: 1;
    inset: 0;

    display: block;

    width: 100%;
    height: 100%;

    cursor: grab;

    touch-action: none;

    user-select: none;
    -webkit-user-select: none;

    -webkit-tap-highlight-color:
            transparent;
}

#youandplaySkyCanvas:active {
    cursor: grabbing;
}


/* =========================================================
   HUD
   ========================================================= */

.sky-hud {
    position: absolute;
    z-index: 3;
    inset: 0;

    pointer-events: none;
}

.sky-topbar {
    display: flex;

    justify-content:
            space-between;

    align-items:
            flex-start;

    gap: 20px;

    padding: 24px;
}

.sky-topbar-left {
    display: flex;

    align-items:
            flex-start;

    gap: 10px;

    flex-wrap: wrap;
}


/* =========================================================
   STATUT ET COORDONNÉES
   ========================================================= */

.sky-status,
.sky-coordinates {
    display: inline-flex;

    align-items: center;

    min-height: 42px;

    padding: 0 16px;

    border:
            1px solid rgba(255, 255, 255, .10);

    border-radius: 999px;

    background:
            rgba(0, 0, 0, .32);

    -webkit-backdrop-filter:
            blur(14px);

    backdrop-filter:
            blur(14px);

    box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, .04),
            0 10px 30px rgba(0, 0, 0, .16);

    color:
            rgba(255, 255, 255, .72);

    font-size: .8rem;
    line-height: 1;

    letter-spacing: .04em;

    white-space: nowrap;
}

.sky-status::before {
    content: "";

    flex: 0 0 auto;

    width: 8px;
    height: 8px;

    margin-right: 10px;

    border-radius: 50%;

    background: #d4af37;

    box-shadow:
            0 0 16px rgba(212, 175, 55, .90);

    animation:
            skyStatusPulse 2.4s ease-in-out infinite;
}

@keyframes skyStatusPulse {
    0%,
    100% {
        opacity: .65;

        box-shadow:
                0 0 9px rgba(212, 175, 55, .55);
    }

    50% {
        opacity: 1;

        box-shadow:
                0 0 20px rgba(212, 175, 55, .95);
    }
}


/* =========================================================
   VISEUR CENTRAL
   ========================================================= */

.sky-center-marker {
    position: absolute;

    left: 50%;
    top: 50%;

    width: 42px;
    height: 42px;

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

    border:
            1px solid rgba(232, 200, 100, .48);

    border-radius: 50%;

    box-shadow:
            0 0 24px rgba(212, 175, 55, .08);
}

.sky-center-marker::before,
.sky-center-marker::after {
    content: "";

    position: absolute;

    background:
            rgba(232, 200, 100, .56);
}

.sky-center-marker::before {
    left: -12px;
    top: 20px;

    width: 64px;
    height: 1px;
}

.sky-center-marker::after {
    left: 20px;
    top: -12px;

    width: 1px;
    height: 64px;
}


/* =========================================================
   POINT CENTRAL
   ========================================================= */

.sky-center-marker span {
    position: absolute;

    left: 50%;
    top: 50%;

    width: 4px;
    height: 4px;

    border-radius: 50%;

    background: #f5df8d;

    box-shadow:
            0 0 12px rgba(245, 223, 141, .90);

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


/* =========================================================
   CARTE D’INFORMATION
   ========================================================= */

.sky-card {
    position: absolute;
    z-index: 4;

    left: 26px;
    bottom: 26px;

    width:
            min(
                    330px,
                    calc(100% - 52px)
            );

    min-height: 124px;

    padding: 20px;

    border:
            1px solid rgba(255, 255, 255, .10);

    border-radius: 22px;

    background:
            linear-gradient(
                    145deg,
                    rgba(16, 16, 24, .82),
                    rgba(4, 4, 8, .72)
            );

    -webkit-backdrop-filter:
            blur(18px);

    backdrop-filter:
            blur(18px);

    box-shadow:
            0 22px 65px rgba(0, 0, 0, .30),
            inset 0 1px 0 rgba(255, 255, 255, .05);

    pointer-events: none;
}

.sky-card-label {
    margin-bottom: 6px;

    color: #e8c864;

    font-size: .72rem;
    font-weight: 900;

    letter-spacing: .16em;

    text-transform: uppercase;
}

.sky-card-title {
    min-height: 29px;

    color: #ffffff;

    font-size: 1.35rem;
    font-weight: 900;

    line-height: 1.25;

    letter-spacing: -.02em;
}

.sky-card-text {
    margin-top: 6px;

    color:
            rgba(255, 255, 255, .62);

    font-size: .9rem;
    line-height: 1.5;
}


/* =========================================================
   ACTIONS
   ========================================================= */

.sky-actions {
    position: absolute;
    z-index: 5;

    right: 26px;
    bottom: 26px;

    display: flex;

    align-items: center;

    gap: 12px;
}


/* =========================================================
   BOUTONS
   ========================================================= */

.sky-button {
    display: inline-flex;

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

    min-height: 48px;

    padding: 0 22px;

    border:
            1px solid rgba(255, 255, 255, .16);

    border-radius: 999px;

    background:
            rgba(8, 8, 12, .72);

    color: #ffffff;

    font-size: .8rem;
    font-weight: 800;

    line-height: 1;

    letter-spacing: .04em;

    white-space: nowrap;

    cursor: pointer;

    -webkit-backdrop-filter:
            blur(16px);

    backdrop-filter:
            blur(16px);

    box-shadow:
            0 14px 35px rgba(0, 0, 0, .24),
            inset 0 1px 0 rgba(255, 255, 255, .04);

    transition:
            transform .25s ease,
            border-color .25s ease,
            background .25s ease,
            box-shadow .25s ease,
            opacity .25s ease;
}

.sky-button:hover {
    transform:
            translateY(-2px);

    border-color:
            rgba(212, 175, 55, .55);

    background:
            rgba(20, 18, 14, .82);

    box-shadow:
            0 18px 42px rgba(0, 0, 0, .32),
            0 0 24px rgba(212, 175, 55, .07);
}

.sky-button:active {
    transform:
            translateY(0);
}

.sky-button:focus-visible {
    outline:
            2px solid rgba(245, 223, 141, .92);

    outline-offset: 3px;
}

.sky-button:disabled {
    opacity: .45;

    cursor: default;

    transform: none;
}

.sky-button-primary {
    color: #080808;

    border: 0;

    background:
            linear-gradient(
                    135deg,
                    #f5df8d,
                    #d4af37 45%,
                    #9e7426
            );

    box-shadow:
            0 18px 45px rgba(212, 175, 55, .22),
            inset 0 1px 0 rgba(255, 255, 255, .40);
}

.sky-button-primary:hover {
    border-color: transparent;

    background:
            linear-gradient(
                    135deg,
                    #fff0ae,
                    #e0bd4b 45%,
                    #ad812d
            );

    box-shadow:
            0 22px 55px rgba(212, 175, 55, .30),
            inset 0 1px 0 rgba(255, 255, 255, .48);
}


/* =========================================================
   ÉTATS DE CHARGEMENT ET ERREUR
   ========================================================= */

.sky-experience.is-loading
#youandplaySkyCanvas {
    opacity: .55;
}

.sky-experience.is-loading::before {
    background:
            radial-gradient(
                    circle at 50% 50%,
                    rgba(212, 175, 55, .08),
                    rgba(0, 0, 0, .38)
            );
}

.sky-experience.has-error
#youandplaySkyCanvas {
    opacity: .28;
    pointer-events: none;
}

.sky-experience.has-error
.sky-status::before {
    background: #ff8888;

    box-shadow:
            0 0 16px rgba(255, 100, 100, .75);

    animation: none;
}


/* =========================================================
   TABLETTES
   ========================================================= */

@media (max-width: 900px) {

    .sky-section {
        padding:
                90px 0 70px;
    }

    .sky-header {
        margin-bottom: 30px;
    }

    .sky-header h2 {
        font-size:
                clamp(
                        2.2rem,
                        11vw,
                        4rem
                );
    }

    .sky-header p {
        font-size: 1rem;
        line-height: 1.65;
    }

    /*
     * La carte occupe toute la largeur visuelle
     * en annulant les marges du container.
     */
    .sky-experience {
        width:
                calc(100% + 48px);

        min-height: 78svh;

        margin-left: -24px;

        border-left: 0;
        border-right: 0;

        border-radius: 0;
    }

    .sky-topbar {
        padding: 14px;
    }

    .sky-status,
    .sky-coordinates {
        min-height: 36px;

        padding: 0 12px;

        font-size: .72rem;
    }

    .sky-center-marker {
        width: 34px;
        height: 34px;
    }

    .sky-center-marker::before {
        left: -9px;
        top: 16px;

        width: 52px;
    }

    .sky-center-marker::after {
        left: 16px;
        top: -9px;

        height: 52px;
    }

    .sky-card {
        left: 14px;
        right: 14px;
        bottom: 84px;

        width: auto;
        min-height: 0;

        padding: 14px 16px;

        border-radius: 16px;
    }

    .sky-card-label {
        margin-bottom: 3px;

        font-size: .62rem;
    }

    .sky-card-title {
        min-height: 0;

        font-size: 1rem;
    }

    .sky-card-text {
        margin-top: 3px;

        font-size: .78rem;
        line-height: 1.4;
    }

    .sky-actions {
        left: 14px;
        right: 14px;
        bottom: 18px;

        justify-content: flex-end;
    }

    .sky-button {
        min-height: 48px;

        padding: 0 18px;

        font-size: .78rem;
    }
}


/* =========================================================
   MOBILES
   ========================================================= */

@media (max-width: 620px) {

    .sky-section {
        padding:
                80px 0 60px;
    }

    .sky-header {
        margin-bottom: 26px;
    }

    .sky-experience {
        min-height: 76svh;
    }

    .sky-topbar {
        padding: 10px;
    }

    .sky-topbar-left {
        flex-direction: column;

        gap: 6px;
    }

    .sky-status,
    .sky-coordinates {
        min-height: 32px;

        padding: 0 10px;

        background:
                rgba(0, 0, 0, .24);

        font-size: .66rem;
    }

    .sky-coordinates {
        opacity: .78;
    }

    .sky-center-marker {
        opacity: .82;
    }

    .sky-card {
        bottom: 80px;
    }

    .sky-actions {
        justify-content: stretch;
    }

    .sky-button {
        flex: 1;

        padding: 0 14px;
    }
}


/* =========================================================
   TRÈS PETITS ÉCRANS
   ========================================================= */

@media (max-width: 420px) {

    .sky-experience {
        min-height: 74svh;
    }

    .sky-card {
        left: 10px;
        right: 10px;
        bottom: 76px;

        padding: 12px 14px;
    }

    .sky-actions {
        left: 10px;
        right: 10px;
        bottom: 14px;
    }

    .sky-button {
        min-height: 46px;

        padding: 0 12px;

        font-size: .74rem;
    }
}


/* =========================================================
   HAUTEUR D’ÉCRAN RÉDUITE
   ========================================================= */

@media (max-height: 680px) and (max-width: 900px) {

    .sky-experience {
        min-height: 620px;
    }
}


/* =========================================================
   ACCESSIBILITÉ : ANIMATIONS RÉDUITES
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .sky-status::before {
        animation: none;
    }

    .sky-button {
        transition: none;
    }
}