/* Charte Athéo : titres Prompt en majuscules bleu #112444 soulignés d'un trait rouge, texte Akrobat bleu #1B3163,
   bleu nuit #202344 (menu, en-têtes), rouge #D63746 pour la mise en valeur et le critique.
   Aucun style en ligne : la politique de sécurité du contenu n'autorise que cette feuille. */

@font-face { font-family: "Prompt"; src: url("../fonts/Prompt-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Prompt"; src: url("../fonts/Prompt-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Prompt"; src: url("../fonts/Prompt-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Akrobat"; src: url("../fonts/Akrobat-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Akrobat"; src: url("../fonts/Akrobat-SemiBold.otf") format("opentype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Akrobat"; src: url("../fonts/Akrobat-Bold.otf") format("opentype"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light;
  --title: #112444;        /* titres */
  --text: #1B3163;         /* texte courant (dk1) */
  --night: #202344;        /* menu, en-têtes (dk2) */
  --night-2: #2A2E57;      /* survol dans le menu */
  --red: #D63746;          /* accent1 : mise en valeur, critique */
  --red-dark: #B02533;
  --grey: #989CA2;         /* lt2 */
  --sage: #A6ADA4;         /* accent2 : opérationnel */
  --navy: #002060;         /* accent3 */
  --sand: #BD9D7E;         /* accent4 : alerte */
  --mist: #ADB9CA;         /* accent5 : inconnu */
  --rose: #EA9AA2;         /* accent6 */
  --line: #E1E5EC;
  --surface: #F4F6F9;
  --white: #FFFFFF;        /* texte sur fond bleu nuit ou rouge */
  --card: #FFFFFF;         /* fond des cartes, tableaux, champs */
  --thead: #F8F9FB; --row-hover: #FAFBFD; --err-bg: #FBEBED;
  --input-border: #C3C8D0;
  --outline: #202344;      /* traits de contour (topologie, bandeau des tuiles) */
  --btn: #202344; --btn-hover: #002060;
  --muted: #5A6275;
  --focus: #D63746;
  --ok-bg: #E9EDE8; --ok-fg: #2F4A2C; --ok-ring: #8C9688;
  --warn-bg: #F4EBE1; --warn-fg: #6B4A26; --warn-ring: #BD9D7E;
  --crit-bg: #D63746; --crit-fg: #FFFFFF; --crit-ring: #D63746;
  --unk-bg: #EEF1F5; --unk-fg: #1B3163; --unk-ring: #ADB9CA;
  --track: #E8EBF0;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(32, 35, 68, .06), 0 6px 18px rgba(32, 35, 68, .06);
  --sidebar: 248px;
}

/* Thème sombre : suit le système par défaut, ou le choix fait avec le bouton « Thème » (js/theme.js). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --title: #F2F5FF; --text: #D5DCF0; --muted: #A9B2CC; --line: #2E345C; --surface: #121429;
    --card: #1B1F3D; --thead: #232850; --row-hover: #222752; --err-bg: #4A2230; --input-border: #4A5380;
    --night: #0E1022; --night-2: #1B1F3F; --outline: #8E9AC8; --btn: #3A4A94; --btn-hover: #4D60B8;
    --navy: #9DB8FF; --red-dark: #E0485A; --focus: #FF8A96; --grey: #8A91A8; --track: #2A2F58;
    --ok-bg: #1F3A2A; --ok-fg: #B4E6C1; --ok-ring: #6FB584;
    --warn-bg: #43341F; --warn-fg: #F3D6A6; --warn-ring: #D6A85F;
    --crit-bg: #C8303F; --crit-fg: #FFFFFF; --crit-ring: #FF6B7A;
    --unk-bg: #262B52; --unk-fg: #D5DCF0; --unk-ring: #7E8CB5;
    --shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 6px 18px rgba(0, 0, 0, .35);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --title: #F2F5FF; --text: #D5DCF0; --muted: #A9B2CC; --line: #2E345C; --surface: #121429;
  --card: #1B1F3D; --thead: #232850; --row-hover: #222752; --err-bg: #4A2230; --input-border: #4A5380;
  --night: #0E1022; --night-2: #1B1F3F; --outline: #8E9AC8; --btn: #3A4A94; --btn-hover: #4D60B8;
  --navy: #9DB8FF; --red-dark: #E0485A; --focus: #FF8A96; --grey: #8A91A8; --track: #2A2F58;
  --ok-bg: #1F3A2A; --ok-fg: #B4E6C1; --ok-ring: #6FB584;
  --warn-bg: #43341F; --warn-fg: #F3D6A6; --warn-ring: #D6A85F;
  --crit-bg: #C8303F; --crit-fg: #FFFFFF; --crit-ring: #FF6B7A;
  --unk-bg: #262B52; --unk-fg: #D5DCF0; --unk-ring: #7E8CB5;
  --shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 6px 18px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html { font-size: 100%; }
body {
  margin: 0; background: var(--surface); color: var(--text);
  font-family: "Akrobat", "Segoe UI", Arial, sans-serif; font-size: 1.0625rem; line-height: 1.45;
}
a { color: var(--navy); text-underline-offset: 2px; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--card); color: var(--title); padding: .5rem 1rem; z-index: 20; }
.skip-link:focus { left: 1rem; top: .5rem; }

.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.icon--xl { width: 2.4rem; height: 2.4rem; }
.icon--ok { color: var(--ok-ring); }
.icon--warning { color: var(--warn-ring); }
.icon--critical { color: var(--red); }

/* Structure : menu latéral bleu nuit et espace de travail */
.shell { background: linear-gradient(to right, var(--night) var(--sidebar), transparent var(--sidebar)); display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--night); color: var(--white); padding: 1.25rem 0 1rem; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; flex-direction: column; gap: .6rem; color: var(--white); text-decoration: none; padding: 0 1.4rem 1.25rem; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.brand:hover { color: var(--white); }
.brand img { height: 30px; width: auto; display: block; align-self: flex-start; }
.brand__name { font-family: "Prompt", sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; opacity: .85; }
.nav__group { font-family: "Prompt", sans-serif; text-transform: uppercase; letter-spacing: .14em; font-size: .66rem; color: var(--mist); margin: 1.2rem 1.4rem .35rem; }
.nav { list-style: none; margin: 0; padding: 0 .7rem; display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: .7rem; color: rgba(255, 255, 255, .88); text-decoration: none; padding: .45rem .7rem; border-radius: var(--radius); font-weight: 600; letter-spacing: .02em; border-left: 3px solid transparent; }
.nav a .icon { opacity: .8; }
.nav a:hover { background: var(--night-2); color: var(--white); }
.nav a[aria-current="page"] { background: rgba(255, 255, 255, .1); color: var(--white); border-left-color: var(--red); }
.nav a[aria-current="page"] .icon { opacity: 1; }
.nav__count { margin-left: auto; min-width: 1.6rem; text-align: center; font-family: "Prompt", sans-serif; font-size: .72rem; font-weight: 700; padding: .05rem .4rem; border-radius: 999px; background: var(--sand); color: var(--night); }
.nav__count--critical { background: var(--red); color: var(--white); }
.sidebar__foot { margin: auto 1.4rem 0; padding-top: 1.5rem; font-size: .62rem; opacity: .6; }

.workspace { min-width: 0; display: flex; flex-direction: column; }
.topbar { background: var(--card); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 1rem; padding: .6rem 2rem; position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.topbar__search { flex: 1; min-width: 14rem; max-width: 34rem; display: flex; align-items: center; gap: .6rem; background: var(--card); border: 1px solid var(--input-border); border-radius: var(--radius); padding: 0 .85rem; color: var(--muted); }
.topbar__search:hover { border-color: var(--outline); }
.topbar__search input[type="search"] { flex: 1; min-width: 0; max-width: none; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: var(--text); padding: .55rem 0; -webkit-appearance: none; appearance: none; }
.topbar__search input[type="search"]::placeholder { color: var(--muted); opacity: 1; }
.topbar__search input[type="search"]:focus, .topbar__search input[type="search"]:focus-visible { outline: none; }
.topbar__search:focus-within { border-color: var(--focus); outline: 3px solid var(--focus); outline-offset: 1px; color: var(--title); }
.topbar__tools { display: flex; align-items: center; gap: 1rem; margin-left: auto; flex-wrap: wrap; }
.topbar form { margin: 0; }
.scope { display: flex; align-items: center; gap: .4rem; }
.scope label { font-weight: 600; color: var(--title); font-size: .95rem; }
.scope select { width: auto; min-width: 11rem; }
.user { display: flex; align-items: center; gap: .55rem; line-height: 1.15; font-size: .95rem; }
.user__avatar { width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--night); color: var(--white); display: grid; place-items: center; font-family: "Prompt", sans-serif; font-weight: 700; }
.user__role { color: var(--muted); font-size: .85rem; }

.subnav { background: var(--card); border-bottom: 1px solid var(--line); }
.subnav ul { margin: 0; padding: .3rem 2rem; display: flex; gap: .25rem; flex-wrap: wrap; list-style: none; }
.subnav a { display: block; text-decoration: none; font-weight: 600; padding: .45rem .75rem; border-bottom: 3px solid transparent; }
.subnav a[aria-current="page"] { color: var(--title); border-bottom-color: var(--red); }

main { width: 100%; max-width: 1440px; margin: 0 auto; padding: 1.5rem 2rem 3rem; flex: 1; }
main:focus { outline: none; }

/* Titres : Prompt majuscules, trait rouge court aligné à gauche */
h1, h2, h3 { font-family: "Prompt", sans-serif; color: var(--title); text-transform: uppercase; letter-spacing: .03em; line-height: 1.2; }
h1 { font-size: 1.55rem; font-weight: 700; margin: .25rem 0 1.25rem; }
h1::after { content: ""; display: block; width: 3.5rem; height: 4px; background: var(--red); margin-top: .5rem; }
h2 { font-size: 1.05rem; font-weight: 600; margin: 2rem 0 .9rem; }
h2::after { content: ""; display: block; width: 2.25rem; height: 3px; background: var(--red); margin-top: .35rem; }
h3 { font-size: .95rem; font-weight: 600; margin: 1rem 0 .5rem; }
.lead { font-size: 1.125rem; max-width: 75ch; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
strong, b { font-weight: 700; }
.highlight { color: var(--red); font-weight: 600; }

.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: .5rem; }
.page-head h1 { margin-bottom: .35rem; }
.page-head__meta { margin: 0 0 1rem; color: var(--muted); }
.page-head__actions { display: flex; gap: .6rem; flex-wrap: wrap; }

/* Cartes */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.25rem; }
.card--flush { padding: 0; }
.card--flush table { margin: 0; }
.card h2:first-child, .card__head h2 { margin-top: 0; }
.card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.card__head a { font-weight: 600; text-decoration: none; display: inline-flex; gap: .3rem; align-items: center; white-space: nowrap; }
.card__more { margin: .75rem 0 0; font-weight: 600; }
.split { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1.25rem; margin-top: 1.25rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.25rem; }
.empty { display: flex; gap: 1rem; align-items: center; padding: 1rem .25rem; }
.empty p { margin: 0; }

/* Anneaux d'état */
.ring { display: block; flex: none; }
.ring--sm { width: 64px; height: 64px; }
.ring--md { width: 92px; height: 92px; }
.ring--lg { width: 132px; height: 132px; }
.ring__track { fill: none; stroke: var(--track); stroke-width: 10; }
.ring__value { fill: none; stroke-width: 10; stroke-linecap: butt; stroke: var(--unk-ring); }
.ring--ok .ring__value, .ring__value--ok { stroke: var(--ok-ring); }
.ring--warning .ring__value, .ring__value--warning { stroke: var(--warn-ring); }
.ring--critical .ring__value, .ring__value--critical { stroke: var(--crit-ring); }
.ring__text { font-family: "Prompt", sans-serif; font-weight: 700; font-size: 17px; fill: var(--title); }
.ring--lg .ring__text { font-size: 19px; }
.ring__sub { font-family: "Akrobat", sans-serif; font-size: 10.5px; font-weight: 600; fill: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

.meter { width: 100%; max-width: 9rem; height: 8px; display: block; margin-top: .25rem; }
.meter__track { fill: var(--track); }
.meter__value { fill: var(--unk-ring); }
.meter--ok .meter__value { fill: var(--ok-ring); }
.meter--warning .meter__value { fill: var(--warn-ring); }
.meter--critical .meter__value { fill: var(--crit-ring); }

/* Bandeau d'état général */
.health { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 2.4fr); gap: 1.25rem; align-items: stretch; }
.health__main { display: flex; gap: 1.25rem; align-items: center; background: var(--night); color: var(--white); border-color: var(--night); }
.health__main .ring__track { stroke: rgba(255, 255, 255, .14); }
.health__main .ring__text { fill: var(--white); }
.health__main .ring__sub { fill: var(--mist); }
.health__title { font-family: "Prompt", sans-serif; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; margin: 0 0 .3rem; color: var(--mist); }
.health__value { font-size: 1.15rem; margin: 0 0 .6rem; }
.health__value strong { font-family: "Prompt", sans-serif; font-size: 1.6rem; }
.health__badges { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0; }
.domains { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.25rem; }
.domain { display: flex; gap: 1rem; align-items: center; }
.domain__title { margin: 0 0 .25rem; font-size: .85rem; }
.domain__detail { margin: 0; font-size: .98rem; }

/* Liste « À traiter » */
.alert-list, .due-list { list-style: none; margin: 0; padding: 0; }
.alert-item { display: flex; gap: .8rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.alert-item:first-child { border-top: 0; padding-top: .2rem; }
.alert-item > .icon { width: 1.4rem; height: 1.4rem; margin-top: .1rem; }
.alert-item p { margin: 0; }
.alert-item__title { font-weight: 700; }
.alert-item__title a { color: var(--title); text-decoration: none; }
.alert-item__title a:hover { color: var(--red); text-decoration: underline; }
.alert-item__detail { font-size: .98rem; }
.alert-item__meta { font-size: .88rem; color: var(--muted); }
.due { display: flex; gap: .9rem; align-items: center; padding: .6rem 0; border-top: 1px solid var(--line); }
.due:first-child { border-top: 0; }
.due__days { flex: none; width: 4.4rem; text-align: center; font-family: "Prompt", sans-serif; font-size: .8rem; padding: .35rem .2rem; border-radius: var(--radius); background: var(--unk-bg); text-transform: uppercase; }
.due__days strong { display: block; font-size: 1.2rem; }
.due--warning .due__days { background: var(--warn-bg); color: var(--warn-fg); }
.due--critical .due__days { background: var(--crit-bg); color: var(--crit-fg); }

/* Tuiles d'indicateurs */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.2rem; display: flex; gap: 1.1rem; align-items: flex-start; position: relative; overflow: hidden; }
.tile::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--outline); }
.tile--ok::before { background: var(--sage); }
.tile--warning::before { background: var(--sand); }
.tile--critical::before { background: var(--red); }
.tile__ring { padding-top: .2rem; }
.tile__body { display: flex; flex-direction: column; gap: .25rem; min-width: 0; flex: 1; }
.tile__title { font-family: "Prompt", sans-serif; text-transform: uppercase; font-size: .8rem; font-weight: 600; letter-spacing: .06em; color: var(--title); margin: 0; }
.tile__value { font-family: "Prompt", sans-serif; font-size: 1.75rem; font-weight: 700; color: var(--title); line-height: 1.1; margin: 0; }
.tile__value--na { font-size: 1.15rem; color: var(--muted); font-weight: 600; }
.tile__value .tile__detail { font-family: "Akrobat", sans-serif; font-weight: 400; font-size: 1rem; }
.tile__detail { margin: 0; font-size: 1rem; }
.tile__trend { margin: 0; font-size: .95rem; }
.tile__trend--up strong { color: var(--red-dark); }
.tile__link { margin-top: auto; padding-top: .45rem; font-weight: 600; }
.tile .badge { align-self: flex-start; }

/* Statuts : toujours un texte, jamais la couleur seule */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .55rem; border-radius: 999px; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.badge::before { font-weight: 700; }
.badge--ok { background: var(--ok-bg); color: var(--ok-fg); }
.badge--ok::before { content: "✓"; }
.badge--warning { background: var(--warn-bg); color: var(--warn-fg); }
.badge--warning::before { content: "!"; }
.badge--critical { background: var(--crit-bg); color: var(--crit-fg); }
.badge--critical::before { content: "✕"; }
.badge--unknown { background: var(--unk-bg); color: var(--unk-fg); }
.badge--unknown::before { content: "–"; }

/* Tableaux */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 1rem; background: var(--card); }
caption { text-align: left; font-weight: 600; padding: .5rem 0; color: var(--title); }
th, td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-family: "Prompt", sans-serif; font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--title); background: var(--thead); }
tbody th { font-weight: 700; color: var(--title); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:hover { background: var(--row-hover); }
.group-row th { background: var(--surface); font-family: "Prompt", sans-serif; font-size: .85rem; letter-spacing: .03em; }
td.num .meter { margin-left: auto; }
.table-wrap > table { border: 1px solid var(--line); border-radius: var(--radius); }

/* Formulaires */
form.stack { display: grid; gap: 1rem; max-width: 680px; }
.field { display: grid; gap: .3rem; }
.field label, .field legend { font-weight: 600; color: var(--title); }
.field .hint { font-size: .95rem; color: var(--muted); margin: 0; }
.field .error { color: var(--red-dark); font-weight: 600; margin: 0; }
input[type="text"], input[type="password"], input[type="number"], input[type="date"], input[type="month"], input[type="email"],
input[type="url"], input[type="search"], select, textarea {
  font: inherit; color: var(--text); padding: .45rem .6rem; border: 1px solid var(--input-border); border-radius: var(--radius); background: var(--card); width: 100%; max-width: 32rem;
}
textarea { min-height: 6rem; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border: 2px solid var(--red-dark); }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: .85rem 1.1rem 1.1rem; margin: 0; }
legend { font-family: "Prompt", sans-serif; text-transform: uppercase; letter-spacing: .04em; font-size: .85rem; font-weight: 600; color: var(--title); padding: 0 .35rem; }
.checkbox { display: flex; gap: .5rem; align-items: center; font-weight: 600; }
.checkbox input { width: 1.1rem; height: 1.1rem; }
.inline-form { display: inline; }
.filters { display: flex; gap: .75rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1rem; }
.filters .field { min-width: 10rem; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 12rem)); gap: .75rem; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 1rem; }

.button, button {
  font-family: "Prompt", sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; font-size: .78rem;
  background: var(--btn); color: var(--white); border: 2px solid var(--btn); padding: .6rem 1.05rem; border-radius: var(--radius); cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: .45rem;
}
.button:hover, button:hover { background: var(--btn-hover); border-color: var(--btn-hover); color: var(--white); }
.button--secondary, button.button--secondary { background: var(--card); color: var(--title); }
.button--secondary:hover, button.button--secondary:hover { background: var(--surface); color: var(--title); }
.button--danger { background: var(--red); border-color: var(--red); }
.button--danger:hover { background: var(--red-dark); border-color: var(--red-dark); }
.button--small { padding: .35rem .7rem; font-size: .72rem; }
.link-button { background: none; border: none; color: var(--navy); padding: .4rem .25rem; text-transform: none; font-family: inherit; font-size: .95rem; letter-spacing: 0; text-decoration: underline; font-weight: 600; }
.link-button:hover { background: none; border: none; color: var(--red); }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin: 1rem 0; }

/* Onglets de filtre */
.tabs { display: flex; gap: .25rem; flex-wrap: wrap; list-style: none; padding: 0; margin: 0 0 1rem; border-bottom: 1px solid var(--line); }
.tabs a { display: block; padding: .5rem .85rem; text-decoration: none; font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a[aria-current="page"] { color: var(--title); border-bottom-color: var(--red); }

/* Messages */
.notice { border-left: 4px solid var(--night); background: var(--card); padding: .75rem 1rem; margin: 1rem 0; max-width: 90ch; border-radius: 0 var(--radius) var(--radius) 0; box-shadow: var(--shadow); }
.notice--ok { border-left-color: var(--sage); }
.notice--warning { border-left-color: var(--sand); background: var(--warn-bg); }
.notice--error { border-left-color: var(--red); background: var(--err-bg); }
.notice--info { border-left-color: var(--mist); }
.notice p { margin: .2rem 0; }
.welcome { max-width: 75ch; }

/* Graphiques */
.chart { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.1rem; margin: 1rem 0; }
.chart__canvas { position: relative; height: 320px; }
.chart details { margin-top: .75rem; }
.chart summary { cursor: pointer; font-weight: 600; }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.25rem; margin: 0; }
dl.facts dt { font-weight: 700; color: var(--title); }
dl.facts dd { margin: 0; }

/* Topologie */
.topology { width: 100%; height: auto; display: block; }
.topology__line { stroke: var(--mist); stroke-width: 1.6; }
.topology__node rect { fill: var(--card); stroke: var(--outline); stroke-width: 1.5; }
.topology__node--switch rect { fill: var(--night); }
.topology__node--unknown rect { stroke-dasharray: 4 3; stroke: var(--grey); }
.topology__node text { font-family: "Akrobat", sans-serif; font-size: 13px; font-weight: 600; fill: var(--title); }
.topology__node--switch text { fill: var(--white); }
.topology__port { font-family: "Akrobat", sans-serif; font-size: 11px; fill: var(--muted); }

/* Connexion */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(280px, 1fr) minmax(320px, 520px); background: var(--card); }
.login__brand { background: var(--night); color: var(--white); padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; }
.login__brand img { width: 220px; height: auto; }
.login__brand .tagline { font-family: "Prompt", sans-serif; letter-spacing: .35em; text-transform: uppercase; font-size: .8rem; opacity: .85; }
.login__brand h1 { color: var(--white); font-size: 2rem; }
.login__form { padding: 3rem; display: flex; flex-direction: column; justify-content: center; max-width: none; margin: 0; }
@media (max-width: 760px) { .login { grid-template-columns: 1fr; } .login__brand { padding: 2rem; } }

/* Pied de page */
.footer { color: var(--muted); font-size: .8rem; }
.footer__inner { max-width: 1440px; margin: 0 auto; padding: 1rem 2rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; border-top: 1px solid var(--line); }
.spaced { font-family: "Prompt", sans-serif; letter-spacing: .35em; text-transform: uppercase; }

/* Rapport : en-tête bleu nuit, imprimable sans menu */
.report { background: var(--card); }
.report main { max-width: 1100px; }
.report-header { background: var(--night); color: var(--white); padding: 1.25rem 2rem; display: flex; justify-content: space-between; align-items: center; }
.report-header img { height: 40px; width: auto; }
.report-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; list-style: none; padding: 0; margin: 0; }
.report-kpis li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem; border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem .5rem; }
.report-kpis p { margin: 0; }
.delta--up { color: var(--red-dark); font-weight: 700; }
.delta--down { color: var(--ok-fg); font-weight: 700; }
.changes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.changes ul { margin: .3rem 0 0; padding-left: 1.1rem; }

@media (max-width: 1100px) {
  .split, .health { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; background: none; }
  .sidebar { position: static; height: auto; padding: .75rem 0 .5rem; }
  .brand { flex-direction: row; align-items: center; padding: 0 1rem .75rem; }
  .sidebar nav { display: flex; overflow-x: auto; gap: .25rem; padding: .5rem .5rem 0; }
  .nav__group, .sidebar__foot { display: none; }
  .nav { display: flex; padding: 0; }
  .nav a { white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; border-radius: 0; }
  .nav a[aria-current="page"] { border-bottom-color: var(--red); }
  .domains { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .domain { flex-direction: column; text-align: center; padding: .75rem .5rem; }
  .topbar, main, .subnav ul, .footer__inner { padding-left: 1rem; padding-right: 1rem; }
}

@media print {
  .sidebar, .topbar, .subnav, .footer, .no-print, .skip-link { display: none !important; }
  .shell { display: block; background: none; }
  main { max-width: none; padding: 0; }
  body { font-size: 11pt; background: var(--card); }
  .report-header, .badge, .ring, .tile::before { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .card, .tile, .chart, table { box-shadow: none; break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.h-like { font-family: "Prompt", sans-serif; text-transform: uppercase; font-size: 1.6rem; letter-spacing: .04em; margin: .25rem 0 .75rem; }

.refresh { margin: 0 0 .75rem; font-size: .875rem; }

@media print {
  :root:root:root {
    color-scheme: light;
    --title: #112444; --text: #1B3163; --muted: #5A6275; --line: #E1E5EC; --surface: #F4F6F9; --card: #FFFFFF;
    --thead: #F8F9FB; --row-hover: #FAFBFD; --err-bg: #FBEBED; --input-border: #C3C8D0; --night: #202344;
    --outline: #202344; --navy: #002060;
  }
}
.theme-toggle { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; padding: 0; border-radius: 50%; background: var(--card); border: 1px solid var(--input-border); color: var(--title); cursor: pointer; }
.theme-toggle:hover { background: var(--surface); border-color: var(--outline); color: var(--title); }
.theme-toggle__icon { display: none; width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle__icon .fill { fill: currentColor; }
.theme-toggle[data-mode="auto"] .theme-toggle__icon--auto, .theme-toggle[data-mode="light"] .theme-toggle__icon--light, .theme-toggle[data-mode="dark"] .theme-toggle__icon--dark { display: block; }
.tabs ul { list-style: none; display: flex; flex-wrap: wrap; gap: 1.25rem; padding: 0; margin: 1rem 0; border-bottom: 1px solid var(--line); }
.tabs a { display: inline-block; padding: .4rem .1rem; text-decoration: none; font-weight: 600; border-bottom: 3px solid transparent; }
.tabs a[aria-current="page"] { color: var(--title); border-bottom-color: var(--red); }
