/* ================================
   YAM'S - Styles spécifiques
   ================================ */

.container-yams {
    max-width: 1100px;
    margin: 4px auto;
    padding: 0 12px;
    display: grid;
    grid-template-columns: 190px 1fr 220px;
    gap: 12px;
    align-items: start;
    position: relative;
}

/* SCORES */
.scores-yams { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
#box-score-yams  { background: #1565c0; }
#box-temps-yams  { background: #0288d1; }

/* BOUTON LANCER */
.btn-lancer-des {
    width: 100%;
    background: linear-gradient(135deg, #1565c0, #0288d1);
    color: white;
    border: none;
    padding: 11px 12px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(21,101,192,0.4);
    transition: opacity 0.2s, transform 0.15s;
    margin-top: 5px;
}
.btn-lancer-des:hover:not(:disabled) { opacity: 0.9; transform: translateY(-2px); }
.btn-lancer-des:disabled { background: #ccc; box-shadow: none; cursor: not-allowed; transform: none; }

.info-relances {
    font-size: 0.72em;
    color: #888;
    text-align: center;
    padding: 3px 2px;
    font-style: italic;
    line-height: 1.3;
}

/* BOUTON PUB */
.btn-pub-yams {
    width: 100%;
    background: linear-gradient(135deg, #f093fb, #764ba2);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.78em;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(118,75,162,0.3);
    transition: opacity 0.2s;
    margin-top: 4px;
}
.btn-pub-yams:hover { opacity: 0.9; }
.info-pub-yams {
    font-size: 0.75em;
    color: #5ced8c;
    text-align: center;
    font-weight: 600;
    padding: 2px 0;
}

/* ================================
   COLONNE CENTRALE
   ================================ */
.colonne-centrale-yams {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 35px;
    padding: 20px 0 8px;
}

.aire-jeu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    width: 100%;
}

/* ================================
   PLANCHE CIRCULAIRE
   ================================ */
.planche-circulaire {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(ellipse at 35% 35%, #1e88e5 0%, #1565c0 40%, #0d47a1 70%, #0a3d91 100%);
    box-shadow: 0 0 0 5px #0a3d91, 0 0 0 8px #1565c0, 0 6px 24px rgba(0,0,0,0.5), inset 0 2px 8px rgba(255,255,255,0.15);
    position: relative;
    flex-shrink: 0;
}

.planche-interieur {
    position: absolute;
    inset: 14px;
    border-radius: 50%;
    background: radial-gradient(ellipse at 40% 35%, #1976d2 0%, #1565c0 50%, #0d47a1 100%);
    box-shadow: inset 0 3px 12px rgba(0,0,0,0.3);
    overflow: hidden;
}

.planche-interieur::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(255,255,255,0.02) 3px, rgba(255,255,255,0.02) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 3px, rgba(255,255,255,0.02) 3px, rgba(255,255,255,0.02) 4px);
}

.planche-des { position: absolute; inset: 0; border-radius: 50%; }

/* DÉS SUR LA PLANCHE */
.de-planche {
    position: absolute;
    cursor: pointer;
    transition: transform 0.15s;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.4));
}
.de-planche:hover { filter: drop-shadow(0 4px 10px rgba(92,237,140,0.6)); z-index: 10; }
.de-planche svg { display: block; }

@keyframes de-tombe {
    0%   { opacity: 0; transform: translate(-50%,-50%) rotate(0deg) scale(0.3); }
    60%  { opacity: 1; transform: translate(-50%,-50%) rotate(var(--rot,15deg)) scale(1.1); }
    80%  { transform: translate(-50%,-50%) rotate(calc(var(--rot,15deg)*0.8)) scale(0.95); }
    100% { opacity: 1; transform: translate(-50%,-50%) rotate(var(--rot,15deg)) scale(1); }
}
.de-planche.de-anime { animation: de-tombe 0.5s ease forwards; }

/* ================================
   GOBELET SVG
   ================================ */
.gobelet-zone { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.gobelet { cursor: pointer; transition: transform 0.2s; position: relative; width: 60px; }
.gobelet:hover:not(.gobelet-epuise) { transform: scale(1.08); }
.gobelet-corps { width: 60px; display: block; }

.gobelet-nb-lancers {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -30%);
    font-size: 1.5em; font-weight: 900; color: #fff9c4;
    text-shadow: 0 2px 5px rgba(0,0,0,0.7);
    font-family: 'Georgia', serif; pointer-events: none; z-index: 2;
}

.gobelet.gobelet-epuise { opacity: 0.4; cursor: not-allowed; }
.gobelet.gobelet-epuise:hover { transform: none; }

@keyframes gobelet-renverse {
    0%   { transform: rotate(0deg) translateY(0); }
    25%  { transform: rotate(-30deg) translateY(-4px); }
    55%  { transform: rotate(-170deg) translateY(-14px); }
    80%  { transform: rotate(-178deg) translateY(-12px); }
    100% { transform: rotate(-175deg) translateY(-10px); }
}
.gobelet.gobelet-lancer { animation: gobelet-renverse 0.6s ease forwards; }
.gobelet-label { font-size: 0.68em; color: #888; text-align: center; }

/* ================================
   DÉS GARDÉS
   ================================ */
.zone-gardes-container {
    width: 100%;
    max-width: 380px;
    background: white;
    border-radius: 10px;
    padding: 5px 10px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
}
.zone-gardes-label { font-size: 0.65em; color: #888; text-align: center; margin-bottom: 4px; font-style: italic; }
.zone-gardes { display: flex; justify-content: center; gap: 5px; flex-wrap: wrap; }

.slot-garde {
    width: 44px; height: 44px;
    border-radius: 8px; background: #f5f5f5;
    border: 2px dashed #ddd;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.slot-garde.slot-occupe { border: 2px solid #5ced8c; background: #f0fff4; cursor: pointer; box-shadow: 0 2px 8px rgba(92,237,140,0.3); }
.slot-garde.slot-occupe:hover { border-color: #e53935; background: #fff5f5; }
.slot-garde svg { display: block; }

/* ================================
   COLONNE DROITE — FICHE
   ================================ */
.colonne-fiche-droite {
    position: sticky;
    top: 8px;
}

.fiche-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
}

.fiche-header {
    background: linear-gradient(135deg, #1565c0, #0288d1);
    color: white;
    padding: 6px 12px;
    font-size: 0.7em;
    font-weight: 700;
    text-align: center;
}

.fiche-yams { padding: 3px 6px; display: flex; flex-direction: column; gap: 0; }

.fiche-section-titre {
    font-size: 0.62em; font-weight: 800; color: #1565c0;
    text-transform: uppercase; letter-spacing: 0.08em;
    padding: 4px 6px 1px; border-bottom: 1px solid #e3f2fd; margin: 1px 0;
}

.fiche-ligne {
    display: flex; justify-content: space-between; align-items: center;
    padding: 3px 6px; border-radius: 5px; transition: background 0.12s;
}
.fiche-ligne.fiche-disponible { cursor: pointer; }
.fiche-ligne.fiche-disponible:hover { background: #e3f2fd; }
.fiche-ligne.fiche-jouee { opacity: 0.55; cursor: not-allowed; }

.fiche-nom { font-size: 0.72em; font-weight: 600; color: #232526; }

.fiche-val {
    font-size: 0.75em; font-weight: 700;
    min-width: 38px; text-align: right;
    border-radius: 5px; padding: 1px 5px;
}
.fiche-val.vide { color: #ccc; }
.fiche-val.joue { color: #1565c0; background: #e3f2fd; }
.fiche-val.preview { color: #888; }
.fiche-val.preview-positif { color: #1565c0; background: #e3f2fd; font-weight: 800; }
.fiche-val.preview-zero { color: #e53935; background: #ffebee; }

.fiche-bonus-ligne {
    display: flex; justify-content: space-between; align-items: center;
    padding: 2px 6px; background: #fff8e1; border-radius: 5px;
    font-size: 0.67em; font-weight: 600; color: #f57c00; margin: 1px 0;
}
.bonus-ok  { color: #2e7d32; }
.bonus-nok { color: #e65100; }

.fiche-total-ligne {
    display: flex; justify-content: space-between; align-items: center;
    padding: 5px 6px;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-radius: 6px; font-weight: 800; font-size: 0.88em;
    color: #0d47a1; margin-top: 2px; border-top: 2px solid #1565c0;
}

/* ================================
   POPUP CONFIRMATION ZÉRO
   ================================ */
.popup-confirmation {
    position: fixed; inset: 0; background: rgba(0,0,0,0.55);
    z-index: 1000; display: flex; align-items: center; justify-content: center;
}
.popup-contenu {
    background: white; border-radius: 16px; padding: 24px 20px;
    max-width: 300px; width: 90%; text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}
.popup-icone { font-size: 2em; margin-bottom: 8px; }
.popup-contenu p { font-size: 0.9em; font-weight: 600; color: #333; margin-bottom: 16px; line-height: 1.4; }
.popup-boutons { display: flex; gap: 10px; }
.popup-btn-oui { flex: 1; background: #e53935; color: white; border: none; padding: 10px; border-radius: 10px; cursor: pointer; font-weight: 700; font-size: 0.88em; }
.popup-btn-non { flex: 1; background: #5ced8c; color: #232526; border: none; padding: 10px; border-radius: 10px; cursor: pointer; font-weight: 700; font-size: 0.88em; }
.popup-btn-oui:hover, .popup-btn-non:hover { opacity: 0.85; }

/* ================================
   CLASSEMENT EN DESSOUS
   ================================ */
.classement-dessous {
    max-width: 500px;
    margin: 10px auto 20px;
    padding: 0 12px;
}

.classement-dessous-inner {
    background: white;
    border-radius: 14px;
    padding: 12px 16px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
}

.classement-dessous-inner h3 {
    font-size: 0.9em;
    font-weight: 800;
    color: #1565c0;
    margin: 0 0 10px;
    text-align: center;
}

.liste-classement-horizontale {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.liste-classement-horizontale .classement-ligne {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 0.82em;
    border-bottom: 1px solid #f0f0f0;
}

.liste-classement-horizontale .classement-moi {
    background: #e3f2fd;
    font-weight: 700;
    color: #1565c0;
    border-radius: 6px;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .container-yams { grid-template-columns: 170px 1fr 200px; gap: 8px; }
}

@media (max-width: 768px) {
    .container-yams { grid-template-columns: 1fr; }
    .colonne-fiche-droite { order: 2; position: static; }
    .colonne-centrale-yams { order: 1; }
    .planche-circulaire { width: 200px; height: 200px; }
    .aire-jeu { flex-wrap: wrap; }
    .liste-classement-horizontale { flex-direction: column; align-items: stretch; }
    .liste-classement-horizontale .classement-ligne { min-width: unset; }
}