/* Palette inspirée des couleurs d'OVHcloud : bleu nuit, bleu vif, bleus clairs. */
:root {
  --nuit: #00185e; --marine: #000e9c; --bleu: #0050d7; --bleu-survol: #003fb0; --ciel: #bef1ff; --ciel-pale: #def8ff;
  --fond: #f5feff; --surface: #ffffff; --encre: #00185e; --doux: #4d5592; --trait: #bfd4f0;
  --stock: #006b3f; --stock-fond: #dcf5e7; --stock-trait: #6fcf9f;
  --alerte: #a35a00; --alerte-fond: #fff0d6; --erreur: #b3131b; --erreur-fond: #fde5e6;
  --bandeau: linear-gradient(110deg, #00185e 0%, #000e9c 55%, #0050d7 100%);
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fond: #000b2e; --surface: #001447; --encre: #eaf6ff; --doux: #a9bfe6; --trait: #1c3577;
    --bleu: #4bb2f6; --bleu-survol: #85d9fd; --ciel: #00308f; --ciel-pale: #001f66;
    --stock: #7be3ae; --stock-fond: #06331f; --stock-trait: #1e7a4d;
    --alerte: #ffc56e; --alerte-fond: #3d2a00; --erreur: #ff9aa0; --erreur-fond: #47090d;
    --bandeau: linear-gradient(110deg, #000724 0%, #000e6b 60%, #0037a3 100%);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--encre); font: 16px/1.5 "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow-x: hidden; }
a { color: var(--bleu); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h1 { font-size: 2rem; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 1.3rem; font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0; }
[hidden] { display: none !important; }
.cache-visuel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.page { max-width: 1240px; margin: 0 auto; padding: 0 20px 56px; }
/* Bandeaux pleine largeur sans toucher au HTML : l'ombre déborde, le rognage la limite en hauteur. */
.entete, .chapeau { box-shadow: 0 0 0 100vmax var(--nuit); clip-path: inset(0 -100vmax); background: var(--nuit); color: #fff; }
.entete { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; padding: 14px 0; }
.marque { font-weight: 700; font-size: 1.2rem; text-decoration: none; color: #fff; display: flex; align-items: center; gap: 10px; }
.marque::before { content: ""; width: 14px; height: 14px; border-radius: 4px; background: var(--ciel); box-shadow: 7px 7px 0 -2px #4bb2f6; margin-right: 6px; }
.entete nav { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.entete nav a { color: #fff; text-decoration: none; font-weight: 600; padding: 7px 14px; border-radius: 6px; }
.entete nav a:hover { background: rgb(255 255 255 / 0.12); }
.entete nav a[aria-current] { background: #fff; color: #00185e; }

.chapeau { background: var(--bandeau); box-shadow: none; clip-path: none; margin: 0 calc(50% - 50vw); padding: 44px calc(50vw - 50%) 40px; display: grid; gap: 12px; }
.chapeau p { color: #d6ecff; max-width: 64ch; font-size: 1.08rem; }
.chapeau .etat { font-family: var(--mono); font-size: 0.8rem; color: #bef1ff; }
.chapeau .etat.panne { color: #ffd0d3; font-weight: 600; }

.filtres { position: sticky; top: 0; z-index: 2; background: var(--surface); display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; padding: 14px 18px; margin-top: -22px; border: 1px solid var(--trait); border-radius: 10px; box-shadow: 0 6px 18px rgb(0 14 156 / 0.10); }
.groupe { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pastille { font: inherit; font-size: 0.92rem; font-weight: 600; padding: 6px 14px; border-radius: 6px; border: 1px solid var(--trait); background: var(--surface); color: var(--bleu); cursor: pointer; }
.pastille:hover { background: var(--ciel-pale); }
.pastille[aria-pressed="true"] { background: var(--bleu); color: #fff; border-color: var(--bleu); }
@media (prefers-color-scheme: dark) { .pastille[aria-pressed="true"], .bouton { color: #00185e !important; } }
.filtres input[type="search"] { font: inherit; padding: 7px 12px; border-radius: 6px; border: 1px solid var(--trait); background: var(--surface); color: inherit; min-width: 200px; }
.filtres label.coche { font-size: 0.95rem; font-weight: 600; display: flex; gap: 7px; align-items: center; cursor: pointer; }
input[type="checkbox"] { accent-color: var(--bleu); width: 1.05em; height: 1.05em; }

.gamme { margin-top: 36px; }
.gamme > header { display: flex; align-items: baseline; gap: 14px; padding-bottom: 10px; }
.gamme > header span { font-size: 0.9rem; color: var(--doux); }
.liste { background: var(--surface); border: 1px solid var(--trait); border-radius: 10px; overflow: hidden; }
.rangee { display: grid; grid-template-columns: minmax(140px, 0.9fr) minmax(200px, 1.9fr) minmax(220px, 2.2fr) auto auto; gap: 8px 22px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--trait); border-left: 4px solid transparent; }
.rangee:first-child { border-top: 0; }
.rangee.dispo { border-left-color: var(--stock); }
.rangee:hover { background: var(--ciel-pale); }
.l-nom { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.l-nom .code { flex-basis: 100%; }
.l-specs { font-size: 0.92rem; display: grid; gap: 2px; }
.l-prix { text-align: right; white-space: nowrap; display: grid; line-height: 1.2; }
.l-prix strong { font-size: 1.15rem; }
.l-prix span { font-size: 0.75rem; color: var(--doux); }
.l-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.badge { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 8px; border-radius: 999px; background: var(--ciel-pale); color: var(--doux); border: 1px solid var(--trait); }
.badge.ok { background: var(--stock-fond); color: var(--stock); border-color: var(--stock-trait); }
.code { font-family: var(--mono); font-size: 0.74rem; color: var(--doux); }
.specs { font-size: 0.88rem; color: var(--doux); }
.dcs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.dc { font-size: 0.76rem; padding: 3px 8px; border-radius: 5px; border: 1px solid var(--trait); color: var(--doux); background: var(--fond); }
.dc b { font-weight: 600; }
.dc.ok { border-color: var(--stock-trait); background: var(--stock-fond); color: var(--stock); }
.dc.ok b { font-weight: 700; }

.bouton { font: inherit; font-size: 0.95rem; font-weight: 700; display: inline-block; padding: 8px 16px; border-radius: 6px; border: 2px solid var(--bleu); background: var(--bleu); color: #fff; text-decoration: none; cursor: pointer; white-space: nowrap; }
.bouton:hover { background: var(--bleu-survol); border-color: var(--bleu-survol); }
.bouton.discret { background: transparent; color: var(--bleu) !important; }
.bouton.discret:hover { background: var(--ciel-pale); }
.bouton.danger { background: transparent; color: var(--erreur) !important; border-color: var(--erreur); }
.bouton.danger:hover { background: var(--erreur-fond); }
.bouton:disabled { opacity: 0.5; cursor: default; }
:focus-visible { outline: 3px solid #4bb2f6; outline-offset: 2px; }

.fil { margin-top: 44px; }
.fil ul { list-style: none; padding: 4px 18px; margin: 12px 0 0; background: var(--surface); border: 1px solid var(--trait); border-radius: 10px; font-size: 0.93rem; }
.fil li { display: grid; grid-template-columns: 9.5em 1fr; gap: 12px; padding: 8px 0; border-top: 1px solid var(--trait); }
.fil li:first-child { border-top: 0; }
.fil time { font-family: var(--mono); font-size: 0.78rem; color: var(--doux); }
.plus { color: var(--stock); font-weight: 700; }
.moins { color: var(--doux); }

.bloc { background: var(--surface); border: 1px solid var(--trait); border-radius: 10px; padding: 24px; margin-top: 22px; display: grid; gap: 14px; }
.bloc > p, .aide { color: var(--doux); font-size: 0.95rem; }
.formulaire { display: grid; gap: 16px; max-width: 660px; }
.champ { display: grid; gap: 5px; }
.champ > span, legend { font-weight: 700; font-size: 0.95rem; }
input[type="email"], input[type="text"], select { font: inherit; padding: 9px 11px; border-radius: 6px; border: 1px solid var(--trait); background: var(--surface); color: inherit; width: 100%; }
input:hover, select:hover { border-color: var(--bleu); }
fieldset { border: 1px solid var(--trait); border-radius: 8px; padding: 12px 16px 14px; margin: 0; display: grid; gap: 10px; }
.cases { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.95rem; }
.cases label { display: flex; gap: 7px; align-items: center; }
.ligne { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
span.ligne input { flex: 1 1 220px; width: auto; }
.message { margin-top: 22px; padding: 12px 16px; border-radius: 8px; background: var(--stock-fond); color: var(--stock); border: 1px solid var(--stock-trait); font-weight: 600; }
.message.erreur { background: var(--alerte-fond); color: var(--alerte); border-color: var(--alerte); }

.alertes { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.alertes li { border: 1px solid var(--trait); border-left: 4px solid var(--bleu); border-radius: 8px; padding: 12px 16px; display: grid; gap: 6px; }
.alertes li.pause { border-left-color: var(--trait); opacity: 0.7; }
.alertes .cible { font-weight: 700; font-size: 1.05rem; }
.alertes .detail { font-size: 0.9rem; color: var(--doux); }

.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 26px 0 0; }
.tuile { background: var(--surface); border: 1px solid var(--trait); border-top: 3px solid var(--bleu); border-radius: 8px; padding: 12px 14px; }
.tuile dt { font-size: 0.78rem; font-weight: 700; color: var(--doux); text-transform: uppercase; letter-spacing: 0.04em; }
.tuile dd { margin: 4px 0 0; font-size: 1.35rem; font-weight: 700; }
.tuile dd small { display: block; font-size: 0.78rem; font-weight: 400; color: var(--doux); line-height: 1.35; }
.tuile.souci { border-top-color: var(--erreur); }
.tuile.souci dd { color: var(--erreur); }
.onglets { margin-top: 28px; }
.defilant { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
th, td { text-align: left; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--trait); vertical-align: top; }
th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--doux); }
td.mono, td time { font-family: var(--mono); font-size: 0.78rem; white-space: nowrap; }
td.texte { white-space: pre-wrap; word-break: break-word; font-family: var(--mono); font-size: 0.78rem; }
.niveau-erreur { color: var(--erreur); font-weight: 700; }
.niveau-avert { color: var(--alerte); font-weight: 600; }

.pied { margin-top: 56px; padding-top: 16px; border-top: 1px solid var(--trait); font-size: 0.88rem; color: var(--doux); display: flex; flex-wrap: wrap; gap: 6px 20px; }
.prose { max-width: 70ch; display: grid; gap: 14px; padding-top: 32px; }
.prose h2 { margin-top: 12px; }

@media (max-width: 980px) {
  .rangee { grid-template-columns: 1fr auto; }
  .l-specs, .dcs { grid-column: 1 / -1; }
  .l-nom { grid-column: 1; grid-row: 1; }
  .l-prix { grid-column: 2; grid-row: 1; }
  .l-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 560px) {
  h1 { font-size: 1.5rem; }
  .chapeau { padding-top: 28px; padding-bottom: 36px; }
  .fil li { grid-template-columns: 1fr; gap: 0; }
  .filtres { position: static; }
}

.filtres select { font: inherit; padding: 7px 10px; border-radius: 6px; border: 1px solid var(--trait); background: var(--surface); color: inherit; width: auto; max-width: 100%; }
.lien-histo { font-size: 0.85rem; flex-basis: 100%; text-align: right; }
@media (max-width: 980px) { .lien-histo { flex-basis: auto; align-self: center; } }
