.stp-clean-roulette-page {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    max-width: 100vw;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 0%, rgba(216, 155, 60, 0.16), transparent 32%),
        linear-gradient(145deg, #fff7ed 0%, #ffffff 48%, #f4f4f5 100%);
}

.stp-clean-page-main {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    padding: clamp(6px, 2dvh, 14px) clamp(8px, 3vw, 16px);
}

.stp-roulette-app {
    --stp-black: #111827;
    --stp-ink: #1f2937;
    --stp-gold: #d89b3c;
    --stp-gold-light: #f4ebcd;
    --stp-red: #e45a4f;
    --stp-white: #ffffff;
    --stp-muted: #6b7280;
    --stp-shadow: none;
    box-sizing: border-box;
    width: min(100%, 720px);
    max-width: 100%;
    max-height: calc(100dvh - 12px);
    margin: 0 auto;
    padding: 0;
    font-family: inherit;
    overflow: hidden;
}

.stp-roulette-app *,
.stp-roulette-app *::before,
.stp-roulette-app *::after {
    box-sizing: border-box;
}

.stp-card {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    max-height: calc(100dvh - 12px);
    border-radius: clamp(18px, 3.2vw, 30px);
    padding: clamp(12px, 2.6dvh, 28px) clamp(12px, 4vw, 34px);
    text-align: center;
    background:
        radial-gradient(circle at top left, rgba(216, 155, 60, 0.18), transparent 38%),
        linear-gradient(145deg, #fffaf1 0%, #ffffff 52%, #f8fafc 100%);
    box-shadow: none;
    border: 1px solid rgba(17, 24, 39, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stp-card::before {
    display: none;
    content: "";
    position: absolute;
    inset: 14px;
    border-radius: 24px;
    border: 1px solid rgba(17, 24, 39, 0.06);
    pointer-events: none;
}

.stp-kicker {
    margin: 0 0 clamp(3px, 0.8dvh, 8px);
    color: var(--stp-gold);
    font-size: clamp(0.66rem, 1.8dvh, 0.78rem);
    font-weight: 850;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.stp-title {
    margin: 0 auto clamp(6px, 1.3dvh, 12px);
    max-width: 620px;
    color: var(--stp-black);
    font-size: clamp(1.45rem, min(7vw, 5.2dvh), 3.15rem);
    line-height: 0.95;
    letter-spacing: -0.045em;
}

.stp-intro {
    margin: 0 auto clamp(8px, 1.7dvh, 16px);
    max-width: 560px;
    color: #374151;
    font-size: clamp(0.82rem, min(3.3vw, 2.1dvh), 1.08rem);
    line-height: 1.32;
}

.stp-admin-note {
    display: inline-flex;
    margin: 0 auto 12px;
    padding: 8px 12px;
    border-radius: 999px;
    color: #78350f;
    background: rgba(251, 191, 36, 0.18);
    font-size: 0.88rem;
    font-weight: 750;
}

.stp-wheel-wrap {
    position: relative;
    width: min(430px, calc(100vw - 48px), 48dvh);
    height: min(430px, calc(100vw - 48px), 48dvh);
    max-width: 100%;
    aspect-ratio: 1 / 1;
    margin: clamp(6px, 1.2dvh, 14px) auto clamp(4px, 1dvh, 12px);
    filter: drop-shadow(0 10px 16px rgba(17, 24, 39, 0.12));
    flex: 0 0 auto;
}

.stp-wheel {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    border: clamp(8px, 2vw, 12px) solid #ffffff;
    outline: 3px solid rgba(17, 24, 39, 0.13);
    overflow: hidden;
    transform: rotate(0deg);
}

.stp-wheel::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.26), transparent 24%),
        radial-gradient(circle, transparent 0 36%, rgba(255, 255, 255, 0.16) 36.5% 37.2%, transparent 38%);
    pointer-events: none;
    z-index: 1;
}

.stp-wheel::after {
    content: "";
    position: absolute;
    inset: clamp(18px, 5%, 24px);
    border-radius: inherit;
    border: 2px solid rgba(255, 255, 255, 0.52);
    pointer-events: none;
    z-index: 2;
}

.stp-prize-marker {
    position: absolute;
    z-index: 3;
    left: var(--stp-marker-x);
    top: var(--stp-marker-y);
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    pointer-events: none;
}

.stp-prize-badge {
    display: grid;
    place-items: center;
    width: clamp(48px, 14vw, 78px);
    aspect-ratio: 1 / 1;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    border: 2px solid rgba(255, 255, 255, 0.72);
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.18);
    color: var(--stp-black);
    font-size: clamp(0.78rem, 3.2vw, 1.12rem);
    font-weight: 950;
    line-height: 0.95;
    text-align: center;
    letter-spacing: -0.04em;
    padding: 6px;
}

.stp-prize-badge-icon img {
    display: block;
    max-width: 88%;
    max-height: 88%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.stp-logo-spinner {
    position: absolute;
    z-index: 5;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: min(40%, 17dvh, 180px);
    height: min(40%, 17dvh, 180px);
    min-width: 122px;
    min-height: 122px;
    max-width: 180px;
    max-height: 180px;
    aspect-ratio: 1 / 1;
    margin: 0;
    transform: translate3d(-50%, -50%, 0) rotate(0deg);
    transform-origin: 50% 50%;
    transition: transform 4.2s cubic-bezier(0.12, 0.78, 0.1, 1);
    border-radius: 999px;
    background: radial-gradient(circle at 35% 25%, #ffffff 0%, #ffffff 50%, #f3f4f6 100%);
    border: 6px solid rgba(17, 24, 39, 0.10);
    box-shadow: 0 10px 18px rgba(17, 24, 39, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.92);
    padding: 14px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    -webkit-tap-highlight-color: transparent;
}

.stp-logo-spinner::after {
    content: "";
    position: absolute;
    right: -11px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: 20px solid var(--stp-red);
    filter: drop-shadow(0 2px 3px rgba(17, 24, 39, 0.18));
}

.stp-logo-spinner::before {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: inherit;
    border: 2px solid rgba(216, 155, 60, 0.36);
    opacity: 0;
    transform: scale(0.94);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.stp-logo-spinner:hover::before,
.stp-logo-spinner:focus-visible::before {
    opacity: 1;
    transform: scale(1);
}

.stp-logo-spinner:hover,
.stp-logo-spinner:focus-visible {
    box-shadow:
        0 12px 20px rgba(17, 24, 39, 0.18),
        0 0 0 4px rgba(216, 155, 60, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.stp-logo-spinner:focus-visible {
    outline: 3px solid rgba(216, 155, 60, 0.45);
    outline-offset: 5px;
}

.stp-logo-spinner img {
    display: block;
    width: auto;
    height: auto;
    max-width: 92%;
    max-height: 60%;
    object-fit: contain;
    object-position: center center;
    margin: 0 auto;
    transform: translateX(1.5%);
}

.stp-logo-spinner[disabled],
.stp-logo-spinner[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.82;
}

.stp-launch-hint {
    margin: clamp(4px, 0.9dvh, 10px) auto 0;
    max-width: 460px;
    color: #374151;
    font-size: clamp(0.74rem, min(2.8vw, 1.8dvh), 0.92rem);
    font-weight: 750;
    line-height: 1.22;
}

.stp-waiting,
.stp-result {
    margin: clamp(8px, 1.6dvh, 18px) auto 0;
    padding: clamp(10px, 2dvh, 16px);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(17, 24, 39, 0.08);
    box-shadow: 0 10px 22px rgba(17, 24, 39, 0.08);
}

.stp-waiting-title {
    margin: 0 0 6px;
    color: var(--stp-black);
    font-size: 1.1rem;
    font-weight: 950;
}

.stp-waiting-text {
    margin: 0;
    color: #4b5563;
    line-height: 1.45;
}

.stp-result-title {
    margin: 0 0 8px;
    color: var(--stp-black);
    font-size: clamp(1.45rem, 5vw, 2.1rem);
    font-weight: 950;
    line-height: 1.05;
}

.stp-result-label {
    margin: 0 0 14px;
    color: #374151;
    font-size: 1.14rem;
    font-weight: 800;
}

.stp-code-box {
    display: inline-flex;
    max-width: 100%;
    margin: 0 auto 8px;
    padding: 12px 18px;
    border-radius: 18px;
    background: #111827;
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.stp-code-box code {
    color: inherit;
    background: transparent;
    font-size: clamp(1.25rem, 6vw, 2.1rem);
    font-weight: 950;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.stp-copy-feedback {
    margin: 8px auto 14px;
    color: #166534;
    font-size: 0.98rem;
    font-weight: 900;
}

.stp-result-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.stp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    min-height: 50px;
    padding: 14px 20px;
    border-radius: 999px;
    border: 0;
    font: inherit;
    font-weight: 850;
    font-size: 1rem;
    line-height: 1.1;
    text-decoration: none !important;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, opacity 0.18s ease;
    -webkit-tap-highlight-color: transparent;
}

.stp-button:hover,
.stp-button:focus-visible {
    transform: translateY(-1px);
}

.stp-button:focus-visible {
    outline: 3px solid rgba(216, 155, 60, 0.42);
    outline-offset: 3px;
}

.stp-button[disabled],
.stp-button[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.72;
    transform: none;
}

.stp-button-primary {
    min-width: min(100%, 190px);
    color: var(--stp-white) !important;
    background: linear-gradient(135deg, var(--stp-black), #374151);
    box-shadow: 0 14px 22px rgba(17, 24, 39, 0.24);
}

.stp-button-secondary {
    min-width: min(100%, 190px);
    color: var(--stp-black) !important;
    background: var(--stp-gold-light);
    border: 1px solid rgba(216, 155, 60, 0.32);
}

@media (max-width: 480px) {
    .stp-clean-page-main {
        padding: 8px;
    }

    .stp-card {
        border-radius: 24px;
        padding: 18px 14px 20px;
    }

    .stp-card::before {
    display: none;
        inset: 8px;
        border-radius: 20px;
    }

    .stp-title {
        font-size: clamp(1.9rem, 10vw, 2.6rem);
    }

    .stp-intro {
        font-size: 0.98rem;
    }

    .stp-wheel-wrap {
        width: min(390px, calc(100vw - 32px));
        height: min(390px, calc(100vw - 32px));
        max-width: 100%;
        margin-top: 12px;
    }

    .stp-prize-badge {
        width: clamp(44px, 15vw, 60px);
        font-size: clamp(0.72rem, 3.5vw, 0.92rem);
    }

    .stp-logo-spinner {
        width: 42%;
        height: 42%;
        min-width: 132px;
        min-height: 132px;
        max-width: 165px;
        max-height: 165px;
        padding: 14px;
        border-width: 6px;
    }

    .stp-logo-spinner::after {
        right: -10px;
        border-top-width: 11px;
        border-bottom-width: 11px;
        border-left-width: 18px;
    }

    .stp-launch-hint {
        font-size: 0.9rem;
    }
}


/* V1.4 : roue SVG fixe, plus fiable sous Safari que les segments en conic-gradient. */
.stp-wheel-svg {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
}

.stp-wheel-segment {
    stroke: rgba(255, 255, 255, 0.72);
    stroke-width: 1.1;
    vector-effect: non-scaling-stroke;
}

.stp-prize-svg-badge {
    fill: rgba(255, 255, 255, 0.92);
    stroke: rgba(17, 24, 39, 0.14);
    stroke-width: 1.2;
    filter: drop-shadow(0 2px 3px rgba(17, 24, 39, 0.18));
}

.stp-prize-svg-text {
    fill: #111827;
    font-family: inherit;
    font-size: 9px;
    font-weight: 950;
    letter-spacing: -0.035em;
    pointer-events: none;
}

.stp-prize-svg-image {
    pointer-events: none;
}

.stp-wheel-inner-mask {
    fill: rgba(255, 255, 255, 0.96);
    stroke: rgba(17, 24, 39, 0.08);
    stroke-width: 1.2;
}

/* Admin V1.5 : choix texte / icône plus visible */
.stp-display-mode-field {
    grid-column: span 2;
}

.stp-display-choice {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.stp-choice-card {
    display: block;
    padding: 12px;
    border: 1px solid #dcdcde;
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
}

.stp-choice-card.is-selected {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    background: #f0f6fc;
}

.stp-choice-card input {
    margin-right: 6px;
}

.stp-choice-title {
    display: inline-block;
    font-weight: 700;
}

.stp-choice-desc {
    display: block;
    margin-top: 4px;
    color: #646970;
    font-size: 12px;
}

.stp-display-icon-wrap {
    grid-column: span 2;
}

.stp-icon-picker {
    flex-wrap: wrap;
}

.stp-icon-picker .stp-upload-icon {
    font-weight: 600;
}

.stp-icon-preview.is-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 170px;
    min-height: 54px;
    padding: 8px 10px;
    border: 1px dashed #a7aaad;
    border-radius: 8px;
    color: #646970;
    background: #f6f7f7;
}

@media (max-width: 640px) {
    .stp-display-choice {
        grid-template-columns: 1fr;
    }

    .stp-display-mode-field,
    .stp-display-icon-wrap {
        grid-column: auto;
    }
}


/* V1.6 : correction anti-débordement horizontal mobile/Safari */
html,
body,
.stp-clean-roulette-page {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.stp-clean-page-main,
.stp-roulette-app,
.stp-card,
.stp-wheel-wrap,



.stp-result-actions,

.stp-code-box {
    max-width: 100%;
    overflow-x: auto;
}

.stp-code-box code {
    white-space: nowrap;
}


/* V1.7 : mode plein écran sans scroll inutile */
.stp-clean-roulette-page,
.stp-clean-roulette-page body,
.stp-clean-page-main {
    height: 100vh;
    height: 100dvh;
}

.stp-clean-page-main {
    align-items: center;
    justify-items: center;
}

.stp-card > * {
    flex-shrink: 0;
}

.stp-logo-spinner {
    width: min(42%, 18dvh, 190px);
    height: min(42%, 18dvh, 190px);
    min-width: 118px;
    min-height: 118px;
}

.stp-logo-spinner img {
    max-width: 94%;
    max-height: 64%;
}

@media (max-height: 760px) {
    .stp-card {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .stp-card::before {
    display: none;
        inset: 8px;
    }

    .stp-title {
        font-size: clamp(1.35rem, min(6.4vw, 4.8dvh), 2.55rem);
    }

    .stp-intro {
        font-size: clamp(0.78rem, min(3vw, 1.9dvh), 0.96rem);
        line-height: 1.25;
    }

    .stp-wheel-wrap {
        width: min(calc(100vw - 40px), 43dvh, 370px);
        height: min(calc(100vw - 40px), 43dvh, 370px);
    }

    .stp-launch-hint {
        font-size: clamp(0.72rem, min(2.6vw, 1.65dvh), 0.86rem);
        line-height: 1.16;
    }

    .stp-admin-note {
        display: none;
    }
}

@media (max-height: 650px) {
    .stp-kicker {
        display: none;
    }

    .stp-title {
        font-size: clamp(1.2rem, min(5.8vw, 4.2dvh), 2.15rem);
        margin-bottom: 4px;
    }

    .stp-intro {
        margin-bottom: 6px;
    }

    .stp-wheel-wrap {
        width: min(calc(100vw - 38px), 40dvh, 320px);
        height: min(calc(100vw - 38px), 40dvh, 320px);
        margin-top: 4px;
        margin-bottom: 2px;
    }

    .stp-launch-hint {
        margin-top: 3px;
    }
}

@media (max-height: 560px) {
    .stp-title {
        font-size: clamp(1.05rem, min(5vw, 3.8dvh), 1.75rem);
    }

    .stp-intro {
        font-size: 0.72rem;
        line-height: 1.18;
    }

    .stp-wheel-wrap {
        width: min(calc(100vw - 34px), 36dvh, 270px);
        height: min(calc(100vw - 34px), 36dvh, 270px);
    }

    .stp-launch-hint {
        display: none;
    }
}

@media (max-width: 480px) {
    .stp-clean-page-main {
        padding: 6px;
    }

    .stp-card {
        padding-left: 10px;
        padding-right: 10px;
    }

    .stp-wheel-wrap {
        width: min(calc(100vw - 28px), 47dvh, 390px);
        height: min(calc(100vw - 28px), 47dvh, 390px);
    }

    .stp-logo-spinner {
        min-width: 108px;
        min-height: 108px;
    }
}


/* V1.8 : suppression des ombres de coins et meilleur centrage du logo */
.stp-card, .stp-card::before {
    background-clip: padding-box;
}


/* V1.12 : message personnalisé du lot */
.stp-result-message {
    margin: -6px auto 14px;
    max-width: 440px;
    color: #4b5563;
    font-size: 0.98rem;
    font-weight: 650;
    line-height: 1.35;
}


/* V1.14 : résultat sauvegardé avant redirection Google */
.stp-result-message {
    margin: -6px auto 14px;
    max-width: 440px;
    color: #4b5563;
    font-size: 0.98rem;
    font-weight: 650;
    line-height: 1.35;
}
