/* ────────────────────────────────────────────────────────────
   Status page — design proche du site principal (pantone dark)
   ──────────────────────────────────────────────────────────── */

:root {
  --bg: #0b0807;
  --bg-2: #110d0c;
  --text: #f4ebe7;
  --text-dim: rgba(244, 235, 231, 0.6);
  --text-mute: rgba(244, 235, 231, 0.35);
  --border: rgba(255, 255, 255, 0.08);
  --pantone: #c0392b;
  --pantone-2: #e74c3c;
  --green: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;
  --gray: #6b7280;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(at top right, rgba(192, 57, 43, 0.15) 0%, transparent 40%),
    var(--bg);
  background-attachment: fixed;
}

.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

/* ── Header ─────────────────────────────────────────── */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
}

.logo-text {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-sub {
  font-size: 13px;
  font-weight: 600;
  color: var(--pantone-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.back-link {
  color: var(--text-mute);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}
.back-link:hover { color: var(--text); }

/* ── Loading / disabled ─────────────────────────────── */

.loading, .disabled-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-dim);
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--pantone-2);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Global status banner ────────────────────────────── */

.banner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 32px;
  border-radius: 16px;
  margin-bottom: 32px;
  border: 1px solid var(--border);
}

.banner.up {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.02) 100%);
  border-color: rgba(16, 185, 129, 0.3);
}
.banner.degraded {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.02) 100%);
  border-color: rgba(245, 158, 11, 0.3);
}
.banner.down {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.02) 100%);
  border-color: rgba(239, 68, 68, 0.3);
}
.banner.unknown {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
}

.banner i { font-size: 36px; }
.banner.up i { color: var(--green); }
.banner.degraded i { color: var(--amber); }
.banner.down i { color: var(--red); }
.banner.unknown i { color: var(--gray); }

.banner-text h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.banner-text p {
  color: var(--text-dim);
  font-size: 14px;
}

/* ── Section titles ──────────────────────────────────── */

.section {
  margin-bottom: 40px;
}
.section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
}

/* ── Service list ────────────────────────────────────── */

.services {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.service {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.service:last-child { border-bottom: none; }

.service-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
}
.service-dot.up      { background: var(--green); }
.service-dot.degraded{ background: var(--amber); }
.service-dot.down    { background: var(--red); }
.service-dot.unknown { background: var(--gray); }

.service-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: inherit;
  opacity: 0.3;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.5); opacity: 0; }
}

.service-name {
  flex: 1;
  font-weight: 500;
}

.service-status {
  font-size: 13px;
  color: var(--text-dim);
}

.service-status.up      { color: var(--green); }
.service-status.degraded{ color: var(--amber); }
.service-status.down    { color: var(--red); }
.service-status.unknown { color: var(--gray); }

/* ── Incidents ───────────────────────────────────────── */

.incidents {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.incident {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
}

.incident.ongoing {
  border-color: rgba(239, 68, 68, 0.3);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, transparent 100%);
}

.incident-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.incident-title {
  font-weight: 600;
  font-size: 16px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.badge.maintenance { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.badge.minor       { background: rgba(245, 158, 11, 0.2); color: #fde68a; }
.badge.major       { background: rgba(249, 115, 22, 0.2); color: #fdba74; }
.badge.critical    { background: rgba(239, 68, 68, 0.2);  color: #fca5a5; }
.badge.resolved    { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }

.incident-meta {
  color: var(--text-mute);
  font-size: 12px;
  margin-bottom: 12px;
}

.incident-description {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 12px;
}

.incident-updates {
  border-left: 2px solid var(--border);
  padding-left: 14px;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.incident-update {
  font-size: 13px;
}
.incident-update-state {
  color: var(--pantone-2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
}
.incident-update-time {
  color: var(--text-mute);
  font-size: 11px;
  margin-left: 8px;
}
.incident-update-msg {
  color: var(--text-dim);
  margin-top: 2px;
}

/* ── Disabled state (page privée) ────────────────────── */

.disabled-state i {
  font-size: 48px;
  color: var(--text-mute);
  margin-bottom: 16px;
}

/* ── Footer ──────────────────────────────────────────── */

.footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--text-mute);
}

.footer p { margin-bottom: 4px; }
.footer-credits a {
  color: var(--text-dim);
  text-decoration: none;
}
.footer-credits a:hover { color: var(--text); }

/* ── Responsive ─────────────────────────────────────── */

@media (max-width: 640px) {
  .container { padding: 20px 16px 40px; }
  .banner { padding: 20px; }
  .banner i { font-size: 28px; }
  .banner-text h2 { font-size: 18px; }
  .service { padding: 14px 16px; }
}
