/* Pages de contenu (règles, FAQ, à propos) : statiques, servies sans JavaScript.
   Reprend les couleurs de l'application (src/styles.css) sans en dépendre. */

:root {
  --bg: #070d18;
  --bg-grad: radial-gradient(1200px 500px at 70% -10%, #0e2547 0%, transparent 60%), var(--bg);
  --panel: #0e1626;
  --panel-2: #131e33;
  --line: #1d2b47;
  --text: #e8eefc;
  --muted: #8fa3c8;
  --accent: #38bdf8;
  --ok: #22c55e;
  --touch: #f59e0b;
  --miss: #ef4444;
  --live: #22d3ee;
  --mono: 'Cascadia Code', ui-monospace, 'SF Mono', Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-grad);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Segoe UI Variable Display', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a { color: var(--accent); }
a:hover { color: #7dd3fc; }
:focus-visible { outline: 2px solid var(--live); outline-offset: 2px; border-radius: 4px; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--panel-2);
  color: var(--text);
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 0 0 8px 0;
  z-index: 10;
}
.skip:focus { left: 0; }

/* ===== En-tête ===== */

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(7, 13, 24, 0.9);
}

.site-header-in {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand img { height: 46px; width: auto; }
.brand-name { font-weight: 700; font-size: 1rem; }
.brand-sub { color: var(--muted); font-size: 0.8rem; }

.to-live {
  margin-left: auto;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--live);
  border: 1px solid rgba(34, 211, 238, 0.5);
  border-radius: 999px;
  padding: 7px 15px;
  white-space: nowrap;
}
.to-live:hover { background: rgba(34, 211, 238, 0.12); color: var(--live); }

/* ===== Contenu ===== */

.wrap { max-width: 780px; margin: 0 auto; padding: 0 20px 48px; }

.breadcrumb { font-size: 0.82rem; color: var(--muted); padding: 18px 0 0; }
.breadcrumb a { color: var(--muted); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: '· '; color: var(--line); }

h1 { font-size: 1.9rem; line-height: 1.2; margin: 18px 0 8px; }
h2 { font-size: 1.25rem; margin: 34px 0 10px; }
h3 { font-size: 1.02rem; margin: 22px 0 6px; }

.lede { color: var(--muted); font-size: 1.05rem; margin: 0 0 6px; }
.updated { color: var(--muted); font-size: 0.78rem; margin: 0 0 8px; }

p, ul, ol { margin: 0 0 14px; }
ul, ol { padding-left: 22px; }
li { margin-bottom: 6px; }

strong { color: #fff; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 20px;
  margin: 20px 0;
}
.panel h2, .panel h3 { margin-top: 0; }
.panel :last-child { margin-bottom: 0; }

table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.94rem; }
caption { text-align: left; color: var(--muted); font-size: 0.85rem; padding-bottom: 8px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
tbody tr:last-child td { border-bottom: none; }

/* cases de portes, identiques à celles du direct */
.cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  height: 1.4rem;
  padding: 0 4px;
  border-radius: 5px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 800;
}
.cell-ok { background: rgba(34, 197, 94, 0.22); border-color: rgba(34, 197, 94, 0.45); color: #4ade80; }
.cell-2 { background: var(--touch); border-color: var(--touch); color: #1c1206; }
.cell-50 { background: var(--miss); border-color: var(--miss); color: #fff; }
.cell-none { background: rgba(13, 21, 38, 0.6); }
.num-down { color: #4ade80; background: rgba(34, 197, 94, 0.12); }
.num-up { color: #f87171; background: rgba(239, 68, 68, 0.14); }
.num-down, .num-up { font-family: var(--mono); font-size: 0.72rem; font-weight: 800; padding: 2px 7px; border-radius: 5px; }

details {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 12px 18px;
  margin-bottom: 10px;
}
details[open] { background: var(--panel-2); }
summary { cursor: pointer; font-weight: 650; }
summary::marker { color: var(--accent); }
details > :not(summary) { margin-top: 10px; }

/* ===== Liens entre pages ===== */

.more { margin-top: 40px; border-top: 1px solid var(--line); padding-top: 20px; }
.more h2 { margin-top: 0; font-size: 1.05rem; }
.more ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  grid-auto-rows: 1fr; /* toutes les lignes à la hauteur de la plus haute */
}
.more li { margin: 0; display: grid; } /* la carte remplit toute la cellule */
.more a {
  display: block;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  text-decoration: none;
  font-weight: 620;
}
.more a:hover { border-color: var(--accent); }
.more span { display: block; color: var(--muted); font-size: 0.82rem; font-weight: 400; margin-top: 3px; }

/* ===== Pied de page ===== */

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
  padding: 22px 20px 34px;
}
.site-footer p { margin: 4px 0; }
.site-footer nav { margin-bottom: 10px; display: flex; gap: 6px 18px; justify-content: center; flex-wrap: wrap; }
/* cible tactile d'au moins 24 px de haut (WCAG 2.2, RGAA) */
.site-footer nav a { display: inline-block; padding: 5px 2px; }

@media (max-width: 600px) {
  body { font-size: 15px; }
  h1 { font-size: 1.55rem; }
  .brand img { height: 38px; }
  .to-live { margin-left: 0; }
  table { font-size: 0.88rem; }
  th, td { padding: 8px 6px; }
}
