/* Les matchs de la ligue, dans la page Ligue (ligue.html, 10 octobre 2026).
   Repris tel quel de l'ancienne page « Tous les matchs » (matchs.html, refonte
   du 7 octobre 2026) : Ligue › Cette semaine › Matchs (rubrique « semaine ») et
   Ligue › Tous les matchs (rubrique « tous »). Le rendu est dans
   /js/matchs-vue.mjs.

   POURQUOI #lg-matchs DEVANT CHAQUE RÈGLE. Ces classes ont des noms courts
   (.match, .liste, .score, .vide...) : préfixées, elles ne peuvent pas
   toucher le reste de la page Ligue. L'ordre des règles est celui d'origine,
   donc leurs priorités entre elles ne changent pas.

   La barre « Aujourd'hui » (.jour, .jc) est stylée dans /css/style.css :
   l'accueil a la même. Les règles (jours de Paris, états, ordre des cartes)
   sont dans /js/aujourdhui.mjs. */

/* Le choix de la saison (Tous les matchs seulement) et le bandeau
   « saison archivée ». */
#lg-matchs .mt-saison { display: flex; justify-content: flex-end; margin: 0 0 14px; }
#lg-matchs .mt-saison[hidden], #lg-matchs .mt-archive[hidden] { display: none; }
#lg-matchs .mt-archive { margin: 0 0 18px; padding: 10px 14px; border-radius: 10px; background: rgba(255,225,77,.12);
  border: 1px solid rgba(255,225,77,.35); color: var(--yellow); font-size: 13px; }
#lg-matchs .mt-archive a { color: inherit; text-decoration: underline; }
@media (max-width: 600px) { #lg-matchs .mt-saison { justify-content: flex-start; } }

/* Filtre par division (saison régulière seulement). */
#lg-matchs .divs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 0 0 18px; }
#lg-matchs .divs[hidden] { display: none; }
#lg-matchs .divs .lb { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
#lg-matchs .divs button { font: inherit; font-size: 12.5px; font-weight: 800; padding: 6px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--surface2); background: var(--surface); color: var(--body); }
#lg-matchs .divs button:hover { color: var(--text); }
#lg-matchs .divs button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
#lg-matchs .divs button.moi { border-color: rgba(18,224,224,.55); color: var(--cyan); }
#lg-matchs .divs button.moi[aria-pressed="true"] { background: var(--cyan); border-color: var(--cyan); color: #0d0a14; }
#lg-matchs .divs .sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
@media (max-width: 600px) { #lg-matchs .divs .sep { display: none; } }
#lg-matchs .equipes .tag-div { margin-right: 8px; vertical-align: 2px; }

/* Cette semaine : la ligne d'information, puis les deux colonnes. */
#lg-matchs .sem-info { display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; margin: 0 0 14px; padding-inline: 3px; }
#lg-matchs .sem-info b { color: var(--violet, #9d8cff); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
#lg-matchs .sem-info span { color: var(--muted); font-size: 12.5px; }
#lg-matchs .sem-info i { margin-left: auto; font-style: normal; color: var(--muted); font-size: 12px; }
#lg-matchs .cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
#lg-matchs .col h3 { margin: 0 0 4px; font-size: 15px; font-weight: 800; color: var(--text); display: flex; align-items: baseline; gap: 8px; }
#lg-matchs .col h3 span { font-size: 12px; color: var(--muted); font-weight: 600; }
#lg-matchs .jourt { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 14px 0 8px 3px; }
#lg-matchs .jourt.dem { color: var(--cyan); }
/* Lot 214 : les matchs de la semaine sans date, listés sous « Matchs à venir ». */
#lg-matchs .jourt.ap { color: var(--yellow, #ffe14d); }
#lg-matchs .sd-note { color: var(--muted); font-size: 12.5px; margin: 8px 3px 0; }
/* Dans une colonne, une rencontre par ligne (la grille à 2 colonnes de
   .liste, plus bas, est faite pour la pleine largeur). */
#lg-matchs .cols .liste { display: flex; flex-direction: column; gap: 8px; }
#lg-matchs .col .rien { color: var(--muted); font-size: 13px; margin: 12px 3px; }
#lg-matchs .sansdate { margin-top: 14px; padding: 10px 13px; border: 1px dashed rgba(255,255,255,.18); border-radius: 12px;
  font-size: 12.5px; color: var(--body); }
#lg-matchs .sansdate b { color: var(--text); }
#lg-matchs .sansdate button, #lg-matchs .col .rien button { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--cyan); cursor: pointer; }
/* Sur téléphone, une colonne : ce qui vient d'abord, ce qui est joué ensuite. */
@media (max-width: 900px) { #lg-matchs .cols { grid-template-columns: 1fr; } #lg-matchs .col.avenir { order: -1; } }

/* Matchs castés : une étiquette sur chaque ligne castée (/js/casts.js). */
#lg-matchs .badge-live { font-size: 10px; font-weight: 900; letter-spacing: .06em; color: #fff; background: #e5304a; padding: 2px 6px; border-radius: 5px; white-space: nowrap; }
/* L'icône de plateforme : un carré de couleur, pas de logo de marque. */
#lg-matchs .pl { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 4px; font-size: 8px;
  font-style: normal; color: #fff; background: rgba(255,255,255,.18); flex: none; }
#lg-matchs .pl.youtube { background: #d23a3a; } #lg-matchs .pl.twitch { background: #7b4fd6; }
#lg-matchs .chip-cast { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: var(--body);
  padding: 2px 8px 2px 3px; border-radius: 999px; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12); margin-left: 8px; vertical-align: 1px; }
#lg-matchs .chip-cast.live { border-color: rgba(229,48,74,.6); color: #ff8a99; }
/* Streams des joueurs (/js/streams.js) : violet, à part de l'étiquette du cast. */
#lg-matchs .chip-stream { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: #c9a8ff;
  padding: 2px 8px; border-radius: 999px; background: rgba(145,70,255,.15); margin-left: 8px; vertical-align: 1px; }
#lg-matchs .chip-stream .pt { width: 7px; height: 7px; border-radius: 50%; background: #ff3b3b; }
#lg-matchs .chip-stream .pt.pale { background: rgba(145,70,255,.6); }
#lg-matchs #comp-select {
  background: rgba(255,255,255,.08); color: var(--text);
  border: 1px solid rgba(255,255,255,.16); border-radius: 999px;
  padding: 8px 16px; font-size: 13px; font-weight: 700; font-family: inherit;
}

/* ── Recherche par équipe ───────────────────────────────────────────
   La page reçoit déjà toutes les rencontres de la compétition en un seul
   appel : le filtre est donc purement local, instantané, et ne coûte
   aucune requête de plus. */
#lg-matchs .rech { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 14px; }
/* Quand la compétition n'a qu'une phase, la barre de pastilles est masquée
   et c'est au champ de poser l'écart avant la liste : sans ça les deux se
   touchent. La classe est posée par rendreOnglets, qui est le seul endroit
   à savoir si la barre s'affiche. */
#lg-matchs .rech.seul { margin-bottom: 26px; }
#lg-matchs .rech-boite { position: relative; flex: 1 1 300px; max-width: 420px; }
#lg-matchs .rech input {
  width: 100%; background: var(--surface); color: var(--text);
  border: 1px solid var(--surface2); border-radius: 999px;
  padding: 9px 34px 9px 38px; font: inherit; font-size: 13px; font-weight: 600;
}
#lg-matchs .rech input::placeholder { color: var(--muted); font-weight: 500; }
#lg-matchs .rech input:focus { outline: none; border-color: var(--accent); }
#lg-matchs .rech .loupe { position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 13px; pointer-events: none; }
#lg-matchs .rech .vider { position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 15px;
  line-height: 1; padding: 2px 4px; }
#lg-matchs .rech .vider:hover { color: var(--text); }
#lg-matchs .rech .vider[hidden] { display: none; }
/* La liste des noms exacts. Elle se réduit à mesure qu'on tape, ce qui lui
   donne l'avantage d'un menu déroulant sans en avoir la longueur : la
   compétition compte près de quatre-vingts équipes. */
#lg-matchs .sugg { position: absolute; z-index: 5; top: calc(100% + 5px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--surface2); border-radius: 12px;
  padding: 4px; max-height: 240px; overflow: auto; box-shadow: 0 12px 30px rgba(0,0,0,.5); }
#lg-matchs .sugg[hidden] { display: none; }
#lg-matchs .sugg button { display: block; width: 100%; text-align: left; background: none; border: 0;
  color: var(--body); font: inherit; font-size: 13px; font-weight: 600; padding: 7px 10px;
  border-radius: 8px; cursor: pointer; }
#lg-matchs .sugg button:hover { background: var(--surface2); color: var(--text); }
#lg-matchs .sugg button small { color: var(--muted); font-weight: 500; margin-left: .4rem; }
#lg-matchs .bandeau-rech { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: rgba(255,47,146,.10); border: 1px solid rgba(255,47,146,.28);
  border-radius: 10px; padding: 8px 12px; margin: 0 0 16px; font-size: 13px; color: var(--body); }
#lg-matchs .bandeau-rech[hidden] { display: none; }
#lg-matchs .bandeau-rech b { color: var(--text); }
#lg-matchs .bandeau-rech button { margin-left: auto; background: none; border: 0; color: var(--accent);
  font: inherit; font-weight: 700; font-size: 12px; cursor: pointer; }

/* onglets de phase */
/* gap : espace entre les pastilles. row-gap sert quand elles passent à la ligne. */
#lg-matchs .phases {
  display: flex; flex-wrap: wrap;
  column-gap: 24px; row-gap: 12px;
  margin: 12px 0 26px;
}
#lg-matchs .phase {
  border: 1px solid var(--surface2); background: var(--surface); color: var(--muted);
  border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 700;
  font-family: inherit; cursor: pointer; width: auto;
  display: inline-flex; align-items: center; gap: 7px;
  transition: color .12s, background .12s, border-color .12s;
}
#lg-matchs .phase:hover { color: var(--text); }
#lg-matchs .phase[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
#lg-matchs .phase .n { font-size: 12px; opacity: .75; font-variant-numeric: tabular-nums; }

/* semaines */
#lg-matchs .semaine { margin-bottom: 28px; }
#lg-matchs .semaine-tete {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin-bottom: 10px; padding-inline: 3px;
}
#lg-matchs .semaine-tete b {
  color: var(--violet, #9d8cff); font-size: 11px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase;
}
#lg-matchs .semaine-tete span { color: var(--muted); font-size: 12px; }
#lg-matchs .semaine-tete i { margin-left: auto; color: var(--muted); font-size: 12px; font-style: normal; }

/* rencontres */
#lg-matchs .liste { display: flex; flex-direction: column; gap: 8px; }

/* Deux colonnes des que la page est assez large.
   POURQUOI 940 px. La page est plafonnee a 1100 px et porte 20 px de marge
   de chaque cote : sa largeur utile vaut donc min(fenetre, 1100) - 40. Une
   carte ne doit pas descendre sous 440 px, sinon le nom des equipes, le
   score et la pastille se marchent dessus. Il faut donc 2 x 440 + 14 de
   gouttiere = 894 px utiles, soit 934 px de fenetre. On arrondit a 940.
   En dessous, .liste reste la colonne unique definie au-dessus, et la
   regle de repli de la carte (560 px) continue de s'appliquer telle
   quelle : les deux seuils ne se croisent jamais. */
@media (min-width: 940px) {
  #lg-matchs .liste {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
  }
}
#lg-matchs .match {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--surface2); border-radius: 12px;
  padding: 13px 16px; text-decoration: none; color: inherit;
  transition: background .12s, border-color .12s;
}
#lg-matchs .match:hover { border-color: rgba(255,255,255,.22); background: var(--surface2); }
#lg-matchs .match.inactif { cursor: default; }
#lg-matchs .equipes { min-width: 0; }
#lg-matchs .equipes b { font-weight: 700; font-size: 15px; }
#lg-matchs .equipes b .vs { color: var(--muted); font-weight: 600; margin: 0 5px; }
#lg-matchs .quand { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
#lg-matchs .quand.flou { opacity: .6; }
#lg-matchs .score {
  font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums;
  white-space: nowrap; letter-spacing: -.01em;
}
#lg-matchs .score .p { color: var(--muted); font-weight: 600; }
#lg-matchs .score .g { color: var(--accent2, #27e0c8); }
#lg-matchs .pastille { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 4px 11px; white-space: nowrap; }
#lg-matchs .p-fini { background: rgba(47,232,138,.15); color: #2fe88a; }
#lg-matchs .p-inc { background: rgba(255,225,77,.15);  color: #ffe14d; }
#lg-matchs .p-int { background: rgba(255,138,153,.15); color: #ff8a99; }   /* match interrompu (10 octobre 2026) */
#lg-matchs .p-rep { background: rgba(255,225,77,.12); color: #ffe14d; border: 1px dashed rgba(255,225,77,.45); }   /* en pause, reprise (lot 177) */
#lg-matchs .p-att { background: rgba(255,255,255,.06); color: var(--muted); }
/* En cours : match commencé (ou rapport en direct actif), pas encore complet */
#lg-matchs .p-cours { background: rgba(18,224,224,.14); color: var(--cyan, #12e0e0); display: inline-flex; align-items: center; gap: 6px; }
#lg-matchs .p-cours::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pouls-cours 1.6s ease-in-out infinite; }
@keyframes pouls-cours { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { #lg-matchs .p-cours::before { animation: none; } }

/* Une phase où la recherche ne trouve rien se grise plutôt que de
   disparaître : on doit voir qu'elle existe et qu'elle est vide. */
#lg-matchs .phase.sansresultat { opacity: .4; }

#lg-matchs .vide { padding: 48px 16px; text-align: center; color: var(--muted); font-size: 14px; }
#lg-matchs .vide button { background: none; border: 0; color: var(--cyan); font: inherit;
  font-weight: 700; cursor: pointer; text-decoration: underline; padding: 0; }

@media (max-width: 560px) {
  #lg-matchs .match { grid-template-columns: 1fr auto; row-gap: 8px; }
  #lg-matchs .score { grid-row: 1; grid-column: 2; }
  #lg-matchs .pastille { grid-column: 2; justify-self: end; }
}
