/* =========================================================
   PROFESSIONAL GAME PAGE
========================================================= */

.game-page-pro {
    background:
        radial-gradient(circle at 50% -10%, rgba(255,179,24,.09), transparent 24%),
        var(--bg);
}

.game-page-shell {
    width: 100%;
    max-width: 1700px;
    margin: 0 auto;
    padding: 24px 28px 80px;
}

.game-nav {
    margin-left: 8px;
}

.game-back-button {
    margin-left: auto;
    padding: 10px 13px;
    color: #aeb5c0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255,255,255,.025);
    font-size: 11px;
    font-weight: 700;
}

.game-back-button:hover {
    color: #fff;
    border-color: rgba(255,179,24,.32);
}

.game-top-ad,
.game-bottom-ad {
    width: min(970px, 100%);
    min-height: 90px;
    margin-left: auto;
    margin-right: auto;
}

.game-top-ad {
    margin-bottom: 22px;
}

.game-bottom-ad {
    margin-top: 35px;
    margin-bottom: 45px;
}

.game-breadcrumb {
    margin: 0 0 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #626a77;
    font-size: 10px;
}

.game-breadcrumb a:hover {
    color: #b8bec8;
}

.game-breadcrumb strong {
    max-width: 380px;
    overflow: hidden;
    color: #8a929f;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.game-title-bar {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.game-title-left {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.game-cover-mini {
    position: relative;
    width: 78px;
    height: 59px;
    flex: 0 0 78px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #11151d;
}

.game-cover-mini img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.game-title-left h1 {
    margin: 5px 0 7px;
    overflow: hidden;
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.05;
    letter-spacing: -1.5px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.game-title-meta {
    display: flex;
    align-items: center;
    gap: 13px;
    color: #7f8794;
    font-size: 10px;
}

.game-title-meta span:first-child {
    color: var(--accent);
    font-weight: 900;
}

.game-stage-layout {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr) 160px;
    gap: 20px;
    align-items: start;
}

.game-side-ad {
    position: sticky;
    top: 96px;
}

.game-skyscraper {
    width: 160px;
    min-height: 600px;
}

.game-main-column {
    min-width: 0;
}

.game-player-card {
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 18px;
    background: #050608;
    box-shadow: 0 22px 70px rgba(0,0,0,.38);
}

.game-player-toolbar {
    min-height: 50px;
    padding: 0 14px 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    border-bottom: 1px solid var(--border);
    background:
        linear-gradient(180deg, #151a22, #10141b);
}

.player-status {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #8f97a4;
    font-size: 10px;
    font-weight: 700;
}

.player-live-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #47d77a;
    box-shadow: 0 0 0 4px rgba(71,215,122,.09);
}

.player-toolbar-actions {
    display: flex;
    gap: 7px;
}

.player-toolbar-actions button {
    width: 34px;
    height: 32px;
    display: grid;
    place-items: center;
    color: #b4bbc6;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #181d26;
    cursor: pointer;
}

.player-toolbar-actions button:hover {
    color: #111;
    border-color: var(--accent);
    background: var(--accent);
}

.game-player-frame {
    position: relative;
    width: 100%;
    height: 680px;
    min-height: 520px;
    overflow: hidden;
    background: #030405;
}

.game-player-frame iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
    background: #030405;
}

.game-player-frame:fullscreen {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    background: #000;
}

.game-player-frame:fullscreen iframe {
    width: 100%;
    height: 100%;
}

.game-mobile-ad {
    display: none;
}

.game-information-card {
    margin-top: 18px;
    padding: 27px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 36px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background:
        linear-gradient(145deg, rgba(255,255,255,.022), transparent),
        #0f131b;
}

.game-description h2 {
    margin: 6px 0 12px;
    font-size: 22px;
    letter-spacing: -.7px;
}

.game-description p {
    margin: 0;
    color: #8e96a3;
    font-size: 12px;
    line-height: 1.75;
}

.game-instructions {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.game-instructions h3 {
    margin: 0 0 8px;
    font-size: 14px;
}

.game-information-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    align-content: start;
}

.game-info-item {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: rgba(255,255,255,.018);
}

.game-info-item span {
    display: block;
    color: #707885;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
}

.game-info-item strong {
    margin-top: 5px;
    display: block;
    overflow: hidden;
    color: #d7dbe2;
    font-size: 11px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.game-recommendations {
    margin-top: 15px;
}

.game-recommendation-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
}

.game-recommendation-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    transition:
        transform .2s ease,
        border-color .2s ease;
}

.game-recommendation-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255,179,24,.4);
}

.game-recommendation-thumb {
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 75%;
    overflow: hidden;
    background: #0d1118;
}

.game-recommendation-thumb img {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.game-recommendation-play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    width: 42px;
    height: 42px;
    margin-top: -21px;
    margin-left: -21px;
    display: grid;
    place-items: center;
    padding-left: 2px;
    color: #111;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0;
    transition: opacity .18s ease;
}

.game-recommendation-card:hover .game-recommendation-play {
    opacity: 1;
}

.game-recommendation-info {
    padding: 12px 13px 13px;
}

.game-recommendation-info strong {
    display: block;
    overflow: hidden;
    font-size: 12px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.game-recommendation-info > div {
    margin-top: 7px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: #777f8c;
    font-size: 9px;
}

.game-recommendation-info > div span:last-child {
    color: var(--accent);
}

@media (max-width: 1320px) {

    .game-stage-layout {
        grid-template-columns: minmax(0, 1fr) 160px;
    }

    .game-side-ad-left {
        display: none;
    }

}

@media (max-width: 1080px) {

    .game-stage-layout {
        grid-template-columns: 1fr;
    }

    .game-side-ad-right {
        display: none;
    }

    .game-mobile-ad {
        margin-top: 17px;
        display: block;
    }

    .game-mobile-ad .ad-slot,
    .game-mobile-ad .pp-ad-300x250 {
        width: min(300px, 100%);
        min-height: 250px;
        margin: 0 auto;
    }

    .game-player-frame {
        height: 590px;
    }

    .game-recommendation-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

}

@media (max-width: 760px) {

    .game-page-shell {
        padding: 18px 14px 55px;
    }

    .game-nav {
        display: none;
    }

    .game-back-button {
        margin-left: auto;
    }

    .game-breadcrumb {
        display: none;
    }

    .game-title-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .game-title-actions {
        width: 100%;
    }

    .game-title-actions .button {
        width: 100%;
    }

    .game-cover-mini {
        width: 68px;
        height: 51px;
        flex-basis: 68px;
    }

    .game-title-left h1 {
        max-width: 70vw;
        font-size: 25px;
    }

    .game-title-meta {
        gap: 8px;
        flex-wrap: wrap;
    }

    .game-player-frame {
        height: 500px;
        min-height: 400px;
    }

    .game-information-card {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 21px;
    }

    .game-recommendation-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 11px;
    }

}

@media (max-width: 470px) {

    .game-player-frame {
        height: 430px;
        min-height: 340px;
    }

    .game-information-sidebar {
        grid-template-columns: 1fr 1fr;
    }

    .game-title-left h1 {
        max-width: 64vw;
        font-size: 22px;
    }

    .game-recommendation-card:hover {
        transform: none;
    }

}


/* =========================================================
   PIXELPRIZES PLAY — PHONE MOCKUP PLAYER
========================================================= */

/* Base desktop player */
.game-player-frame {
    position: relative;
    width: 100%;
    height: 680px;
    min-height: 520px;
    overflow: hidden;
    background:
        radial-gradient(circle at center, rgba(255,255,255,.025), transparent 45%),
        #030405;
}

.game-player-frame iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
    background: #000;
}

/* =========================================================
   MOBILE PHONE STAGE
========================================================= */

.portrait-stage {
    position: relative;
    width: 100%;
    min-height: 840px;
    padding: 38px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 44%, rgba(55,98,255,.12), transparent 26%),
        radial-gradient(circle at 50% 50%, rgba(255,179,24,.05), transparent 42%),
        linear-gradient(180deg, #06080d, #030406);
}

/* subtle decorative glow behind the phone */
.portrait-stage::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 520px;
    height: 720px;
    margin-left: -260px;
    margin-top: -360px;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(44,89,255,.14), rgba(44,89,255,0) 68%);
    filter: blur(14px);
    pointer-events: none;
}

/* =========================================================
   REALISTIC PHONE MOCKUP
========================================================= */

.phone-mockup {
    position: relative;
    z-index: 2;
    width: 430px;
    height: 820px;
    max-width: 86vw;
}

/* physical metal edge */
.phone-shell {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 11px;
    overflow: hidden;
    border: 2px solid #747982;
    border-radius: 58px;
    background:
        linear-gradient(145deg, #6c727a 0%, #161a20 12%, #050608 45%, #2e333a 83%, #8d9299 100%);
    box-shadow:
        0 36px 90px rgba(0,0,0,.68),
        0 8px 24px rgba(0,0,0,.55),
        0 0 0 1px rgba(255,255,255,.18),
        0 0 42px rgba(70,108,255,.08);
}

/* internal black bezel */
.phone-shell::before {
    content: "";
    position: absolute;
    top: 7px;
    right: 7px;
    bottom: 7px;
    left: 7px;
    z-index: 1;
    border-radius: 51px;
    border: 7px solid #050506;
    pointer-events: none;
}

/* subtle glass border */
.phone-shell::after {
    content: "";
    position: absolute;
    top: 13px;
    right: 13px;
    bottom: 13px;
    left: 13px;
    z-index: 4;
    border-radius: 43px;
    box-shadow:
        0 0 0 1px rgba(255,255,255,.08),
        0 0 12px rgba(255,255,255,.025) inset;
    pointer-events: none;
}

/* actual iframe viewport */
.phone-screen {
    position: absolute;
    top: 14px;
    right: 14px;
    bottom: 14px;
    left: 14px;
    z-index: 2;
    overflow: hidden;
    border-radius: 43px;
    background: #000;
}

.phone-screen iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
    background: #000;
}

/* dynamic island */
.phone-dynamic-island {
    position: absolute;
    z-index: 6;
    top: 22px;
    left: 50%;
    width: 112px;
    height: 31px;
    margin-left: -56px;
    border-radius: 18px;
    background:
        linear-gradient(180deg, #050506, #000);
    box-shadow:
        0 1px 1px rgba(255,255,255,.05) inset,
        0 2px 8px rgba(0,0,0,.65);
    pointer-events: none;
}

.phone-camera-dot {
    position: absolute;
    top: 11px;
    right: 14px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 35%, #244b79, #07111e 42%, #020304 70%);
    box-shadow:
        0 0 0 1px rgba(255,255,255,.05);
}

/* glass reflection */
.phone-reflection {
    position: absolute;
    z-index: 5;
    top: 18px;
    left: 22px;
    width: 34%;
    height: 62%;
    border-radius: 46px 0 80% 0;
    background:
        linear-gradient(
            115deg,
            rgba(255,255,255,.075),
            rgba(255,255,255,.018) 34%,
            rgba(255,255,255,0) 72%
        );
    transform: skewX(-5deg);
    pointer-events: none;
}

/* physical side buttons */
.phone-side-button {
    position: absolute;
    z-index: 0;
    width: 5px;
    border-radius: 3px;
    background:
        linear-gradient(90deg, #545a62, #111419);
    box-shadow:
        0 1px 2px rgba(255,255,255,.12) inset,
        0 2px 5px rgba(0,0,0,.5);
}

.phone-side-button-left-one {
    left: -4px;
    top: 164px;
    height: 62px;
}

.phone-side-button-left-two {
    left: -4px;
    top: 244px;
    height: 92px;
}

.phone-side-button-right {
    right: -4px;
    top: 218px;
    height: 112px;
}

/* =========================================================
   FULLSCREEN
========================================================= */

.portrait-stage:fullscreen {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    padding: 12px;
    background: #000;
}

.portrait-stage:fullscreen .phone-mockup {
    height: 96vh;
    width: 50.34vh;
    max-width: 94vw;
}

.game-player-frame:fullscreen {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    background: #000;
}

.game-player-frame:fullscreen iframe {
    width: 100%;
    height: 100%;
}

/* =========================================================
   RESPONSIVE PHONE
========================================================= */

@media (max-width: 1080px) {
    .portrait-stage {
        min-height: 800px;
    }

    .phone-mockup {
        width: 405px;
        height: 772px;
    }
}

@media (max-width: 760px) {
    .portrait-stage {
        min-height: 720px;
        padding: 22px 12px;
    }

    .phone-mockup {
        width: 355px;
        height: 677px;
        max-width: 88vw;
    }

    .phone-shell {
        border-radius: 50px;
    }

    .phone-shell::before {
        border-radius: 44px;
    }

    .phone-screen {
        border-radius: 37px;
    }

    .phone-shell::after {
        border-radius: 37px;
    }
}

@media (max-width: 470px) {
    .portrait-stage {
        min-height: 650px;
        padding: 18px 8px;
    }

    .phone-mockup {
        width: 320px;
        height: 610px;
        max-width: 91vw;
    }

    .phone-dynamic-island {
        top: 20px;
        width: 94px;
        height: 27px;
        margin-left: -47px;
    }

    .phone-camera-dot {
        top: 9px;
        right: 12px;
        width: 7px;
        height: 7px;
    }
}


/* =========================================================
   FINAL MOBILE MOCKUP OVERRIDES
========================================================= */

.portrait-stage {
    box-sizing: border-box;
    width: 100%;
    min-height: 860px;
    padding: 38px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portrait-stage .phone-mockup {
    position: relative;
    display: block;
    width: 430px;
    height: 820px;
    max-width: 86vw;
    flex: 0 0 auto;
}

.portrait-stage .phone-shell {
    box-sizing: border-box;
}

.portrait-stage .phone-screen iframe {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
}

@media (max-width: 760px) {
    .portrait-stage {
        min-height: 720px;
    }

    .portrait-stage .phone-mockup {
        width: 355px;
        height: 677px;
    }
}

@media (max-width: 470px) {
    .portrait-stage {
        min-height: 650px;
    }

    .portrait-stage .phone-mockup {
        width: 320px;
        height: 610px;
    }
}

/* =========================================================
   INDICATION MODE PAYSAGE — MOBILE / TABLETTE
========================================================= */

.orientation-hint[hidden] {
    display: none !important;
}

.orientation-hint {
    position: absolute;
    z-index: 20;
    top: 30px;
    right: 30px;

    display: flex;
    align-items: center;
    gap: 11px;

    min-height: 76px;
    padding: 9px 16px 9px 9px;

    border: 1px solid rgba(176,112,255,.72);
    border-radius: 22px;

    color: #fff;
    background:
        linear-gradient(
            145deg,
            rgba(25,15,58,.97),
            rgba(7,12,30,.96)
        );

    box-shadow:
        0 16px 46px rgba(0,0,0,.46),
        0 0 30px rgba(126,61,255,.28),
        0 0 0 1px rgba(66,177,255,.12) inset;

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    cursor: pointer;
    appearance: none;

    transform: translateZ(0);
    transition:
        transform .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}

.orientation-hint:hover {
    transform: translateY(-2px) scale(1.015);
    border-color: rgba(197,137,255,.95);
    box-shadow:
        0 18px 52px rgba(0,0,0,.52),
        0 0 38px rgba(135,68,255,.38),
        0 0 24px rgba(35,169,255,.14) inset;
}

.orientation-hint:active {
    transform: scale(.985);
}

.orientation-hint-icon {
    position: relative;
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
}

.orientation-hint-icon::before {
    content: "";
    position: absolute;
    inset: 7px;
    border-radius: 50%;
    background: rgba(112,59,255,.32);
    filter: blur(9px);
}

.orientation-hint-icon img {
    position: relative;
    z-index: 1;
    width: 58px;
    height: 58px;
    display: block;
    object-fit: contain;
    filter:
        drop-shadow(0 4px 10px rgba(0,0,0,.35));
}

.orientation-hint-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
    text-align: left;
}

.orientation-hint-copy strong {
    font-size: 13px;
    line-height: 1.1;
    letter-spacing: .02em;
    color: #fff;
}

.orientation-hint-copy small {
    font-size: 11px;
    line-height: 1.25;
    white-space: nowrap;
    color: rgba(225,228,243,.72);
}


/* =========================================================
   MOCKUP PAYSAGE AUTOMATIQUE
========================================================= */

.portrait-stage.is-landscape-mode {
    min-height: 0;
    height: 100%;
    padding: 14px;
}

.portrait-stage.is-landscape-mode::before {
    width: 78vw;
    height: 68vh;
    margin-left: -39vw;
    margin-top: -34vh;
}

.portrait-stage.is-landscape-mode .phone-mockup {
    width: min(94vw, 1160px);
    height: min(88vh, 610px);
    max-width: 94vw;
}

.portrait-stage.is-landscape-mode .phone-shell {
    border-radius: 54px;
}

.portrait-stage.is-landscape-mode .phone-shell::before {
    border-radius: 47px;
}

.portrait-stage.is-landscape-mode .phone-shell::after,
.portrait-stage.is-landscape-mode .phone-screen {
    border-radius: 40px;
}

.portrait-stage.is-landscape-mode .phone-dynamic-island {
    top: 50%;
    left: 23px;
    width: 31px;
    height: 112px;
    margin: -56px 0 0;
    border-radius: 18px;
}

.portrait-stage.is-landscape-mode .phone-camera-dot {
    top: auto;
    right: auto;
    left: 11px;
    bottom: 14px;
}

.portrait-stage.is-landscape-mode .phone-side-button-left-one {
    left: 170px;
    top: -4px;
    width: 62px;
    height: 5px;
}

.portrait-stage.is-landscape-mode .phone-side-button-left-two {
    left: 248px;
    top: -4px;
    width: 92px;
    height: 5px;
}

.portrait-stage.is-landscape-mode .phone-side-button-right {
    right: 220px;
    top: auto;
    bottom: -4px;
    width: 112px;
    height: 5px;
}

.portrait-stage.is-landscape-mode .phone-reflection {
    width: 28%;
    height: 54%;
}


/* Le badge n'est utile qu'en portrait sur appareil tactile. */
@media (orientation: landscape) {
    .orientation-hint {
        display: none !important;
    }
}


@media (max-width: 760px) and (orientation: portrait) {

    .orientation-hint {
        top: 14px;
        right: 14px;
        min-height: 66px;
        max-width: calc(100% - 28px);
        padding: 7px 12px 7px 7px;
        border-radius: 19px;
    }

    .orientation-hint-icon,
    .orientation-hint-icon img {
        width: 52px;
        height: 52px;
    }

    .orientation-hint-icon {
        flex-basis: 52px;
    }

    .orientation-hint-copy strong {
        font-size: 12px;
    }

    .orientation-hint-copy small {
        font-size: 10px;
    }
}


@media (max-height: 560px) and (orientation: landscape) {

    .portrait-stage.is-landscape-mode {
        padding: 6px;
    }

    .portrait-stage.is-landscape-mode .phone-mockup {
        height: 94vh;
        width: min(96vw, 1120px);
    }

}


/* =========================================================
   BANNIÈRE MODE PAYSAGE — VERSION IMAGE
========================================================= */

.orientation-hint-image {
    position: absolute;
    z-index: 24;
    top: 18px;
    right: 18px;

    width: min(520px, 42vw);
    min-height: 0;
    padding: 0;

    border: 0;
    border-radius: 22px;

    background: transparent;
    box-shadow:
        0 18px 48px rgba(0,0,0,.42),
        0 0 28px rgba(133,74,255,.20);

    overflow: hidden;
    cursor: pointer;
    appearance: none;

    transition:
        transform .20s ease,
        filter .20s ease,
        box-shadow .20s ease;
}

.orientation-hint-image:hover {
    transform: translateY(-2px) scale(1.01);
    filter: brightness(1.06);
    box-shadow:
        0 22px 58px rgba(0,0,0,.48),
        0 0 36px rgba(133,74,255,.30);
}

.orientation-hint-image:active {
    transform: scale(.985);
}

.orientation-hint-image picture,
.orientation-hint-image img {
    display: block;
    width: 100%;
    height: auto;
}

.orientation-hint-image img {
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}


/* Tablette / mobile : visuel spécifique plus compact. */
@media (max-width: 1024px) {

    .orientation-hint-image {
        top: 12px;
        right: 12px;

        width: min(560px, calc(100% - 24px));
        border-radius: 18px;

        box-shadow:
            0 14px 38px rgba(0,0,0,.40),
            0 0 24px rgba(133,74,255,.22);
    }

}


/* Mobile portrait : centrage propre au-dessus du mockup. */
@media (max-width: 760px) and (orientation: portrait) {

    .orientation-hint-image {
        left: 50%;
        right: auto;

        width: min(94%, 560px);

        transform:
            translateX(-50%);

        border-radius: 16px;
    }

    .orientation-hint-image:hover {
        transform:
            translateX(-50%)
            translateY(-2px)
            scale(1.01);
    }

    .orientation-hint-image:active {
        transform:
            translateX(-50%)
            scale(.985);
    }

}


/* En paysage tactile, le visuel disparaît. */
@media (max-width: 1024px) and (orientation: landscape) {

    .orientation-hint-image {
        display: none !important;
    }

}


/* =========================================================
   CORRECTIF BANNIÈRE ROTATION
   - compacte
   - réellement transparente
   - ne masque plus le lecteur
========================================================= */

.orientation-hint-image {
    top: 18px !important;
    right: 18px !important;
    left: auto !important;

    width: min(340px, 30vw) !important;
    max-width: 340px !important;

    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;

    border: 0 !important;
    outline: 0 !important;
    border-radius: 18px !important;

    background: transparent !important;
    box-shadow:
        0 12px 32px rgba(0,0,0,.35),
        0 0 22px rgba(122,64,255,.20) !important;

    overflow: visible !important;
}

.orientation-hint-image img {
    display: block !important;
    width: 100% !important;
    height: auto !important;

    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;

    filter:
        drop-shadow(0 10px 22px rgba(0,0,0,.32));
}


/* Tablette */
@media (max-width: 1024px) {

    .orientation-hint-image {
        top: auto !important;
        right: 14px !important;
        bottom: 14px !important;

        width: min(320px, 46vw) !important;
        max-width: 320px !important;
    }

}


/* Mobile portrait */
@media (max-width: 760px) and (orientation: portrait) {

    .orientation-hint-image {
        left: 50% !important;
        right: auto !important;

        top: auto !important;
        bottom: 16px !important;

        width: min(300px, 78vw) !important;
        max-width: 300px !important;

        transform:
            translateX(-50%) !important;
    }

    .orientation-hint-image:hover {
        transform:
            translateX(-50%)
            translateY(-2px)
            scale(1.01) !important;
    }

    .orientation-hint-image:active {
        transform:
            translateX(-50%)
            scale(.985) !important;
    }

}


/* =========================================================
   MODE THÉÂTRE DESKTOP
   Fallback visible si Fullscreen API est bloquée.
========================================================= */

body.game-theater-open {
    overflow: hidden !important;
}

.portrait-stage.desktop-theater-mode {
    position: fixed !important;
    z-index: 999999 !important;

    inset: 12px !important;

    width: auto !important;
    height: auto !important;
    min-height: 0 !important;

    padding: 16px !important;
    margin: 0 !important;

    border-radius: 24px !important;

    background:
        radial-gradient(
            circle at 50% 45%,
            rgba(92,46,196,.18),
            rgba(4,7,18,.98) 62%
        ) !important;

    box-shadow:
        0 0 0 9999px rgba(0,0,0,.82),
        0 24px 80px rgba(0,0,0,.65) !important;
}

.portrait-stage.desktop-theater-mode .phone-mockup {
    width: min(94vw, 1320px) !important;
    height: min(90vh, 760px) !important;
    max-width: 94vw !important;
    max-height: 90vh !important;
}

.portrait-stage.desktop-theater-mode .orientation-hint-image {
    display: none !important;
}

/* =========================================================
   ORIENTATION — CORRECTIF FINAL 2026-08-20
   Ce bloc doit rester EN DERNIER dans ce fichier.
========================================================= */

/* Le bouton ne doit jamais hériter d'un fond blanc navigateur. */
.orientation-hint.orientation-hint-image {
    appearance: none !important;
    -webkit-appearance: none !important;

    position: absolute !important;
    z-index: 30 !important;

    top: 18px !important;
    right: 18px !important;
    bottom: auto !important;
    left: auto !important;

    width: clamp(190px, 22vw, 280px) !important;
    max-width: 280px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;

    padding: 0 !important;
    margin: 0 !important;

    border: 0 !important;
    outline: 0 !important;
    border-radius: 16px !important;

    background: transparent !important;
    box-shadow: none !important;

    overflow: visible !important;
    cursor: pointer !important;
}

.orientation-hint.orientation-hint-image img {
    display: block !important;

    width: 100% !important;
    height: auto !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    outline: 0 !important;

    background: transparent !important;

    pointer-events: none !important;
    user-select: none !important;
    -webkit-user-drag: none !important;

    filter:
        drop-shadow(0 8px 18px rgba(0,0,0,.35)) !important;
}

.orientation-hint.orientation-hint-image:hover {
    transform: translateY(-2px) scale(1.02) !important;
    filter: brightness(1.05) !important;
    box-shadow: none !important;
}

.orientation-hint.orientation-hint-image:active {
    transform: scale(.98) !important;
}


/* Tablette */
@media (max-width: 1024px) {

    .orientation-hint.orientation-hint-image {
        top: auto !important;
        right: 14px !important;
        bottom: 14px !important;
        left: auto !important;

        width: min(260px, 42vw) !important;
        max-width: 260px !important;
    }

}


/* Mobile portrait */
@media (max-width: 760px) and (orientation: portrait) {

    .orientation-hint.orientation-hint-image {
        top: auto !important;
        right: auto !important;
        bottom: 14px !important;
        left: 50% !important;

        width: min(250px, 70vw) !important;
        max-width: 250px !important;

        transform: translateX(-50%) !important;
    }

    .orientation-hint.orientation-hint-image:hover {
        transform:
            translateX(-50%)
            translateY(-2px)
            scale(1.02) !important;
    }

    .orientation-hint.orientation-hint-image:active {
        transform:
            translateX(-50%)
            scale(.98) !important;
    }

}


/* Paysage réel : on n'a plus besoin de la bannière. */
@media (orientation: landscape) and (max-width: 1024px) {

    .orientation-hint.orientation-hint-image {
        display: none !important;
    }

}


/* Desktop : clic = mockup paysage immédiat, sans dépendre de Fullscreen API. */
.portrait-stage.desktop-landscape-selected,
.portrait-stage.is-landscape-mode {
    min-height: 620px !important;
    height: auto !important;
    padding: 24px !important;
}

.portrait-stage.desktop-landscape-selected .phone-mockup,
.portrait-stage.is-landscape-mode .phone-mockup {
    width: min(94%, 1080px) !important;
    height: min(62vw, 600px) !important;
    max-width: 1080px !important;
    max-height: 600px !important;
}

.portrait-stage.desktop-landscape-selected .phone-shell,
.portrait-stage.is-landscape-mode .phone-shell {
    border-radius: 52px !important;
}

.portrait-stage.desktop-landscape-selected .phone-shell::before,
.portrait-stage.is-landscape-mode .phone-shell::before {
    border-radius: 45px !important;
}

.portrait-stage.desktop-landscape-selected .phone-shell::after,
.portrait-stage.desktop-landscape-selected .phone-screen,
.portrait-stage.is-landscape-mode .phone-shell::after,
.portrait-stage.is-landscape-mode .phone-screen {
    border-radius: 38px !important;
}

.portrait-stage.desktop-landscape-selected .phone-dynamic-island,
.portrait-stage.is-landscape-mode .phone-dynamic-island {
    top: 50% !important;
    left: 23px !important;

    width: 31px !important;
    height: 112px !important;

    margin: -56px 0 0 !important;

    border-radius: 18px !important;
}

.portrait-stage.desktop-landscape-selected .phone-camera-dot,
.portrait-stage.is-landscape-mode .phone-camera-dot {
    top: auto !important;
    right: auto !important;
    bottom: 14px !important;
    left: 11px !important;
}


/* Sur mobile en paysage, occuper un maximum de surface sans débordement. */
@media (max-width: 1024px) and (orientation: landscape) {

    .portrait-stage.is-landscape-mode {
        min-height: 0 !important;
        height: 100vh !important;
        padding: 8px !important;
    }

    .portrait-stage.is-landscape-mode .phone-mockup {
        width: min(96vw, 1100px) !important;
        height: min(92vh, 590px) !important;
        max-width: 96vw !important;
        max-height: 92vh !important;
    }

}


/* Ancien fallback théâtre désactivé : il n'est plus utilisé. */
.portrait-stage.desktop-theater-mode {
    position: relative !important;
    inset: auto !important;
}


/* =========================================================
   GAME PAGE — SANS PUBLICITÉS
   Conserve la structure générale sans réserver d'espace pub.
========================================================= */

.game-stage-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0 !important;
}

.game-main-column {
    width: 100% !important;
    min-width: 0 !important;
}

.game-side-ad,
.game-mobile-ad,
.pp-ad {
    display: none !important;
}

@media (max-width: 1320px),
       (max-width: 1080px) {

    .game-stage-layout {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 0 !important;
    }

}


/* =========================================================
   ROTATION — VISIBILITÉ DESKTOP
   L'ancienne règle cachait .orientation-hint dès que le viewport
   était en paysage, ce qui correspond à presque tous les PC.
========================================================= */

@media (min-width: 1025px) {

    .orientation-hint.orientation-hint-image:not([hidden]) {
        display: block !important;
    }

}

/* On ne masque l'indication en paysage que sur téléphone/tablette. */
@media (max-width: 1024px) and (orientation: landscape) {

    .orientation-hint.orientation-hint-image {
        display: none !important;
    }

}


/* =========================================================
   PIXELPRIZES — MOCKUP MOBILE ADAPTATIF
   - exploite réellement la taille du viewport
   - conserve le ratio du téléphone
   - remplace la "Dynamic Island" par un simple poinçon caméra
========================================================= */

@media (max-width: 1024px) and (orientation: portrait) {

    .portrait-stage {
        min-height: 0 !important;
        height: auto !important;

        padding:
            10px 8px 14px !important;

        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /*
     * Le mockup occupe presque toute la largeur disponible,
     * mais ne dépasse jamais la hauteur réelle du viewport.
     *
     * 94vw = grands téléphones bien exploités.
     * 86dvh = évite de sortir de l'écran malgré les barres navigateur.
     */
    .portrait-stage .phone-mockup {
        width:
            min(
                94vw,
                calc(86dvh * 0.50),
                500px
            ) !important;

        height:
            auto !important;

        max-width:
            calc(100vw - 16px) !important;

        max-height:
            86dvh !important;

        aspect-ratio:
            1 / 2 !important;

        margin:
            0 auto !important;
    }

    .portrait-stage .phone-shell {
        width: 100% !important;
        height: 100% !important;

        border-radius:
            clamp(28px, 7vw, 48px) !important;
    }

    .portrait-stage .phone-shell::before {
        border-radius:
            clamp(24px, 6.3vw, 43px) !important;
    }

    .portrait-stage .phone-shell::after,
    .portrait-stage .phone-screen {
        border-radius:
            clamp(21px, 5.7vw, 39px) !important;
    }


    /* -----------------------------------------------------
       CAMÉRA CENTRALE — STYLE ANDROID
       L'ancienne grande barre type iPhone est supprimée.
    ----------------------------------------------------- */

    .portrait-stage .phone-dynamic-island {
        top:
            12px !important;
        left:
            50% !important;

        width:
            clamp(9px, 2.4vw, 13px) !important;
        height:
            clamp(9px, 2.4vw, 13px) !important;

        margin:
            0 !important;

        transform:
            translateX(-50%) !important;

        border:
            1px solid rgba(255,255,255,.12) !important;

        border-radius:
            50% !important;

        background:
            radial-gradient(
                circle at 38% 34%,
                rgba(73,102,151,.72) 0 15%,
                rgba(15,24,39,.96) 25% 48%,
                #030507 58% 100%
            ) !important;

        box-shadow:
            0 0 0 2px rgba(0,0,0,.42),
            0 1px 4px rgba(0,0,0,.9) !important;
    }

    /*
     * Le deuxième point caméra historique n'est plus nécessaire :
     * on garde un seul œilleton propre.
     */
    .portrait-stage .phone-camera-dot {
        display:
            none !important;
    }


    /* Boutons latéraux proportionnels au nouveau mockup. */
    .portrait-stage .phone-side-button-left-one {
        top:
            24% !important;

        height:
            9% !important;
    }

    .portrait-stage .phone-side-button-left-two {
        top:
            35% !important;

        height:
            14% !important;
    }

    .portrait-stage .phone-side-button-right {
        top:
            29% !important;

        height:
            16% !important;
    }

}


/* =========================================================
   TRÈS GRANDS SMARTPHONES
========================================================= */

@media (min-width: 430px) and (max-width: 760px) and (orientation: portrait) {

    .portrait-stage .phone-mockup {
        width:
            min(
                95vw,
                calc(88dvh * 0.50),
                520px
            ) !important;

        max-height:
            88dvh !important;
    }

}


/* =========================================================
   PETITS SMARTPHONES
========================================================= */

@media (max-width: 390px) and (orientation: portrait) {

    .portrait-stage {
        padding:
            8px 6px 12px !important;
    }

    .portrait-stage .phone-mockup {
        width:
            min(
                93vw,
                calc(84dvh * 0.50)
            ) !important;

        max-height:
            84dvh !important;
    }

}


/* =========================================================
   MOBILE / TABLETTE EN PAYSAGE
========================================================= */

@media (max-width: 1024px) and (orientation: landscape) {

    .portrait-stage.is-landscape-mode {
        width:
            100% !important;

        min-height:
            0 !important;

        height:
            100dvh !important;

        padding:
            6px !important;
    }

    .portrait-stage.is-landscape-mode .phone-mockup {
        width:
            min(
                96vw,
                calc(92dvh * 2)
            ) !important;

        height:
            min(
                92dvh,
                620px
            ) !important;

        max-width:
            96vw !important;

        max-height:
            92dvh !important;

        aspect-ratio:
            2 / 1 !important;
    }

    /*
     * Même logique Android en paysage :
     * simple œilleton sur le bord gauche.
     */
    .portrait-stage.is-landscape-mode .phone-dynamic-island {
        top:
            50% !important;
        left:
            12px !important;

        width:
            clamp(9px, 1.7vh, 13px) !important;
        height:
            clamp(9px, 1.7vh, 13px) !important;

        margin:
            0 !important;

        transform:
            translateY(-50%) !important;

        border-radius:
            50% !important;
    }

    .portrait-stage.is-landscape-mode .phone-camera-dot {
        display:
            none !important;
    }

}


/* =========================================================
   ROTATION — JEU SANS MOCKUP
   Après activation du paysage, le téléphone décoratif disparaît
   et l'iframe exploite directement l'écran disponible.
========================================================= */

.portrait-stage.mockup-hidden-landscape {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    max-width: none !important;
    background: #000 !important;
}

.portrait-stage.mockup-hidden-landscape .phone-mockup {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    margin: 0 !important;
}

.portrait-stage.mockup-hidden-landscape .phone-shell,
.portrait-stage.mockup-hidden-landscape .phone-screen {
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #000 !important;
}

.portrait-stage.mockup-hidden-landscape .phone-shell::before,
.portrait-stage.mockup-hidden-landscape .phone-shell::after,
.portrait-stage.mockup-hidden-landscape .phone-reflection,
.portrait-stage.mockup-hidden-landscape .phone-dynamic-island,
.portrait-stage.mockup-hidden-landscape .phone-camera-dot,
.portrait-stage.mockup-hidden-landscape .phone-side-button-left-one,
.portrait-stage.mockup-hidden-landscape .phone-side-button-left-two,
.portrait-stage.mockup-hidden-landscape .phone-side-button-right {
    display: none !important;
}

.portrait-stage.mockup-hidden-landscape .phone-screen iframe {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    border: 0 !important;
    border-radius: 0 !important;
}