/* ============================================================
   Écran « Postes dans le monde » (cf. js/pages/monde.js)
   ============================================================ */

.monde-attente { display: flex; gap: 10px; justify-content: center; padding: 80px 0; }
.monde-attente i { width: 10px; height: 10px; border-radius: 50%; background: var(--bleu-2); animation: monde-saut 1s var(--doux) infinite; }
.monde-attente i:nth-child(2) { animation-delay: .12s; }
.monde-attente i:nth-child(3) { animation-delay: .24s; }
@keyframes monde-saut { 50% { transform: translateY(-10px); opacity: .4; } }

/* ---------------- La matrice championnats × postes ---------------- */
.monde-matrice {
  display: grid; grid-template-columns: minmax(170px, 215px) repeat(var(--cols), minmax(0, 1fr)); gap: 6px;
  padding: 16px; border-radius: 22px; background: linear-gradient(160deg, rgba(47, 107, 255, .08), rgba(255, 255, 255, .02) 60%);
  border: 1px solid var(--ligne);
}
.monde-matrice button { border: 0; font: inherit; color: inherit; }
.mm-coin { min-height: 28px; }
.mm-tete {
  display: grid; justify-items: center; gap: 3px; align-self: end; background: none; padding: 4px 0 8px; color: var(--texte-3); text-align: center; transition: color .2s;
}
.mm-tete span { font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; line-height: 1.15; }
.mm-tete b { font: 600 13px var(--titre); color: var(--texte-2); letter-spacing: .02em; white-space: nowrap; }
.mm-tete:hover, .mm-tete:hover b { color: var(--texte); }
.mm-champ {
  display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; background: var(--surface); text-align: left;
  transition: background .2s, transform .3s var(--ressort);
}
.mm-champ:hover { background: var(--surface-3); transform: translateX(3px); }
.mm-champ img { width: 30px; height: 30px; object-fit: contain; flex: none; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .5)); }
.mm-champ span { font: 600 15px var(--titre); text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-champ em { margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 800; color: var(--texte-3); }
.mm-case {
  position: relative; overflow: hidden; min-height: 50px; border-radius: 12px; display: grid; place-items: center; align-content: center; gap: 0;
  background: rgba(47, 107, 255, var(--i)); box-shadow: inset 0 0 0 1px rgba(143, 179, 255, calc(var(--i) * .5));
  transition: transform .35s var(--ressort), box-shadow .25s;
}
.mm-case::after { /* la part de joueurs libres en 2027 */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, #ff4d57, #ff9f43);
  transform-origin: 0 50%; transform: scaleX(var(--l));
}
.mm-case b { font: 600 18px/1 var(--titre); font-variant-numeric: tabular-nums; color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, .45); }
.mm-case small { font-size: 10px; font-weight: 800; color: #ffc2c5; line-height: 1.2; }
.mm-case.est-vide b { color: var(--texte-3); text-shadow: none; }
.mm-case:hover { transform: translate3d(0, -3px, 0) scale(1.06); z-index: 1; box-shadow: 0 14px 30px -12px rgba(47, 107, 255, .8), inset 0 0 0 1px rgba(200, 216, 255, .6); }
.mm-case.est-choisi { box-shadow: 0 0 0 2px #fff, 0 12px 34px -10px rgba(91, 140, 255, .9); }

/* ---------------- La barre des fins de contrat ---------------- */
.monde-fins { margin: 18px 0 26px; }
.mf-titre { font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--texte-3); margin-bottom: 8px; }
.mf-titre span { letter-spacing: .04em; text-transform: none; font-weight: 650; }
.mf-barre { display: flex; gap: 4px; height: 54px; }
.mf-seg {
  flex: 1 1 0; min-width: 0; border: 0; border-radius: 12px; padding: 7px 12px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  overflow: hidden; color: #fff; text-align: left; transition: transform .35s var(--ressort), box-shadow .25s, opacity .2s;
}
.mf-seg b { font: 600 14px var(--titre); text-transform: uppercase; white-space: nowrap; }
.mf-seg span { font-size: 11.5px; font-weight: 750; opacity: .85; white-space: nowrap; }
.mf-seg:hover { transform: translateY(-2px); }
.mf-seg.est-choisi { box-shadow: 0 0 0 2px #fff; }
.mf-2026 { background: linear-gradient(135deg, #8d1520, #c7282d); }
.mf-2027 { background: linear-gradient(135deg, #c7282d, #ff5a62); }
.mf-2028 { background: linear-gradient(135deg, #c96a12, #ff9f43); }
.mf-2029 { background: linear-gradient(135deg, #17834a, #36d27a); }
.mf-inconnue { background: linear-gradient(135deg, #24314f, #3a4a70); color: var(--texte-2); }

/* ---------------- Filtres + en-têtes de colonnes ---------------- */
.monde-filtres { padding-bottom: 0; }
.monde-groupes button { font-size: 12.5px; }
.monde-tete, .monde-ligne {
  display: grid; align-items: center; column-gap: 12px;
  grid-template-columns: minmax(210px, 2.3fr) minmax(120px, 1.2fr) minmax(70px, .8fr) minmax(130px, 1.2fr) 48px 66px 60px 86px 64px minmax(96px, .9fr);
}
.monde-tete { flex-basis: 100%; margin: 4px -12px 0; padding: 8px 26px 9px; border-top: 1px solid var(--ligne); }
.monde-tete button {
  display: flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; font-size: 10.5px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--texte-3); text-align: left; transition: color .2s; white-space: nowrap;
}
.monde-tete button:hover, .monde-tete button.est-tri { color: var(--ciel); }
.monde-tete button i { font-style: normal; font-size: 12px; }

/* ---------------- La liste virtualisée ---------------- */
.monde-liste { position: relative; margin-top: -8px; }
.monde-corps { --h-ligne: 52px; position: relative; contain: strict; content-visibility: visible; width: 100%; }
.monde-ligne {
  position: absolute; top: 0; left: 0; right: 0; height: var(--h-ligne); padding: 0 14px; will-change: transform;
  border-bottom: 1px solid var(--ligne); font-size: 13px; color: var(--texte-2); contain: layout paint;
}
.monde-ligne:hover { background: rgba(47, 107, 255, .07); }
.monde-ligne.est-suivi { cursor: pointer; }
.monde-ligne.est-suivi::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--or); }
.monde-ligne.est-suivi:hover { background: rgba(245, 196, 81, .07); }
.monde-ligne > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-nom { display: grid !important; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; }
.ml-av {
  grid-row: 1 / 3; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font: 600 13px var(--titre); font-style: normal;
  color: rgba(230, 238, 255, .85); background: linear-gradient(150deg, hsla(var(--t), 70%, 55%, .38), hsla(var(--t), 70%, 30%, .25)); border: 1px solid rgba(255, 255, 255, .08);
}
.ml-nom b { font-weight: 750; color: var(--texte); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-nom small { font-size: 11.5px; color: var(--texte-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-poste b { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 5px; margin-right: 7px; border-radius: 7px; background: var(--surface-3); font: 600 12.5px var(--titre); color: var(--texte); }
.ml-club { font-weight: 700; color: var(--texte); }
.ml-club em { display: none; font-style: normal; }
.ml-champ { display: flex !important; align-items: center; gap: 8px; }
.ml-champ img { width: 22px; height: 22px; object-fit: contain; flex: none; }
.ml-champ em { font-style: normal; overflow: hidden; text-overflow: ellipsis; }
.ml-age, .ml-taille, .ml-poids { font-variant-numeric: tabular-nums; }
.ml-age { font: 600 15px var(--titre); color: var(--texte); }
.ml-vide { font-size: 11.5px; color: var(--texte-3); }
.ml-suivi { display: flex !important; align-items: center; gap: 8px; }
.ml-fleche { margin-left: auto; font-style: normal; font-size: 20px; color: var(--or); transition: transform .25s var(--ressort); }
.monde-ligne:hover .ml-fleche { transform: translateX(4px); }
.monde-vide { position: relative; }

@media (max-width: 1200px) {
  .monde-tete, .monde-ligne { grid-template-columns: minmax(200px, 2.2fr) minmax(110px, 1.1fr) minmax(70px, .8fr) minmax(110px, 1fr) 44px 64px 86px; }
  .mt-taille, .mt-poids, .mt-jiff, .ml-taille, .ml-poids, .ml-jiff { display: none !important; }
}

@media (max-width: 760px) {
  .monde-matrice { grid-template-columns: 112px repeat(var(--cols), 46px); overflow-x: auto; gap: 4px; padding: 10px; scrollbar-width: none; }
  .monde-matrice::-webkit-scrollbar { display: none; }
  .mm-tete span { display: none; }
  .mm-tete b { font-size: 12px; }
  .mm-champ { padding: 5px 6px; gap: 6px; position: sticky; left: 0; z-index: 2; background: #0a1433; }
  .mm-champ span { font-size: 12px; }
  .mm-champ em { display: none; }
  .mm-case { min-height: 44px; }
  .mm-case b { font-size: 15px; }
  .mf-barre { height: 48px; }
  .mf-seg { padding: 6px 8px; }
  .mf-seg b { font-size: 12px; }
  .monde-filtres { position: static; }
  .monde-filtres .champ { min-width: 0; flex: 1 1 100%; }
  .monde-groupes { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .monde-groupes::-webkit-scrollbar { display: none; }
  .monde-groupes button { flex: none; }
  .monde-filtres .liste-deroulante { flex: 1 1 calc(50% - 10px); }
  .monde-filtres .liste-deroulante select { width: 100%; }
  .monde-tete { display: flex; gap: 14px; overflow-x: auto; padding: 8px 14px; scrollbar-width: none; }
  .monde-tete::-webkit-scrollbar { display: none; }
  .monde-corps { --h-ligne: 64px; }
  .monde-ligne { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "nom fin" "club suivi"; row-gap: 2px; padding: 8px 10px; align-content: center; }
  .monde-ligne > span:not(.ml-nom):not(.ml-club):not(.ml-fin):not(.ml-suivi) { display: none !important; }
  .ml-nom { grid-area: nom; grid-template-columns: 26px 1fr; column-gap: 8px; }
  .ml-av { width: 26px; height: 26px; border-radius: 8px; font-size: 11px; grid-row: 1; }
  .ml-nom small { display: none; }
  .ml-club { grid-area: club; padding-left: 34px; font-size: 12px; font-weight: 650; color: var(--texte-3); }
  .ml-club em { display: inline; }
  .ml-fin { grid-area: fin; justify-self: end; }
  .ml-suivi { grid-area: suivi; justify-self: end; }
  .ml-fleche { display: none; }
}
