/* Exploitation réseau — feuille de style de l'interface
   Principe : un outil de salle de commande. Sobre, dense, lisible.
   Seul élément marqué : la navigation dessinée comme un schéma de ligne. */

@font-face { font-family: 'Barlow'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/barlow-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 500; font-style: normal; font-display: swap; src: url('/fonts/barlow-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 600; font-style: normal; font-display: swap; src: url('/fonts/barlow-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 700; font-style: normal; font-display: swap; src: url('/fonts/barlow-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-style: normal; font-display: swap; src: url('/fonts/barlow-condensed-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-style: normal; font-display: swap; src: url('/fonts/barlow-condensed-latin-700-normal.woff2') format('woff2'); }

:root {
  --accent: #0b7a75;            /* remplacé par la couleur du réseau */
  --rail: #1c2738;
  --rail-ink: #c3ccd8;
  --rail-muted: #7f8ca0;
  --paper: #eceff3;
  --surface: #ffffff;
  --ink: #17202e;
  --muted: #5b6778;
  --line: #d3d9e1;
  --line-strong: #b8c1cd;
  --ok: #2f7d32;
  --warn: #a86400;
  --danger: #b3261e;
  --focus: #2563c9;

  --font: 'Barlow', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-cond: 'Barlow Condensed', 'Arial Narrow', 'Segoe UI', system-ui, sans-serif;

  --r-sm: 3px;
  --r-md: 6px;
  --rail-w: 248px;

  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --rail: #10161f;
    --paper: #141b25;
    --surface: #1b2430;
    --ink: #e2e8ef;
    --muted: #97a3b4;
    --line: #2b3646;
    --line-strong: #3a4759;
    --ok: #5fb563;
    --warn: #e0a040;
    --danger: #ef6b61;
    --focus: #7aa7ff;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: inherit; }

html, body, #app { height: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-cond); font-weight: 600; line-height: 1.15; margin: 0; }
h1 { font-size: 1.9rem; letter-spacing: .005em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 .75em; }
a { color: inherit; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Structure ---------- */

.shell { display: grid; grid-template-columns: var(--rail-w) 1fr; min-height: 100%; }

.rail {
  background: var(--rail);
  color: var(--rail-ink);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.rail__brand { padding: 20px 20px 18px; display: flex; gap: 12px; align-items: center; }
.rail__epingle { margin-left: auto; border: 0; background: transparent; color: var(--rail-muted); cursor: pointer; font-size: 1rem; padding: 4px; border-radius: 4px; }
.rail__epingle:hover { color: #fff; background: rgba(255,255,255,.08); }
.rail__epingle[aria-pressed='true'] { color: var(--accent); }

/* Menu escamotable (écrans larges) : une fine bande à gauche, le menu glisse par-dessus au survol */
@media (min-width: 861px) {
  .shell[data-rail='auto'] { grid-template-columns: 14px 1fr; }
  .shell[data-rail='auto'] > .main { grid-column: 2; grid-row: 1; min-width: 0; }
  .shell[data-rail='auto'] .rail {
    position: fixed; left: 0; top: 0; bottom: 0; width: var(--rail-w); z-index: 40;
    transform: translateX(calc(-100% + 14px));
    transition: transform .18s ease .25s, box-shadow .18s ease .25s;
  }
  .shell[data-rail='auto'] .rail::after {
    content: '›'; position: absolute; right: 0; top: 50%; width: 14px; transform: translateY(-50%);
    color: var(--rail-muted); font-size: 1rem; text-align: center; pointer-events: none; transition: opacity .1s .25s;
  }
  .shell[data-rail='auto'] .rail:hover, .shell[data-rail='auto'] .rail:focus-within {
    transform: none; box-shadow: 8px 0 30px rgba(0,0,0,.25); transition-delay: .08s;
  }
  .shell[data-rail='auto'] .rail:hover::after, .shell[data-rail='auto'] .rail:focus-within::after { opacity: 0; transition-delay: 0s; }
}
.rail__badge {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  font: 700 .95rem var(--font-cond);
  flex: none;
}
.rail__name { font: 600 1.1rem/1.1 var(--font-cond); color: #fff; }
.rail__sub { font-size: .8rem; color: var(--rail-muted); }

/* La navigation : un tracé de ligne, chaque entrée est une station. */
.line { list-style: none; margin: 0; padding: 6px 0 14px; position: relative; }
.line::before {
  content: '';
  position: absolute;
  left: 29px; top: 18px; bottom: 26px;
  width: 4px;
  border-radius: 2px;
  background: var(--accent);
}
.line--admin::before { background: var(--rail-muted); top: 52px; }

.line__group {
  position: relative;
  padding: 14px 20px 4px 52px;
  font: 600 .82rem var(--font-cond);
  color: var(--rail-muted);
  letter-spacing: .02em;
}

.stop { position: relative; }
.stop a {
  display: block;
  padding: 7px 16px 7px 52px;
  text-decoration: none;
  color: var(--rail-ink);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  margin-right: 12px;
}
.stop a::before {
  content: '';
  position: absolute;
  left: 24px; top: 50%;
  width: 14px; height: 14px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--rail);
  border: 3px solid var(--accent);
  transition: transform .15s ease;
}
.line--admin .stop a::before { border-color: var(--rail-muted); }
.stop a:hover { background: rgba(255,255,255,.05); color: #fff; }
.stop a[aria-current='page'] { color: #fff; font-weight: 600; background: rgba(255,255,255,.07); }
.stop a[aria-current='page']::before { background: var(--accent); border-color: #fff; transform: scale(1.25); }
.line--admin .stop a[aria-current='page']::before { background: var(--rail-muted); }

.rail__foot { margin-top: auto; padding: 14px 20px 18px; border-top: 1px solid rgba(255,255,255,.08); font-size: .85rem; }
.rail__user { color: #fff; font-weight: 600; }
.rail__actions { display: flex; gap: 14px; margin-top: 6px; }
.rail__actions a, .rail__actions button {
  color: var(--rail-muted); background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.rail__actions a:hover, .rail__actions button:hover { color: #fff; }

/* Statut du serveur : toujours visible en bas à droite de la fenêtre */
.live { position: fixed; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 90; display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 2px 8px rgb(15 23 42 / .12);
  color: var(--muted); font-size: .75rem; pointer-events: auto; user-select: none; }
.live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.live[data-state='on']::before { background: #2fa84f; }
.live[data-state='off'] { color: var(--danger); border-color: var(--danger); font-weight: 600; }
.live[data-state='off']::before { background: #e5534b; animation: live-alerte 1s infinite alternate; }
@keyframes live-alerte { to { opacity: .3; } }
.bandeau-simulation ~ .live { bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }
@media print { .live { display: none !important; } }

.main { min-width: 0; padding: 28px clamp(16px, 3vw, 40px) 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head p { color: var(--muted); margin: 4px 0 0; }

.topbar { display: none; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .rail { position: fixed; inset: 0 auto 0 0; width: min(86vw, 300px); z-index: 30; transform: translateX(-100%); transition: transform .2s ease; padding-top: env(safe-area-inset-top, 0px); }
  .shell[data-nav='open'] .rail { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
  .topbar {
    display: flex; align-items: center; gap: 12px;
    position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
    background: var(--rail); color: #fff; padding: 10px 14px;
  }
  .topbar button { background: none; border: 0; color: #fff; font-size: 1.4rem; line-height: 1; padding: 4px 6px; cursor: pointer; }
  .topbar strong { font: 600 1.05rem var(--font-cond); }
  .main { padding-top: 18px; }
}

/* ---------- Composants ---------- */

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.panel + .panel { margin-top: 18px; }
.panel__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel__body { padding: 16px 18px; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: 600 .92rem var(--font);
  padding: 8px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--primary:hover { filter: brightness(1.08); border-color: var(--accent); }
.btn--danger { color: var(--danger); border-color: currentColor; }
.btn--ghost { border-color: transparent; background: transparent; padding-inline: 8px; }
.btn--ghost:hover { background: var(--paper); border-color: transparent; }
.btn--small { padding: 4px 10px; font-size: .85rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font: 600 .85rem var(--font-cond); color: var(--muted); background: color-mix(in srgb, var(--paper) 60%, var(--surface)); white-space: nowrap; }
tbody tr:hover { background: color-mix(in srgb, var(--paper) 45%, var(--surface)); }
tbody tr:last-child td { border-bottom: 0; }
td.actions { text-align: right; white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* État : pastille + texte, jamais la couleur seule */
.state { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; white-space: nowrap; }
.state::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.state--ok { color: var(--ok); }
.state--warn { color: var(--warn); }
.state--danger { color: var(--danger); }
.state--off { color: var(--muted); }

.tag { display: inline-block; padding: 1px 8px; border-radius: 10px; border: 1px solid var(--line-strong); font-size: .8rem; color: var(--muted); margin: 1px 4px 1px 0; white-space: nowrap; }
.tag--accent { border-color: var(--accent); color: var(--accent); }
.tag--alerte { border-color: var(--warn); color: var(--warn); font-weight: 600; }

.line-chip {
  display: inline-grid; place-items: center;
  min-width: 34px; height: 26px; padding: 0 8px;
  border-radius: var(--r-sm);
  font: 700 .95rem var(--font-cond);
  background: var(--chip-bg, #666); color: var(--chip-fg, #fff);
}

/* Formulaires */
.form { display: grid; gap: 14px; }
.form__row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); align-items: end; }
label.field { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 6px; font-weight: 500; font-size: .9rem; }
label.field small { font-weight: 400; color: var(--muted); }
label.field > :is(input, select, textarea) { flex: 1 0 100%; }
input[type='text'], input[type='password'], input[type='email'], input[type='number'], input[type='search'], select, textarea {
  font: 400 .95rem var(--font);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  width: 100%;
}
textarea { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: .85rem; min-height: 180px; resize: vertical; }
input[type='color'] { width: 100%; height: 38px; padding: 2px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: -1px; border-color: transparent; }
.check { display: flex; align-items: center; gap: 8px; font-size: .92rem; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); margin: 0; }
.form__actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.form__error { color: var(--danger); font-size: .9rem; min-height: 1.2em; margin: 0; }

fieldset { border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 14px 12px; margin: 0; }
legend { font: 600 .95rem var(--font-cond); padding: 0 6px; }
.perm-list { display: grid; gap: 6px 18px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-top: 4px; }

/* Dialogue */
dialog {
  border: 0; padding: 0; border-radius: var(--r-md);
  width: min(640px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
  background: var(--surface); color: var(--ink);
  box-shadow: 0 18px 50px rgba(10, 18, 30, .35);
}
dialog::backdrop { background: rgba(12, 18, 28, .5); }
.dialog__head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.dialog__body { padding: 18px 20px 20px; }

/* Notifications */
.toasts { position: fixed; right: 16px; bottom: calc(46px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 8px; z-index: 100; max-width: min(380px, calc(100vw - 32px)); }
.toast { background: var(--rail); color: #fff; padding: 10px 14px; border-radius: var(--r-md); border-left: 4px solid var(--accent); box-shadow: 0 6px 20px rgba(0,0,0,.25); font-size: .92rem; }
.toast--error { border-left-color: #e5534b; }

/* Secret affiché une fois (mot de passe temporaire) */
.secret { display: flex; gap: 10px; align-items: center; background: var(--paper); border: 1px dashed var(--line-strong); padding: 10px 12px; border-radius: var(--r-sm); font: 600 1.05rem ui-monospace, Consolas, monospace; word-break: break-all; }

.empty { padding: 32px 18px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font: 600 1.1rem var(--font-cond); margin-bottom: 4px; }

/* Accueil */
.tile { display: block; text-decoration: none; padding: 16px 18px; border-left: 4px solid var(--accent); }
.tile:hover { border-color: var(--line-strong); border-left-color: var(--accent); }
.tile h3 { margin-bottom: 6px; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 64px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.feed li:last-child { border-bottom: 0; }
.feed li.feed__empty { display: block; color: var(--muted); }
.feed time { color: var(--muted); font-variant-numeric: tabular-nums; }

/* Connexion */
.auth {
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
}
.auth__side {
  background: var(--rail);
  color: #fff;
  padding: 48px;
  display: flex; flex-direction: column; justify-content: flex-end;
  position: relative; overflow: hidden;
}
.auth__side svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .9; }
.auth__side::after { content: ''; position: absolute; inset: 40% 0 0; background: linear-gradient(to bottom, transparent, var(--rail) 70%); }
.auth__illustration { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.auth__illustration.cadrage-top { object-position: center top; }
.auth__illustration.cadrage-bottom { object-position: center bottom; }
.auth__illustration.cadrage-left { object-position: left center; }
.auth__illustration.cadrage-right { object-position: right center; }
.auth__side h1 { position: relative; z-index: 1; font-size: clamp(2rem, 4vw, 3.2rem); max-width: 12ch; }
.auth__side p { position: relative; z-index: 1; color: var(--rail-ink); max-width: 40ch; margin-top: 10px; }
.auth__form { background: var(--surface); padding: 48px 40px; display: flex; flex-direction: column; justify-content: center; gap: 20px; }
@media (max-width: 760px) {
  .auth { grid-template-columns: 1fr; grid-template-rows: 200px 1fr; }
  .auth__side { padding: 24px; }
  .auth__form { padding: 28px 22px; }
}

.boot { min-height: 100%; display: grid; place-items: center; color: var(--muted); }

/* Plan décoratif de l'écran de connexion */
.auth__side path { fill: none; stroke-width: 14; stroke-linecap: round; stroke-linejoin: round; }
.auth__side .plan-l1 { stroke: var(--accent); }
.auth__side .plan-l2 { stroke: #3b4a63; }
.auth__side .plan-st circle { fill: var(--rail); stroke: #fff; stroke-width: 4; }
.auth__side .plan-hub { fill: #fff; stroke: var(--rail); stroke-width: 5; }

.narrow { max-width: 520px; }
.mt { margin-top: 18px; }
.center-card { width: min(460px, calc(100vw - 32px)); }
.grow { flex: 1; }

[hidden] { display: none !important; }

/* Administration › Apparence */
.apparence { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, 1fr); gap: 18px; align-items: start; }
.apparence .panel + .panel { margin-top: 0; }
@media (max-width: 1000px) { .apparence { grid-template-columns: 1fr; } }
.apercu-logo { display: grid; place-items: center; min-height: 120px; padding: 18px; border: 1px dashed var(--line-strong); border-radius: var(--r-sm); background: #fff; }
.apercu-logo img { max-width: 100%; max-height: 120px; object-fit: contain; }
.apercu-logo { position: relative; }
.apercu-logo .logo-vide { color: #6b7684; font-size: .9rem; text-align: center; }
.apercu-connexion { height: 420px; border-radius: var(--r-sm); padding: 28px; }
.apercu-connexion h1 { font-size: 2rem; }
.apercu-defaut { position: absolute; inset: 0; display: grid; place-items: center; color: var(--rail-ink); font-size: .9rem; }

/* Mode simulation (administrateur) : bandeau permanent en bas de l'écran */
.bandeau-simulation { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px)); color: #1a1200; font-size: .9rem;
  background: repeating-linear-gradient(135deg, #ffcf3f 0 14px, #ffc21a 14px 28px); box-shadow: 0 -2px 8px rgb(0 0 0 / .2); }
.bandeau-simulation strong { text-transform: uppercase; letter-spacing: .05em; }
.bandeau-simulation [data-heure-simulee] { font-weight: 700; font-variant-numeric: tabular-nums; }
.bandeau-simulation__note { opacity: .8; font-size: .82rem; }
.bandeau-simulation a, .bandeau-simulation button { margin-left: auto; color: #1a1200; font: inherit; font-weight: 600; }
.bandeau-simulation button { margin-left: 0; background: #1a1200; color: #ffd23f; border: 0; border-radius: 4px; padding: 4px 10px; cursor: pointer; }
.shell.en-simulation .main { padding-bottom: 96px; }
@media (max-width: 700px) { .bandeau-simulation__note { display: none; } }

/* Connexion Microsoft 365 */
.btn--microsoft { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 11px 16px; text-decoration: none;
  background: #fff; color: #1b1b1b; border: 1px solid #8c8c8c; border-radius: var(--r-md); font-weight: 600; }
.btn--microsoft:hover { background: #f3f3f3; border-color: #5e5e5e; }
.auth__ou { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; }
.auth__ou::before, .auth__ou::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.auth__secours { border-top: 1px solid var(--line); padding-top: 10px; }
.auth__secours summary { cursor: pointer; color: var(--muted); font-size: .88rem; margin-bottom: 10px; }
.etapes-ms { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: .92rem; }
.etapes-ms code, .uri-retour { font-size: .85rem; background: var(--paper); border: 1px solid var(--line); border-radius: 3px; padding: 1px 5px; word-break: break-all; }
.groupes-ms td input, .groupes-ms td select { width: 100%; }

/* Marque Remiz */
.marque { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.marque__nom { font: 700 1.9rem/1 var(--font-cond); letter-spacing: .06em; color: var(--ink); }
.marque__acro { font-size: .68rem; white-space: nowrap; color: var(--muted); margin-top: 4px; letter-spacing: .01em; }
.rail__produit { display: flex; align-items: center; gap: 7px; font: 700 .8rem var(--font-cond); letter-spacing: .1em; color: var(--rail-ink); opacity: .85; margin-bottom: 8px; }

/* Paramètres des modules (formulaire) */
dialog.large { width: min(920px, calc(100vw - 24px)); }
.cfg-form { gap: 18px; }
.cfg-champ { display: grid; gap: 4px; }
.cfg-aide { color: var(--muted); font-size: .82rem; }
.cfg-groupe { border: 1px solid var(--line); border-radius: var(--r-sm, 6px); padding: 10px 14px 14px; margin: 0; display: grid; gap: 8px; justify-items: start; }
.cfg-groupe legend { font-weight: 600; font-size: .92rem; padding: 0 4px; }
.cfg-liste { display: grid; gap: 6px; width: 100%; }
.cfg-ligne { display: flex; align-items: center; gap: 6px; }
.cfg-ligne input { max-width: 220px; }
.cfg-ligne input[type="email"] { max-width: 340px; }
.cfg-outils { display: inline-flex; gap: 2px; }
.cfg-outils .btn { padding: 2px 8px; }
.cfg-suppr { color: var(--danger); }
.cfg-table { border-collapse: collapse; width: 100%; }
.cfg-table th { text-align: left; font-size: .8rem; font-weight: 600; color: var(--muted); padding: 2px 6px 6px; }
.cfg-table td { padding: 3px 6px; vertical-align: middle; }
.cfg-table td.centre { text-align: center; }
.cfg-table input[type="text"] { width: 110px; }
.cfg-table input[type="color"] { width: 48px; height: 30px; padding: 2px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); cursor: pointer; }
.cfg-table input[type="color"]:disabled { opacity: .3; cursor: not-allowed; }
.cfg-table input[type="radio"] { width: 17px; height: 17px; accent-color: var(--accent); }
.cfg-apercu { display: inline-grid; place-items: center; min-width: 40px; height: 26px; padding: 0 8px; border-radius: 4px; font: 700 .8rem/1 var(--font-cond, sans-serif); color: #fff; }
.cfg-apercu.vide { color: var(--muted); font: italic 400 .8rem var(--font, sans-serif); padding: 0; }
.cfg-nombre { display: flex; align-items: center; gap: 6px; flex: 1 0 100%; }
.cfg-nombre input { max-width: 120px; }
.cfg-avance summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.cfg-avance textarea { width: 100%; min-height: 180px; font-family: ui-monospace, monospace; font-size: .82rem; margin-top: 6px; }

.simu-participants { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; max-height: 260px; overflow: auto;
  padding: 8px; border: 1px solid var(--line); border-radius: var(--r-sm); margin-top: 6px; }
.simu-participants label[hidden] { display: none; }

/* À propos */
.apropos { display: flex; gap: 18px; align-items: flex-start; }
.apropos p { margin: 0 0 6px; }
.apropos__nom { font: 700 1.3rem var(--font-cond); letter-spacing: .04em; }
.apropos__synthese { display: flex; flex-wrap: wrap; gap: 6px; }
.rail__produit { text-decoration: none; width: fit-content; }
.rail__version { font: 500 .72rem var(--font); letter-spacing: .02em; color: var(--rail-muted); }
.rail__apropos { font: 500 .72rem var(--font); letter-spacing: 0; opacity: 0; transition: opacity .15s; }
.rail__produit:hover .rail__apropos, .rail__produit:focus-visible .rail__apropos { opacity: .8; }

/* Simulation : données modifiées */
.encadre-simu { border: 1px solid #e3c27a; background: #fdf6e3; border-radius: 8px; padding: 12px 14px; }
.encadre-simu p { margin: 0 0 8px; }

.dialog-message { white-space: pre-line; }
/* Données d'une journée */
.journee-table td.centre, .journee-table th.centre { text-align: center; width: 90px; }
.journee-table .erreur { color: var(--danger); }
.form__row.journee-choix { grid-template-columns: minmax(0, 320px) 180px; justify-content: start; }

/* Nouvelle version du serveur : proposer de recharger */
.bandeau-version { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 950; display: flex; align-items: center; gap: 12px;
  padding: 8px 8px 8px 16px; border-radius: 10px; background: var(--surface, #fff); color: var(--ink, #1d2633); font-size: .92rem;
  border: 1px solid var(--line, #dfe4ea); box-shadow: 0 8px 28px rgb(0 0 0 / .18); max-width: calc(100vw - 24px); }
@media (max-width: 560px) { .bandeau-version { flex-wrap: wrap; justify-content: center; text-align: center; } }
