/* actu-aja.fr — base du design system « Matchday » (Claude Design).
   Tokens clair/sombre, typo Archivo (largeur variable), composants communs.
   Les styles propres à une page vivent dans assets/pages/*.css. */

/* Police Archivo hébergée sur le site (axes graisse 100-900 et largeur 62-125 %). */
@font-face {
  font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url('/assets/fonts/archivo-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: 'Archivo'; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url('/assets/fonts/archivo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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 {
  --bg: #F2F5F9; --sf: #FFFFFF; --sf2: #F2F5F9; --ink: #0A1F4D; --mut: #5B6884; --line: #D9E0EA;
  --hero: #0A1F4D; --sky: #4DB2FF; --blue: #1565C0; --acc: #FF7A1A;
  --drawBg: #E4E9F0; --drawInk: #33415F; --track: #C9D2E0; --aja: #0A1F4D;
  --winT: #0F7F70; --lossT: #C2303D; --hl: rgba(77,178,255,.18);
  --win: #0F7F70; --loss: #C2303D; --draw: #8A96AE; --warn: #F2B544;
  --gutter: clamp(16px, 3vw, 32px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #050E26; --sf: #0E1F47; --sf2: #16295A; --ink: #F2F5F9; --mut: #A3B3D6; --line: #1E3366;
    --hero: #0B2560; --sky: #6BC1FF; --blue: #7CC8FF; --acc: #FF8D3A; --drawBg: #24396B; --drawInk: #E1E8F5;
    --track: #2A3F72; --aja: #6BC1FF; --winT: #3FD1B5; --lossT: #FF7A85; --hl: rgba(107,193,255,.16);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #050E26; --sf: #0E1F47; --sf2: #16295A; --ink: #F2F5F9; --mut: #A3B3D6; --line: #1E3366;
  --hero: #0B2560; --sky: #6BC1FF; --blue: #7CC8FF; --acc: #FF8D3A; --drawBg: #24396B; --drawInk: #E1E8F5;
  --track: #2A3F72; --aja: #6BC1FF; --winT: #3FD1B5; --lossT: #FF7A85; --hl: rgba(107,193,255,.16);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Archivo', system-ui, sans-serif; font-size: 16px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); }
a:hover { color: var(--ink); }
img, svg { max-width: 100%; display: block; }
.wrap { container-type: inline-size; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@keyframes blink { 50% { opacity: .2; } }

/* ---------- Typo utilitaires ---------- */
.cond { font-stretch: 62%; }
.wide { font-stretch: 112%; }
.num { font-variant-numeric: tabular-nums; }
.mut { color: var(--mut); }
.h-display { margin: 0; font-stretch: 62%; font-weight: 900; text-transform: uppercase; line-height: .9; }
.h2 { margin: 0; font-stretch: 62%; font-weight: 900; font-size: 30px; line-height: .95; text-transform: uppercase; }
.h3 { margin: 0; font-stretch: 62%; font-weight: 900; font-size: 22px; line-height: 1; text-transform: uppercase; }
.kicker { font-size: 15px; font-stretch: 112%; font-weight: 700; text-transform: uppercase; color: var(--mut); }

/* ---------- Mise en page ---------- */
.main {
  max-width: 1200px; margin: 0 auto; padding: 16px var(--gutter) 48px;
  display: flex; flex-direction: column; gap: 16px;
}
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 16px; }
.cols { display: grid; gap: 16px; }
@media (min-width: 960px) {
  .cols--side { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
  .cols--2 { grid-template-columns: 1fr 1fr; }
}
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* ---------- Carte ---------- */
.card {
  background: var(--sf); border: 1px solid var(--line); border-radius: 20px; padding: 18px;
  display: flex; flex-direction: column; gap: 14px; min-width: 0;
}
.card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card__more { font-weight: 800; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.hero {
  background: var(--hero); color: #fff; border-radius: 24px; overflow: hidden; position: relative;
}
.hero::before {
  content: ""; position: absolute; right: -30px; top: 0; width: 150px; height: 64px;
  background: var(--sky); transform: skewX(-14deg);
}
.hero > * { position: relative; }
.hero__in { padding: 18px clamp(16px, 4vw, 44px) 20px; }

/* ---------- Pastilles, chips, boutons ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
  border-radius: 999px; background: var(--sf2); font-size: 15px;
}
.pill--glass { background: rgba(255,255,255,.12); color: #fff; }
.pill--sky { background: var(--sky); color: #0A1F4D; }
.tag { white-space: nowrap;
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px;
  font-size: 15px; font-stretch: 112%; font-weight: 800; text-transform: uppercase; background: #fff; color: #0A1F4D;
}
.tag--live { background: var(--acc); color: #1F0C00; }
.tag--dark { background: var(--hero); color: #fff; border-radius: 8px; padding: 5px 9px; font-weight: 700; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: block; animation: blink 1.2s steps(2) infinite; }
.chip {
  display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 14px;
  font-stretch: 112%; font-weight: 700; text-transform: uppercase; background: var(--hl); color: var(--ink);
  white-space: nowrap;
}
.chip--avant-match { background: rgba(77,178,255,.2); }
.chip--compos { background: rgba(15,127,112,.16); }
.chip--apres-match { background: rgba(10,31,77,.1); }
.chip--barometre { background: rgba(255,122,26,.18); }
.chip--analyse, .chip--multiplex { background: rgba(242,181,68,.25); }
.btn {
  min-height: 52px; border-radius: 999px; font-weight: 800; display: inline-flex; align-items: center;
  justify-content: center; gap: 8px; text-decoration: none; font-size: 16px; padding: 0 20px; border: 0; cursor: pointer;
}
.btn--white { background: #fff; color: #0A1F4D; }
.btn--ghost { box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); color: #fff; }
.btn--dark { background: var(--hero); color: #fff; }
.btn--line { box-shadow: inset 0 0 0 2px var(--line); color: var(--ink); background: var(--sf); }

/* ---------- Blason générique ---------- */
.crest {
  width: var(--c-size, 44px); height: var(--c-size, 44px); border-radius: 50%; flex: none;
  background: var(--c-bg); color: var(--c-ink); box-shadow: inset 0 0 0 calc(var(--c-size, 44px) * .07) var(--c-ring);
  display: inline-grid; place-items: center; font-stretch: 62%; font-weight: 800; font-size: var(--c-font, 14px);
  line-height: 1; letter-spacing: -.01em;
}

.crest--img { display: inline-block; object-fit: contain; background: none; box-shadow: none; border-radius: 0; }

/* ---------- Photo joueur ---------- */
.ph { display: block; object-fit: cover; object-position: top center; background: var(--sf2); }

/* ---------- Forme V/N/D ---------- */
.form { display: flex; gap: 6px; }
.form__it {
  width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center;
  font-stretch: 62%; font-weight: 900; font-size: 18px; color: #fff;
}
.form__it--V { background: var(--win); }
.form__it--N { background: var(--drawBg); color: var(--drawInk); }
.form__it--D { background: var(--loss); }
.form__it--last { box-shadow: 0 0 0 2px var(--sf), 0 0 0 4px var(--sky); }

/* ---------- Notes ---------- */
.rating {
  display: inline-grid; place-items: center; min-width: 40px; height: 30px; padding: 0 6px; border-radius: 8px;
  font-stretch: 62%; font-weight: 900; font-size: 19px; font-variant-numeric: tabular-nums;
}
.rating--top { background: #0F7F70; color: #fff; }
.rating--good { background: #3BA58F; color: #fff; }
.rating--ok { background: var(--sky); color: #0A1F4D; }
.rating--meh { background: var(--drawBg); color: var(--drawInk); }
.rating--bad { background: var(--loss); color: #fff; }
.rating--none { background: var(--sf2); color: var(--mut); }
.rating--lg { min-width: 56px; height: 40px; font-size: 26px; border-radius: 10px; }

/* ---------- Tableau (classement) ---------- */
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 15px; }
.table th { font-weight: 700; color: var(--mut); text-align: right; padding: 8px 6px; font-size: 14px; }
.table td { padding: 8px 6px; text-align: right; border-top: 1px solid var(--line); }
.table th:first-child, .table td:first-child { text-align: left; width: 32px; }
.table .t-club { text-align: left; }
.table .t-club a { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 600; min-height: 32px; }
.table .t-pts { font-weight: 900; font-stretch: 62%; font-size: 20px; }
.table tr.is-club td { background: var(--hl); font-weight: 800; }
.table tr.is-club td:first-child { box-shadow: inset 4px 0 0 var(--sky); }
.zone { display: inline-block; width: 4px; height: 20px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.zone--europe { background: var(--blue); }
.zone--barrage { background: var(--warn); }
.zone--relegation { background: var(--loss); }

/* ---------- Barre comparée ---------- */
.cmp { display: flex; flex-direction: column; gap: 6px; }
.cmp__head { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; font-size: 15px; align-items: baseline; }
.cmp__head b { font-stretch: 62%; font-weight: 900; font-size: 22px; font-variant-numeric: tabular-nums; }
.cmp__head b:last-child { text-align: right; }
.cmp__bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 3px; }
.cmp__bar span { display: block; height: 100%; border-radius: 4px; }

/* ---------- États vide / chargement ---------- */
.empty {
  border: 2px dashed var(--line); border-radius: 20px; padding: 22px 18px; display: flex; flex-direction: column;
  align-items: center; text-align: center; gap: 8px;
}
.empty__icon { width: 44px; height: 44px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--mut); display: grid; place-items: center; opacity: .8; }
.empty__icon::after { content: ""; width: 16px; height: 2px; border-radius: 2px; background: var(--mut); }
.empty__title { font-stretch: 62%; font-weight: 900; font-size: 26px; line-height: .95; text-transform: uppercase; text-wrap: balance; }
.empty p { margin: 0; color: var(--mut); max-width: 460px; text-wrap: pretty; }

/* ---------- Carte d'article ---------- */
.acard { display: flex; gap: 12px; align-items: flex-start; text-decoration: none; color: inherit; padding: 12px 0; border-top: 1px solid var(--line); }
.acard:first-child { border-top: 0; padding-top: 0; }
.acard__body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.acard__title { font-weight: 800; font-size: 17px; line-height: 1.25; text-wrap: pretty; }
.acard__meta { font-size: 14px; color: var(--mut); }

/* ---------- Jeu responsable ---------- */
.anj { font-size: 13px; line-height: 1.4; color: var(--mut); border-top: 1px solid var(--line); padding-top: 10px; }
.anj b { color: var(--ink); }

/* ---------- Fil d'Ariane ---------- */
.crumbs { font-size: 15px; color: var(--mut); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumbs a { color: var(--mut); }
.crumbs strong { color: var(--ink); font-weight: 700; }

/* ---------- Header ---------- */
.site-header { background: var(--hero); color: #fff; position: relative; overflow: hidden; }
.site-header::before { content: ""; position: absolute; right: -28px; top: 0; width: 100px; height: 60px; background: var(--sky); transform: skewX(-14deg); }
.site-header__in { position: relative; max-width: 1200px; margin: 0 auto; padding: 0 8px 0 var(--gutter); }
.site-header__top { display: flex; justify-content: space-between; align-items: center; height: 60px; gap: 12px; }
.logo { display: flex; align-items: baseline; color: #fff; text-decoration: none; font-stretch: 62%; font-weight: 900; font-size: 32px; line-height: 1; text-transform: uppercase; }
.logo span { font-size: 20px; color: var(--sky); }
.logo:hover { color: #fff; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; padding: 0; }
.icon-btn--search { background: var(--hero); }
.icon-btn--menu { background: #fff; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; }
.icon-btn--menu i { width: 16px; height: 2px; border-radius: 2px; background: #0A1F4D; display: block; }
.i-search { position: relative; width: 18px; height: 18px; display: block; }
.i-search::before { content: ""; position: absolute; left: 0; top: 0; width: 12px; height: 12px; border: 2px solid #fff; border-radius: 50%; }
.i-search::after { content: ""; position: absolute; right: 0; bottom: 2px; width: 8px; height: 2px; background: #fff; transform: rotate(45deg); }
.nav { display: flex; gap: 4px; overflow-x: auto; padding: 0 0 10px; margin-left: -10px; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { flex: none; display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; font-size: 16px; font-weight: 500; color: #D6E2F5; text-decoration: none; }
.nav a[aria-current="page"] { background: #fff; color: #0A1F4D; font-weight: 800; }
.nav a:hover { color: #fff; }
.nav a[aria-current="page"]:hover { color: #0A1F4D; }
.band { display: block; background: var(--sf); border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.band:hover { color: var(--ink); }
.band__in { max-width: 1200px; margin: 0 auto; padding: 6px var(--gutter); min-height: 50px; display: flex; align-items: center; gap: 10px; font-size: 15px; line-height: 1.3; }
.band__arrow { margin-left: auto; font-weight: 800; font-size: 18px; }
.band--live { background: var(--acc); color: #1F0C00; border: 0; }
.band--live:hover { color: #1F0C00; }
.search-box { display: none; padding: 0 0 12px; }
.search-box.is-open { display: block; }
.search-box form { display: flex; gap: 8px; }
.search-box input { flex: 1; min-height: 44px; border-radius: 999px; border: 0; padding: 0 16px; font: inherit; }
.menu-panel { display: none; padding: 4px 0 14px; }
.menu-panel.is-open { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.menu-panel a { color: #E4ECF8; text-decoration: none; min-height: 44px; display: flex; align-items: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--hero); color: #fff; position: relative; overflow: hidden; }
.site-footer::before { content: ""; position: absolute; right: -40px; top: 0; width: 120px; height: 8px; background: var(--sky); transform: skewX(-14deg); }
.site-footer__in { max-width: 1200px; margin: 0 auto; padding: 32px var(--gutter) 28px; }
.site-footer__brand { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; }
.site-footer__brand .logo { font-size: 40px; }
.site-footer__brand .logo span { font-size: 24px; }
.site-footer__brand p { margin: 0; color: #C7D6EE; max-width: 440px; }
.site-footer__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px 24px; margin: 26px 0 22px; }
.site-footer__cols h2 { font-size: 15px; font-stretch: 112%; font-weight: 700; text-transform: uppercase; color: var(--sky); margin: 0 0 4px; }
.site-footer__cols a { display: flex; align-items: center; min-height: 44px; color: #E4ECF8; text-decoration: none; }
.site-footer__cols a:hover { color: #fff; text-decoration: underline; }
.site-footer__legal { border-top: 1px solid rgba(255,255,255,.16); padding-top: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 15px; color: #C7D6EE; }
.site-footer__anj { margin-top: 14px; font-size: 13px; color: #A9BBDB; }

/* ---------- Terrain (compo) ---------- */
.pitch-card { background: var(--sf); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.pitch-card__head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.pitch-card__name { font-stretch: 62%; font-weight: 900; font-size: 26px; line-height: .95; text-transform: uppercase; }
.pitch {
  position: relative; aspect-ratio: 68/76; background: #0B2A63;
  background-image: repeating-linear-gradient(180deg, rgba(255,255,255,.045) 0 10%, transparent 10% 20%); overflow: hidden;
}
.pitch__line { position: absolute; border-color: rgba(255,255,255,.3); }
.pitch__top { left: 0; right: 0; top: 0; height: 2px; background: rgba(255,255,255,.3); }
.pitch__circle { left: 50%; top: 0; width: 34%; aspect-ratio: 1; border: 2px solid rgba(255,255,255,.3); border-radius: 50%; transform: translate(-50%, -50%); }
.pitch__box { left: 20%; right: 20%; bottom: 0; height: 19%; border: 2px solid rgba(255,255,255,.3); border-bottom: 0; }
.pitch__six { left: 37%; right: 37%; bottom: 0; height: 7%; border: 2px solid rgba(255,255,255,.3); border-bottom: 0; }
.pitch__rows { position: absolute; inset: 5% 0 2%; display: flex; flex-direction: column; justify-content: space-around; }
.pitch__row { display: flex; justify-content: space-evenly; }
.pitch__p { width: 72px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pitch__n { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-stretch: 62%; font-weight: 900; font-size: 20px; box-shadow: 0 0 0 2px rgba(255,255,255,.9); }
.pitch__nm { font-size: 14px; font-stretch: 75%; font-weight: 600; color: #fff; text-align: center; line-height: 1.1; white-space: nowrap; max-width: 80px; overflow: hidden; text-overflow: ellipsis; }
.pitch__p .rating { min-width: 0; height: auto; padding: 2px 7px; font-size: 16px; border-radius: 7px; }
.subs { padding: 12px 14px 14px; }
.subs__list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.subs__it { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; border-radius: 999px; background: var(--sf2); font-size: 15px; }
.subs__it strong { font-stretch: 62%; font-weight: 900; font-size: 17px; }
