/* ==========================================================================
   PAGE DES SPORTS - STYLE "RÉTRO PASTEL" (En accord avec match.css)
   ========================================================================== */

/* --- Import des polices --- */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Montserrat:wght@400;600&display=swap');

main {
    max-width: 1000px; 
    width: 95%;
    margin: 0 auto;
    padding-bottom: 50px;
}

/* --- Typographie Globale des Titres --- */
h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 60px;
    color: #5c2a2d; /* Bordeaux de la charte */
    text-align: center;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

section p {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    color: #e57373; /* Corail */
    text-align: center;
    font-weight: 600;
    margin-top: 0;
}

h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 45px;
    color: #5c2a2d;
    text-align: center;
    margin-top: 50px;
    margin-bottom: 25px;
    letter-spacing: 1.5px;
}

.all-match {
    width: 100%;
}

/* --- Les Cartes de Match (Dégradés BDD + Effet Rétro) --- */
.block-entity {
    border-radius: 16px;
    border: 3px solid #5c2a2d; /* Bordure rétro */
    box-shadow: 6px 6px 0px rgba(92, 42, 45, 0.2); /* Ombre solide (légèrement transparente pour se mêler au fond) */
    padding: 20px 25px;
    display: flex;
    flex-direction: column;
    margin-bottom: 25px;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.block-entity:hover {
    transform: translate(-3px, -3px);
    box-shadow: 9px 9px 0px rgba(92, 42, 45, 0.25);
}

.list-match {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Le type d'épreuve (ex: Simple) */
.list-match > span:first-child {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 22px;
    color: white;
    -webkit-text-stroke: 1px #5c2a2d; /* Contour pour rester lisible sur les dégradés */
    letter-spacing: 2px;
}

.block-match {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* --- Les Équipes --- */
.eq {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 30%;
}

.eq img {
    filter: drop-shadow(3px 3px 0px rgba(92, 42, 45, 0.4)); /* Ombre solide sur le logo */
    transition: transform 0.3s ease;
}

.block-entity:hover .eq img {
    transform: scale(1.08);
}

/* Noms de campus (Style Jumbotron de match.css) */
.eq span { 
    font-family: 'Bebas Neue', sans-serif;
    font-size: 32px;
    color: white; 
    letter-spacing: 1px;
    text-align: center;
    -webkit-text-stroke: 1.5px #5c2a2d; /* Contour bordeaux très stylé */
    text-stroke: 1.5px #5c2a2d;
    text-shadow: 3px 3px 0px rgba(0,0,0,0.15); /* Légère ombre pour détacher du fond */
}

/* --- Le Score --- */
.sc {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 65px;
    color: white;
    -webkit-text-stroke: 2px #5c2a2d;
    text-shadow: 4px 4px 0px rgba(0,0,0,0.15);
}

/* --- La Zone Centrale (Pilule Rétro Date/Lieu) --- */
.middle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #fdf5f2; /* Blanc cassé / saumon très clair */
    padding: 8px 22px;
    border-radius: 30px;
    gap: 6px;
    border: 2px solid #5c2a2d; /* Bordure stricte */
    box-shadow: 3px 3px 0px #5c2a2d; /* Ombre solide comme dans match.css */
    min-width: 130px;
}

.middle span {
    font-family: Georgia, 'Times New Roman', Times, serif; /* Rappel du style ping-pong original */
    font-size: 15px;
    font-weight: bold;
    color: #5c2a2d;
    text-align: center;
}

/* --- Animation Point Live --- */
.live-dot {
    width: 12px;
    height: 12px;
    background-color: #e57373;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    border: 2px solid #5c2a2d;
    animation: pulse-pastel 1.5s infinite;
}

@keyframes pulse-pastel {
    0% { box-shadow: 0 0 0 0 rgba(229, 115, 115, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(229, 115, 115, 0); }
    100% { box-shadow: 0 0 0 0 rgba(229, 115, 115, 0); }
}

/* ==========================================================================
   FORMULAIRE D'AJOUT DE MATCH (Administrateurs)
   ========================================================================== */
.add-match-card {
    background-color: #fdf5f2; /* Fond crème rétro */
    border: 3px solid #5c2a2d;
    padding: 25px 35px;
    border-radius: 16px;
    margin-bottom: 40px;
    box-shadow: 6px 6px 0px #5c2a2d; /* Ombre solide cohérente */
}

.add-match-card h2 {
    margin-top: 0;
}

.add-match-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.add-match-form input,
.add-match-form select {
    padding: 12px 15px;
    border-radius: 8px;
    border: 2px solid #5c2a2d; /* Bordures marquées */
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: #5c2a2d;
    background-color: white;
    box-shadow: 2px 2px 0px rgba(92, 42, 45, 0.2);
}

.add-match-form input:focus,
.add-match-form select:focus {
    outline: none;
    border-color: #e57373;
}

/* Bouton du formulaire */
.add-match-form .btn-primary {
    background-color: #d48b95;
    color: white;
    border: 2px solid #5c2a2d;
    border-radius: 8px;
    padding: 12px;
    font-size: 20px;
    font-family: 'Bebas Neue', sans-serif;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 3px 3px 0px #5c2a2d;
    transition: all 0.2s ease;
}

.add-match-form .btn-primary:hover {
    background-color: #c47681;
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px #5c2a2d;
}

.success-msg {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #155724;
    margin-bottom: 20px;
    font-family: 'Montserrat', sans-serif;
    font-weight: bold;
}

.error-msg {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #721c24;
    margin-bottom: 20px;
    font-family: 'Montserrat', sans-serif;
    font-weight: bold;
}


/* ==========================================================================
   MOBILE RESPONSIVENESS
   ========================================================================== */
@media (max-width: 768px) {
    .block-entity {
        padding: 15px 12px;
        box-shadow: 4px 4px 0px rgba(92, 42, 45, 0.2);
    }

    .list-match > span:first-child {
        font-size: 16px;
        text-align: center;
        margin-bottom: 5px;
    }

    .block-match {
        gap: 5px;
    }

    .eq {
        width: 32%;
        gap: 6px;
    }

    .eq img {
        height: 50px;
        filter: drop-shadow(2px 2px 0px rgba(92, 42, 45, 0.4));
    }

    .eq span {
        font-size: 22px; 
        line-height: 1.1;
        word-wrap: break-word; 
        -webkit-text-stroke: 1px #5c2a2d;
    }

    .sc {
        font-size: 45px;
        -webkit-text-stroke: 1.5px #5c2a2d;
    }

    .middle {
        min-width: 80px;
        padding: 6px 12px;
        border-radius: 20px;
        box-shadow: 2px 2px 0px #5c2a2d;
    }

    .middle span {
        font-size: 12px;
    }

    .add-match-card {
        padding: 20px 15px;
    }
}
/* Conteneur global des détails du match au centre */
.middle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

/* Conteneur spécifique pour les lignes de sets */
.sets-container {
    display: flex;
    flex-direction: column;
    gap: 2px; /* Espace entre les lignes */
    font-family: monospace; /* Optionnel : pour un alignement parfait des chiffres */
    width: 100%;
    align-items: center;
}
/* Style de base pour chaque ligne de set */
.set-line {
    font-size: 0.85em; /* Un peu plus petit par défaut */
    opacity: 0.7;      /* Légèrement transparent par défaut */
    transition: all 0.3s ease; /* Animation douce lors des changements */
}

/* === Le "Gros" Set (En cours) === */
.set-line.is-current {
    font-size: 1.2em;   /* Plus gros */
    font-weight: bold;  /* En gras */
    opacity: 1;         /* Totalement opaque */
    color: #fff;        /* Ou une couleur "flashy" de ton choix (ex: jaune #ffeb3b) */
}

/* === Match Terminé === */
/* Si le match est fini, on remet tous les sets à la même taille,
   mais on peut les garder un peu plus gros que le style par défaut */
.match-finished .set-line {
    font-size: 1em;
    opacity: 1;
}