/* ════════════════════════════════════════════════════════════════════
   Statut Ogerant — page de statut statique.
   Mêmes tokens que guide/assets/guide.css (charte éditoriale Ogerant :
   crème, marine, violet officiel, accent rouge). `.dark` sur <html>
   reste un choix explicite. Zéro build, zéro dépendance.
   ════════════════════════════════════════════════════════════════════ */
@import url("https://fonts.googleapis.com/css2?family=Public+Sans:wght@400;500;600;700;800&display=swap");

:root {
	--background: 36 33% 97%;
	--foreground: 227 85% 18%;
	--card: 0 0% 100%;
	--muted: 264 36% 96%;
	--muted-foreground: 252 16% 38%;
	--faint: 250 11% 47%;
	--border: 250 26% 89%;

	--primary: 259 69% 39%;
	--accent: 264 79% 74%;
	--accent-soft: 264 56% 95%;
	--primary-foreground: 0 0% 100%;
	--ring: 259 69% 39%;

	--success: 153 57% 41%;
	--success-deep: 154 61% 21%;
	--success-soft: 136 33% 94%;
	--warn: 45 67% 36%;
	--warn-deep: 43 100% 19%;
	--warn-soft: 44 76% 95%;
	--danger: 357 54% 41%;
	--danger-soft: 0 70% 96%;

	--radius: 14px;
	--radius-lg: 24px;
	--font-body: "Public Sans", ui-sans-serif, system-ui, sans-serif;
	--header-h: 68px;
	--content-max: 880px;
}

.dark {
	--background: 0 0% 7%;
	--foreground: 0 0% 96%;
	--card: 0 0% 10.2%;
	--muted: 0 0% 14.5%;
	--muted-foreground: 0 0% 65%;
	--faint: 0 0% 52%;
	--border: 0 0% 16.5%;

	--primary: 258 60% 63%;
	--accent: 258 68% 72%;
	--accent-soft: 258 26% 19%;
	--ring: 258 68% 72%;

	--success: 153 50% 52%;
	--success-deep: 145 45% 78%;
	--success-soft: 152 30% 13%;
	--warn: 44 75% 58%;
	--warn-deep: 45 80% 78%;
	--warn-soft: 44 40% 12%;
	--danger: 357 65% 64%;
	--danger-soft: 357 35% 14%;
	color-scheme: dark;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
	font-family: var(--font-body);
	/* Aurore violette en tête de page — même recette que le guide et la landing. */
	min-height: 100vh;
	background:
		radial-gradient(1100px 620px at 88% -8%, hsl(var(--accent) / 0.2), transparent 66%),
		radial-gradient(820px 520px at 4% -10%, hsl(var(--primary) / 0.12), transparent 62%),
		hsl(var(--background));
	color: hsl(var(--foreground));
	line-height: 1.65;
	font-size: 15px;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
::selection { background: hsl(var(--primary) / 0.25); }
:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; border-radius: 6px; }

/* ── Header (même gabarit que le guide) ── */
.st-header {
	position: fixed;
	inset-inline: 0;
	top: 0;
	z-index: 50;
	height: var(--header-h);
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 0 20px;
	background: hsl(var(--card) / 0.85);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid hsl(var(--border));
}
/* Liseré de marque 3px — même signature que le header du guide. */
.st-header::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: 3px;
	background: linear-gradient(90deg, #4a1fa8, #b089f2 72%, #cd223b);
}
.st-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.st-brand img { height: 28px; width: auto; }
.st-brand-page {
	font-size: 13px;
	font-weight: 600;
	color: hsl(var(--primary));
	background: hsl(var(--accent-soft));
	padding: 2px 10px;
	border-radius: 999px;
}
.st-header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.st-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	border: 1px solid hsl(var(--border));
	color: hsl(var(--muted-foreground));
}
.st-icon-btn:hover { background: hsl(var(--muted)); }
.st-icon-btn svg { width: 17px; height: 17px; }
.st-icon-btn .i-moon { display: none; }
.dark .st-icon-btn .i-sun { display: none; }
.dark .st-icon-btn .i-moon { display: block; }
.st-app-link {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 13.5px;
	font-weight: 600;
	color: hsl(var(--primary-foreground));
	background: hsl(var(--primary));
	padding: 8px 14px;
	border-radius: 10px;
}
.st-app-link:hover { filter: brightness(1.1); }
.st-app-link svg { width: 13px; height: 13px; }

/* ── Layout ── */
.st-main {
	max-width: var(--content-max);
	margin: 0 auto;
	padding: calc(var(--header-h) + 40px) 20px 64px;
	display: grid;
	gap: 40px;
}
.st-section-title {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: hsl(var(--faint));
	margin-bottom: 14px;
}

/* ── Bandeau d'état global — carte avec la composition architecturale
      (même traitement que le hero du guide : art à droite, fondu de
      lisibilité à gauche, teinte pilotée par --hero-bg selon l'état). ── */
.st-hero {
	--hero-bg: #f8f3ed;
	position: relative;
	display: flex;
	align-items: center;
	min-height: 280px;
	padding: clamp(28px, 4vw, 48px);
	overflow: clip;
	border-radius: var(--radius-lg);
	border: 1px solid hsl(var(--success) / 0.35);
	background: var(--hero-bg);
	box-shadow: 0 42px 100px -72px rgb(7 25 87 / 55%);
}
.st-hero::after {
	content: "";
	position: absolute;
	z-index: 1;
	inset: 0;
	background: linear-gradient(
		90deg,
		var(--hero-bg) 0%,
		color-mix(in srgb, var(--hero-bg) 98%, transparent) 37%,
		color-mix(in srgb, var(--hero-bg) 72%, transparent) 54%,
		color-mix(in srgb, var(--hero-bg) 8%, transparent) 78%,
		transparent 100%
	);
	pointer-events: none;
}
.st-hero-copy {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 18px;
	width: 60%;
	max-width: 560px;
}
.st-hero-art {
	position: absolute;
	z-index: 0;
	inset-block: 0;
	inset-inline-end: 0;
	display: block;
	width: 58%;
	height: 100%;
	pointer-events: none;
	user-select: none;
}
.st-hero-art img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 60% 34%;
}
.dark .st-hero { --hero-bg: #130c28; }
.dark .st-hero::after {
	background: linear-gradient(
		90deg,
		var(--hero-bg) 0%,
		color-mix(in srgb, var(--hero-bg) 98%, transparent) 37%,
		color-mix(in srgb, var(--hero-bg) 78%, transparent) 56%,
		color-mix(in srgb, var(--hero-bg) 20%, transparent) 80%,
		transparent 100%
	);
}
.dark .st-hero-art { opacity: 0.72; }
.st-hero h1 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; line-height: 1.25; color: hsl(var(--success-deep)); text-wrap: balance; }
.st-hero p { font-size: 13.5px; color: hsl(var(--muted-foreground)); margin-top: 6px; }
.st-dot {
	flex: none;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: hsl(var(--success));
	box-shadow: 0 0 0 0 hsl(var(--success) / 0.45);
	animation: st-pulse 2.4s ease-out infinite;
}
@keyframes st-pulse {
	0% { box-shadow: 0 0 0 0 hsl(var(--success) / 0.45); }
	70% { box-shadow: 0 0 0 12px hsl(var(--success) / 0); }
	100% { box-shadow: 0 0 0 0 hsl(var(--success) / 0); }
}
@media (prefers-reduced-motion: reduce) { .st-dot { animation: none; } }

/* Variantes du bandeau : passer la classe sur <section class="st-hero"> */
.st-hero.is-degraded { --hero-bg: hsl(var(--warn-soft)); border-color: hsl(var(--warn) / 0.4); }
.st-hero.is-degraded h1 { color: hsl(var(--warn-deep)); }
.st-hero.is-degraded .st-dot { background: hsl(var(--warn)); box-shadow: none; animation: none; }
.st-hero.is-down { --hero-bg: hsl(var(--danger-soft)); border-color: hsl(var(--danger) / 0.4); }
.st-hero.is-down h1 { color: hsl(var(--danger)); }
.st-hero.is-down .st-dot { background: hsl(var(--danger)); box-shadow: none; animation: none; }

/* ── Services ── */
.st-services {
	background: hsl(var(--card));
	border: 1px solid hsl(var(--border));
	border-radius: var(--radius-lg);
	overflow: hidden;
}
.st-service {
	display: grid;
	grid-template-columns: minmax(200px, 260px) 1fr auto;
	gap: 8px 24px;
	align-items: center;
	padding: 18px 24px;
}
.st-service + .st-service { border-top: 1px solid hsl(var(--border)); }
.st-service-name { font-weight: 600; font-size: 14.5px; }
.st-service-name small { display: block; font-weight: 400; font-size: 12.5px; color: hsl(var(--faint)); }
.st-uptime { min-width: 0; }
.st-uptime-bar { display: flex; gap: 2px; height: 26px; }
.st-uptime-bar span { flex: 1 1 0; min-width: 1px; border-radius: 2px; background: hsl(var(--success)); }
.st-uptime-bar span.nodata { background: hsl(var(--border)); }
.st-uptime-bar span.degraded { background: hsl(var(--warn)); }
.st-uptime-bar span.down { background: hsl(var(--danger)); }
.st-uptime-meta {
	display: flex;
	justify-content: space-between;
	font-size: 11.5px;
	color: hsl(var(--faint));
	margin-top: 5px;
}
.st-pill {
	font-size: 12.5px;
	font-weight: 600;
	padding: 4px 12px;
	border-radius: 999px;
	white-space: nowrap;
	color: hsl(var(--success-deep));
	background: hsl(var(--success-soft));
	border: 1px solid hsl(var(--success) / 0.3);
}
.st-pill.is-degraded { color: hsl(var(--warn-deep)); background: hsl(var(--warn-soft)); border-color: hsl(var(--warn) / 0.35); }
.st-pill.is-down { color: hsl(var(--danger)); background: hsl(var(--danger-soft)); border-color: hsl(var(--danger) / 0.35); }
.st-pill.is-maint { color: hsl(var(--primary)); background: hsl(var(--accent-soft)); border-color: hsl(var(--primary) / 0.3); }
.st-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	margin-top: 12px;
	font-size: 12px;
	color: hsl(var(--faint));
}
.st-legend i {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 2px;
	margin-inline-end: 6px;
	vertical-align: baseline;
}
.st-legend .l-ok { background: hsl(var(--success)); }
.st-legend .l-degraded { background: hsl(var(--warn)); }
.st-legend .l-down { background: hsl(var(--danger)); }
.st-legend .l-nodata { background: hsl(var(--border)); }

/* ── Incidents & maintenances ── */
.st-empty {
	background: hsl(var(--card));
	border: 1px dashed hsl(var(--border));
	border-radius: var(--radius);
	padding: 22px 24px;
	font-size: 14px;
	color: hsl(var(--muted-foreground));
}
.st-month { font-size: 14px; font-weight: 700; color: hsl(var(--muted-foreground)); margin: 22px 0 10px; }
.st-incident {
	background: hsl(var(--card));
	border: 1px solid hsl(var(--border));
	border-radius: var(--radius);
	padding: 20px 24px;
	margin-bottom: 14px;
}
.st-incident-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 4px; }
.st-incident-head h3 { font-size: 15.5px; font-weight: 700; }
.st-incident-date { font-size: 12.5px; color: hsl(var(--faint)); margin-bottom: 12px; }
.st-incident-services { font-size: 12.5px; color: hsl(var(--muted-foreground)); margin-bottom: 12px; }
.st-timeline { list-style: none; display: grid; gap: 8px; border-inline-start: 2px solid hsl(var(--border)); padding-inline-start: 16px; }
.st-timeline li { font-size: 13.5px; }
.st-timeline b { font-weight: 600; }
.st-timeline time { color: hsl(var(--faint)); font-size: 12px; margin-inline-start: 6px; }

/* ── Aide / contact ── */
.st-help {
	background: hsl(var(--accent-soft));
	border: 1px solid hsl(var(--primary) / 0.2);
	border-radius: var(--radius-lg);
	padding: 22px 26px;
	font-size: 14px;
}
.st-help a { color: hsl(var(--primary)); font-weight: 600; }
.st-help a:hover { text-decoration: underline; }

/* ── Footer (même gabarit que le guide) ── */
.st-footer {
	max-width: var(--content-max);
	margin: 0 auto;
	padding: 24px 20px 40px;
	display: flex;
	flex-wrap: wrap;
	gap: 10px 24px;
	justify-content: space-between;
	font-size: 13px;
	color: hsl(var(--faint));
	border-top: 1px solid hsl(var(--border));
}
.st-footer a:hover { color: hsl(var(--primary)); }
.st-footer .foot-links { display: flex; flex-wrap: wrap; gap: 16px; }

/* ── Responsive ── */
@media (max-width: 720px) {
	.st-service { grid-template-columns: 1fr auto; }
	.st-service .st-uptime { grid-column: 1 / -1; order: 3; }
	.st-hero { min-height: 0; padding: 24px 20px 250px; }
	.st-hero-copy { width: 100%; max-width: none; }
	.st-hero-art { inset-block: auto 0; width: 100%; height: 230px; }
	.st-hero-art img { object-position: 58% 69%; }
	.st-hero::after {
		background: linear-gradient(
			180deg,
			var(--hero-bg) 0%,
			color-mix(in srgb, var(--hero-bg) 85%, transparent) 30%,
			transparent 55%
		);
	}
	.st-hero h1 { font-size: 20px; }
	.st-app-link span { display: none; }
	.st-app-link { padding: 8px 10px; }
}
