/* Alertes Sorties — direction « Haute lumière ».
   1. Tokens · 2. Base · 3. Coque (sidebar, barre mobile, tiroir) · 4. Composants · 5. Écrans · 6. Compatibilité · 7. Responsive */
@import url('fonts.css');

/* ------------------------------------------------------------------ 1. Tokens */
:root {
  --nuit: #0F1C2B; --texte-2: #3E4C5B; --mineral: #5B6672; --muted: #66727F; --sep-3: #A3ADB7;
  --bord: #CBD3DB; --bord-check: #8794A1; --ligne: #E3E8EE; --ligne-l: #EEF1F4; --neve: #F6F8FA; --neige: #FFFFFF;
  --ciel: #1B5FAD; --ciel-f: #174F91; --ciel-t: #E6F0FA; --glacier: #CFE4EE; --alpenglow: #D2602C;
  --ok: #0E7A5A; --ok-t: #E3F4EC; --ok-f: #0B6149;
  --warn-t: #FFF1D1; --warn-f: #7A4D00;
  --err: #B42318; --err-t: #FDECEA; --err-f: #A11D13; --err-ff: #7A1810;
  --sent-t: #EEEBFA; --sent-f: #4A3AA8;
  --today-t: #FBEDE4; --today-f: #9A3C12;
  --closed-f: #4F5B66;
  --font: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r: 3px; --shadow: 0 1px 2px rgba(15, 28, 43, .06);
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s7: 28px; --s8: 32px; --s9: 40px; --s10: 48px; --s11: 72px;
  --sidebar: 248px; --sidebar-c: 72px;
  color-scheme: light;
}

/* ------------------------------------------------------------------ 2. Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.5; color: var(--nuit); background: var(--neve); }
h1, h2, h3, h4 { margin: 0; text-wrap: pretty; color: var(--nuit); }
p { margin: 0 0 var(--s3); text-wrap: pretty; }
a { color: var(--ciel); text-decoration: none; }
a:hover { color: var(--nuit); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--ciel); outline-offset: 2px; }
img { max-width: 100%; display: block; }
code, kbd, .mono { font-family: var(--mono); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.h1 { font-size: 40px; font-weight: 800; letter-spacing: -.025em; line-height: 1.1; }
.h2 { font-size: 24px; font-weight: 800; letter-spacing: -.015em; line-height: 1.2; }
.h3 { font-size: 20px; font-weight: 800; letter-spacing: -.015em; line-height: 1.25; }
.overline { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.lead { font-size: 17px; color: var(--texte-2); }
.meta { font-size: 15px; color: var(--texte-2); }
.small { font-size: 14px; } .xsmall { font-size: 13px; }
.muted { color: var(--muted); } .d-block { display: block; } .nowrap { white-space: nowrap; } .grow { flex: 1 1 auto; min-width: 0; }
.ok-text { color: var(--ok-f); } .err-text { color: var(--err-f); } .warn-text { color: var(--warn-f); } .info-text { color: var(--ciel-f); }

/* ------------------------------------------------------------------ 3. Coque */
.app { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar); flex: 0 0 var(--sidebar); background: var(--neige); border-right: 1px solid var(--ligne);
  padding: 28px 16px 20px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--nuit); padding: 0 12px; }
.logo:hover { text-decoration: none; color: var(--nuit); }
.logo-mark { width: 0; height: 0; border-left: 11px solid transparent; border-right: 11px solid transparent; border-bottom: 18px solid var(--nuit); flex: 0 0 auto; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-name { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.logo-sub { font-size: 12px; color: var(--muted); }
.navlist { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.navlist a { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: var(--r); color: var(--nuit); font-size: 15px; }
.navlist a:hover { background: var(--ligne-l); text-decoration: none; color: var(--nuit); }
.navlist a[aria-current="page"] { background: var(--ligne-l); font-weight: 700; }
.nav-ini { display: none; width: 28px; text-align: center; font-weight: 700; font-size: 13px; color: var(--mineral); }
.nav-group { margin: 20px 12px 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; padding-top: 24px; }
.robot { background: var(--neve); border-radius: var(--r); padding: 12px 14px; }
.robot-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.robot-line { font-family: var(--mono); font-size: 12px; color: var(--mineral); margin-top: 2px; }
.pip { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: 0 0 auto; display: inline-block; }
.pip-err { background: var(--err); } .pip-warn { background: #C98A00; } .pip-off { background: var(--sep-3); }
.whoami { display: flex; justify-content: space-between; align-items: center; padding: 0 12px; font-size: 14px; color: var(--texte-2); }
.whoami button { background: none; border: 0; padding: 0; color: var(--ciel); font: inherit; font-size: 14px; cursor: pointer; }
.whoami button:hover { color: var(--nuit); text-decoration: underline; }
.collapse-btn { background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; text-align: left; padding: 6px 12px; border-radius: var(--r); }
.collapse-btn:hover { background: var(--ligne-l); color: var(--nuit); }
body.nav-collapsed .sidebar { width: var(--sidebar-c); flex-basis: var(--sidebar-c); padding-left: 10px; padding-right: 10px; }
body.nav-collapsed .logo-text, body.nav-collapsed .nav-label, body.nav-collapsed .nav-group, body.nav-collapsed .robot-line,
body.nav-collapsed .robot-title span:not(.pip), body.nav-collapsed .whoami span, body.nav-collapsed .collapse-label { display: none; }
body.nav-collapsed .nav-ini { display: inline-block; }
body.nav-collapsed .navlist a, body.nav-collapsed .logo { justify-content: center; padding: 0; }
body.nav-collapsed .robot { padding: 10px; display: flex; justify-content: center; }
body.nav-collapsed .whoami { justify-content: center; }
.logout-ini { display: none; } body.nav-collapsed .logout-full { display: none; } body.nav-collapsed .logout-ini { display: inline; font-size: 18px; }
.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.content { padding: 40px 48px 56px; max-width: 1400px; width: 100%; }
.content-flush { padding: 0 0 56px; }
.mobilebar { display: none; }
.drawer { display: none; }
.app-foot { margin-top: auto; padding: 16px 48px 24px; font-size: 12px; color: var(--muted); }
.app-foot a { color: var(--muted); text-decoration: underline; }

/* ------------------------------------------------------------------ 4. Composants */
/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: var(--r);
  border: 0; background: var(--neige); box-shadow: inset 0 0 0 1px var(--bord); color: var(--nuit); font: inherit; font-size: 15px; font-weight: 700;
  cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { text-decoration: none; color: var(--nuit); box-shadow: inset 0 0 0 1px var(--mineral); }
.btn-primary { background: var(--ciel); color: #fff; box-shadow: none; }
.btn-primary:hover { background: var(--ciel-f); color: #fff; box-shadow: none; }
.btn-danger { color: var(--err-f); }
.btn-danger:hover { color: var(--err-f); box-shadow: inset 0 0 0 1px var(--err-f); }
.btn-ghost { box-shadow: none; background: transparent; color: var(--ciel); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.link-action { font-weight: 600; color: var(--ciel); }
.link { color: var(--ciel); font-weight: 600; }
.link-danger { color: var(--err-f); font-weight: 600; background: none; border: 0; padding: 0; font: inherit; font-weight: 600; cursor: pointer; }
.link-danger:hover { text-decoration: underline; }
/* Badges de statut : symbole + libellé, toujours */
.st { display: inline-flex; align-items: center; gap: 7px; min-height: 26px; padding: 3px 9px; border-radius: var(--r); font-size: 13px; font-weight: 700;
  line-height: 1.2; white-space: nowrap; background: var(--ligne-l); color: var(--closed-f); }
.st-sym { font-size: 12px; line-height: 1; }
.st-lg { min-height: 34px; padding: 6px 12px; font-size: 15px; }
.st-open { background: var(--ok); color: #fff; }
.st-today { background: var(--today-t); color: var(--today-f); }
.st-soon { background: var(--neige); color: var(--ciel-f); box-shadow: inset 0 0 0 1.5px #7FA6D6; }
.st-closed { background: var(--ligne-l); color: var(--closed-f); }
.st-new, .st-planned, .st-wait { background: var(--ciel-t); color: var(--ciel-f); }
.st-running { background: var(--ciel); color: #fff; }
.st-sent { background: var(--sent-t); color: var(--sent-f); }
.st-ok { background: var(--ok-t); color: var(--ok-f); }
.st-uncertain { background: var(--warn-t); color: var(--warn-f); }
.st-error { background: var(--err-t); color: var(--err-f); }
.st-blocked { background: var(--err); color: #fff; }
.st-missed { background: var(--neige); color: var(--closed-f); box-shadow: inset 0 0 0 1px var(--bord); }
.st-plain { background: none; padding: 0; min-height: 0; }
/* Pastille d'événement (fil d'activité) */
.ev-pip { width: 24px; height: 24px; border-radius: var(--r); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; flex: 0 0 auto; }
.ev-open { background: var(--ok); color: #fff; } .ev-new { background: var(--ciel-t); color: var(--ciel-f); } .ev-error { background: var(--err-t); color: var(--err-f); }
.ev-type { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.ev-type-open { color: var(--ok-f); } .ev-type-new { color: var(--ciel-f); } .ev-type-error { color: var(--err-f); }
/* Codes club : teinte stable par agenda */
.cc { display: inline-block; font-family: var(--mono); font-size: 11px; font-weight: 500; padding: 3px 6px; border-radius: 2px; line-height: 1.2; letter-spacing: .02em;
  background: var(--ligne-l); color: var(--mineral); vertical-align: 2px; }
.cc-1 { background: #DCEBF5; color: #174F91; } .cc-2 { background: #F7E3D8; color: #8A3812; } .cc-3 { background: #E1F0E6; color: #1F5B36; }
.cc-4 { background: #EEE5F5; color: #5A2E7E; } .cc-5 { background: #F5EED5; color: #6B4E00; } .cc-6 { background: #DDEFF0; color: #1D5759; }
.cc-7 { background: #F6E1E6; color: #842239; } .cc-8 { background: #E5E8F5; color: #2F3E8A; }
.cc-off { background: var(--ligne-l); color: var(--mineral); }
/* Segmented control */
.seg { display: inline-flex; background: var(--ligne-l); padding: 4px; border-radius: 4px; gap: 2px; flex-wrap: wrap; }
.seg a { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: var(--r); color: var(--texte-2); font-size: 15px; white-space: nowrap; }
.seg a:hover { color: var(--nuit); text-decoration: none; background: rgba(255, 255, 255, .6); }
.seg a[aria-current], .seg a.active { background: var(--neige); color: var(--nuit); font-weight: 700; box-shadow: 0 1px 2px rgba(15, 28, 43, .1); }
/* Chips de filtre */
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chips-label { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 17px; box-shadow: inset 0 0 0 1px var(--bord);
  background: var(--neige); color: var(--nuit); font-size: 14px; white-space: nowrap; }
.chip:hover { text-decoration: none; color: var(--nuit); box-shadow: inset 0 0 0 1px var(--mineral); }
.chip[aria-pressed="true"] { background: var(--nuit); color: #fff; box-shadow: none; font-weight: 600; }
.chip-sep { width: 1px; height: 22px; background: var(--ligne); margin: 0 6px; }
/* Panneaux et listes à lignes */
.panel { background: var(--neige); box-shadow: var(--shadow); border-radius: var(--r); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px; border-bottom: 1px solid var(--ligne); }
.panel-head h2 { font-size: 20px; font-weight: 800; letter-spacing: -.015em; }
.panel-body { padding: 20px 24px; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li, .rows > .row { border-bottom: 1px solid var(--ligne); padding: 18px 0; }
.rows-tight > li { padding: 12px 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 10px; }
.section-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -.015em; }
/* Messages */
.msg { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r); font-size: 15px; background: var(--ciel-t); color: var(--ciel-f); margin-bottom: 20px; }
.msg-sym { font-weight: 800; line-height: 1.5; }
.msg-title { font-weight: 700; font-size: 16px; display: block; }
.msg-ok { background: var(--ok-t); color: var(--ok-f); } .msg-warn { background: var(--warn-t); color: var(--warn-f); } .msg-err { background: var(--err-t); color: var(--err-ff); }
.msg p:last-child { margin: 0; }
/* Bandeau d'anomalies */
.alertband { display: flex; gap: 14px; align-items: flex-start; background: var(--err-t); color: var(--err-ff); padding: 18px 24px; border-radius: var(--r); }
.alertband-pip { width: 24px; height: 24px; border-radius: var(--r); background: var(--err); color: #fff; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.alertband-title { font-weight: 700; font-size: 16px; }
.alertband a { color: var(--err-ff); font-weight: 700; margin-left: auto; white-space: nowrap; }
/* Formulaires */
label { font-size: 14px; font-weight: 600; color: var(--texte-2); }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="date"], input[type="url"], select, textarea {
  display: block; width: 100%; height: 44px; margin-top: 6px; padding: 0 12px; font: inherit; font-size: 15px; font-weight: 400; color: var(--nuit);
  background: var(--neige); border: 1px solid var(--bord); border-radius: var(--r); }
textarea { height: auto; min-height: 96px; padding: 10px 12px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ciel); outline-offset: 0; border-color: var(--ciel); }
.field-error { color: var(--err-f); font-size: 14px; margin-top: 4px; } .is-invalid { border-color: var(--err) !important; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; align-items: end; }
/* Case à cocher : toute la ligne cliquable */
.check { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 0; border-bottom: 1px solid var(--ligne); cursor: pointer; color: var(--nuit); font-size: 17px; font-weight: 600; }
.check input { appearance: none; -webkit-appearance: none; width: 28px; height: 28px; margin: 0; border-radius: 4px; border: 2px solid var(--bord-check); background: var(--neige);
  flex: 0 0 auto; display: grid; place-content: center; cursor: pointer; }
.check input::before { content: "✓"; color: #fff; font-size: 17px; font-weight: 800; transform: scale(0); }
.check input:checked { background: var(--ciel); border-color: var(--ciel); }
.check input:checked::before { transform: scale(1); }
.check-sub { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.check-sm { min-height: 44px; font-size: 15px; } .check-sm input { width: 22px; height: 22px; } .check-sm input::before { font-size: 14px; }
/* Modale (dialog natif) et état vide */
dialog.modal { border: 0; border-radius: var(--r); padding: 28px; max-width: 520px; box-shadow: 0 10px 40px rgba(15, 28, 43, .2); }
dialog.modal::backdrop { background: rgba(15, 28, 43, .45); }
.modal h2 { font-size: 24px; font-weight: 800; margin-bottom: 10px; } .modal p { color: var(--texte-2); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.empty { padding: 28px 0; color: var(--texte-2); }
/* Paires clé / valeur, tableaux, détails */
.kv { display: grid; grid-template-columns: minmax(140px, max-content) 1fr; gap: 10px 20px; margin: 0; font-size: 15px; }
.kv dt { color: var(--mineral); } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.kv-compact { gap: 6px 16px; font-size: 14px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--ligne); }
.table td { padding: 14px 12px; border-bottom: 1px solid var(--ligne); vertical-align: top; }
details > summary { cursor: pointer; color: var(--ciel); font-weight: 600; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "▸ "; font-size: 12px; }
details[open] > summary::before { content: "▾ "; }
.tech { font-family: var(--mono); font-size: 12px; color: var(--mineral); }
.photo-credit { position: absolute; right: 12px; top: 10px; font-size: 11px; color: #fff; background: rgba(15, 28, 43, .55); padding: 2px 7px; border-radius: 2px; z-index: 2; }
.photo-credit a { color: #fff; text-decoration: underline; }

/* Utilitaires (aucun attribut style : CSP stricte) */
.m0 { margin: 0; } .mt16 { margin-top: 16px; } .navlist-robot { margin-top: 0; } .panel-body-tight { padding-top: 4px; padding-bottom: 4px; }
.agenda-err { margin: -6px 0 8px; } .dash-flash { padding: 24px 48px 0; }

/* ------------------------------------------------------------------ 5. Écrans */
/* Tableau de bord : bandeau photo + panneau résumé */
.hero { position: relative; }
.hero-photo { position: relative; height: 340px; overflow: hidden; background: var(--glacier); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%; }
.hero-panel { position: relative; z-index: 3; background: var(--neige); box-shadow: var(--shadow); margin: -120px 0 0 48px; max-width: 1040px; padding: 36px 40px; border-radius: var(--r);
  display: grid; grid-template-columns: 1fr auto; gap: 8px 32px; align-items: end; }
.hero-panel.no-photo { margin: 40px 48px 0; }
.hero-kicker { grid-column: 1 / -1; font-family: var(--mono); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--alpenglow); }
.hero-title { font-size: 40px; font-weight: 800; letter-spacing: -.025em; line-height: 1.1; }
.hero-sub { font-size: 17px; color: var(--texte-2); margin: 12px 0 0; }
.hero-cta { align-self: end; }
.dash { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 40px; padding: 40px 48px 0; grid-template-areas: "act side"; }
.dash-act { grid-area: act; min-width: 0; } .dash-side { grid-area: side; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.day-head { font-size: 13px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 22px 0 8px; border-bottom: 1px solid var(--ligne); }
.act-row { display: grid; grid-template-columns: 52px 24px 1fr auto; gap: 4px 16px; padding: 20px 0; border-bottom: 1px solid var(--ligne); }
.act-time { font-family: var(--mono); font-size: 14px; color: var(--texte-2); padding-top: 1px; }
.act-name { font-size: 18px; font-weight: 600; margin: 2px 0; }
.act-name a { color: var(--nuit); } .act-name a:hover { color: var(--ciel); }
.act-meta { font-size: 15px; color: var(--texte-2); } .act-detail { font-size: 14px; color: var(--muted); }
.act-notif { font-size: 14px; color: var(--muted); text-align: right; white-space: nowrap; }
.next { background: var(--today-t); padding: 20px 24px; }
.next-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.next-when { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--today-f); }
.next-time { font-family: var(--mono); font-size: 22px; font-weight: 500; color: var(--nuit); }
.next-name { font-size: 18px; font-weight: 600; margin-top: 10px; }
.next-person { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--neige); border-radius: var(--r); padding: 10px 12px; margin-top: 8px; }
.next-person b { font-weight: 600; display: block; } .next-person small { font-size: 13px; color: var(--muted); }
.counters { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ligne); }
.counter { padding: 16px; border-right: 1px solid var(--ligne); }
.counter:last-child { border-right: 0; }
.counter b { display: block; font-size: 24px; font-weight: 800; line-height: 1.1; }
.counter span { font-size: 13px; color: var(--muted); line-height: 1.3; display: block; margin-top: 4px; }
.counter.is-alert b { color: var(--err-f); }
.agenda-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--ligne); }
.agenda-row:last-child { border-bottom: 0; }
.agenda-name { font-size: 16px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda-row.is-off .agenda-name { font-weight: 400; color: var(--texte-2); }
.agenda-ago { font-family: var(--mono); font-size: 12px; color: var(--mineral); min-width: 48px; text-align: right; }
.dash-foot { padding: 24px 48px 0; }

/* Sorties : bandeau, en-tête, liste en 4 colonnes */
.banner { position: relative; height: 132px; overflow: hidden; background: var(--glacier); }
.banner img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.photo-credit-br { top: auto; bottom: 10px; }
.pagehead { background: var(--neige); padding: 32px 48px 24px; border-bottom: 1px solid var(--ligne); }
.pagehead-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px 32px; flex-wrap: wrap; margin-bottom: 20px; }
.pagehead-top > div:first-child { flex: 1 1 420px; min-width: 0; }
.pagehead-help { font-size: 15px; color: var(--texte-2); max-width: 760px; margin: 6px 0 0; }
.olist { padding: 8px 48px 0; }
.olist-head, .orow { display: grid; grid-template-columns: 96px minmax(0, 1fr) 300px 176px; gap: 28px; }
.olist-head { padding: 22px 0 10px; border-bottom: 1px solid var(--ligne); font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.olist-head span:last-child { text-align: right; }
.orow { padding: 22px 0; border-bottom: 1px solid var(--ligne); }
.orow-date { display: flex; flex-direction: column; line-height: 1.1; }
.od-day { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--texte-2); }
.od-num { font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1; margin: 2px 0; }
.od-month { font-size: 14px; font-weight: 600; color: var(--texte-2); }
.od-time { font-family: var(--mono); font-size: 13px; color: var(--mineral); margin-top: 4px; }
.orow-activity { font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ciel); }
.orow-name { font-size: 21px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; margin: 2px 0 6px; }
.orow-name a { color: var(--nuit); } .orow-name a:hover { color: var(--ciel); }
.orow-meta { font-size: 15px; color: var(--texte-2); }
.orow-club { font-weight: 600; color: var(--nuit); }
.orow-auto { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.orow-reg .st { max-width: 100%; white-space: normal; }
.orow-sub { font-size: 14px; color: var(--texte-2); margin-top: 6px; }
.orow-ev { text-align: right; font-size: 14px; }
.orow-evtype { font-weight: 700; color: var(--nuit); }
.orow-stamp { font-family: var(--mono); font-size: 13px; color: var(--mineral); }
.orow-notif { color: var(--mineral); margin-top: 2px; }
.olist .outings-sep { font-size: 20px; font-weight: 800; margin: 32px 0 0; padding-bottom: 10px; border-bottom: 1px solid var(--ligne); color: var(--texte-2); }

/* Page publique « Mes alertes sorties » : mobile d'abord */
body.front { background: var(--neige); }
.pub { min-height: 100vh; }
.pub-photo { position: relative; height: 220px; overflow: hidden; background: var(--glacier); }
.pub-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
.pub-photo .logo-pill { position: absolute; left: 20px; top: 52px; }
.pub-card { position: relative; z-index: 3; background: var(--neige); margin: -48px 12px 0; padding: 24px 20px 32px; border-radius: var(--r); box-shadow: var(--shadow); }
.pub-title { font-size: 30px; font-weight: 800; letter-spacing: -.025em; line-height: 1.1; margin-bottom: 10px; }
.pub-lead { font-size: 17px; color: var(--texte-2); margin-bottom: 8px; }
.pub-addr { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.pub-addr .mono { color: var(--nuit); font-size: 13px; }
.pub-list { border: 0; margin: 0; padding: 0; border-top: 1px solid var(--ligne); }
.pub-actions { margin-top: 28px; }
.pub-btn { width: 100%; height: 56px; font-size: 17px; }
.pub-note { font-size: 13px; color: var(--texte-2); margin: 16px 0 0; }
.pub-unsub { margin-top: 20px; } .pub-unsub .link-danger { font-size: 15px; min-height: 44px; }
.pub .msg { margin-bottom: 18px; }
@media (min-width: 1200px) {
  .pub { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .pub-photo { height: auto; min-height: 100vh; position: sticky; top: 0; }
  .pub-photo .logo-pill { left: 40px; top: 40px; }
  .pub-card { margin: 0; padding: 72px; box-shadow: none; border-radius: 0; align-self: center; max-width: 640px; }
  .pub-title { font-size: 44px; }
  .pub-actions { display: flex; align-items: center; gap: 20px; }
  .pub-btn { width: auto; min-width: 260px; height: 52px; }
}

/* Auto-inscriptions */
.ar-sched { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-bottom: 24px; } .ar-sched .pip { align-self: center; }

/* Écran de connexion */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); background: var(--neige); }
.login-photo { position: relative; overflow: hidden; background: var(--glacier); }
.login-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.login-photo .logo-pill { position: absolute; left: 40px; top: 40px; }
.logo-pill { display: inline-flex; align-items: center; gap: 10px; background: var(--neige); padding: 8px 14px; border-radius: var(--r); font-weight: 800; font-size: 15px; color: var(--nuit); z-index: 2; }
.logo-pill .logo-mark { border-left-width: 8px; border-right-width: 8px; border-bottom-width: 13px; }
.photo-credit-bl { top: auto; bottom: 12px; left: 12px; right: auto; }
.login-form { padding: 72px; display: flex; flex-direction: column; justify-content: center; max-width: 560px; }
.login-form h1 { font-size: 40px; font-weight: 800; letter-spacing: -.025em; margin-bottom: 8px; }
.login-form form { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }

/* ------------------------------------------------------------------ 6. Compatibilité (écrans non encore refaits) */
.container { padding: 40px 48px 56px; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 24px; margin-bottom: 24px; }
.page-head h1 { font-size: 40px; font-weight: 800; letter-spacing: -.025em; line-height: 1.1; }
.card { background: var(--neige); box-shadow: var(--shadow); border-radius: var(--r); padding: 22px 24px; margin-bottom: 24px; }
.card h2 { font-size: 20px; font-weight: 800; letter-spacing: -.015em; margin-bottom: 12px; }
.card h3 { font-size: 16px; font-weight: 700; margin: 20px 0 8px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: -22px -24px 16px; padding: 22px 24px; border-bottom: 1px solid var(--ligne); }
.card-head h2 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 24px; }
.grid-2 > .card { margin-bottom: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpi { margin: 0; } .kpi-label { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.kpi-value { font-size: 24px; font-weight: 800; } .kpi-unit { font-size: 15px; color: var(--muted); font-weight: 600; } .kpi-sub { font-size: 14px; color: var(--muted); }
.list { list-style: none; margin: 0; padding: 0; }
.list-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--ligne); }
.list-row:last-child { border-bottom: 0; } .list-row.wrap { flex-wrap: wrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--sep-3); margin-top: 8px; flex: 0 0 auto; }
.dot-ok { background: var(--ok); } .dot-err { background: var(--err); } .dot-warn { background: #C98A00; } .dot-muted { background: var(--sep-3); }
.badge { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 2px 8px; border-radius: var(--r); font-size: 13px; font-weight: 700; background: var(--ligne-l); color: var(--closed-f); }
.badge-ok { background: var(--ok-t); color: var(--ok-f); } .badge-warn { background: var(--warn-t); color: var(--warn-f); }
.badge-err { background: var(--err-t); color: var(--err-f); } .badge-muted { background: var(--ligne-l); color: var(--closed-f); }
.flash { padding: 14px 16px; border-radius: var(--r); margin-bottom: 20px; font-size: 15px; background: var(--ciel-t); color: var(--ciel-f); }
.flash-success { background: var(--ok-t); color: var(--ok-f); } .flash-success::before { content: "✓  "; font-weight: 800; }
.flash-error { background: var(--err-t); color: var(--err-ff); } .flash-error::before { content: "!  "; font-weight: 800; }
.flash-info { background: var(--ciel-t); color: var(--ciel-f); }
.tabs { display: inline-flex; background: var(--ligne-l); padding: 4px; border-radius: 4px; gap: 2px; flex-wrap: wrap; }
.tabs a { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: var(--r); color: var(--texte-2); font-size: 15px; }
.tabs a:hover { text-decoration: none; color: var(--nuit); }
.tabs a.active { background: var(--neige); color: var(--nuit); font-weight: 700; box-shadow: 0 1px 2px rgba(15, 28, 43, .1); }
.stack > * + * { margin-top: 12px; }
.row-form { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; margin-top: 12px; }
.row-form label { flex: 1 1 200px; } .row-form .grow { flex: 2 1 280px; } .row-form .btn { flex: 0 0 auto; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
form.inline { display: inline; }
.inline-edit > summary { font-size: 14px; } .inline-edit[open] > summary { margin-bottom: 8px; }
.agenda.is-disabled { opacity: .75; }
.log { background: var(--nuit); color: #DCE3EA; font-family: var(--mono); font-size: 12px; line-height: 1.6; padding: 16px; border-radius: var(--r); overflow-x: auto; white-space: pre-wrap; word-break: break-word; }
.log-err { color: #FFB4AB; } .log-warn { color: #FFD58A; }
.diag { padding: 0; box-shadow: none; background: none; } .diag > summary { padding: 0; }
.diag .kv { margin-top: 12px; }
.supervision .causes { margin: 8px 0 0; padding-left: 18px; }
.checks { list-style: none; padding: 0; margin: 12px 0; columns: 2; font-size: 14px; } .checks li { break-inside: avoid; padding: 2px 0; }
.history { padding-left: 20px; font-size: 14px; } .history li { margin: 6px 0; }
.subs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 16px; margin: 8px 0 12px; }
.subs .sub { display: flex; gap: 8px; align-items: center; font-weight: 400; color: var(--nuit); font-size: 15px; min-height: 36px; }
.subs .sub.muted { color: var(--muted); }
.subs .sub input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; margin: 0; border-radius: 4px; border: 2px solid var(--bord-check);
  background: var(--neige); display: grid; place-content: center; flex: 0 0 auto; cursor: pointer; }
.subs .sub input[type="checkbox"]::before { content: "✓"; color: #fff; font-size: 14px; font-weight: 800; transform: scale(0); }
.subs .sub input[type="checkbox"]:checked { background: var(--ciel); border-color: var(--ciel); }
.subs .sub input[type="checkbox"]:checked::before { transform: scale(1); }
.version-box .kv { margin-top: 8px; }
.doc-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; }
.doc-toc { position: sticky; top: 24px; align-self: start; font-size: 14px; }
.doc-toc ul { list-style: none; padding: 0; margin: 0; } .doc-toc li { margin: 6px 0; } .doc-toc a { color: var(--texte-2); }
.doc { max-width: 820px; font-size: 16px; }
.doc h2 { font-size: 28px; font-weight: 800; letter-spacing: -.015em; margin: 40px 0 12px; } .doc h2:first-child { margin-top: 0; }
.doc h3 { font-size: 20px; font-weight: 800; margin: 24px 0 8px; }
.doc pre { background: var(--nuit); color: #DCE3EA; padding: 14px 16px; border-radius: var(--r); overflow-x: auto; font-size: 13px; }
.doc code { font-size: .9em; background: var(--ligne-l); padding: 1px 4px; border-radius: 2px; } .doc pre code { background: none; padding: 0; }
.doc .note { background: var(--warn-t); color: var(--warn-f); padding: 12px 16px; border-radius: var(--r); }
.doc { overflow-wrap: anywhere; } .doc table { border-collapse: collapse; width: 100%; font-size: 14px; display: block; overflow-x: auto; } .doc th, .doc td { border-bottom: 1px solid var(--ligne); padding: 8px 10px; text-align: left; vertical-align: top; }
.doc th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.outings { display: flex; flex-direction: column; gap: 0; }
.outing { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.outings-sep { font-size: 20px; margin: 24px 0 12px; }
.sep { color: var(--sep-3); margin: 0 6px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.incident { background: var(--err-t); color: var(--err-ff); padding: 12px 16px; border-radius: var(--r); margin: 12px 0; }
/* ------------------------------------------------------------------ 7. Responsive */
@media (max-width: 1199px) {
  .sidebar, .collapse-btn { display: none; }
  .mobilebar { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px; background: var(--neige); border-bottom: 1px solid var(--ligne);
    position: sticky; top: 0; z-index: 20; }
  .mobilebar .logo { padding: 0; } .mobilebar .logo-sub { display: none; } .mobilebar .logo-name { font-size: 16px; white-space: nowrap; }
  .mobilebar .robot-line { white-space: nowrap; margin: 0; }
  .mobilebar-robot { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--texte-2); }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; min-width: 44px; padding: 0 10px; border-radius: var(--r);
    color: var(--nuit); font-weight: 700; font-size: 15px; background: var(--ligne-l); }
  .menu-btn:hover { text-decoration: none; color: var(--nuit); }
  .drawer:target, body.drawer-open .drawer { display: flex; position: fixed; inset: 0; z-index: 50; background: var(--neige); flex-direction: column; padding: 12px 16px 24px; overflow-y: auto; }
  .drawer-head { display: flex; align-items: center; justify-content: space-between; height: 44px; margin-bottom: 8px; }
  .drawer .navlist { margin-top: 8px; } .drawer .navlist a { height: 56px; font-size: 17px; }
  .drawer .sidebar-foot { margin-top: 24px; }
  .content, .container { padding: 28px 32px 48px; }
  .dash { grid-template-columns: minmax(0, 1fr); grid-template-areas: "side" "act"; padding: 28px 32px 0; gap: 32px; }
  .dash-foot { padding: 24px 32px 0; }
  .hero-panel { margin: -100px 32px 0; } .hero-panel.no-photo { margin: 28px 32px 0; }
  .app-foot { padding: 16px 32px 24px; }
  .doc-layout { grid-template-columns: minmax(0, 1fr); } .doc-toc { position: static; }
  .login { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .login-form { padding: 48px; }
  .pagehead { padding: 28px 32px 20px; } .olist { padding: 8px 32px 0; }
  .olist-head { grid-template-columns: 96px minmax(0, 1fr) 260px; } .olist-head span:last-child { display: none; }
  .orow { grid-template-columns: 96px minmax(0, 1fr) 260px; }
  .orow-ev { grid-column: 2; text-align: left; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
  .orow-ev > * { margin: 0; }
}
@media (max-width: 767px) {
  body { font-size: 15px; }
  .content, .container { padding: 20px 16px 40px; }
  .page-head h1, .h1 { font-size: 32px; }
  .hero-photo { height: 180px; }
  .hero-panel { margin: 0; padding: 24px 16px; grid-template-columns: minmax(0, 1fr); border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--ligne); }
  .hero-panel.no-photo { margin: 0; }
  .hero-title { font-size: 28px; }
  .hero-cta { width: 100%; height: 56px; }
  .dash { padding: 20px 16px 0; gap: 28px; } .dash-foot { padding: 20px 16px 0; }
  .act-row { grid-template-columns: 24px 1fr; gap: 4px 12px; }
  .act-time { grid-column: 2; order: -1; font-size: 13px; } .act-notif { grid-column: 2; text-align: left; }
  .counters { grid-template-columns: repeat(2, 1fr); } .counter:nth-child(2) { border-right: 0; } .counter:nth-child(-n+2) { border-bottom: 1px solid var(--ligne); }
  .panel-head, .panel-body, .next { padding-left: 16px; padding-right: 16px; }
  .agenda-row { grid-template-columns: auto 1fr auto; } .agenda-ago { display: none; }
  .alertband { padding: 16px; flex-wrap: wrap; } .alertband a { margin-left: 38px; }
  .btn { min-height: 44px; }
  .seg { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .checks { columns: 1; }
  .outing { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px 0; } .kv dd { margin-bottom: 10px; }
  .card-head { flex-wrap: wrap; }
  .app-foot { padding: 16px; }
  .login { grid-template-columns: minmax(0, 1fr); } .login-photo { height: 200px; } .login-form { padding: 28px 16px 40px; }
  .banner { height: 96px; }
  .pagehead { padding: 20px 16px 16px; } .pagehead-top { margin-bottom: 14px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
  .olist { padding: 0 16px; } .olist-head { display: none; }
  .orow { grid-template-columns: 64px minmax(0, 1fr); gap: 6px 14px; padding: 18px 0; }
  .od-num { font-size: 30px; }
  .orow-main { grid-column: 2; } .orow-reg { grid-column: 2; grid-row: 2; } .orow-ev { grid-column: 2; grid-row: 3; font-size: 13px; }
  .orow-name { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
