/* DM Sans auto-hébergée (mêmes fichiers que sweb_pro) : aucune dépendance à Google Fonts. */
@font-face {
  font-family: "DM Sans"; font-style: normal; font-weight: 100 1000; font-display: swap;
  src: url("/fonts/dm-sans-v17-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Sans"; font-style: normal; font-weight: 100 1000; font-display: swap;
  src: url("/fonts/dm-sans-v17-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #faf8fb;
  --text: #1b181b;
  --muted: #6b5f6b;
  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --stroke: rgba(27, 24, 27, 0.08);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 12px 40px -12px rgba(120, 60, 30, 0.18);
  --link: #d5410b;
  --brand: #f45410;
  --veil: rgba(250, 248, 251, 0.28);
  --ok: #17b26a;
  --degraded: #e6a700;
  --partial: #f76b15;
  --major: #f04438;
  --maintenance: #3b82f6;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #120f12;
    --text: #f6f3f6;
    --muted: #a99ea9;
    --glass: rgba(255, 255, 255, 0.055);
    --glass-strong: rgba(255, 255, 255, 0.09);
    --stroke: rgba(255, 255, 255, 0.1);
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 20px 50px -20px rgba(0, 0, 0, 0.7);
    --link: #ff8a55;
    --veil: rgba(18, 15, 18, 0.8);
    --ok: #32d583;
    --degraded: #fdb022;
    --partial: #ff8a3d;
    --major: #ff5a4d;
    --maintenance: #6aa3ff;
  }
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-underline-offset: 3px; }

/* Fond : dégradé de la DA SWEB (GRADIENTS BACKGROUNDS), voilé pour garder le texte lisible */
.aurora {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(var(--veil), var(--veil)), url("/bg.webp") center / cover no-repeat;
}

.wrap { max-width: 860px; margin: 0 auto; padding: 16px 16px 72px; }

/* Barre flottante en verre */
header.top {
  position: sticky; top: 12px; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 8px 10px 8px 12px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--stroke); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: -0.01em; }
.brand img { border-radius: 8px; display: block; }
.brand em { font-style: normal; font-weight: 500; color: var(--muted); }
header.top nav { display: flex; gap: 4px; font-size: 14px; }
header.top nav a { color: var(--muted); text-decoration: none; padding: 6px 12px; border-radius: 999px; transition: background .2s, color .2s; }
header.top nav a:hover { color: var(--text); background: var(--glass-strong); }
header.top nav a[aria-current="page"] { color: var(--text); background: var(--glass-strong); font-weight: 600; }

.lvl-operational { --lvl: var(--ok); }
.lvl-degraded { --lvl: var(--degraded); }
.lvl-partial { --lvl: var(--partial); }
.lvl-major { --lvl: var(--major); }
.lvl-maintenance { --lvl: var(--maintenance); }

/* Hero */
.hero { text-align: center; padding: 64px 0 48px; animation: rise .6s cubic-bezier(.2, .7, .2, 1) both; }
.hero h1 { margin: 20px 0 8px; font-size: clamp(36px, 7vw, 60px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 700; }
.hero p { margin: 0 auto; max-width: 560px; color: var(--muted); font-size: 18px; }
.cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; padding: 11px 20px; border-radius: 999px; font-weight: 600; font-size: 15px;
  color: var(--text); text-decoration: none; background: var(--glass); border: 1px solid var(--stroke);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: transform .15s, background .2s;
}
.btn:hover { transform: translateY(-1px); background: var(--glass-strong); }
.btn.primary { color: #fff; border-color: transparent; background: linear-gradient(135deg, #ff7c44, #f45410 55%, #fd2a94); box-shadow: 0 10px 30px -10px rgba(244, 84, 16, 0.6); }

/* Orbe de statut : point central + deux anneaux qui pulsent */
.orb { position: relative; width: 72px; height: 72px; margin: 0 auto; }
.orb span { position: absolute; inset: 22px; border-radius: 50%; background: var(--lvl); box-shadow: 0 0 40px var(--lvl); }
.orb::before, .orb::after { content: ""; position: absolute; inset: 14px; border-radius: 50%; border: 2px solid var(--lvl); opacity: 0; animation: ring 2.6s ease-out infinite; }
.orb::after { animation-delay: 1.3s; }
.lvl-operational .orb::before, .lvl-operational .orb::after { animation-duration: 4s; }

h2 { margin: 56px 0 16px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
h2 span { display: inline-block; }

/* Cartes en verre */
.incident, .component, .day {
  background: var(--glass); border: 1px solid var(--stroke); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
}
.incident { position: relative; border-radius: 24px; padding: 24px; margin-bottom: 16px; overflow: hidden; animation: rise .6s .1s cubic-bezier(.2, .7, .2, 1) both; }
.incident::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--lvl), transparent 80%); }
.incident h3 { margin: 12px 0 2px; font-size: 22px; letter-spacing: -0.02em; line-height: 1.2; }
.incident h3 a { color: var(--text); text-decoration: none; }
.incident h3 a:hover { text-decoration: underline; }
.incident .meta { color: var(--muted); font-size: 14px; }
.incident > p { margin: 10px 0 0; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; color: var(--muted); background: var(--glass-strong); border: 1px solid var(--stroke); }
.tag.lvl { color: var(--lvl); border-color: color-mix(in srgb, var(--lvl) 45%, transparent); background: color-mix(in srgb, var(--lvl) 12%, transparent); }

/* Fil d'incident vertical */
.timeline { list-style: none; margin: 22px 0 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--stroke); border-radius: 2px; }
.timeline li { position: relative; padding: 0 0 20px 30px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline .dot { position: absolute; left: 0; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 3px solid var(--muted); }
.timeline .st-investigating .dot { border-color: var(--degraded); }
.timeline .st-identified .dot { border-color: var(--partial); }
.timeline .st-monitoring .dot { border-color: var(--maintenance); }
.timeline .st-resolved .dot { border-color: var(--ok); background: var(--ok); }
.timeline .head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.timeline .st { font-weight: 700; }
.timeline time { color: var(--muted); font-size: 13px; }
.timeline p { margin: 4px 0 0; }

/* Composants : grille bento */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.component { position: relative; border-radius: 22px; padding: 20px; transition: transform .2s, background .2s; }
/* Chaque carte est un contexte d'empilement (backdrop-filter) : au survol on la passe devant, sinon l'infobulle disparaît sous la carte voisine. */
.component:hover { z-index: 10; transform: translateY(-2px); background: var(--glass-strong); }
.component .row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.badge { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--lvl); padding: 4px 10px 4px 8px; border-radius: 999px; background: color-mix(in srgb, var(--lvl) 13%, transparent); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--lvl); box-shadow: 0 0 8px var(--lvl); }
.uptime { color: var(--muted); font-size: 13px; }
.uptime b { font-size: 20px; color: var(--text); letter-spacing: -0.02em; }
.component .name { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; line-height: 1.25; }
.component .desc { color: var(--muted); font-size: 13px; margin-top: 2px; min-height: 20px; }

.bar { display: flex; gap: 2px; height: 34px; margin-top: 16px; }
.bar i { font-style: normal; position: relative; flex: 1; border-radius: 3px; background: var(--lvl, var(--ok)); opacity: .9; transition: transform .15s, opacity .15s; }
.bar i:hover { opacity: 1; transform: scaleY(1.18); }
.bar i::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  white-space: nowrap; font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: 8px;
  background: var(--text); color: var(--bg); opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 5;
}
.bar i:hover::after { opacity: 1; }
/* Aux extrémités, l'infobulle s'aligne sur le bord de la barre au lieu de déborder de la carte. */
.bar i:nth-child(-n+12)::after { left: 0; transform: none; }
.bar i:nth-last-child(-n+12)::after { left: auto; right: 0; transform: none; }
.bar-legend { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 6px; text-transform: uppercase; letter-spacing: .06em; }

/* Historique */
.day { display: flex; gap: 16px; align-items: baseline; padding: 16px 20px; border-radius: 18px; margin-bottom: 10px; }
.day time { width: 130px; flex: none; color: var(--muted); font-size: 14px; }
.day a { font-weight: 600; }
.day .uptime { margin-top: 2px; }

h1:not(.hero h1) { font-size: 32px; letter-spacing: -0.03em; margin: 40px 0 0; }

footer { margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--stroke); color: var(--muted); font-size: 13px; text-align: center; }
footer p { margin: 4px 0; }

@keyframes ring { 0% { transform: scale(.7); opacity: .7; } 100% { transform: scale(2.1); opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .hero { padding: 44px 0 32px; }
  header.top nav a { padding: 6px 9px; }
  .brand em { display: none; }
  .day { flex-direction: column; gap: 2px; }
  .day time { width: auto; }
  .bar i::after { display: none; }
}

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