/* ═══════════════════════════════════════════════════════════════════════════
   SOLARBOT — PAGE STATUT
   ═══════════════════════════════════════════════════════════════════════════ */

.status-page { background: var(--black); }

.status-main {
  padding-top: 100px;
  padding-bottom: 120px;
  min-height: 100vh;
}

.status-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ─── HERO ───────────────────────────────────────────────────────────────────── */
.status-hero {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 48px;
  background: var(--gray-900);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-xl);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.status-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(34,197,94,.06) 0%, transparent 60%);
  pointer-events: none;
  transition: background 1s ease;
}

.status-hero.offline::before {
  background: radial-gradient(ellipse at 20% 50%, rgba(239,68,68,.06) 0%, transparent 60%);
}

/* Indicateur pulsant */
.status-hero-indicator {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-dot-large {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--success);
  position: relative;
  z-index: 2;
  transition: background 1s ease;
}

.status-dot-large.offline { background: var(--error); }

.status-pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--success);
  opacity: 0;
  animation: pulse-ring 2.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  transition: border-color 1s ease;
}

.status-pulse-ring.offline {
  border-color: var(--error);
  animation: none;
}

@keyframes pulse-ring {
  0%   { transform: scale(.7); opacity: .6; }
  80%  { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(1.4); opacity: 0; }
}

.status-hero-title {
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -0.8px;
  margin-bottom: 8px;
  transition: color .5s ease;
}

.status-hero-sub {
  font-size: 13.5px;
  color: var(--gray-500);
}

/* ─── METRICS GRID ───────────────────────────────────────────────────────────── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.metric-card {
  background: var(--gray-900);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius-lg);
  padding: 22px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color var(--transition);
}
.metric-card:hover { border-color: rgba(255,255,255,.15); }

.metric-icon { font-size: 22px; }

.metric-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-600);
  font-weight: 600;
}

.metric-value {
  font-size: 20px;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--white);
}

.metric-value--mono {
  font-family: monospace;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0;
}

/* Chip statut */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-family: var(--font-body);
  font-weight: 600;
}
.chip::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
}
.chip--green {
  background: rgba(34,197,94,.1);
  color: #4ade80;
  border: 1px solid rgba(34,197,94,.2);
}
.chip--green::before { background: #22c55e; box-shadow: 0 0 6px #22c55e; }
.chip--red {
  background: rgba(239,68,68,.1);
  color: #f87171;
  border: 1px solid rgba(239,68,68,.2);
}
.chip--red::before { background: #ef4444; }

/* Barre de ping */
.metric-bar-wrap {
  height: 3px;
  background: rgba(255,255,255,.06);
  border-radius: 99px;
  overflow: hidden;
}
.metric-bar {
  height: 100%;
  border-radius: 99px;
  transition: width .8s ease;
}

/* ─── HISTORIQUE ─────────────────────────────────────────────────────────────── */
.history-section {
  background: var(--gray-900);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius-lg);
  padding: 28px 28px 20px;
  margin-bottom: 20px;
}

.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.history-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.history-legend {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: var(--gray-500);
}

.legend-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 5px;
}
.legend-dot--green { background: var(--success); }
.legend-dot--red   { background: var(--error); }

/* Barres d'uptime */
.uptime-bars {
  display: flex;
  gap: 2px;
  height: 36px;
  align-items: flex-end;
  margin-bottom: 8px;
}

.uptime-bar {
  flex: 1;
  border-radius: 3px;
  transition: transform var(--transition), filter var(--transition);
  cursor: default;
  position: relative;
}
.uptime-bar:hover {
  transform: scaleY(1.1);
  filter: brightness(1.3);
}
.uptime-bar--online  { background: var(--success); opacity: .7; height: 100%; }
.uptime-bar--offline { background: var(--error);   opacity: .8; height: 100%; }
.uptime-bar--unknown { background: var(--gray-700); height: 60%; }

.uptime-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--gray-600);
}

/* ─── REFRESH NOTE ───────────────────────────────────────────────────────────── */
.refresh-note {
  text-align: center;
  font-size: 12.5px;
  color: var(--gray-600);
}

/* ─── NAV ACTIVE ─────────────────────────────────────────────────────────────── */
.nav-active { color: var(--white) !important; }

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .status-hero  { flex-direction: column; text-align: center; padding: 32px 24px; }
}
@media (max-width: 400px) {
  .metrics-grid { grid-template-columns: 1fr; }
}

/* ─── TOOLTIP BARRES ─────────────────────────────────────────────────────────── */
.uptime-bars {
  position: relative; /* pour positionner le tooltip */
}

.bar-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  background: var(--gray-800);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--gray-300);
  line-height: 1.6;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease;
  white-space: nowrap;
  z-index: 10;
  box-shadow: var(--shadow-md);
}
.bar-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── UPTIME PCT ─────────────────────────────────────────────────────────────── */
.uptime-pct { font-weight: 600; }
.uptime-pct--great { color: var(--success); }
.uptime-pct--good  { color: var(--warning); }
.uptime-pct--bad   { color: var(--error);   }

/* ─── LÉGENDE unknown ────────────────────────────────────────────────────────── */
.legend-dot--gray { background: var(--gray-700); }
.uptime-bar--unknown { background: var(--gray-800); height: 50%; opacity: .5; }

/* ─── INCIDENTS ──────────────────────────────────────────────────────────────── */
.incidents-section {
  background: var(--gray-900);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 20px;
}
.incidents-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 16px;
}
.no-incidents {
  font-size: 14px;
  color: var(--gray-500);
  padding: 8px 0;
}
.incident-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.incident-row:last-child { border-bottom: none; }
.incident-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--error);
  flex-shrink: 0;
}
.incident-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.incident-title { font-size: 13.5px; font-weight: 500; }
.incident-date  { font-size: 12px; color: var(--gray-500); }
.incident-badge {
  font-size: 11px;
  font-weight: 600;
  color: #4ade80;
  background: rgba(34,197,94,.08);
  border: 1px solid rgba(34,197,94,.2);
  padding: 3px 10px;
  border-radius: 999px;
}

/* ─── UPTIME PERIOD LABEL ────────────────────────────────────────────────────── */
.uptime-period {
  font-size: 10px;
  font-weight: 400;
  color: var(--gray-600);
  margin-left: 4px;
}

/* ─── INCIDENT EN COURS ──────────────────────────────────────────────────────── */
.incident-dot--ongoing {
  background: var(--warning);
  box-shadow: 0 0 6px var(--warning);
  animation: pulse-dot 2s infinite;
}
.incident-badge--ongoing {
  color: #fcd34d;
  background: rgba(245,158,11,.1);
  border-color: rgba(245,158,11,.25);
}
.incident-duration {
  font-weight: 400;
  color: var(--gray-500);
  font-size: 12px;
}

/* ─── GRAPHIQUE PING ─────────────────────────────────────────────────────────── */
.ping-chart-wrap {
  position: relative;
  width: 100%;
  margin-bottom: 10px;
}

#pingChart {
  width: 100% !important;
  display: block;
}

.ping-chart-empty {
  text-align: center;
  padding: 40px;
  color: var(--gray-600);
  font-size: 13.5px;
}

.ping-chart-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--gray-600);
  margin-top: 6px;
}

#pingAvg {
  font-weight: 600;
  color: var(--gray-400);
}

.ping-chart-legend {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: var(--gray-500);
}

.ping-legend-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 4px;
}
.ping-legend-dot--good { background: var(--success); }
.ping-legend-dot--warn { background: var(--warning); }
.ping-legend-dot--bad  { background: var(--error); }
