@charset "utf-8";

/* =========================================
   0. VARIABLES & RESET
   ========================================= */
:root {
    --jb-primary: #fb8800;       /* Orange Jolibut */
    --jb-secondary: #596a72;     /* Gris Bleuté */
    --jb-text: #333333;          /* Texte principal */
    --jb-text-light: #666666;    /* Texte secondaire */
    --jb-bg-light: #f4f4f4;      /* Fond clair */
    --jb-border: #e0e0e0;        /* Bordures */
--jb-font-stack: "Scada", Tahoma, Geneva, Kalimati, sans-serif;}

/* =========================================
   1. STRUCTURE GÉNÉRALE
   ========================================= */
.jolibut-wrapper {
    width: 100%;
    max-width: 673px;
    margin: 0 auto;
    box-sizing: border-box;
    font-family: var(--jb-font-stack);
    color: var(--jb-text);
    line-height: 1.4;
}

div.phase { display: none; } /* Masqué par défaut (géré par JS) */
.jolibut-hidden { display: none; }

/* =========================================
   2. NAVIGATION PRINCIPALE (ONGLETS PHASES)
   ========================================= */
#liste_phases { 
    display: flex; 
    list-style: none; 
    margin: 0 0 20px 0; 
    padding: 0; 
    width: 100%;
}
#liste_phases li { flex: 1; margin: 0; text-align: center; }
#liste_phases li a { 
    display: flex; 
    align-items: center; 
    justify-content: center;
    padding: 0.75em 1em; 
    font-weight: bold; 
    font-size: 1.1em; 
    text-decoration: none; 
    color: #fff; 
    background: linear-gradient(to bottom, #cedce7 0%, var(--jb-secondary) 100%); 
    transition: background 0.3s;
}
#liste_phases li:first-child a { border-radius: 5px 0 0 5px; }
#liste_phases li:last-child a { border-radius: 0 5px 5px 0; }
#liste_phases li:not(:last-child) a { border-right: 1px solid rgba(0,0,0,0.1); }
#liste_phases li a.actif { 
    background: var(--jb-primary); 
    box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.25); 
}
#liste_phases li a:not(.actif):hover { 
    background: linear-gradient(to bottom, #f9bd77 0%, var(--jb-primary) 100%); 
}

/* =========================================
   3. NAVIGATION SECONDAIRE (GROUPES)
   ========================================= */
#liste_groupe { 
    margin: 15px auto; 
    padding: 0 5px;
    list-style: none; 
    display: flex; 
    flex-wrap: wrap; 
    justify-content: center; 
    gap: 4px; 
    width: 100%;
}
#liste_groupe li { flex: 0 0 auto; margin: 0; padding: 0; }
#liste_groupe li a { 
    display: flex;
    align-items: center;
    justify-content: center;
    height: 34px; 
    min-width: calc(100% / 12); 
    padding: 0 10px;
    font-weight: bold; 
    font-size: 1em; 
    text-decoration: none; 
    color: var(--jb-secondary); 
    background: #fff;
    border: 1px solid var(--jb-border);
    border-radius: 50px; 
    transition: all 0.2s ease;
}
#liste_groupe li a:not(.actif):hover { background: #fff; z-index: 2; }
#liste_groupe li a.actif { 
    background: var(--jb-primary); 
    color: #fff; 
    border-color: var(--jb-primary);
    z-index: 1;
}

/* =========================================
   4. EN-TÊTES DE GROUPE & INFO LIEUX
   ========================================= */
.jolibut-group-header {
    background: var(--jb-bg-light);
    padding: 15px;
    border-left: 5px solid var(--jb-primary);
    margin-bottom: 20px;
    border-radius: 0 4px 4px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.jolibut-group-title {
    margin: 0 0 10px 0;
    font-size: 1.4em;
    color: var(--jb-text);
    line-height: 1.2;
    font-weight: bold;
}
.jolibut-place-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    font-size: 0.95em;
}
.jolibut-place-info {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #555;
}
.jolibut-place-icon { height: 18px; width: auto; opacity: 0.7; }
.jolibut-place-city { color: #777; font-weight: normal; }
.jolibut-map-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 20px;
    color: var(--jb-text);
    text-decoration: none;
    font-size: 0.85em;
    font-weight: bold;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    transition: all 0.2s;
}
.jolibut-map-btn:hover {
    background-color: var(--jb-primary);
    color: white;
    border-color: var(--jb-primary);
    box-shadow: 0 2px 4px rgba(251, 136, 0, 0.2);
}

/* =========================================
   5. GRILLE ÉQUIPES (Composition)
   ========================================= */
.jolibut-section-container { margin-bottom: 30px; }
.jolibut-section-title {
    text-align: center;
    padding: 8px 10px;
    background: var(--jb-primary);
    color: #fff;
    font-weight: bold;
    font-size: 1.1em;
    margin: 0 0 15px 0;
    text-transform: uppercase;
}
.jolibut-equipes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.jolibut-equipe-card {
    background: #fff;
    border: 1px solid var(--jb-border);
    border-radius: 6px;
    padding: 10px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    transition: transform 0.2s, border-color 0.2s;
}
.jolibut-equipe-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
    border-color: var(--jb-primary);
}
.jolibut-card-blason {
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 8px 0;
}
.jolibut-card-blason img { max-height: 100%; max-width: 100%; width: auto; }
.jolibut-card-nom {
    font-weight: bold;
    font-size: 0.85em;
    line-height: 1.2;
    color: var(--jb-text);
    margin-bottom: 4px;
    word-wrap: break-word;
}
.jolibut-card-pays { font-size: 0.7em; color: #888; text-transform: uppercase; }

/* =========================================
   6. LISTE DES MATCHS
   ========================================= */
.jolibut-match-list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--jb-border);
}
.jolibut-match-row {
    display: flex;
    flex-wrap: wrap; 
    align-items: center;
    padding: 8px 10px;
    padding-bottom: 18px; /* Augmenté pour laisser la place aux TAB en absolute */
    border-bottom: 1px solid var(--jb-border);
    min-height: 50px;
    gap: 8px;
}
.jolibut-match-row:nth-child(even) { background-color: rgba(0,0,0,0.02); }
.jolibut-match-row:hover { background-color: #fff8f0; }

.jb-col-date {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 45px;
    flex-shrink: 0;
    line-height: 1.1;
}
.jb-date { font-size: 0.75em; color: var(--jb-text-light); }
.jb-heure { font-weight: bold; font-size: 1em; color: var(--jb-text); }

.jb-col-equipe {
    flex: 1;
    display: flex;
    align-items: center;
    font-size: 0.95em;
    line-height: 1.2;
}
.jb-eq-left { justify-content: flex-end; text-align: right; }
.jb-eq-right { justify-content: flex-start; text-align: left; }
.jb-vainqueur { color: #196AB3; font-weight: bold; }

.jb-blason-mini {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}
.jb-blason-mini img { max-width: 100%; max-height: 100%; display: block; }
.jb-margin-left { margin-left: 6px; margin-bottom: 0 !important; }
.jb-margin-right { margin-right: 6px; margin-bottom: 0 !important;}

/* NOUVEAU : Conteneur des scores pour positionner les TAB */
.jb-score-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative; /* Référence pour le TAB absolute */
}

.jb-col-score {
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #ccc;
    font-weight: bold;
    flex-shrink: 0;
    line-height: 1;
    margin: 0 1px; /* Espacement entre les deux carrés */
}

/* Terrains */
.jb-col-terrain {
    font-size: 0.8em;
    padding: 2px 6px;
    border-radius: 3px;
    background-color: #ccc;
    color: #fff;
    font-weight: bold;
    flex-shrink: 0;
    align-self: center;
}


/* NOUVEAU : Tirs au but en absolu sous le score */
.jb-row-tab {
    position: absolute;
    top: 100%; /* Juste en dessous des scores */
    left: 50%;
    transform: translateX(-50%); /* Centrage parfait */
    white-space: nowrap; /* Empêche le retour à la ligne */
    font-size: 0.7em;
    color: var(--jb-text-light);
    margin-top: 3px;
}

/* =========================================
   7. CLASSEMENT
   ========================================= */
.jolibut-classement-table {
    display: flex;
    flex-direction: column;
    width: 100%;
    font-size: 0.9em;
}
.jb-class-header, .jb-class-row {
    display: flex;
    align-items: center;
    padding: 6px 5px;
    border-bottom: 1px solid #ccc;
    gap: 2px;
}
.jb-class-header {
    background-color: var(--jb-primary);
    color: #fff;
    font-weight: bold;
    font-size: 0.85em;
	height: 25px;
}
.jb-class-row:nth-child(even) { background-color: rgba(0,0,0,0.02); }
.jb-class-row:hover { background-color: #fff8f0; }

.jb-cell-pos { width: 25px; text-align: center; flex-shrink: 0; font-weight: bold; }
.jb-cell-team {
    flex: 1;
    display: flex;
    align-items: center;
    text-align: left;
    font-weight: bold;
    min-width: 120px;
    overflow: hidden;
}
.jb-cell-team span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.jb-cell-stat {
    width: 28px;
    text-align: center;
    flex-shrink: 0;
    font-size: 0.95em;
    color: #555;
}
.jb-class-header .jb-cell-stat { font-weight: bold; color: #fff; }
.jb-cell-pts { width: 30px; text-align: center; flex-shrink: 0; font-weight: bold; color: var(--jb-text); background: rgba(0,0,0,0.03); }
.jb-cell-diff { width: 30px; text-align: center; flex-shrink: 0; font-weight: bold; }

@media (max-width: 550px) {
    .jb-hide-mobile { display: none; }
    .jb-cell-team { min-width: auto; }
}

/* =========================================
   TITRES DE PHASE
   ========================================= */
.jolibut-phase-separator { margin-top: 40px; margin-bottom: 10px; }
.jolibut-phase-title {
    margin: 0 !important;
    padding: 0 0 0 0.5em !important;
    color: var(--jb-primary) !important;
    font-size: 1.5em !important;
    font-weight: 600;
    letter-spacing: 0.5px;
    line-height: 1.2 !important;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 5px solid var(--jb-primary);   
}
.jolibut-phase-icon { height: 24px; width: auto; display: block; transform: translateY(-2px); }

@media (max-width: 500px) {
    .jolibut-phase-title { font-size: 1.1em; }
    .jolibut-phase-icon { height: 20px; }
}

/* =========================================
   VUE D'ENSEMBLE DES GROUPES (Header)
   ========================================= */
.jolibut-overview-container { margin-bottom: 25px; }
.jolibut-overview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.jolibut-overview-card {
    background: #fff;
    border: 1px solid var(--jb-border);
    border-left: 4px solid var(--jb-primary);
    padding: 10px 12px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.jolibut-overview-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: var(--jb-primary);
}
.jolibut-card-header { font-weight: bold; color: var(--jb-text); font-size: 1em; }
.jolibut-card-desc { font-size: 0.9em; color: var(--jb-text-light); margin-top: 2px; }
.jolibut-card-loc {
    margin-top: 6px;
    font-size: 0.85em;
    font-weight: bold;
    color: var(--jb-primary);
    display: flex;
    align-items: center;
    gap: 4px;
}

@media (max-width: 600px) {
    .jolibut-overview-grid { grid-template-columns: 1fr; }
}

/* =========================================
   8. LISTE TERRAINS (Header Groupe)
   ========================================= */
.jolibut-group-fields {
    margin-top: 10px;
    font-size: 0.9em;
    color: #555;
    padding-top: 8px;
    border-top: 1px solid var(--jb-border);
    
    /* Centrage vertical */
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* Gère le retour à la ligne proprement */
    gap: 6px;        /* Espace uniforme entre le texte et les badges */
}

.jolibut-terrain-badge {
    display: inline-flex; /* Mieux que inline-block pour le centrage interne */
    align-items: center;
    justify-content: center;
    padding: 5px 6px;
    border-radius: 3px;
    font-weight: bold;
    color: #fff;
    font-size: 0.85em;
    background-color: #999;
    line-height: 1; /* Hauteur de ligne stable */
}

.jolibut-terrain-name {
    color: #777;
    margin-right: 8px;
        line-height: 1;
}

/* Couleurs définies */
.jb-terrain-a { background-color: #0D8A2D; } 
.jb-terrain-b { background-color: #249EE0; } 
.jb-terrain-c { background-color: #FBBA02; } 


/* =========================================
   9. CLASSEMENT FINAL & PODIUM
   ========================================= */
.classement-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: calc(100% - 20px);
    margin: 20px auto;
    padding:10px;
    line-height:1.3;
}

.podium {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 20px;
    align-items: end;
    gap:0;
    font-size:1.2em;
    perspective: 500px;
}

.podium-step {
    flex:1;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    padding:10px;
    box-shadow:3px 3px 10px rgba(0,0,0,0.25);
    z-index:1;
    transform: rotateX(15deg);
}

.podium-step .rank{
     position:absolute;
     z-index:1;
     color:white;
     font-weight:bold;
     display:flex;
     width:100%;
     height:100%;
     top:0;
     left:0;
     opacity:0.5;
     font-size:4em;
     line-height:1;
}

.step-1 {
    height: 180px;
    background: radial-gradient(circle at top left, #FDED01, #FCC600);
    order: 2;
    z-index:2;
    transform: scale(1.05);
}

.step-2 {
    height: 150px; 
    background: radial-gradient(circle at top left, #cedce7, #a5bcce); 
    order: 1;
    transform: rotateY(15deg);
}

.step-3 {
    height: 120px;
    background: radial-gradient(circle at top left, #d69b64, #CD7F32); 
    order: 3;
    transform: rotateY(-15deg);
}

.step-2,.step-3 {
    font-weight:bold;
    color:white;
}

.step-2,.step-3, .step-1 .rank { 
    text-shadow:1px 1px 1px rgba(0,0,0,1);
}

/* Media query pour le responsive */
@media (max-width: 768px) {
    .step-1 { height:210px; }
    .step-2 { height:180px; }
    .step-3 { height:150px; } 
    .podium-step .rank{ font-size:3em; }
} 

.podium-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    position:relative;
    z-index:2;
}

.podium-content .back-blason {
    width:55px;
    max-width: 100%;
    height: auto;
}

.podium-step.step-1 .back-blason {
    width:85px; 
}

.podium-rank {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 5px;
}

.podium-team {
    font-weight: bold;
    margin-top: 5px;
    line-height: 1.1;
}

.classement-list {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.classement-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    gap:10px;
    justify-content:center;
}
.classement-item:nth-child(even) { background-color:rgba(0,0,0,0.025); }

.classement-position {
     width:15px; text-align:center; padding-right:10px; font-weight:bold;
}

.classement-team {
   width:100%; max-width:300px;
}
.classement-team.team-4 { font-weight:bold; }

.classement-item .back-blason {
    width:20px;
    height:auto;
}

/* =========================================
   10. RÉCOMPENSES
   ========================================= */
#recompenses {
  display: flex;
  flex-direction: column;
  width: calc(100% - 20px);
  margin: 20px auto;
  border: 10px solid transparent;
  border-image: linear-gradient(to right, #FCC600, #FDEB00, #FCC600) 1;
}

#recompenses .recompense-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #ddd;
  font-size: 1.2em;
  background-image: url(../design/fa-filiaire.svg);
  background-size: cover;
  background-attachment: fixed;
  background-repeat: repeat;
  line-height: 1.3
}

#recompenses .recompense-item:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.025)
}

#recompenses .label {
  font-weight: bold;
  flex: 1;
}

#recompenses .value {
  flex: 2;
  text-align: right;
}

#recompenses .recompense-item:first-child {
  border-top: 1px solid #ddd;
}

#recompenses .recompense-item:last-child {
  border-bottom: none;
}

#recompenses .label,
#recompenses .value {
  padding: 15px;
}

@media (max-width: 600px) {
  #recompenses .recompense-item {
    flex-direction: column;
    align-items: flex-start;
  }

  #recompenses .value {
    text-align: left;
    margin-top: 5px;
  }

  #recompenses .label,
  #recompenses .value {
    padding: 5px;
  }
}