/* CARTES */
.casinocards{
    display:flex;
    justify-content:center;
    gap:40px;
    min-height:200px;
    margin:30px 0;
}

.casinocard{
    width:120px;
    height:170px;
    border-radius:12px;
    background-color:white;
    background-size:contain;
    background-repeat:no-repeat;
    background-position:center;
    box-shadow:0 6px 15px rgba(0,0,0,0.4);
    padding:5px;
}

/* JETONS PREMIUM */

.balance-chips,.bet-chips{
    position:relative;
    height:140px;
    margin-top:25px;
}

.chip{
    width:70px;
    height:70px;
    border-radius:50%;
    position:absolute;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:bold;
    font-size:14px;
    color:white;
    box-shadow:
        inset 0 4px 8px rgba(255,255,255,0.5),
        inset 0 -4px 8px rgba(0,0,0,0.4),
        0 6px 12px rgba(0,0,0,0.4);
}

.chip-wrapper {
    transform: translateY(-200px);
    opacity: 0;
    transition: transform 0.4s ease-out, opacity 0.3s;
}

.chip-wrapper.animate {
    transform: translateY(0);
    opacity: 1;
}


.chip::before{
    content:"";
    position:absolute;
    width:85%;
    height:85%;
    border-radius:50%;
    border:4px dashed rgba(255,255,255,0.8);
}

.chip-1{
    background:radial-gradient(circle at 30% 30%, #bdc3c7, #7f8c8d);
}
.chip-5{
    background:radial-gradient(circle at 30% 30%, #ff6b6b, #c0392b);
}
.chip-10{
    background:radial-gradient(circle at 30% 30%, #5dade2, #1f618d);
}
.chip-50{
    background:radial-gradient(circle at 30% 30%, #af7ac5, #6c3483);
}
.chip-100{
    background:radial-gradient(circle at 30% 30%, #f7dc6f, #b7950b);
    color:black;
}
.chip-500{
    background:radial-gradient(circle at 30% 30%, #f5b041, #a04000);
    color:black;
}



/* ===== ROULETTE ===== */
/* Roulette container responsive */
.wheel-container {
    position: relative;
    width: 80vw;          /* 80% de la largeur du parent / fenêtre */
    max-width: 700px;     /* taille max */
    aspect-ratio: 1 / 1;  /* toujours carré */
    margin: 0 auto;
}

/* Image de la roulette */
#wheel-img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
}

/* Bille */
#ball {
    position: absolute;
    width: 25px;       /* taille de la bille */
    height: 25px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, 
        #ffffff 0%, 
        #dddddd 25%, 
        #bbbbbb 45%, 
        #888888 65%, 
        #555555 85%, 
        #333333 100%
    );
    box-shadow:
        inset -2px -2px 4px rgba(0,0,0,0.6),
        inset 2px 2px 4px rgba(255,255,255,0.6),
        0 2px 6px rgba(0,0,0,0.8);
    top: 50%;   /* position initiale au centre */
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ===== TIMER ===== */

#timer {
    font-size: 24px;
    margin: 15px 0;
}

/* ===== TAPIS ===== */
.bet-area {
    width: 100%;
    max-width: 1200px;        /* facultatif, limite max */
    margin: 20px auto;
    display: grid;
    grid-template-columns: repeat(14, 1fr);
    grid-template-rows: repeat(7, 70px); /* plus grand pour plus de place */
    gap: 2px;
     justify-content: center; /* centrage horizontal */
}

.bet-square {
    font-size: 18px;           /* police plus grande */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border-radius: 4px;
    border: 1px solid #444;
    color: white;
    position: relative;        /* important pour positionner la chip */
}

.bet-square.green { background-color: #008000; color: white;}
.bet-square.red { background-color: #c0392b; color: white;}
.bet-square.black { background-color: #111; color: white;}
.bet-square.special { background-color: #222; color: white;}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== HISTORIQUE ===== */

.history {
    margin: 20px auto;
    width: 80vw;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    color: white;
}

.history-number {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
}



.stats {
    width: 560px;
    margin: 20px auto;
    padding: 15px;
    border-radius: 10px;
    font-family: Arial, sans-serif;
}

.stats h2 {
    margin-top: 0;
}

.stats p {
    margin: 5px 0;
}

.round-result {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    background: #111;
    color: white;
    padding: 25px 40px;
    border-radius: 15px;
    font-size: 22px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 0 25px rgba(0,0,0,0.6);
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 9999;
    pointer-events: none;
}

.round-result.show {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.round-result.win {
    border: 3px solid #2ecc71;
    color: #2ecc71;
}

.round-result.lose {
    border: 3px solid #e74c3c;
    color: #e74c3c;
}

.round-result.neutral {
    border: 3px solid #808080;
    color: #808080;
}


/* =========================
   CONTENEUR GLOBAL
========================= */
.loto-grid{
    display: grid;
    gap: 35px;  /* espace entre les lignes */
    margin: 30px auto;
}

/* =========================
   GRILLES UTILISATEUR (4 images par ligne)
========================= */
.loto-row{
    display: grid;
    grid-template-columns: repeat(4, 165px); /* +10% par rapport à 150px */
    gap: 18px; /* espace entre les images */
    justify-content: center;
    align-items: center;
}

/* =========================
   IMAGES BASE (non tirées)
========================= */
.loto-row img,
#loto-history img{
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.25s ease, opacity 0.25s ease, border 0.25s ease, box-shadow 0.25s ease;
}

/* Images NON tirées : légèrement plus petites et ternes */
.loto-row img:not(.selected),
#loto-history img:not(.selected){
    transform: scale(0.85);
    opacity: 0.6;
}

/* =========================
   IMAGE TIRÉE (cadre orange)
========================= */
.loto-row img.selected,
#loto-history img.selected{
    transform: scale(1);
    opacity: 1;

    border: 4px solid #FF8C00;
    box-shadow:
        0 0 12px #FF8C00,
        0 0 25px #FFA500;
}

/* =========================
   HISTORIQUE DES TIRAGES (2 lignes de 3)
========================= */
#loto-history{
    display: grid;
    grid-template-columns: repeat(3, 165px); /* +10% taille images, 3 par ligne */
    gap: 60px; /* doublé pour bien séparer les cadres oranges */
    justify-content: center;
    margin-top: 20px;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px){
    .loto-row{
        grid-template-columns: repeat(4, 132px); /* +10% par rapport à 120px */
        gap: 18px;
    }

    #loto-history{
        grid-template-columns: repeat(3, 132px);
        gap: 36px; /* doublé pour tablette */
    }
}

@media (max-width: 480px){
    .loto-row{
        grid-template-columns: repeat(4, 110px); /* +10% par rapport à 100px */
        gap: 18px;
    }

    #loto-history{
        grid-template-columns: repeat(3, 110px);
        gap: 36px; /* doublé sur mobile également */
    }
}