:root {
    --wheel-overlay: rgba(10, 30, 33, 0.58);
    --wheel-surface: #ffffff;
    --wheel-surface-2: #f4faf6;
    --wheel-glow: rgba(22, 123, 108, 0.18);
    --wheel-segment-1: #167b6c;
    --wheel-segment-2: #0f6b5d;
    --wheel-segment-3: #7fb84a;
    --wheel-segment-4: #9ac8ab;
    --wheel-segment-5: #dcefe2;
    --wheel-segment-6: #21534f;
}

.wheel-popup {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.26s ease;
}

.wheel-popup[hidden] {
    display: none;
}

.wheel-popup.is-open {
    opacity: 1;
    pointer-events: auto;
}

.wheel-popup__overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top, rgba(154, 200, 171, 0.12), transparent 26%),
        var(--wheel-overlay);
    backdrop-filter: blur(8px);
}

.wheel-popup__dialog {
    position: relative;
    width: min(980px, 100%);
    max-height: min(92vh, 860px);
    overflow: auto;
    border: 1px solid rgba(219, 232, 225, 0.9);
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(154, 200, 171, 0.18), transparent 30%),
        linear-gradient(180deg, #ffffff, #f8fcf9);
    box-shadow:
        0 34px 90px rgba(18, 53, 58, 0.24),
        0 10px 24px rgba(18, 53, 58, 0.08);
    transform: translateY(16px) scale(0.975);
    opacity: 0;
    transition: transform 0.28s ease, opacity 0.28s ease;
}

.wheel-popup.is-open .wheel-popup__dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.wheel-popup__close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: rgba(18, 53, 58, 0.06);
    color: var(--ink);
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    transition: background 0.18s ease, transform 0.18s ease;
}

.wheel-popup__close:hover {
    background: rgba(18, 53, 58, 0.12);
    transform: rotate(90deg);
}

.wheel-popup__dialog :is(button, a):focus-visible {
    outline: 3px solid rgba(22, 123, 108, 0.34);
    outline-offset: 3px;
}

.wheel-popup__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(320px, 420px);
    gap: 34px;
    padding: 34px;
}

.wheel-popup__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.wheel-popup__eyebrow {
    margin: 0 0 14px;
    color: var(--brand);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.wheel-popup__title {
    margin: 0;
    font-size: clamp(30px, 3.6vw, 48px);
    line-height: 1.04;
    letter-spacing: -1.9px;
}

.wheel-popup__desc {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.55;
}

.wheel-popup__guarantee {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    margin: 18px 0 0;
    padding: 10px 14px;
    border: 1px solid rgba(22, 123, 108, 0.14);
    border-radius: 999px;
    background: rgba(22, 123, 108, 0.08);
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
}

.wheel-popup__guarantee::before {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #7fb84a;
    content: "";
}

.wheel-popup__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
}

.wheel-popup__list li {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 10px 24px rgba(18, 53, 58, 0.05);
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.wheel-popup__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 24px;
}

.wheel-popup__result {
    min-height: 26px;
    margin: 2px 0 0;
    color: var(--ink);
    font-size: 15px;
    font-weight: 700;
}

.wheel-popup__result strong {
    color: var(--brand-dark);
}

.wheel-popup__aside {
    position: relative;
    display: grid;
    place-items: center;
    gap: 20px;
    padding: 18px 10px 8px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top, rgba(154, 200, 171, 0.32), transparent 36%),
        linear-gradient(180deg, rgba(242, 248, 244, 0.9), rgba(255, 255, 255, 0.92));
    border: 1px solid rgba(219, 232, 225, 0.95);
}

.wheel-popup__pointer {
    position: absolute;
    top: 0;
    left: 50%;
    z-index: 2;
    width: 0;
    height: 0;
    border-right: 15px solid transparent;
    border-top: 24px solid var(--ink);
    border-left: 15px solid transparent;
    transform: translate(-50%, -26%);
    filter: drop-shadow(0 8px 12px rgba(18, 53, 58, 0.18));
}

.wheel-popup__wheel-wrap {
    position: relative;
    display: grid;
    place-items: center;
    width: min(100%, 360px);
    aspect-ratio: 1;
    padding: 18px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 56%),
        linear-gradient(180deg, rgba(255,255,255,0.88), rgba(255,255,255,0.36));
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,0.8),
        0 20px 44px rgba(18, 53, 58, 0.12);
}

.wheel-popup__wheel-wrap::before {
    position: absolute;
    inset: 16px;
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: 50%;
    content: "";
}

.wheel-popup__wheel {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border: 10px solid #ffffff;
    border-radius: 50%;
    background:
        conic-gradient(
            from -30deg,
            var(--wheel-segment-1) 0deg 60deg,
            var(--wheel-segment-2) 60deg 120deg,
            var(--wheel-segment-3) 120deg 180deg,
            var(--wheel-segment-4) 180deg 240deg,
            var(--wheel-segment-5) 240deg 300deg,
            var(--wheel-segment-6) 300deg 360deg
        );
    box-shadow:
        inset 0 16px 28px rgba(255,255,255,0.16),
        inset 0 -10px 16px rgba(0,0,0,0.12),
        0 16px 30px rgba(18, 53, 58, 0.14);
    transform: rotate(0deg);
    transform-origin: 50% 50%;
    will-change: transform;
}

.wheel-popup__wheel-wrap.is-idle {
    animation: wheelFloat 3.6s ease-in-out infinite;
}

.wheel-popup__wheel.is-winning {
    animation: wheelWinPulse 0.9s ease-in-out 3;
}

.wheel-popup__wheel::before {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 34%, rgba(255,255,255,0.28), transparent 48%),
        radial-gradient(circle at 50% 78%, rgba(0,0,0,0.1), transparent 52%);
    content: "";
}

.wheel-popup__wheel::after {
    position: absolute;
    inset: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.38);
    border-radius: 50%;
    content: "";
}

.wheel-popup__label {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 92px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 0.2px;
    text-align: center;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.22);
    transform:
        translate(-50%, -50%)
        rotate(var(--label-angle))
        translateY(-118px)
        rotate(calc(var(--label-angle) * -1));
}

.wheel-popup__label--dark {
    color: var(--ink);
    text-shadow: none;
}

.wheel-popup__hub {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 104px;
    aspect-ratio: 1;
    padding: 12px;
    border: 8px solid rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    background:
        radial-gradient(circle at 28% 24%, rgba(255,255,255,0.24), transparent 42%),
        linear-gradient(180deg, var(--ink), #0e2a2e);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.18),
        0 16px 32px rgba(18, 53, 58, 0.22);
    color: #fff;
    text-align: center;
    transform: translate(-50%, -50%);
}

.wheel-popup__hub strong {
    display: block;
    font-size: 14px;
    line-height: 1.05;
}

.wheel-popup__hub span {
    display: block;
    margin-top: 4px;
    color: rgba(255,255,255,0.74);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.wheel-popup__note {
    max-width: 320px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
    text-align: center;
}

.wheel-popup__claim[hidden] {
    display: none;
}

body.wheel-popup-open {
    overflow: hidden;
}

@keyframes wheelFloat {
    0%, 100% { transform: rotate(var(--wheel-rotation)) translateY(0); }
    50% { transform: rotate(var(--wheel-rotation)) translateY(-4px); }
}

@keyframes wheelWinPulse {
    0%, 100% {
        box-shadow:
            inset 0 16px 28px rgba(255,255,255,0.16),
            inset 0 -10px 16px rgba(0,0,0,0.12),
            0 16px 30px rgba(18, 53, 58, 0.14);
    }
    50% {
        box-shadow:
            inset 0 16px 28px rgba(255,255,255,0.16),
            inset 0 -10px 16px rgba(0,0,0,0.12),
            0 0 0 10px rgba(22, 123, 108, 0.08),
            0 20px 34px rgba(18, 53, 58, 0.18);
    }
}

@media (prefers-reduced-motion: reduce) {
    .wheel-popup,
    .wheel-popup__dialog,
    .wheel-popup__wheel,
    .wheel-popup__close {
        transition: none;
        animation: none !important;
    }
}

@media (max-width: 860px) {
    .wheel-popup {
        padding: 16px;
    }

    .wheel-popup__inner {
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 26px 20px 22px;
    }

    .wheel-popup__content {
        order: 2;
    }

    .wheel-popup__aside {
        order: 1;
        padding-top: 28px;
    }

    .wheel-popup__list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .wheel-popup__dialog {
        border-radius: 22px;
    }

    .wheel-popup__title {
        font-size: 29px;
        letter-spacing: -1.2px;
    }

    .wheel-popup__desc {
        font-size: 16px;
    }

    .wheel-popup__wheel-wrap {
        width: min(100%, 320px);
        padding: 14px;
    }

    .wheel-popup__label {
        width: 78px;
        font-size: 11px;
        transform:
            translate(-50%, -50%)
            rotate(var(--label-angle))
            translateY(-103px)
            rotate(calc(var(--label-angle) * -1));
    }

    .wheel-popup__hub {
        width: 92px;
    }

    .wheel-popup__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .wheel-popup__actions .button {
        width: 100%;
    }
}

/* Correctifs responsive mobile — popup roue
   Fichier : assets/css/wheel-popup.css */
@media (max-width: 480px) {
    .wheel-popup {
        align-items: start;
        padding: 10px;
    }

    .wheel-popup__dialog {
        max-height: calc(100dvh - 20px);
        border-radius: 18px;
    }

    .wheel-popup__close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }

    .wheel-popup__inner {
        gap: 18px;
        padding: 58px 14px 18px;
    }

    .wheel-popup__aside {
        padding: 18px 8px 12px;
        border-radius: 18px;
    }

    .wheel-popup__wheel-wrap {
        width: min(100%, 280px);
    }

    .wheel-popup__label {
        width: 70px;
        font-size: 10px;
        transform:
            translate(-50%, -50%)
            rotate(var(--label-angle))
            translateY(-90px)
            rotate(calc(var(--label-angle) * -1));
    }

    .wheel-popup__hub {
        width: 82px;
        border-width: 6px;
    }

    .wheel-popup__hub strong {
        font-size: 12px;
    }

    .wheel-popup__title {
        font-size: 26px;
    }

    .wheel-popup__guarantee {
        width: 100%;
        border-radius: 14px;
    }
}
