/* Home top zone: the featured match (hero), the flash wire and the club rail. */
.top-zone { display: grid; gap: var(--space-5); padding-block-start: var(--space-5); }
.home-top { display: grid; gap: var(--space-5); }
@media (min-width: 1000px) { .home-top { grid-template-columns: minmax(0, 1.75fr) minmax(320px, 1fr); align-items: stretch; } }

/* Featured match: a scoreboard on the brand green, crests in their club colours */
.featured {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-rows: auto 1fr auto; gap: var(--space-5);
  padding: var(--space-5) var(--space-6);
  border-radius: 20px;
  background: var(--brand); color: #FFFFFF;
  box-shadow: var(--shadow-pop);
}
.featured::before {
  content: ""; position: absolute; z-index: -1; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.06'%3E%3Cpath d='M18 18h28v28H18z'/%3E%3Cpath d='M32 12 52 32 32 52 12 32z'/%3E%3C/g%3E%3C/svg%3E");
}
.featured::after {
  content: ""; position: absolute; z-index: -1; inset-block-end: -40%; inset-inline-end: -10%;
  inline-size: 60%; aspect-ratio: 1; border-radius: 50%; background: #FFFFFF; opacity: 0.05;
}
.featured__head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); font-size: var(--step--1); }
.featured__kicker { font-weight: 700; opacity: 0.85; }
.featured__status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: rgb(255 255 255 / 0.14); font-weight: 800; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; }
.featured__status--live { background: #FFFFFF; color: var(--flag-red); }
:root[dir="rtl"] .featured__status { letter-spacing: 0; }
.featured__board { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: var(--space-4); }
.featured__team { display: grid; justify-items: center; gap: 8px; text-align: center; text-decoration: none; color: inherit; min-inline-size: 0; }
.featured__crest { display: grid; place-items: center; inline-size: clamp(84px, 11vw, 140px); aspect-ratio: 1; border-radius: 50%; background: #FFFFFF; box-shadow: 0 0 0 6px color-mix(in srgb, var(--team, #FFFFFF) 55%, transparent), 0 12px 30px rgb(0 0 0 / 0.25); transition: transform 0.25s cubic-bezier(.2,.7,.2,1); }
.featured__team:hover .featured__crest { transform: translateY(-3px) scale(1.03); }
.featured__crest .crest { inline-size: 64%; block-size: auto; }
.featured__name { font-weight: 800; font-size: clamp(1rem, 2vw, 1.5rem); letter-spacing: -0.02em; line-height: 1.15; text-wrap: balance; }
:root[dir="rtl"] .featured__name { letter-spacing: 0; }
.featured__position { font-size: 0.8125rem; opacity: 0.8; }
.featured__form { display: inline-flex; gap: 4px; }
.featured__form-dot { inline-size: 9px; block-size: 9px; border-radius: 50%; background: rgb(255 255 255 / 0.35); }
.featured__form-dot--win { background: #7DE0A8; }
.featured__form-dot--loss { background: #FF8A8E; }
.featured__center { display: grid; justify-items: center; gap: 6px; }
.featured__score { display: flex; gap: 10px; font-size: clamp(3rem, 7vw, 5.5rem); font-weight: 900; letter-spacing: -0.04em; line-height: 0.9; direction: ltr; }
.featured__dash { opacity: 0.5; }
.featured__time { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 900; letter-spacing: -0.04em; line-height: 0.9; }
.featured__countdown { font-size: var(--step--1); font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgb(255 255 255 / 0.14); }
.featured__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-3); font-size: var(--step--1); opacity: 0.95; }
.featured__cta { padding: 8px 16px; border-radius: 999px; background: #FFFFFF; color: var(--brand); font-weight: 800; text-decoration: none; }
.featured__cta:hover { background: #E7F3EC; }
@media (max-width: 600px) {
  .featured { padding: var(--space-4); border-radius: 16px; }
  .featured__crest { inline-size: 72px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--team, #FFFFFF) 55%, transparent); }
  .featured__form, .featured__position { display: none; }
}

/* Flash wire */
.flash-wire { display: grid; grid-template-rows: auto 1fr; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-card); overflow: hidden; }
.flash-wire__head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) var(--space-5) var(--space-2); }
.flash-wire__title { font-size: var(--step-2); }
.flash-wire__live { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 700; color: var(--ink-2); }
.flash-wire__list { position: relative; margin: 0; padding: 0 0 var(--space-3); list-style: none; overflow-y: auto; max-block-size: 420px; }
.flash-wire__list::before { content: ""; position: absolute; inset-block: 8px; inset-inline-start: 86px; inline-size: 1px; background: var(--line); }
.flash-wire__link { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: var(--space-5); padding: 9px var(--space-5); text-decoration: none; }
.flash-wire__link:hover { background: var(--surface-2); }
.flash-wire__time { position: relative; font-size: 0.8125rem; font-weight: 800; color: var(--atlas-green); text-align: end; }
.flash-wire__time::after { content: ""; position: absolute; inset-block-start: 6px; inset-inline-end: -14px; inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--surface); border: 2px solid var(--atlas-green); }
.flash-wire__item--live .flash-wire__time { color: var(--flag-red); }
.flash-wire__item--live .flash-wire__time::after { background: var(--flag-red); border-color: var(--flag-red); }
.flash-wire__item--kickoff .flash-wire__time { color: var(--ink-2); }
.flash-wire__item--kickoff .flash-wire__time::after { border-color: var(--line); }
.flash-wire__text { display: grid; font-size: var(--step--1); font-weight: 600; line-height: 1.35; }
.flash-wire__competition { font-size: 0.6875rem; font-weight: 600; color: var(--ink-2); }

/* Club rail */
.club-rail { display: grid; gap: var(--space-3); padding: var(--space-4) var(--space-5); background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-card); }
.club-rail__title { font-size: var(--step-0); font-weight: 800; }
.club-rail__list { display: flex; gap: var(--space-2); margin: 0; padding: 0 0 4px; list-style: none; overflow-x: auto; scrollbar-width: thin; scroll-snap-type: x proximity; }
.club-rail__club { display: grid; justify-items: center; gap: 6px; inline-size: 84px; padding: var(--space-2) 4px; border-radius: var(--radius-m); text-decoration: none; text-align: center; scroll-snap-align: start; }
.club-rail__club:hover { background: var(--surface-2); }
.club-rail__crest { display: grid; place-items: center; inline-size: 56px; block-size: 56px; border-radius: 50%; background: var(--surface-2); transition: transform 0.2s; }
.club-rail__club:hover .club-rail__crest { transform: scale(1.06); }
.club-rail__name { font-size: 0.75rem; font-weight: 600; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Matches lists and groups (shared) */
.competition-groups { display: grid; gap: var(--space-5); }
.match-grid { display: grid; gap: var(--space-3); }
@media (min-width: 640px) { .match-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- À l'affiche: one card per sport, in that sport's colours (tint-<sport> from sports.css) ---------- */
.highlights { display: grid; gap: var(--space-4); }
.highlights__grid { display: grid; gap: var(--space-3); margin: 0; padding: 0; list-style: none; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
@media (min-width: 1000px) { .highlights__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.highlight {
  position: relative; isolation: isolate; overflow: hidden; display: grid; align-content: space-between; gap: var(--space-3); block-size: 100%; min-block-size: 150px;
  padding: var(--space-4) var(--space-5); border-radius: var(--radius-l); color: #FFFFFF; text-decoration: none;
  background: var(--hub-pattern, none), linear-gradient(135deg, var(--hub, #0B6B3F), var(--hub-deep, #053B22));
  transition: transform 0.15s, box-shadow 0.15s;
}
.highlight::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(0 0 0 / 0.3), transparent 70%); }
:root[dir="rtl"] .highlight::before { background: linear-gradient(270deg, rgb(0 0 0 / 0.3), transparent 70%); }
.highlight:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); color: #FFFFFF; }
.highlight__top { display: flex; align-items: center; gap: var(--space-2); min-inline-size: 0; }
.highlight__icon { display: grid; place-items: center; flex: none; inline-size: 30px; block-size: 30px; border-radius: 9px; background: rgb(255 255 255 / 0.16); color: var(--hub-accent, #FFFFFF); }
.highlight__icon .icon { inline-size: 17px; block-size: 17px; }
.highlight__kicker { flex: 1; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--hub-accent, #FFFFFF); }
:root[dir="rtl"] .highlight__kicker { letter-spacing: 0; }
.highlight__badge { flex: none; padding: 2px 8px; border-radius: 999px; background: rgb(255 255 255 / 0.18); font-size: 0.75rem; font-weight: 800; }
.highlight__title { font-family: "Archivo", "Inter", sans-serif; font-stretch: 75%; font-weight: 900; font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.05; text-wrap: balance; }
:root[dir="rtl"] .highlight__title { font-family: "Noto Kufi Arabic", var(--font-arabic); font-stretch: 100%; line-height: 1.35; }
.highlight__meta { font-size: var(--step--1); color: rgb(255 255 255 / 0.82); }
@media (prefers-reduced-motion: reduce) { .highlight { transition: none; } .highlight:hover { transform: none; } }
@media (max-width: 599px) {
  .highlights__grid { grid-auto-flow: column; grid-auto-columns: 78%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-block-end: 2px; }
  .highlights__grid > li { scroll-snap-align: start; }
}

/* ---------- Every sport, right under the highlights ---------- */
.home-sports { display: grid; gap: var(--space-3); }
.home-sports__title { margin: 0; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
:root[dir="rtl"] .home-sports__title { letter-spacing: 0; font-size: var(--step--1); }

/* ---------- Section widgets: next UFC card, ATP/WTA top 5 ---------- */
.panel-card.fight-teaser {
  display: grid; gap: var(--space-2); padding: var(--space-5); text-decoration: none; color: #FFFFFF;
  background: radial-gradient(120% 90% at 0% 100%, rgb(229 38 46 / 0.45), transparent 55%), radial-gradient(120% 90% at 100% 0%, rgb(46 107 255 / 0.4), transparent 55%), #111115;
}
.panel-card.fight-teaser:hover { color: #FFFFFF; }
.fight-teaser__kicker { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #FF4D55; }
.fight-teaser__title { font-family: "Archivo", "Inter", sans-serif; font-stretch: 62%; font-weight: 900; font-size: 2.75rem; line-height: 0.9; color: transparent; -webkit-text-stroke: 1.5px #FFFFFF; }
.fight-teaser__faceoff { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2); font-family: "Archivo", "Inter", sans-serif; font-stretch: 72%; font-weight: 900; font-size: 1.5rem; text-transform: uppercase; line-height: 1; }
.fight-teaser__faceoff b { font-style: italic; color: #FF4D55; font-size: 1rem; }
.fight-teaser__meta { font-size: var(--step--1); color: rgb(255 255 255 / 0.75); }
.fight-teaser__more { margin-block-start: var(--space-2); font-weight: 800; font-size: var(--step--1); }
:root[dir="rtl"] .fight-teaser__title, :root[dir="rtl"] .fight-teaser__faceoff { direction: ltr; text-align: end; }
.mini-ranking { display: grid; margin: 0 0 var(--space-2); padding: 0; list-style: none; }
.mini-ranking li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: var(--space-2); align-items: center; min-block-size: 36px; padding-inline: var(--space-4); border-block-end: 1px solid var(--line); font-size: var(--step--1); }
.mini-ranking__rank { font-weight: 800; color: var(--ink-2); }
.mini-ranking__name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-ranking__value { color: var(--ink-2); }
.mag-section--mma .mag-head, .mag-section--combat .mag-head { border-color: var(--sport-mma); }
.mag-section--tennis .mag-head { border-color: #C0532A; }
.mag-section--basketball .mag-head { border-color: #E2621B; }
/* On phones the wire stays short so the other sports come into view quickly. */
@media (max-width: 599px) { .wire__item:nth-child(n+6) { display: none; } }
