/*
 * Page d'état APC34 : charte d'Oasis (docs/ux/charte.md), sans script ni ressource tierce ;
 * couleurs doublées d'un texte. La page est déposée seule sur l'hébergement mutualisé : les
 * valeurs des jetons sont RECOPIÉES de apps/web/src/design/tokens.css (mêmes noms), le logo de
 * apps/web/src/design/assets/ et les polices Manrope et Sora du thème Keycloak (ressources/).
 * Contrastes AA de la charte (texte, états sur leur fond, mode sombre).
 */
@font-face {
  font-family: 'Manrope Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('ressources/manrope-latin-wght-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Sora Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url('ressources/sora-latin-wght-normal.woff2') format('woff2-variations');
}
:root {
  color-scheme: light;
  --bg: #f3f6fa;
  --surface: #ffffff;
  --surface-muted: #eaf1fa;
  --line: #dce3ea;
  --line-strong: #788aa0;
  --text: #09223e;
  --text-muted: #566a81;
  --accent: #0753a4;
  --primary: #c23d00;
  --primary-hover: #a83500;
  --orange-strong: #c23d00;
  --focus: #c23d00;
  --header-bg: #082746;
  --header-text: #ffffff;
  --header-muted: #d6e2ef;
  --ok: #17703d;
  --ok-soft: #e6f4ec;
  --warning: #9a5b00;
  --warning-soft: #fff4e0;
  --critical: #b3261e;
  --critical-soft: #fdecea;
  --info: #0753a4;
  --info-soft: #e6eef8;
  --inconnu: #566a81;
  --inconnu-soft: #eaf1fa;
  --radius: 12px;
  --radius-small: 8px;
  --shadow: 0 1px 2px rgb(8 39 70 / 6%), 0 4px 16px rgb(8 39 70 / 6%);
  --font-text: 'Manrope Variable', 'Segoe UI', Arial, sans-serif;
  --font-title: 'Sora Variable', 'Manrope Variable', 'Segoe UI', Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #102338;
    --surface: #19344e;
    --surface-muted: #23435f;
    --line: #2c5070;
    --line-strong: #668fb3;
    --text: #ecf2fa;
    --text-muted: #b4c6d9;
    --accent: #8fbcff;
    --orange-strong: #ff9466;
    --focus: #ff9466;
    --header-bg: #0b1c2e;
    --header-text: #ecf2fa;
    --header-muted: #b4c6d9;
    --ok: #6fd39a;
    --ok-soft: #12321f;
    --warning: #f2b45a;
    --warning-soft: #3a2a0d;
    --critical: #ff8a80;
    --critical-soft: #3d1614;
    --info: #8fbcff;
    --info-soft: #1d3d60;
    --inconnu: #b4c6d9;
    --inconnu-soft: #23435f;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 4px 16px rgb(0 0 0 / 30%);
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.5 var(--font-text);
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
a {
  color: var(--accent);
}
/* Barre du haut bleu nuit, logo APC34 sur plaque blanche (charte). */
.barre {
  background: var(--header-bg);
  color: var(--header-text);
}
.barre > div {
  max-width: 760px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}
.barre-logo {
  display: inline-flex;
  background: #ffffff;
  border-radius: var(--radius-small);
  padding: 3px 6px;
}
.barre-logo img {
  display: block;
  height: 34px;
  width: auto;
}
.barre p {
  margin: 0;
  color: var(--header-muted);
  font-size: 0.875rem;
  font-weight: 600;
}
main {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}
h1,
h2 {
  font-family: var(--font-title);
  letter-spacing: -0.01em;
  line-height: 1.25;
}
h1 {
  margin: 0 0 16px;
  font-size: clamp(1.45rem, 1.1rem + 1.2vw, 1.95rem);
  font-weight: 750;
}
h2 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 28px 0 10px;
}
.sur-titre {
  margin: 0;
  color: var(--orange-strong);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
section {
  margin-top: 16px;
}
.bandeau,
.annonce,
.services,
.incidents,
.carte {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
}
.bandeau {
  border-left-width: 6px;
}
.bandeau p,
.annonce p {
  margin: 4px 0;
}
.bandeau-titre {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.15rem;
}
.bandeau.etat-ok {
  border-left-color: var(--ok);
}
.bandeau.etat-degrade {
  border-left-color: var(--warning);
}
.bandeau.etat-panne {
  border-left-color: var(--critical);
}
.bandeau.etat-maintenance {
  border-left-color: var(--info);
}
.bandeau.etat-inconnu {
  border-left-color: var(--inconnu);
}
.annonce {
  border-left: 6px solid var(--info);
}
.annonce h2 {
  margin: 0 0 6px;
}
ul.services,
ul.incidents {
  list-style: none;
  margin: 0;
  padding: 0 16px;
}
.services li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.incidents li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.services li:last-child,
.incidents li:last-child {
  border-bottom: 0;
}
span.etat {
  font-weight: 650;
  font-size: 0.875rem;
  padding: 2px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
span.etat-ok {
  color: var(--ok);
  background: var(--ok-soft);
}
span.etat-degrade {
  color: var(--warning);
  background: var(--warning-soft);
}
span.etat-panne {
  color: var(--critical);
  background: var(--critical-soft);
}
span.etat-maintenance {
  color: var(--info);
  background: var(--info-soft);
}
span.etat-inconnu {
  color: var(--inconnu);
  background: var(--inconnu-soft);
}
footer {
  margin-top: 32px;
  color: var(--text-muted);
  font-size: 0.875rem;
}
/* Administration */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.carte {
  overflow-x: auto;
}
th,
td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  background: var(--surface-muted);
}
label {
  display: block;
  margin: 10px 0 4px;
  font-weight: 650;
}
input,
textarea,
button {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  padding: 8px 10px;
  max-width: 100%;
  min-height: 44px;
}
textarea {
  width: 100%;
  min-height: 70px;
}
button {
  cursor: pointer;
  font-weight: 650;
  margin-top: 12px;
}
button:hover {
  background: var(--surface-muted);
}
/* Action principale : orange foncé, texte blanc 5,3:1 (mêmes valeurs en mode sombre). */
button.principal {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}
button.principal:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}
.message {
  padding: 10px 14px;
  border-radius: var(--radius-small);
  background: var(--info-soft);
  border-left: 4px solid var(--info);
}
.message.erreur {
  background: var(--critical-soft);
  color: var(--critical);
  border-left-color: var(--critical);
}
form.ligne {
  display: inline;
}
code {
  overflow-wrap: anywhere;
}
