/* Page de statut ello — feuille de style partagée (aperçu + pages d'incident).
   Aucune ressource externe : la page doit rester légère et lisible en 4G. */

:root {
  /* Palette calée sur le bleu du logo ello business (#0032FF). Les couleurs de
     texte restent assez foncées pour être lisibles sur fond blanc (WCAG AA). */
  --bg: #f5f6fa;
  --surface: #ffffff;
  --border: #e2e5ee;
  --text: #11131a;
  --muted: #5f6475;
  --brand: #0032FF;

  --ok: #00874D;      --ok-bg: #DDF6EA;
  --warn: #B85300;    --warn-bg: #FFEBD6;
  --danger: #D6002A;  --danger-bg: #FFE3E8;
  --info: #0032FF;    --info-bg: #E5EBFF;
  --neutral: #5f6475; --neutral-bg: #eceef4;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1018;
    --surface: #181b26;
    --border: #2c3142;
    --text: #eceef4;
    --muted: #a3a8b8;
    --brand: #7C95FF;

    --ok: #2FD08A;      --ok-bg: #0f3324;
    --warn: #FF9F43;    --warn-bg: #3d2610;
    --danger: #FF5C77;  --danger-bg: #42121c;
    --info: #7C95FF;    --info-bg: #161f4d;
    --neutral: #a3a8b8; --neutral-bg: #262a38;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--brand); }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }

/* ── En-tête / pied ─────────────────────────────────────────────────── */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); }
.logo img { display: block; height: 40px; width: auto; }
.logo span { font-size: 14px; color: var(--muted); padding-left: 14px; border-left: 1px solid var(--border); }
/* Logo bleu illisible sur fond sombre : passé en blanc en mode sombre. */
@media (prefers-color-scheme: dark) { .logo img { filter: brightness(0) invert(1); } }
@media (max-width: 420px) { .logo span { display: none; } }
.site-header nav a { font-size: 14px; text-decoration: none; }

.site-footer { margin: 48px 0 32px; font-size: 13px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; border-top: 1px solid var(--border); padding-top: 16px; }

main.wrap { padding-top: 24px; padding-bottom: 24px; }
h1 { font-size: 26px; line-height: 1.25; margin: 0 0 8px; }
h2 { font-size: 17px; margin: 36px 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ── Bandeau d'état global ──────────────────────────────────────────── */
.overall {
  display: flex; gap: 14px; align-items: center;
  padding: 18px 20px; border-radius: 10px; border: 1px solid;
}
.overall .dot { flex: none; width: 14px; height: 14px; border-radius: 50%; background: currentColor; }
.overall strong { display: block; font-size: 17px; }
.overall p { margin: 2px 0 0; font-size: 14px; color: var(--text); }
.overall.ok     { color: var(--ok);     background: var(--ok-bg);     border-color: var(--ok); }
.overall.warn   { color: var(--warn);   background: var(--warn-bg);   border-color: var(--warn); }
.overall.danger { color: var(--danger); background: var(--danger-bg); border-color: var(--danger); }

/* ── Pastilles ──────────────────────────────────────────────────────── */
.pill {
  display: inline-block; font-size: 12px; font-weight: 600; line-height: 1;
  padding: 5px 9px; border-radius: 999px; white-space: nowrap;
}
.pill.ok      { color: var(--ok);      background: var(--ok-bg); }
.pill.warn    { color: var(--warn);    background: var(--warn-bg); }
.pill.danger  { color: var(--danger);  background: var(--danger-bg); }
.pill.info    { color: var(--info);    background: var(--info-bg); }
.pill.neutral { color: var(--neutral); background: var(--neutral-bg); }

/* ── Cartes (incidents, maintenances) ───────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px 18px; margin-bottom: 12px;
}
.card.accent-danger { border-left: 4px solid var(--danger); }
.card.accent-info   { border-left: 4px solid var(--info); }
.card .pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.card h3 { font-size: 16px; margin: 0 0 6px; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card p { margin: 6px 0 0; font-size: 14px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; color: var(--muted); }
.meta b { color: var(--text); font-weight: 600; }
.card .more { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 600; text-decoration: none; }

.empty { padding: 14px 18px; border: 1px dashed var(--border); border-radius: 10px; color: var(--muted); font-size: 14px; }

/* ── Liste des services ─────────────────────────────────────────────── */
.services { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.services li {
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 18px; border-top: 1px solid var(--border);
}
.services li:first-child { border-top: 0; }
.services ul { margin: 0; padding: 0; }

/* ── Historique (incidents résolus) ─────────────────────────────────── */
.history { margin: 0; padding: 0; }
.history li {
  list-style: none; display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px;
}
.history li a { color: var(--text); }
.history time { flex: none; color: var(--muted); font-size: 13px; }

/* ── Page incident ──────────────────────────────────────────────────── */
.back { display: inline-block; margin-bottom: 16px; font-size: 14px; text-decoration: none; }
.incident-head .pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }

.steps { display: flex; margin: 24px 0; padding: 0; counter-reset: step; }
.steps li {
  list-style: none; flex: 1; position: relative; text-align: center;
  font-size: 12px; color: var(--muted); padding-top: 26px;
}
.steps li::before {
  content: ""; position: absolute; top: 4px; left: 50%; transform: translateX(-50%);
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--border); z-index: 1;
}
.steps li::after {
  content: ""; position: absolute; top: 11px; left: -50%; width: 100%; height: 2px; background: var(--border);
}
.steps li:first-child::after { display: none; }
.steps li.done { color: var(--text); }
.steps li.done::before { background: var(--warn); border-color: var(--warn); }
.steps li.done::after  { background: var(--warn); }
.steps li.current { color: var(--text); font-weight: 700; }
.steps li.current::before { box-shadow: 0 0 0 4px var(--warn-bg); }

.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
.facts div { background: var(--surface); padding: 12px 16px; }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 600; }

.advice {
  margin-top: 16px; padding: 14px 18px; border-radius: 10px;
  background: var(--info-bg); font-size: 14px;
}
.advice strong { color: var(--info); }
.advice ul { margin: 6px 0 0; padding-left: 20px; }

.timeline { margin: 0; padding: 0; }
.timeline li { list-style: none; position: relative; padding: 0 0 22px 26px; border-left: 2px solid var(--border); margin-left: 6px; }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--muted);
}
.timeline li:first-child::before { border-color: var(--warn); background: var(--warn); }
.timeline .when { font-size: 13px; color: var(--muted); }
.timeline .when .pill { margin-left: 6px; vertical-align: 1px; }
.timeline p { margin: 4px 0 0; }

@media (max-width: 560px) {
  h1 { font-size: 22px; }
  .steps li { font-size: 11px; }
  .history li { flex-direction: column; gap: 2px; }
}

/* ── Bandeau « page de test » (à retirer à la mise en service) ───────── */
.test-banner {
  background: #D6002A; color: #fff; text-align: center;
  padding: 10px 16px; font-size: 14px;
}
