/* ==========================================================================
   ROULETTE D'ATOUT — slot machine vertical
   3 colonnes : (gauche) titre+bouton | (centre) slot machine | (droite) résultat
   ========================================================================== */

   .roulette-screen {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100svh;
    padding: 30px 50px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: clamp(20px, 5vw, 50px);
}

/* ---------- COLONNE GAUCHE ---------- */

.roulette-side {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    flex-shrink: 0;
    width: clamp(180px, 28vw, 250px);
    animation: fadeUp 0.5s ease-out backwards;
    animation-delay: 0.1s;
}

.roulette-title {
    font-family: var(--font-title);
    font-size: clamp(22px, 6vh, 32px);
    color: var(--cream);
    letter-spacing: 2px;
    line-height: 1.1;
    text-transform: uppercase;
}

.roulette-title em {
    display: block;
    font-style: normal;
    color: var(--green);
    font-size: 0.7em;
    margin-top: 6px;
}

.roulette-hint {
    font-family: var(--font-body);
    font-size: clamp(11px, 2.6vh, 13px);
    color: var(--cream-soft);
    opacity: 0.75;
    line-height: 1.5;
}

.roulette-hint.is-spinning::after {
    content: "...";
    display: inline-block;
    animation: dots 1s steps(4) infinite;
}

@keyframes dots {
    0%   { content: "";     }
    25%  { content: ".";    }
    50%  { content: "..";   }
    75%  { content: "..."; }
}

/* ---------- SLOT MACHINE (centre) ---------- */

.slot-machine {
    position: relative;
    width: clamp(110px, 24vw, 160px);
    height: clamp(180px, 78vh, 320px);
    flex-shrink: 0;
    animation: fadeUp 0.5s ease-out backwards;
    animation-delay: 0.2s;
}

/* la fenêtre visible où défilent les items */
.slot-window {
    position: absolute;
    inset: 0;
    background-color: var(--bg-2);
    border: 3px solid var(--cream-soft);
    overflow: hidden;
    /* effet "écran de borne" */
    box-shadow:
        inset 0 0 0 2px var(--bg),
        inset 0 0 30px rgba(0, 0, 0, 0.5);
}

.slot-window::before {
    /* fines lignes horizontales type vieil écran */
    content: "";
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 2px,
        rgba(255, 255, 255, 0.02) 2px,
        rgba(255, 255, 255, 0.02) 3px
    );
    pointer-events: none;
    z-index: 3;
}

.slot-track {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    /* hauteur calculée par JS */
    transform: translateY(0);
    /* la transition est appliquée dynamiquement par JS pour le spin */
    display: flex;
    flex-direction: column;
}

.slot-item {
    position: relative;
    width: 100%;
    /* hauteur calculée et fixée en JS via --slot-h pour que 1 item = 1 fenêtre */
    height: var(--slot-h, 200px);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    box-sizing: border-box;
}

.slot-item img {
    width: 60%;
    height: 60%;
    max-width: 100px;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.4));
}

.slot-item__name {
    font-family: var(--font-title);
    font-size: clamp(10px, 2vh, 13px);
    color: var(--cream);
    text-align: center;
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 1.1;
    max-width: 100%;
    word-break: break-word;
}

/* ---------- Repères (chevrons gauche/droite) ---------- */

.slot-pointer {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: clamp(18px, 4vh, 26px);
    height: clamp(18px, 4vh, 26px);
    pointer-events: none;
    z-index: 5;
    animation: pointerPulse 1.4s ease-in-out infinite;
}

.slot-pointer--left  { left:  -8px; }
.slot-pointer--right { right: -8px; }

.slot-pointer svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: var(--green);
    stroke-width: 3;
    stroke-linecap: square;
    stroke-linejoin: miter;
    filter: drop-shadow(0 0 4px var(--green));
}

@keyframes pointerPulse {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50%      { transform: translateY(-50%) translateX(3px); }
}

.slot-pointer--right { animation-name: pointerPulseRight; }

@keyframes pointerPulseRight {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50%      { transform: translateY(-50%) translateX(-3px); }
}

/* ---------- Masques haut/bas (assombrissent les items adjacents) ---------- */

.slot-mask {
    position: absolute;
    left: 0;
    width: 100%;
    height: 25%;
    pointer-events: none;
    z-index: 4;
}

.slot-mask--top {
    top: 0;
    background: linear-gradient(to bottom, var(--bg) 0%, rgba(15, 22, 18, 0.85) 60%, transparent 100%);
}

.slot-mask--bottom {
    bottom: 0;
    background: linear-gradient(to top, var(--bg) 0%, rgba(15, 22, 18, 0.85) 60%, transparent 100%);
}

/* ---------- COLONNE DROITE : résultat ---------- */

.roulette-result {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    flex-shrink: 0;
    width: clamp(180px, 28vw, 260px);
    animation: fadeUp 0.5s ease-out backwards;
    animation-delay: 0.3s;
}

.roulette-result__label {
    font-family: var(--font-body);
    font-size: clamp(10px, 2vh, 12px);
    color: var(--cream-soft);
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.6;
}

.roulette-result__name {
    font-family: var(--font-title);
    font-size: clamp(20px, 5.5vh, 28px);
    color: var(--cream);
    letter-spacing: 1px;
    line-height: 1.1;
    transition: color 0.3s ease;
    /* soulignement vert pointillé style maquette */
    border-bottom: 3px dashed transparent;
    padding-bottom: 4px;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.roulette-result__name.is-revealed {
    color: var(--green);
    border-bottom-color: var(--green);
    animation: revealPop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.5);
}

@keyframes revealPop {
    0%   { transform: scale(0.85); opacity: 0; }
    60%  { transform: scale(1.08); }
    100% { transform: scale(1);    opacity: 1; }
}

.roulette-result__desc {
    font-family: var(--font-body);
    font-size: clamp(10px, 2.2vh, 13px);
    color: var(--cream-soft);
    line-height: 1.5;
    opacity: 0.85;
    min-height: 60px;
}

.roulette-result__continue {
    margin-top: 6px;
    align-self: stretch;
    text-align: center;
    animation: fadeUp 0.4s ease-out backwards;
}

.roulette-result__continue[hidden] { display: none; }

/* ---------- Bouton Lancer (utilise les styles globaux) ---------- */

.roulette-side .btn {
    align-self: stretch;
    text-align: center;
}

.roulette-side .btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ---------- Petits écrans landscape ---------- */

@media (orientation: landscape) and (max-height: 380px) {
    .roulette-screen { padding: 18px 40px; gap: 24px; }
    .roulette-side, .roulette-result { width: 26vw; gap: 10px; }
    .slot-machine { width: 22vw; height: 80vh; }
}