/* Styles propres au site des prévisions. Le socle commun vit dans univers.css. */
:root {
  --hausse: #4ade80;
  --baisse: #f87171;
  --fond-tableau: #0a0918;
}

/* Un élément masqué le reste, même si une règle plus bas lui donne un affichage. */
[hidden] { display: none !important; }

/* ---------- En-tête ---------- */
.site-nav { position: sticky; top: 0; z-index: 50; background: rgba(4, 3, 11, .9); border-bottom: 1px solid var(--line); }
.site-nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { font-family: var(--serif); font-size: 24px; line-height: 1; white-space: nowrap; text-decoration: none; }
.onglets { display: flex; gap: 4px; }
.onglets a { padding: 8px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--dim); text-decoration: none; transition: color .3s, background .3s; }
.onglets a:hover { color: var(--text); }
.onglets a[aria-current="page"] { color: var(--accent-light); background: rgba(var(--accent-rgb), .12); }

/* ---------- Haut de page ---------- */
.tete { padding: 56px 0 28px; }
.tete h1 { font-size: clamp(40px, 6.4vw, 68px); }
.tete .lead { margin-top: 16px; }
.maj { margin-top: 14px; font-size: 13px; color: var(--faint); }
.bloc { padding: 24px 0 56px; }
.bloc + .bloc::before { display: none; }
.bloc h2 { font-size: clamp(30px, 4vw, 42px); margin-bottom: 18px; }

/* ---------- Commandes ---------- */
.commandes { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.bascule { display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px var(--line); }
.bascule button { font: 600 14px var(--sans); color: var(--dim); background: none; border: 0; padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.bascule button[aria-pressed="true"] { color: var(--btn-text); background: var(--btn-grad); }
.choix { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--dim); }
.choix select { font: 600 14px var(--sans); color: var(--text); background: rgba(255, 255, 255, .05); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; }
.choix select option { background: var(--fond-tableau); }

/* ---------- Tableau du classement ---------- */
.tableau-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--glass), var(--glass-bg); -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { padding: 10px 12px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 0; }
th { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); vertical-align: bottom; }
th button { all: unset; cursor: pointer; }
th button:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 2px; }
th[aria-sort] { color: var(--accent-light); }
th[aria-sort="descending"] button::after { content: " ▼"; font-size: 9px; }
th[aria-sort="ascending"] button::after { content: " ▲"; font-size: 9px; }
th:first-child, td:first-child { text-align: left; position: sticky; left: 0; z-index: 1; background: var(--fond-tableau); }
td.equipe { min-width: 168px; }
.equipe strong { display: block; font-weight: 700; color: var(--text); }
.equipe small { display: block; font-size: 12px; color: var(--faint); }
.code { display: inline-block; min-width: 38px; margin-right: 10px; padding: 2px 0; border-radius: 6px; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-align: center; color: var(--accent-light); background: rgba(var(--accent-rgb), .1); vertical-align: middle; }
.equipe .nom { display: inline-block; vertical-align: middle; }
th.texte, td.texte { text-align: left; }
td.texte { color: var(--dim); }
td.elo { font-weight: 700; color: var(--text); }
.hausse { color: var(--hausse); }
.baisse { color: var(--baisse); }
td.pct { font-weight: 700; color: var(--text); background: rgba(var(--accent-rgb), calc(var(--p, 0) * .5)); }
.legende { margin-top: 14px; font-size: 13px; color: var(--faint); max-width: 760px; }
.legende a { color: var(--accent-light); }

/* ---------- Matchs ---------- */
.une { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.une .card { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.une .tag { align-self: flex-start; }
.une .pourquoi { font-size: 13px; color: var(--faint); margin-top: -6px; }
.jour { margin: 28px 0 12px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.matchs { display: grid; gap: 12px; }
.match { padding: 18px 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--glass), var(--glass-bg); }
.match .heure { font-size: 12px; color: var(--faint); margin-bottom: 10px; }
.duel { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.duel .camp { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.duel .camp:last-child { align-items: flex-end; text-align: right; }
.duel .camp strong { font-size: 15px; line-height: 1.25; }
.duel .camp .proba { font-family: var(--serif); font-size: 30px; line-height: 1; color: var(--text); }
.duel .camp.favori .proba { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.duel .arobase { font-size: 13px; color: var(--faint); }
.barre { display: flex; height: 6px; margin: 12px 0 2px; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, .06); }
.barre span { background: rgba(var(--accent-rgb), .85); }
.barre span + span { background: rgba(255, 255, 255, .18); }
.notes { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: 13px; color: var(--dim); }
.notes b { color: var(--text); font-weight: 700; }
.cotes { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--dim); }
.cotes b { color: var(--text); }
.valeur { font-weight: 700; color: var(--hausse); }
.resultat .score { font-family: var(--serif); font-size: 28px; line-height: 1; color: var(--text); }
.resultat .perdant { opacity: .55; }
.vide { padding: 28px; text-align: center; color: var(--faint); border: 1px dashed var(--line); border-radius: 18px; }

/* ---------- Méthode ---------- */
.texte-long { max-width: 720px; }
.texte-long h2 { margin: 48px 0 16px; }
.texte-long p { margin-bottom: 14px; color: var(--text-strong); }
.texte-long .formule { margin: 18px 0; padding: 16px 20px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); font-size: 15px; color: var(--accent-light); overflow-x: auto; white-space: nowrap; }
.texte-long table { margin: 18px 0; font-size: 14px; }
.texte-long td, .texte-long th { text-align: left; white-space: normal; }
.texte-long td:last-child { text-align: right; white-space: nowrap; color: var(--text); font-weight: 700; }
.texte-long th:first-child, .texte-long td:first-child { position: static; background: none; }
.texte-long a { color: var(--accent-light); }

/* ---------- Pied de page ---------- */
footer { padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); position: relative; }
footer::before { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: min(var(--maxw), calc(100% - 48px)); height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .12), transparent); }
footer p { font-size: 13px; color: var(--faint); max-width: 760px; }
footer p + p { margin-top: 8px; }
footer .alerte { color: var(--dim); }
footer a { color: var(--dim); }

@media (max-width: 860px) {
  .une { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .site-nav .wrap { min-height: 56px; gap: 8px; }
  .brand { font-size: 20px; }
  .onglets a { padding: 7px 9px; font-size: 13px; }
  .tete { padding: 36px 0 20px; }
  th, td { padding: 9px 7px; }
  th:first-child, td:first-child { padding-left: 12px; }
  td.equipe { min-width: 0; }
  .equipe strong { font-size: 13.5px; }
  .secondaire { display: none; }
  th { white-space: normal; }
  .code { display: none; }
  .match { padding: 16px; }
  .duel .camp .proba { font-size: 26px; }
}
