/* Version: 2026-11-07 00:15 */
/* Nouvelle présentation du widget (layout=v2). Couleurs : variables définies par la page. */

@font-face {
  font-family: "Quicksand";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/quicksand-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Quicksand";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/quicksand-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Oswald";
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
  src: url("/fonts/oswald-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Oswald";
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
  src: url("/fonts/oswald-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --line: #e5e7eb;
  --chip-bg: #eef3f9;
  --status-bg: #fff4e0;
  --status-text: #8a5300;
  --live-bg: #fdecec;
  --font-text: "Quicksand", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-title: "Oswald", "Arial Narrow", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: transparent;
}

/* Avec hauteur automatique, la page parente ajuste l'iframe : pas de barre de défilement interne. */
html.auto-height, html.auto-height body { overflow: hidden; }

body {
  color: var(--text);
  font-family: var(--font-text);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

.hcc { padding: 2px 2px 6px; }

/* Jour */
.day + .day { margin-top: 14px; }

.day-title {
  margin: 0;
  padding: 4px 0 6px;
  border-bottom: 2px solid var(--primary);
  color: var(--primary);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.matches { list-style: none; margin: 0; padding: 0; }

/* Match : heure | équipes + infos | pastille */
.m {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  column-gap: 10px;
  align-items: start;
  padding: 10px 4px;
  border-bottom: 1px solid var(--line);
}

.m-time {
  padding-top: 5px;
  font-family: var(--font-title);
  font-weight: 500;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.m-team {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
}

.m-logo {
  flex: none;
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.m-logo.is-missing { visibility: hidden; }

.m-name {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.m-team.is-club .m-name {
  color: var(--primary);
  font-weight: 700;
}

.m-score {
  flex: none;
  min-width: 2.2ch;
  text-align: right;
  font-family: var(--font-title);
  font-weight: 500;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.m-team.is-winner .m-score {
  color: var(--text);
  font-weight: 700;
}

/* Infos sous les équipes */
.m-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin-top: 6px;
  padding-left: 36px;
  font-size: 13px;
  color: var(--muted);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
}
.chip-status { background: var(--status-bg); color: var(--status-text); }
.chip-live { background: var(--live-bg); color: var(--loss); }

.chip-live .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--loss);
  animation: hcc-pulse 1.4s ease-in-out infinite;
}
@keyframes hcc-pulse {
  50% { opacity: 0.25; }
}
@media (prefers-reduced-motion: reduce) {
  .chip-live .dot { animation: none; }
}

.m-venue {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  text-decoration: none;
}
.m-venue::before {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.2 7 13 7 13s7-7.8 7-13a7 7 0 0 0-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.2 7 13 7 13s7-7.8 7-13a7 7 0 0 0-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E") center / contain no-repeat;
}
a.m-venue:hover { color: var(--primary); text-decoration: underline; }

/* Pastille Victoire / Nul / Défaite */
.badge {
  align-self: center;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  color: #fff;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 14px;
}
.badge-v { background: var(--win); }
.badge-n { background: var(--draw); }
.badge-d { background: var(--loss); }

/* Prochain match (programme d'une équipe) : bande turquoise */
.m.is-next {
  background: linear-gradient(90deg, rgba(1, 164, 147, 0.08), rgba(1, 164, 147, 0) 70%);
  box-shadow: inset 3px 0 0 var(--accent);
  padding-left: 10px;
}

.empty {
  margin: 0;
  padding: 18px 8px;
  text-align: center;
  color: var(--muted);
}

/* Les règles display ci-dessus l'emporteraient sinon sur l'attribut hidden. */
[hidden] { display: none !important; }

/* Bouton « Afficher plus » */
.more {
  margin: 10px 0 0;
  text-align: center;
}
.more-btn {
  padding: 7px 18px;
  border: 1px solid var(--primary);
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  font-family: var(--font-text);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.more-btn:hover { background: var(--primary); color: #fff; }

a:focus-visible,
.more-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 3px;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.m-sep { display: none; }

/* Écrans larges : une ligne par match
   heure | hôte (aligné à droite) score : score visiteur | ligue, salle… | pastille */
@media (min-width: 720px) {
  .day + .day { margin-top: 10px; }
  .day-title { padding: 2px 0 4px; font-size: 13px; }

  .m {
    grid-template-columns: 48px minmax(0, 1fr) 14px minmax(0, 1fr) minmax(0, 0.9fr) 26px;
    column-gap: 10px;
    align-items: center;
    padding: 5px 6px;
  }
  .m-body { display: contents; }

  .m-time { grid-column: 1; padding-top: 0; font-size: 15px; }
  .m-team { min-height: 28px; gap: 8px; }
  .m-team-a { grid-column: 2; }
  .m-sep {
    display: block;
    grid-column: 3;
    text-align: center;
    font-family: var(--font-title);
    color: var(--muted);
  }
  .m-team-b { grid-column: 4; }
  .m-meta {
    grid-column: 5;
    margin-top: 0;
    padding-left: 0;
    gap: 3px 6px;
    font-size: 12.5px;
  }
  .badge { grid-column: 6; width: 24px; height: 24px; font-size: 13px; }

  /* Hôte : nom aligné à droite, logo puis score contre le séparateur */
  .m-team-a .m-name { order: 1; text-align: right; }
  .m-team-a .m-logo { order: 2; }
  .m-team-a .m-score { order: 3; }
  /* Visiteur : score contre le séparateur, puis logo et nom */
  .m-team-b .m-score { order: 0; text-align: left; }
  .m-team-b .m-logo { order: 1; }
  .m-team-b .m-name { order: 2; }

  .m.is-next { padding-left: 10px; }
}

/* Classement (what=ranking) */
.rk {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-variant-numeric: tabular-nums;
}
/* Colonnes de chiffres à largeur fixe : le nom de l'équipe prend le reste et passe à la ligne si besoin */
.rk th { width: 42px; }
.rk th.rk-team { width: auto; }
.rk th {
  padding: 8px 4px 6px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-title);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
}
.rk th abbr { text-decoration: none; cursor: help; }
.rk td {
  padding: 6px 4px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.rk .rk-pos { width: 40px; }
.rk th.rk-team,
.rk td.rk-team { text-align: left; }
.rk-team-in {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
}
.rk .rk-pts { font-weight: 700; }
.rk td.rk-diff { color: var(--muted); }

/* Position : pastille verte (promotion), rouge (relégation) ou neutre */
.rk-rank {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 24px;
  border-radius: 6px;
  background: var(--chip-bg);
  color: var(--primary);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 13px;
}
.rk-rank.rk-promo { background: var(--win); color: #fff; }
.rk-rank.rk-releg { background: var(--loss); color: #fff; }

/* Équipes du club, et équipe demandée en évidence */
.rk tr.is-club .m-name { color: var(--primary); font-weight: 700; }
.rk tr.is-self td { background: rgba(1, 164, 147, 0.08); }
.rk tr.is-self td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

/* Petits écrans : buts marqués et encaissés masqués, la différence reste */
@media (max-width: 479px) {
  .rk .rk-goals { display: none; }
  .rk th, .rk td { padding-left: 2px; padding-right: 2px; }
  .rk th { width: 24px; }
  .rk th.rk-pts { width: 30px; }
  .rk th.rk-diff { width: 34px; }
  .rk .rk-pos { width: 32px; }
  .rk td { font-size: 14px; }
  .rk .m-logo { width: 22px; height: 22px; }
  .rk-team-in { gap: 6px; }
}
