/* Styles pour le classement final du tournoi */
.classement-container {
    position: relative;
    transition: opacity 0.3s ease;
    max-width: 1200px;
    margin: 40px auto;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    overflow: hidden;
    background-color: #fff;
    padding: 25px;
}
#classement-container.loading {
    opacity: 0.5;
}
#classement-container.loading::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.5);
    z-index: 10;
}
#classement-container.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 28px;
    margin: -14px;
    border: 3px solid rgba(0,0,0,0.1);
    border-top-color: #1a3a5f;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    z-index: 11;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

.classement-title {
    text-align: center;
    font-size: 28px;
    margin-bottom: 30px;
    color: #1a3a5f;
    position: relative;
    padding-bottom: 15px;
    font-weight: 700;
    border-bottom: 2px solid #e9ecef;
}

.classement-title:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background:  #000000;
    border-radius: 2px;
}

/* Styles pour légendes et badges */
.classement-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    padding: 0 10px;
}

.classement-legend {
    display: flex;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
}

.trophy {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 8px;
}

.trophy.gold {
    background: linear-gradient(145deg, #ffd700, #ffb347);
    box-shadow: 0 2px 5px rgba(255, 215, 0, 0.3);
}

.trophy.silver {
    background: linear-gradient(145deg, #C0C0C0, #A9A9A9);
    box-shadow: 0 2px 5px rgba(192, 192, 192, 0.3);
}

.trophy.bronze {
    background: linear-gradient(145deg, #CD7F32, #B87333);
    box-shadow: 0 2px 5px rgba(205, 127, 50, 0.3);
}

.cups-info {
    display: flex;
    gap: 10px;
}

.tier-badge {
    padding: 5px 10px;
    border-radius: 4px;
    color: white;
    font-weight: 500;
    font-size: 13px;
    min-width: 100px;
    text-align: center;
}

.tier-badge.hoplacup {
    background-color: #28a745;
}

.tier-badge.castorcup {
    background-color: #007bff;
}

.tier-badge.hamstercup {
    background-color: #fd7e14;
}

/* Styles améliorés pour le podium */
.podium-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 20px;
    margin: 60px 0;
    height: 280px;
    position: relative;
    perspective: 800px;
}

.podium-item {
    text-align: center;
    position: relative;
    width: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 15px;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 12px 25px rgba(0,0,0,0.15);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.4s ease;
    transform-origin: bottom center;
    border-bottom: 5px solid #1a3a5f;

}

.podium-item:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 20%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px 8px 0 0;
}

.podium-item:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 30px rgba(0,0,0,0.2);
    z-index: 10;
}

.podium-item.first {
    height: 200px;
    background: linear-gradient(135deg, #ffd700, #ffb347);
    z-index: 3;
}

.podium-item.second {
    height: 160px;
    background: linear-gradient(135deg, #e0e0e0, #b4b4b4);
    z-index: 2;
}

.podium-item.third {
    height: 120px;
    background: linear-gradient(135deg, #cd7f32, #a56c21);
    z-index: 1;
}

.podium-base {
    width: 100%;
    height: 10px;
    background: #1a3a5f;
    position: absolute;
    bottom: 0;
    border-radius: 5px 5px 0 0;
    opacity: 0.6;
}

/* Médaille : style et animation corrigés */
.podium-item .medal {
    position: absolute;
    /* on colle la médaille juste au-dessus du bloc podium */
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) scale(0) rotate(0deg);
    transform-origin: center center;

    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    border: 4px solid transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
    opacity: 0;
    z-index: 1000;

    /* animation d'apparition */
    animation: medalSpin 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.8s forwards;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.podium-item.first  .medal { border-color: #ffd700; }
.podium-item.second .medal { border-color: #c0c0c0; }
.podium-item.third  .medal { border-color: #cd7f32; }

.medal img {
    width: 50px;
    height: 50px;
    transition: transform 0.3s ease;
}

.podium-item:hover .medal {
    /* léger basculement et zoom au hover */
    transform: translateX(-50%) scale(1.1) rotate(10deg);
}

.position-number {
    font-size: 2.2rem;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
    margin-top: 5px;
    letter-spacing: 1px;
}

.team-name {
    font-size: 1.1rem;
    font-weight: bold;
    white-space: nowrap;
    padding: 0 10px;
    margin-top: 15px;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 100%;
    transition: transform 0.3s ease;
}

.podium-item:hover .team-name {
    transform: scale(1.05);
}

/* Styles pour les tableaux */
.classement-general-container {
    margin-top: 50px;
}

h2.hopla, h2.castor, h2.hamster {
    padding: 14px 20px;
    color: white;
    margin: 30px 0 15px 0;
    text-align: center;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

h2.hopla:before, h2.castor:before, h2.hamster:before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

h2.hopla:after, h2.castor:after, h2.hamster:after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.15);
    transform: skewX(-25deg);
    transition: all 0.5s ease;
}

h2.hopla:hover:after, h2.castor:hover:after, h2.hamster:hover:after {
    left: 100%;
}

h2.hopla {
    background-color: #28a745;
}

h2.castor {
    background-color: #007bff;
}

h2.hamster {
    background-color: #fd7e14;
}

.classement-general-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-radius: 10px;
    overflow: hidden;
}

.classement-general-table th {
    background-color: #1a3a5f;
    color: white;
    padding: 14px 10px;
    text-align: center;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 14px;
    border: none;
}

.classement-general-table th:first-child {
    border-top-left-radius: 8px;
    text-align: center;
}

.classement-general-table th:last-child {
    border-top-right-radius: 8px;
}

.classement-general-table td {
    padding: 14px 10px;
    text-align: center;
    border-bottom: 1px solid #eaeaea;
    vertical-align: middle;
    font-size: 15px;
    transition: all 0.2s ease;
}

.equipe-row:hover td {
    background-color: #f5f9fd;
}

.position-cell {
    width: 10%;
    text-align: center;
}

.position-indicator {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    font-weight: bold;
    margin: 0 auto;
}

.position-indicator.gold {
    background: linear-gradient(145deg, #ffd700, #ffb347);
    box-shadow: 0 2px 5px rgba(255, 215, 0, 0.3);
}

.position-indicator.silver {
    background: linear-gradient(145deg, #C0C0C0, #A9A9A9);
    box-shadow: 0 2px 5px rgba(192, 192, 192, 0.3);
}

.position-indicator.bronze {
    background: linear-gradient(145deg, #CD7F32, #B87333);
    box-shadow: 0 2px 5px rgba(205, 127, 50, 0.3);
}

.position-indicator.standard {
    background-color: #e9ecef;
    color: #495057;
}

.team-cell {
    width: 30%;
}

.container_info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.club-logo {
    width: 30px;
    height: 30px;
    object-fit: contain;
    border-radius: 4px;
    transition: transform 0.2s ease;
}
.club-logo2{
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 4px;
    transition: transform 0.2s ease;
}

.container_info:hover .club-logo {
    transform: scale(1.1);
}

.team-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.team-info .team-name {
    color: #333;
    font-weight: 600;
    text-shadow: none;
    margin: 0;
    font-size: 15px;
}

.team-info .team-cup {
    font-size: 12px;
    color: #6c757d;
}

.club-cell {
    width: 15%;
    text-align: center;
}

.division-cell {
    width: 10%;
    text-align: center;
}

.form-cell {
    width: 10%;
    text-align: center;
}

.stats-cell {
    width: 15%;
    text-align: center;
}

.stats-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.buts-marques,
.buts-encaisses {
  display: inline-block;
  font-weight: bold;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.9em;
  margin: 0 2px;
}

/* Marqués en vert */
.buts-marques {
  background-color: #b4b4b4;
  color: #ffffff;
}

/* Encaissés en rouge */
.buts-encaisses {
  background-color: #b4b4b4;
  color: #ffffff;
}

/* Coloration des lignes par coupe */
.hoplacup-row { background-color: rgba(40, 167, 69, 0.03); }
.castorcup-row { background-color: rgba(0, 123, 255, 0.03); }
.hamstercup-row { background-color: rgba(253, 126, 20, 0.03); }

.classement-footer {
    margin-top: 30px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border-top: 1px solid #e9ecef;
}

.stats-legend {
    display: flex;
    justify-content: center;
    gap: 25px;
}

.legend-bullet {
    display: inline-block;
    font-weight: bold;
    margin-right: 5px;
    color: #1a3a5f;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Animations du podium */
@keyframes podiumFadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes medalSpin {
    0% {
        opacity: 0;
        transform: translateX(-50%) scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) scale(1.2) rotate(180deg);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) scale(1) rotate(360deg);
    }
}

.podium-item {
    animation: podiumFadeInUp 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    opacity: 0;
}

.podium-item.first {
    animation-delay: 0.2s;
}

.podium-item.second {
    animation-delay: 0s;
}

.podium-item.third {
    animation-delay: 0.4s;
}


.classement-general-table {
    animation: fadeInUp 0.6s ease-out forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

.classement-general-table tr {
    animation: fadeIn 0.3s ease forwards;
}

.classement-general-table tr:nth-child(1) { animation-delay: 0.05s; }
.classement-general-table tr:nth-child(2) { animation-delay: 0.1s; }
.classement-general-table tr:nth-child(3) { animation-delay: 0.15s; }

h2.hopla, h2.castor, h2.hamster {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

h2.hopla {
    animation-delay: 0.5s;
}

h2.castor {
    animation-delay: 0.8s;
}

h2.hamster {
    animation-delay: 1.1s;
}

/* Variables pour les couleurs */
:root {
    --castor: #007bff;
    --castor-rgb: 0, 123, 255;
    --hamster: #fd7e14;
    --hamster-rgb: 253, 126, 20;
}



/* Styles pour l'affichage des résultats V/D/N */
.resultats-inline {
    display: flex;
    flex-direction: row;
    justify-content: center;
    margin-bottom: 8px;
  }
  
.resultat {
display: inline-block;
width: 24px;
height: 24px;
line-height: 24px;
text-align: center;
margin: 0 2px;
font-weight: bold;
border-radius: 50%;
}

.resultat.victoire {
background-color: #4CAF50;
color: white;
}

.resultat.defaite {
background-color: #F44336;
color: white;
}

.resultat.nul {
background-color: #FFC107;
color: white;
}

.stats-container {
display: flex;
flex-direction: column;
align-items: center;
}

/* Message d'attente tournoi non finalisé */
.classement-non-finalise {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 30px;
    text-align: center;
    margin: 20px 0;
}

.message-attente {
    max-width: 600px;
    margin: 0 auto;
}

.message-attente h3 {
    color: #333;
    margin-bottom: 15px;
}

.message-attente p {
    color: #666;
    font-size: 16px;
}

/* Colonnes du classement */
.classement-general-container.single-column {
    margin-bottom: 20px;
}

/* Style pour les cellules sans données */
.no-data {
    text-align: center;
    padding: 20px;
    color: #888;
    font-style: italic;
}

/* Media queries pour la responsivité */
@media (max-width: 992px) {
    .team-cup {
        display: none;
    }
    
    .club-cell {
        display: none;
    }
    
    .classement-general-table th:nth-child(3),
    .classement-general-table td:nth-child(3) {
        display: none;
    }
    
    .classement-container {
        padding: 15px;
        margin: 20px auto;
    }
    
    .classement-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .division-cell {
        display: none;
    }
    
    .classement-general-table th:nth-child(4),
    .classement-general-table td:nth-child(4) {
        display: none;
    }
    
    .classement-info {
        flex-direction: column;
        gap: 15px;
    }
    
    .classement-legend, .cups-info {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .podium-container {
        height: 200px;
    }
    
    .podium-item {
        width: 90px;
    }
    
    .podium-item.first {
        height: 140px;
    }
    
    .podium-item.second {
        height: 110px;
    }
    
    .podium-item.third {
        height: 80px;
    }
    
    .podium-item .medal {
        width: 50px;
        height: 50px;
        bottom: calc(100% + 8px); /* un peu plus serré qu'en desktop */
      }
      .podium-item .medal img {
        width: 35px;
        height: 35px;
      }
    
    .position-number {
        font-size: 1.5rem;
        margin-top: 0px;
    }
    
    .classement-title:after {
        width: 80px;
    }
    
    .stats-legend {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}

@media (max-width: 576px) {
    .form-cell {
        display: none;
    }
    
    .classement-general-table th:nth-child(5),
    .classement-general-table td:nth-child(5) {
        display: none;
    }
    
    .position-indicator {
        width: 25px;
        height: 25px;
        font-size: 0.9rem;
    }
    
    .podium-container {
        gap: 10px;
        height: 180px;
    }
    
    .podium-item {
        width: 70px;
    }
    
    .podium-item.first {
        height: 120px;
    }
    
    .podium-item.second {
        height: 90px;
    }
    
    .podium-item.third {
        height: 60px;
    }
    
    .team-name {
        font-size: 0.8rem;
    }
    
    .classement-title {
        font-size: 20px;
        padding-bottom: 10px;
    }
    
    .legend-item {
        font-size: 12px;
    }
    
    .tier-badge {
        min-width: 80px;
        font-size: 12px;
    }
    
    .resultat {
        width: 20px;
        height: 20px;
        line-height: 20px;
        font-size: 12px;
    }
    
    .container_info {
        gap: 8px;
    }
    
    .club-logo {
        width: 25px;
        height: 25px;
    }
    
    .club-logo2 {
        width: 45px;
        height: 45px;
    }
    
    .team-info .team-name {
        font-size: 13px;
    }
    
    h2.hopla, h2.castor, h2.hamster {
        font-size: 1.2rem;
        padding: 10px 15px;
    }
}

@media (max-width: 400px) {
    .classement-container {
        padding: 10px;
        margin: 10px auto;
    }
    
    .podium-container {
        margin: 30px 0;
        height: 150px;
    }
    
    .podium-item {
        width: 60px;
    }
    
    .podium-item.first {
        height: 100px;
    }
    
    .podium-item.second {
        height: 75px;
    }
    
    .podium-item.third {
        height: 50px;
    }
    
    .podium-item .medal {
        width: 40px;
        height: 40px;
        bottom: calc(100% + 6px);
      }
      .podium-item .medal img {
        width: 28px;
        height: 28px;
      }
    
    .position-number {
        font-size: 1.2rem;
        margin-top: 0px;
    }
    
    .team-info .team-name {
        font-size: 12px;
    }
    
    .points {
        font-size: 13px;
    }
    
    .goal-diff {
        font-size: 11px;
        padding: 1px 4px;
    }
    
    .classement-general-table td {
        padding: 10px 5px;
        font-size: 13px;
    }
    
    .classement-general-table th {
        padding: 10px 5px;
        font-size: 12px;
    }
    
    .trophy {
        width: 16px;
        height: 16px;
    }
}

/* Notification discrète pour les matches en attente */
.pending-matches-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(to right, rgba(255, 165, 0, 0.1), rgba(255, 165, 0, 0.05));
    border-left: 3px solid orange;
    margin-bottom: 20px;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 14px;
    color: #555;
    animation: fadeIn 0.5s ease-in-out;
  }
  
  .pending-matches-banner p {
    margin: 0;
  }
  
  /* Icône pulsante pour les équipes en attente */
  .pending-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #FFB74D;
    position: relative;
    display: inline-block;
    animation: pulse 2s infinite;
  }
  
  .pending-icon:before {
    content: "⏳";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    color: white;
  }
  
  .pending-icon-small {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #FFB74D;
    position: relative;
    display: inline-block;
  }
  
  .pending-icon-small:before {
    content: "⏳";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    color: white;
  }
  
  /* Podium en attente */
  .podium-pending {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(250, 250, 250, 0.8);
    border-radius: 10px;
    padding: 30px;
    margin: 40px 0;
    text-align: center;
    min-height: 200px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: 1px dashed #FFB74D;
  }
  
  .podium-pending p {
    margin-top: 15px;
    color: #555;
    font-size: 16px;
    font-weight: 500;
  }
  
  /* Icône pulsante pour le podium en attente */
  .pulse-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #FFB74D;
    position: relative;
    display: inline-block;
    margin-bottom: 15px;
    animation: pulse 2s infinite;
  }
  
  .pulse-icon:before {
    content: "⏳";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: white;
  }
  
  /* Ligne de tableau pour équipe en attente */
  .equipe-attente {
    background: linear-gradient(to right, rgba(255, 165, 0, 0.05), rgba(255, 165, 0, 0.02));
    position: relative;
    border-left: 3px solid #FFB74D;
    transition: all 0.3s ease;
  }
  
  .equipe-attente:hover {
    background: linear-gradient(to right, rgba(255, 165, 0, 0.1), rgba(255, 165, 0, 0.05));
  }
  
  .position-indicator.pending {
    background-color: #FFB74D;
    color: white;
    position: relative;
    overflow: hidden;
  }
  
  .position-indicator.pending:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.2), rgba(255,255,255,0), rgba(255,255,255,0.2));
    animation: shine 2s infinite;
  }
  
  .attente-match {
    position: relative;
    color: #666;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  
  /* Animations */
  @keyframes pulse {
    0% {
      box-shadow: 0 0 0 0 rgba(255, 183, 77, 0.7);
    }
    70% {
      box-shadow: 0 0 0 10px rgba(255, 183, 77, 0);
    }
    100% {
      box-shadow: 0 0 0 0 rgba(255, 183, 77, 0);
    }
  }
  
  @keyframes shine {
    0% {
      left: -100%;
    }
    100% {
      left: 100%;
    }
  }
  
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* Styles responsifs */
  @media (max-width: 768px) {
    .podium-pending {
      padding: 20px;
      min-height: 150px;
    }
    
    .pulse-icon {
      width: 40px;
      height: 40px;
    }
    
    .pulse-icon:before {
      font-size: 16px;
    }
    
    .pending-matches-banner {
      flex-direction: column;
      text-align: center;
      padding: 10px;
    }
    
    .message-attente h3 {
      font-size: 20px;
    }
  }
  
  @media (max-width: 576px) {
    .podium-pending p {
      font-size: 14px;
    }
  }