@font-face { font-family: Inter; src: url(assets/fonts/inter.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(assets/fonts/jetbrains-mono.woff2) format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  color-scheme: light dark;
  --bg: light-dark(#EEF3FA, #0A1322);
  --surface: light-dark(#FFFFFF, #111E33);
  --surface-2: light-dark(#F2F6FB, #18283F);
  --ink: light-dark(#0F1B2D, #EAF0F8);
  --muted: light-dark(#4A5A70, #9FB0C6);
  --line: light-dark(#DCE5F0, #22344F);
  --primary: light-dark(#0B5FD8, #5AA2FF);
  --primary-ink: light-dark(#FFFFFF, #0A1322);
  --navy: light-dark(#0F2747, #1B3A66);
  --screen: light-dark(#13233A, #060D19);
  --screen-ink: #EAF0F8;
  --ok: light-dark(#15803D, #4ADE80);
  --bad: light-dark(#B91C1C, #F87171);
  --alert-bg: light-dark(#FDEEEE, #2A1519);
  --alert-line: light-dark(#F4B4B4, #5B2A31);
  --alert-ink: light-dark(#B91C1C, #FCA5A5);
  --c-matinale: light-dark(#B45309, #FBBF24);
  --c-meteo: light-dark(#1D4ED8, #60A5FA);
  --c-air: light-dark(#047857, #34D399);
  --c-vigilance: light-dark(#C2410C, #FB923C);
  --c-crues: light-dark(#0E7490, #22D3EE);
  --c-feux: light-dark(#B91C1C, #F87171);
  --c-trafic: light-dark(#6D28D9, #A78BFA);
  --c-sorties: light-dark(#BE185D, #F472B6);
  --c-agenda: light-dark(#4338CA, #A5B4FC);
  --c-sante: light-dark(#0F766E, #2DD4BF);
  --hero-from: light-dark(#CFE6FB, #13294A);
  --hero-to: light-dark(#EAF4FD, #0F2140);
  --veil-1: light-dark(rgba(234,244,253,.94), rgba(10,19,34,.92));
  --veil-2: light-dark(rgba(234,244,253,.75), rgba(10,19,34,.7));
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  font: 16px/1.5 Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid #4C9BFF; outline-offset: 2px; }
h1, h2, p, ul, ol, dl, dd, figure, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
button { font: inherit; cursor: pointer; }
.i { width: 20px; height: 20px; flex: none; fill: currentColor; }
.i.big { width: 24px; height: 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); text-wrap: pretty; }
.small { font-size: 15px; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--primary); color: var(--primary-ink); padding: 10px 14px; border-radius: 10px; font-weight: 700; }
.skip:focus { left: 12px; }

/* En-tête */
.top { position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 1px 3px rgba(15,27,45,.05); }
.top-in { max-width: 1320px; margin: 0 auto; padding: 0 16px; min-height: 72px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.logo { display: block; flex: none; width: 48px; height: 48px; background: var(--primary); -webkit-mask: url(assets/logo-idf-info.svg) center/contain no-repeat; mask: url(assets/logo-idf-info.svg) center/contain no-repeat; }
.brand-text { display: grid; line-height: 1.05; }
.brand-name { font-weight: 800; font-size: 24px; letter-spacing: -.025em; }
.brand-url { font-size: 14px; color: var(--muted); font-weight: 500; }
.nav { display: none; gap: 6px; margin: 0 auto; }
.nav a { display: inline-flex; align-items: center; gap: 9px; min-height: 46px; padding: 0 18px; border-radius: 12px; font-size: 15px; font-weight: 600; text-decoration: none; color: var(--ink); }
.nav a .i { width: 16px; height: 16px; }
.nav a[aria-current="page"], .menu a[aria-current="page"] { color: var(--primary-ink); background: var(--primary); }
.nav a[aria-current="page"] { box-shadow: 0 4px 12px rgba(11,95,216,.3); }
.theme { display: none; gap: 2px; padding: 3px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); }
.theme button { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 0; background: transparent; color: var(--ink); }
.theme button .i { width: 18px; height: 18px; }
.theme button[aria-pressed="true"] { background: var(--surface); box-shadow: 0 1px 3px rgba(15,27,45,.15); }
.burger { margin-left: auto; width: 46px; height: 46px; display: grid; place-content: center; gap: 5px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--ink); }
.burger span { display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor; }
.menu { display: grid; gap: 4px; padding: 8px 16px 16px; border-top: 1px solid var(--line); }
.menu div { display: grid; gap: 4px; }
.menu a { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 0 14px; border-radius: 12px; font-size: 16px; font-weight: 600; text-decoration: none; color: var(--ink); }
.menu-theme { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-size: 16px; font-weight: 600; margin-top: 6px; }

/* Structure */
main { width: 100%; max-width: 1320px; margin: 0 auto; padding: 12px 12px 32px; }
.page { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 2px 8px rgba(15,27,45,.04); }
.pad { padding: 20px; display: grid; gap: 10px; align-content: start; }
.h2 { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 700; letter-spacing: -.015em; }
.h3 { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; }

/* Accueil */
.home { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
.home-main, .home-side { display: contents; }
.hero-home { order: 1; }
.status { order: 2; }
.alerts { order: 3; }
.latest { order: 4; }
.about { order: 5; }

.hero { position: relative; border-radius: 18px; overflow: hidden; background: linear-gradient(180deg, var(--hero-from), var(--hero-to)); display: flex; flex-direction: column; }
.hero-img { order: 2; width: 100%; height: 200px; object-fit: cover; display: block; }
.hero-veil { display: none; position: absolute; inset: 0; background: linear-gradient(90deg, var(--veil-1) 0%, var(--veil-2) 36%, transparent 62%); pointer-events: none; }
.hero-body { position: relative; order: 1; padding: 24px 20px 20px; display: grid; gap: 14px; align-content: center; max-width: 560px; }
.hero-title { display: grid; gap: 8px; }
.hero-title span:first-child { font-size: clamp(48px, 6.4vw, 84px); line-height: .95; font-weight: 800; letter-spacing: -.04em; }
.hero-title span:last-child { font-size: clamp(19px, 2vw, 26px); line-height: 1.25; font-weight: 500; letter-spacing: -.01em; text-wrap: balance; }
.hero-sub { color: var(--muted); max-width: 40ch; }
.hero-h1 { font-size: clamp(34px, 4.6vw, 60px); line-height: 1; font-weight: 800; letter-spacing: -.035em; }
.hero-lead { font-size: clamp(16px, 1.5vw, 19px); color: var(--muted); max-width: 44ch; }
.cta { display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 24px; border-radius: 999px; background: var(--navy); color: #FFF; font-weight: 600; text-decoration: none; box-shadow: 0 6px 18px rgba(15,39,71,.25); }
.cta:hover { color: #FFF; }

.status { padding: 18px; display: grid; gap: 10px; }
.status-title { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; color: var(--state); --state: var(--ok); }
.status-title.off { --state: var(--bad); }
.dot { width: 13px; height: 13px; border-radius: 50%; background: var(--state); box-shadow: 0 0 0 4px color-mix(in srgb, var(--state) 22%, transparent); }
.status-row { display: flex; gap: 16px; align-items: flex-start; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); }
.status-row > span { display: grid; font-size: 15px; line-height: 1.35; }
.status-row small { color: var(--muted); font-size: 13px; }

.alerts { background: var(--alert-bg); border: 1px solid var(--alert-line); border-radius: 18px; padding: 16px 18px; display: grid; gap: 8px; }
.alerts h2 { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; color: var(--alert-ink); }
.alerts h2 small { font-size: 13px; font-weight: 600; color: var(--muted); }
.alerts ul { display: grid; }
.alerts li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--alert-line); }
.alert-body { flex: 1; display: grid; gap: 3px; font-size: 14px; line-height: 1.45; }
.alert-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.alert-head strong { font-size: 16px; color: var(--alert-ink); }
.tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 999px; }
.tag.jaune { background: #FACC15; color: #422006; }
.tag.orange { background: #F97316; color: #1C0A00; }
.tag.rouge { background: #DC2626; color: #FFF; }
.alert-body a { font-size: 13px; font-weight: 600; }

.latest { padding: 16px; display: grid; gap: 4px; }
.latest-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 10px; }
.more { font-weight: 600; font-size: 15px; text-decoration: none; }
.rows { display: grid; }
.row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.row-time { display: grid; line-height: 1.25; min-width: 84px; }
.row-time time { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.row-time span { font-size: 13px; color: var(--muted); }
.pill { justify-self: start; display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; white-space: nowrap; color: var(--cat); background: color-mix(in srgb, var(--cat-base) 14%, var(--surface)); }
.row pre { grid-column: 1 / -1; margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--screen); color: var(--screen-ink); font: 14.5px/1.5 "JetBrains Mono", ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.notice { padding: 14px 0; color: var(--muted); border-top: 1px solid var(--line); }

.about { overflow: hidden; display: grid; padding: 0; }
.about-body { padding: 20px 20px 16px; display: grid; gap: 12px; }
.about-body p { color: var(--muted); }
.ghost { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--primary); font-weight: 600; font-size: 15px; text-decoration: none; }
.about-img { display: none; width: 100%; height: 110px; object-fit: cover; }

/* Archive */
.filters { flex: 1 1 100%; display: grid; gap: 16px; padding: 18px; box-shadow: none; }
.filters-head { display: grid; gap: 4px; }
.filters h1 { font-size: 30px; line-height: 1.1; font-weight: 800; letter-spacing: -.03em; }
.filters p { font-size: 14px; color: var(--muted); }
.search { position: relative; display: block; }
.search-ring { position: absolute; left: 16px; top: 50%; width: 14px; height: 14px; margin-top: -9px; border: 2px solid var(--muted); border-radius: 50%; }
.search input { width: 100%; font: inherit; font-size: 15px; min-height: 48px; padding: 0 16px 0 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); }
legend { font-size: 15px; font-weight: 700; padding: 0; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 600; }
.chip[aria-pressed="true"] { border-color: var(--cat-base); background: color-mix(in srgb, var(--cat-base) 20%, var(--surface)); }
.chip.all[aria-pressed="true"] { border-color: var(--navy); background: var(--navy); color: #FFF; }
.result { font-size: 13px; }
.days { flex: 999 1 560px; display: grid; gap: 16px; min-width: 0; }
.day { padding: 16px; display: grid; box-shadow: none; }
.day h2 { margin-bottom: 6px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 19px; font-weight: 700; }
.day h2 span:last-child { font-size: 13px; font-weight: 500; color: var(--muted); }
.day .row-time { min-width: 84px; }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: 18px; padding: 32px; text-align: center; display: grid; gap: 12px; justify-items: center; }
.empty p { font-size: 18px; font-weight: 700; }
.empty button { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--primary); color: var(--primary-ink); font-weight: 600; }

/* Rejoindre */
.join, .sources { display: grid; }
.join-layout { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.join-main { flex: 999 1 560px; display: grid; gap: 16px; min-width: 0; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.steps .card { box-shadow: none; }
.step { display: flex; align-items: center; gap: 12px; }
.step h2 { font-size: 18px; font-weight: 700; }
.num { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--primary-ink); font-weight: 800; }
.steps ul { padding-left: 20px; list-style: disc; display: grid; gap: 6px; font-size: 15px; }
.channel { justify-self: start; font: 700 18px "JetBrains Mono", monospace; padding: 8px 14px; border-radius: 10px; background: var(--screen); color: var(--screen-ink); }
.join-side { flex: 1 1 340px; display: grid; gap: 16px; }
.room { display: flex; gap: 16px; flex-wrap: wrap; }
.room dl { flex: 1 1 180px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
.room dl div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.room dt { font-size: 13px; color: var(--muted); }
.field { min-height: 44px; display: flex; align-items: center; padding: 0 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 600; }
.key { gap: 8px; padding: 0 4px 0 12px; }
.key code { flex: 1; font: 400 13px "JetBrains Mono", monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.key button { flex: none; min-height: 36px; padding: 0 12px; border-radius: 8px; border: 0; background: var(--primary); color: var(--primary-ink); font-size: 13px; font-weight: 600; }
.room figure { flex: 0 0 128px; display: grid; gap: 6px; justify-items: center; }
.qr { width: 128px; height: 128px; display: block; border-radius: 12px; border: 1px solid var(--line); background: #FFF; }
.room figcaption { font-size: 12px; color: var(--muted); }
.repeater { background: var(--navy); color: #FFF; border-radius: 18px; padding: 20px; display: grid; gap: 10px; }
.repeater h2 { display: flex; gap: 10px; align-items: flex-start; font-size: 18px; font-weight: 700; line-height: 1.3; }
.repeater p { font-size: 15px; color: #D6E2F2; }
.repeater a { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; background: #FFF; color: #0F2747; font-weight: 600; font-size: 15px; text-decoration: none; }

/* Sources */
.src-hero { overflow: hidden; display: flex; flex-wrap: wrap; box-shadow: none; }
.src-hero-body { flex: 1 1 420px; padding: 24px 20px 20px; display: grid; gap: 12px; align-content: center; }
.src-hero img { flex: 1 1 360px; min-width: 0; width: 100%; height: 200px; object-fit: cover; }
.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.values .card { gap: 6px; box-shadow: none; }
.values strong { font-size: 18px; }
.values span { font-size: 15px; color: var(--muted); }
.src-layout { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.src-list { flex: 3 1 480px; min-width: 0; padding: 16px; display: grid; gap: 8px; box-shadow: none; }
.src-list h2 { margin-bottom: 4px; font-size: 20px; font-weight: 700; }
.src-list ul { display: grid; }
.src-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.tile { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #FFF; font-weight: 800; font-size: 13px; }
.src-name { flex: 1 1 200px; display: grid; }
.src-name span { font-size: 14px; color: var(--muted); }
.src-list a { font-size: 14px; font-weight: 500; text-decoration: none; }
.urgent { flex: 2 1 340px; background: var(--alert-bg); border: 1px solid var(--alert-line); border-radius: 18px; padding: 20px; display: grid; gap: 6px; }
.urgent h2 { font-size: 16px; font-weight: 700; color: var(--alert-ink); }
.urgent p { font-size: 14px; }

/* Pied de page */
.foot { margin-top: auto; background: light-dark(#0F2747, #071022); color: #EAF0F8; }
.foot-in { max-width: 1320px; margin: 0 auto; padding: 24px 20px; display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; justify-content: space-between; }
.foot-brand { display: flex; align-items: center; gap: 12px; }
.foot .logo { width: 44px; height: 44px; background: #EAF0F8; }
.foot .brand-name { font-size: 22px; letter-spacing: -.02em; }
.foot .brand-url { color: #B8C7DB; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 15px; }
.foot nav a { color: #EAF0F8; text-decoration: none; }
.foot p { font-size: 14px; font-style: italic; color: #D6E2F2; }

@media (min-width: 760px) {
  .latest, .day { padding: 18px 22px; }
  .src-list { padding: 18px 22px; }
  .home .row { grid-template-columns: 100px 170px minmax(0, 1fr); gap: 16px; align-items: start; }
  .home .row pre { grid-column: auto; }
}
@media (min-width: 960px) {
  main { padding: 16px 16px 40px; }
  .nav, .theme { display: flex; }
  .burger, .menu { display: none !important; }
  .home { display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
  .home-main { display: grid; flex: 999 1 620px; gap: 16px; min-width: 0; }
  .home-side { display: grid; flex: 1 1 340px; max-width: 420px; gap: 16px; }
  .hero { flex-direction: row; }
  .hero-home { min-height: 320px; }
  .hero-join { min-height: 260px; }
  .hero-img { position: absolute; inset: 0; height: 100%; }
  .hero-veil { display: block; }
  .hero-body, .src-hero-body { padding: 36px; }
  .about-img { display: block; }
  .filters { flex: 1 1 300px; max-width: 400px; position: sticky; top: 88px; }
  .join-side { max-width: 400px; position: sticky; top: 88px; }
  .src-hero img { height: auto; min-height: 240px; }
}
@media (min-width: 1100px) {
  .archive .row { grid-template-columns: 100px 170px minmax(0, 1fr); gap: 16px; align-items: start; }
  .archive .row pre { grid-column: auto; }
}
