/* ============================================================
   MATCH_DOSSARD.CSS — Carte "Match en cours" / "En attente"
   Chargé après dossard.css (voir dossard.php)
   ============================================================ */

.match-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    padding: 20px 20px 24px;
    margin-bottom: 20px;
    color: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    box-sizing: border-box;
}

/* Variante "match en cours" (tableau final) : dégradé vert */
.match-card.encours {
    background: linear-gradient(135deg, #4fd07a 0%, #219150 100%);
}

/* Variante "poules en cours" : dégradé bleu */
.match-card.encours-poule {
    background: linear-gradient(135deg, #4a9bd9 0%, #2563a8 100%);
}

/* Variante "en attente" : dégradé orange */
.match-card.attente {
    background: linear-gradient(135deg, #f0913a 0%, #d4701a 100%);
}

/* Bulles décoratives en fond de carte */
.match-card::before,
.match-card::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}
.match-card::before {
    width: 140px;
    height: 140px;
    top: -50px;
    right: -40px;
}
.match-card::after {
    width: 90px;
    height: 90px;
    bottom: -35px;
    left: -25px;
}

/* ---- Ligne du haut : badge statut + badge tableau ---- */
.match-card-top {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    gap: 10px;
    position: relative;
    z-index: 1;
    margin-bottom: 14px;
}

.match-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.22);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.72em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.match-card-table {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 0.95em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Palette de couleurs par lettre de tableau (A à H) */
.couleur-a { background-color: #e74c3c; }
.couleur-b { background-color: #2980b9; }
.couleur-c { background-color: #27ae60; }
.couleur-d { background-color: #f39c12; }
.couleur-e { background-color: #9b59b6; }
.couleur-f { background-color: #16a085; }
.couleur-g { background-color: #d35400; }
.couleur-h { background-color: #34495e; }

/* ---- Ligne info : "Votre match · Table X" ---- */
.match-card-info {
    position: relative;
    z-index: 1;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.95em;
    font-weight: 700;
}

.match-card-info i {
    margin-right: 2px;
}

.match-info-dot {
    font-size: 0.4em;
    opacity: 0.7;
    vertical-align: middle;
}

.match-table-num {
    font-weight: 900;
    color: #000000;
    font-size: 2em;
    text-shadow: none;
    display: block;
    text-align: left;
    margin-top: 4px;
    line-height: 1.1;
}

.match-table-num i {
    margin-right: 6px;
    font-size: 0.7em;
}

/* ---- Séparateur ---- */
.match-card-sep {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    margin: 16px 0;
    position: relative;
    z-index: 1;
}

/* ---- Zone "Vous affrontez" ---- */
.match-card-vs {
    position: relative;
    z-index: 1;
    text-align: center;
}

.match-vs-label {
    font-size: 0.72em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.85;
    margin-bottom: 10px;
}

.match-vs-opponent {
    display: block;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 1.05em;
    font-weight: 800;
    margin-bottom: 8px;
}

.match-vs-opponent i {
    margin-right: 6px;
    opacity: 0.9;
}

.match-vs-opponent.unknown {
    background: rgba(255, 255, 255, 0.12);
    font-weight: 700;
    opacity: 0.9;
}

#match-encours-zone {
    display: none;
}

/* ---- Responsive ---- */

/* Tablette */
@media (max-width: 768px) {
    .match-card {
        padding: 18px 18px 22px;
        border-radius: 14px;
        margin-bottom: 16px;
    }
    .match-table-num {
        font-size: 1.7em;
    }
    .match-card::before {
        width: 100px;
        height: 100px;
        top: -35px;
        right: -30px;
    }
    .match-card::after {
        width: 70px;
        height: 70px;
        bottom: -25px;
        left: -20px;
    }
}

/* Téléphone */
@media (max-width: 480px) {
    .match-card {
        padding: 14px 14px 18px;
        border-radius: 12px;
        margin-bottom: 14px;
    }
    .match-card-top {
        gap: 6px;
        margin-bottom: 10px;
    }
    .match-badge {
        padding: 4px 10px;
        font-size: 0.65em;
    }
    .match-card-table {
        padding: 5px 12px;
        font-size: 0.82em;
    }
    .match-table-num {
        font-size: 1.5em;
        margin-top: 2px;
    }
    .match-card-sep {
        margin: 12px 0;
    }
    .match-vs-label {
        font-size: 0.65em;
        margin-bottom: 8px;
    }
    .match-vs-opponent {
        padding: 8px 14px;
        font-size: 0.92em;
        border-radius: 10px;
        margin-bottom: 6px;
    }
    .match-card::before {
        width: 80px;
        height: 80px;
        top: -25px;
        right: -20px;
    }
    .match-card::after {
        width: 55px;
        height: 55px;
        bottom: -20px;
        left: -15px;
    }
}

/* Petit téléphone (iPhone SE, Galaxy S mini) */
@media (max-width: 360px) {
    .match-card {
        padding: 12px 12px 14px;
        border-radius: 10px;
        margin-bottom: 12px;
    }
    .match-badge {
        padding: 3px 8px;
        font-size: 0.6em;
    }
    .match-card-table {
        padding: 4px 10px;
        font-size: 0.75em;
    }
    .match-table-num {
        font-size: 1.3em;
    }
    .match-vs-opponent {
        padding: 7px 10px;
        font-size: 0.85em;
    }
}
/* COULEURS DES TABLEAUX (Bypass CSP) */
.match-card-table.couleur-a { background: #dbb9a2 !important; color: #333 !important; border-color: #dbb9a2 !important; background-image: none !important; }
.match-card-table.couleur-b { background: #ff8605 !important; color: #fff !important; border-color: #ff8605 !important; background-image: none !important; }
.match-card-table.couleur-c { background: #f7c0b0 !important; color: #333 !important; border-color: #f7c0b0 !important; background-image: none !important; }
.match-card-table.couleur-d { background: #eac882 !important; color: #333 !important; border-color: #eac882 !important; background-image: none !important; }
.match-card-table.couleur-e { background: #c2ba4e !important; color: #333 !important; border-color: #c2ba4e !important; background-image: none !important; }
.match-card-table.couleur-f { background: #95bdbc !important; color: #333 !important; border-color: #95bdbc !important; background-image: none !important; }
.match-card-table.couleur-g { background: #86c1ea !important; color: #333 !important; border-color: #86c1ea !important; background-image: none !important; }
.match-card-table.couleur-h { background: #f973bf !important; color: #fff !important; border-color: #f973bf !important; background-image: none !important; }