/* =========================
   AMIGO – STYLE GLOBAL
========================= */

#amigo-root{
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background: #1f1f1f;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    font-family: Arial, Helvetica, sans-serif;
    color: #fff;
}

/* =========================
   CONFIGURATION
========================= */

.amigo-config{
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.amigo-config label{
    font-weight: bold;
    color: #a9a9ad;
}

.amigo-config select{
    background: #121212;
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
}

.amigo-config strong{
    color: #1E90FF;
}

.info-session {
    margin-bottom: 15px;
    color: #ddd;
    font-weight: bold;
}

/* =========================
   GRILLE NUMÉROS
========================= */

/* =========================
   AMIGO – GRILLE NUMÉROS
========================= */

.amigo-grid{
    display: grid;
    grid-template-columns: repeat(7, 72px);
    gap: 6px;
    margin: 15px 0 0 0;
    justify-content: center;
}

.amigo-grid label{
    position: relative;
    cursor: pointer;
}

.amigo-grid input{
    display: none;
}

.amigo-grid span{
    display: block;
    padding: 8px 0;
    background: #121212; /* gris initial */
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    font-size: 0.85rem;
    border: 1px solid #333;
    transition: all .2s ease;
    color: #fff;
}

/* Case cochée = bleu */
.amigo-grid input:checked + span{
    background: #1E90FF;
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(30,144,255,0.6);
}

/* Case tirée = orange (appliqué par JS) */
.amigo-grid span.drawn{
    background: #FFA500 !important;
    color: #000 !important;
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(255,165,0,0.6);
}

/* =========================
   RÉSULTATS
========================= */

.amigo-result-ok,
.amigo-result-no{
    display: none;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-size: 1.1rem;
}

.amigo-result-ok{
    border: 2px dashed lightgreen;
    background: rgba(0,128,0,0.1);
    color: #d4ffd4;
	max-width: 600px;
	margin:10px auto 0 auto;
}

.amigo-result-no{
    border: 2px dashed lightcoral;
    background: rgba(128,0,0,0.1);
    color: #ffd4d4;
	max-width: 600px;
	margin:10px auto 0 auto;	
}

/* =========================
   AMIGO – TIRAGE VISUEL
========================= */

.amigo-draw-grid{
    display: grid;
    grid-template-columns: repeat(7, minmax(32px, 50px));
    gap: 6px;
    justify-content: center;
	margin: 10px 0 10px 0;
}

.draw-ball{
    background: #121212;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    border: 2px solid #333;
    color: #aaa;
    transition: all .3s ease;
}

.draw-ball.blue{
    background: #1E90FF;
    border-color: #1E90FF;
    color: #fff;
    box-shadow: 0 0 12px rgba(30,144,255,.8);
    animation: pop .3s ease;
}

.draw-ball.yellow{
    background: #FFD700;
    border-color: #FFD700;
    color: #000;
    box-shadow: 0 0 12px rgba(255,215,0,.8);
    animation: pop .3s ease;
}

@keyframes pop{
    0%{transform: scale(.5); opacity:0;}
    100%{transform: scale(1); opacity:1;}
}

.amigo-draw-status{
    text-align: center;
    font-weight: bold;
    color: #1E90FF;
    margin-bottom: 20px;
}

/* Overlay central WIN / PERDU */
.amigo-win-overlay{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity .4s ease;
}

.amigo-win-overlay.show{
    opacity: 1;
    pointer-events: all;
}

#amigo-win-message{
    background: #111;
    border: 3px solid gold;
    border-radius: 16px;
    padding: 30px 40px;
    text-align: center;
    font-size: 2rem;
    font-weight: bold;
    color: gold;
    box-shadow: 0 0 30px gold;
    animation: pulse 1s infinite alternate;
}

@keyframes pulse{
    from{ transform: scale(1); }
    to{ transform: scale(1.15); }
}

.flash-effect {
    animation: flash 0.3s ease-in-out;
}

@keyframes flash {
    0%   { background-color: rgba(255,255,255,0.0); }
    50%  { background-color: rgba(255,255,255,0.25); }
    100% { background-color: rgba(255,255,255,0.0); }
}

/* =========================
   MOBILE
========================= */

@media(max-width:600px){
    .amigo-grid{
        grid-template-columns: repeat(7, 54px);
        gap: 5px;
        justify-content: center;
    }

    .amigo-grid span{
        padding: 6px 0;
        font-size: 0.75rem;
    }

    .amigo-config{
        flex-direction: column;
        align-items: flex-start;
    }
}


@media(max-width:500px){
    .amigo-draw-grid{
        grid-template-columns: repeat(7, 34px);
        gap: 4px;
    }
.amigo-ranking-level { min-width:100%; }	
}
