/* Console NetBridge.

   Sobre et dense : fonds neutres froids, bordures fines, le bleu NetBridge
   comme seule couleur vive (actions, etat actif, liens). Ni halo ni lueur
   dans la console ; un seul degrade discret, sur les pages autonomes.

   Polices Geist et Geist Mono (licence OFL, polices/OFL.txt), servies par
   la console elle-meme : aucun appel a un service tiers (RGPD), repli sur
   les polices du systeme.

   Coins : 8px pour ce qui se clique ou se saisit (boutons, champs), 12px
   pour les cartes, 14px pour les fenetres ; pilule seulement pour les
   pastilles d'etat et les interrupteurs.

   Deux themes : le sombre suit le reglage du systeme, sauf choix explicite
   retenu dans le navigateur (data-theme="clair" | "sombre"). */

@font-face {
  font-family: "Geist"; src: url("polices/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Geist Mono"; src: url("polices/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  color-scheme: light;
  --bleu: #2563eb;
  --bleu-vif: #1d4ed8;
  --bleu-survol: #1e55d6;
  --bleu-doux: rgba(37, 99, 235, .08);
  --bleu-bord: rgba(37, 99, 235, .28);
  --sur-bleu: #ffffff;
  --fond: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f3f4f7;
  --surface-pleine: #ffffff;
  --champ: #ffffff;
  --survol: rgba(17, 24, 39, .045);
  --bord: #e4e6eb;
  --bord-fort: #d3d6dd;
  --texte: #0f1115;
  --doux: #5a606c;
  --pale: #737985;
  --volet: #fbfbfc;
  --volet-bord: #e8eaee;
  --halo: rgba(37, 99, 235, .10);
  --ok: #047857;
  --ok-fond: rgba(4, 120, 87, .09);
  --alerte: #a14b07;
  --alerte-fond: rgba(217, 119, 6, .11);
  --erreur: #c81e1e;
  --erreur-fond: rgba(220, 38, 38, .08);
  --ombre: 0 1px 2px rgba(17, 24, 39, .04);
  --ombre-haute: 0 24px 60px -18px rgba(17, 24, 39, .28), 0 2px 6px rgba(17, 24, 39, .06);
  --voile: rgba(17, 24, 39, .38);
  --rayon: 12px;
  --rayon-petit: 8px;
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --titre: var(--sans);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="clair"]) {
    color-scheme: dark;
    --bleu: #3b82f6;
    --bleu-vif: #8db4ff;
    --bleu-survol: #5a95f8;
    --bleu-doux: rgba(59, 130, 246, .14);
    --bleu-bord: rgba(59, 130, 246, .38);
    --fond: #0b0c0e;
    --surface: #111214;
    --surface-2: #17181b;
    --surface-pleine: #141518;
    --champ: #0e0f11;
    --survol: rgba(255, 255, 255, .045);
    --bord: rgba(255, 255, 255, .075);
    --bord-fort: rgba(255, 255, 255, .13);
    --texte: #ececee;
    --doux: #a1a5ad;
    --pale: #80858e;
    --volet: #0d0e10;
    --volet-bord: rgba(255, 255, 255, .06);
    --halo: rgba(59, 130, 246, .16);
    --ok: #34d399;
    --ok-fond: rgba(52, 211, 153, .11);
    --alerte: #fbbf24;
    --alerte-fond: rgba(251, 191, 36, .11);
    --erreur: #f87171;
    --erreur-fond: rgba(248, 113, 113, .11);
    --ombre: none;
    --ombre-haute: 0 24px 70px -18px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .04);
    --voile: rgba(4, 5, 7, .7);
  }
}

:root[data-theme="sombre"] {
  color-scheme: dark;
  --bleu: #3b82f6;
  --bleu-vif: #8db4ff;
  --bleu-survol: #5a95f8;
  --bleu-doux: rgba(59, 130, 246, .14);
  --bleu-bord: rgba(59, 130, 246, .38);
  --fond: #0b0c0e;
  --surface: #111214;
  --surface-2: #17181b;
  --surface-pleine: #141518;
  --champ: #0e0f11;
  --survol: rgba(255, 255, 255, .045);
  --bord: rgba(255, 255, 255, .075);
  --bord-fort: rgba(255, 255, 255, .13);
  --texte: #ececee;
  --doux: #a1a5ad;
  --pale: #80858e;
  --volet: #0d0e10;
  --volet-bord: rgba(255, 255, 255, .06);
  --halo: rgba(59, 130, 246, .16);
  --ok: #34d399;
  --ok-fond: rgba(52, 211, 153, .11);
  --alerte: #fbbf24;
  --alerte-fond: rgba(251, 191, 36, .11);
  --erreur: #f87171;
  --erreur-fond: rgba(248, 113, 113, .11);
  --ombre: none;
  --ombre-haute: 0 24px 70px -18px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .04);
  --voile: rgba(4, 5, 7, .7);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--fond);
  color: var(--texte);
  font: 14px/1.55 var(--sans);
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
}
a { color: var(--bleu); text-decoration: none; }
a:hover { color: var(--bleu-vif); }
code, .mono { font-family: var(--mono); font-size: .88em; }
h1, h2, h3 { font-family: var(--titre); }
h1 { font-size: 1.45rem; font-weight: 620; margin: 0; letter-spacing: -.025em; }
h2 { font-size: 1rem; font-weight: 600; margin: 0; letter-spacing: -.012em; }
h3 { font-size: .93rem; font-weight: 600; margin: 0 0 .5rem; }
p { margin: 0 0 .75rem; }
.doux { color: var(--doux); }
.pale { color: var(--pale); }
.petit { font-size: .84rem; }
.icone { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--bleu); outline-offset: 2px; }

/* --- Structure ------------------------------------------------------------- */

.cadre { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.volet {
  background: var(--volet); border-right: 1px solid var(--volet-bord);
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  padding: 16px 10px 12px;
}
.logo { display: flex; align-items: center; gap: 10px; color: var(--texte); padding: 2px 10px 16px; }
.logo:hover { color: var(--texte); }
.logo .marque { width: 28px; height: 28px; border-radius: 7px; display: block; flex: none; }
.logo strong { font-size: 1rem; font-weight: 620; letter-spacing: -.02em; }
.nav-titre { color: var(--pale); font-size: .72rem; font-weight: 520; padding: 16px 12px 4px; }
.volet nav a {
  display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: var(--rayon-petit);
  color: var(--doux); font-weight: 500; margin-bottom: 1px; font-size: .88rem;
  transition: background .15s, color .15s;
}
.volet nav a:hover { background: var(--survol); color: var(--texte); }
.volet nav a.actif { background: var(--surface); color: var(--texte); box-shadow: inset 0 0 0 1px var(--bord), var(--ombre); }
.volet nav a.actif .icone { color: var(--bleu); }
.volet nav a .compte { margin-left: auto; font-size: .72rem; color: var(--pale); font-variant-numeric: tabular-nums; }
.volet .bas { margin-top: auto; border-top: 1px solid var(--volet-bord); padding: 10px 2px 0; display: flex; flex-direction: column; gap: 1px; }
.utilisateur { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: var(--rayon-petit); }
.utilisateur:hover { background: var(--survol); }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--bleu-doux); color: var(--bleu-vif); display: grid; place-items: center; font-weight: 620; font-size: .74rem; flex: none; }
.utilisateur .nom { font-weight: 560; font-size: .86rem; line-height: 1.2; }
.utilisateur .role { color: var(--doux); font-size: .75rem; }
.lien-volet { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: var(--rayon-petit); color: var(--doux); background: none; border: 0; font: inherit; font-size: .86rem; cursor: pointer; width: 100%; text-align: left; transition: background .15s, color .15s; }
.lien-volet:hover { background: var(--survol); color: var(--texte); }

main { min-width: 0; }
.barre { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--fond) 86%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--bord); }
.barre-interieur { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 32px; max-width: 1360px; flex-wrap: wrap; min-height: 72px; }
.fil { color: var(--pale); font-size: .8rem; font-weight: 500; margin-bottom: 2px; }
.fil a { color: var(--doux); }
.fil a:hover { color: var(--texte); }
.contenu { padding: 24px 32px 64px; max-width: 1360px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* --- Cartes, statistiques ---------------------------------------------------- */

.carte { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre); margin-bottom: 20px; min-width: 0; }
.carte-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--bord); flex-wrap: wrap; }
.carte-tete h2 { display: flex; align-items: center; gap: 9px; font-size: .95rem; }
.carte-tete h2 .icone { color: var(--bleu); }
.carte-tete p { margin: 2px 0 0; color: var(--doux); font-size: .84rem; }
.carte-corps { padding: 18px 20px; }
.grille { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
/* Chiffres cles : une bande decoupee, pas quatre cartes. */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 20px;
  background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre); overflow: hidden; }
.stat { padding: 16px 20px; display: flex; gap: 12px; align-items: flex-start; box-shadow: -1px 0 0 var(--bord); }
.stat .pictogramme { color: var(--pale); margin-top: 3px; display: grid; }
.stat .pictogramme .icone { width: 16px; height: 16px; }
.stat > div { display: flex; flex-direction: column-reverse; gap: 2px; }
.stat b { display: block; font-size: 1.65rem; font-weight: 600; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat span { color: var(--doux); font-size: .82rem; }

/* --- Tableaux ------------------------------------------------------------------ */

.defile { overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--bord-fort) transparent; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--pale); font-weight: 520; font-size: .78rem; padding: 10px 20px; background: var(--surface-2); border-bottom: 1px solid var(--bord); white-space: nowrap; }
td { padding: 12px 20px; border-bottom: 1px solid var(--bord); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover td { background: var(--survol); }
td.actions-ligne { text-align: right; white-space: nowrap; }
td.petit { white-space: nowrap; }
td.actions-ligne form { display: inline-flex; vertical-align: middle; }
.ligne-principale { font-weight: 560; color: var(--texte); }
a.ligne-principale:hover { color: var(--bleu-vif); }
.sous-ligne { color: var(--doux); font-size: .8rem; margin-top: 1px; }
.vide { text-align: center; color: var(--doux); padding: 44px 20px; }
.vide .icone { width: 26px; height: 26px; color: var(--pale); margin-bottom: 10px; }
.vide strong { display: block; color: var(--texte); margin-bottom: 4px; }

/* --- Pastilles, puces ---------------------------------------------------------- */

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: .76rem; font-weight: 540; background: var(--surface-2); color: var(--doux); border: 1px solid var(--bord); white-space: nowrap; }
/* Point d'etat : seulement quand la couleur porte un etat. */
.badge.ok::before, .badge.alerte::before, .badge.erreur::before, .badge.bleu::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.sans-point::before { display: none; }
.badge.ok { color: var(--ok); background: var(--ok-fond); border-color: transparent; }
.badge.alerte { color: var(--alerte); background: var(--alerte-fond); border-color: transparent; }
.badge.erreur { color: var(--erreur); background: var(--erreur-fond); border-color: transparent; }
.badge.bleu { color: var(--bleu-vif); background: var(--bleu-doux); border-color: transparent; }
.puce { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: .78rem; padding: 2px 7px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--bord); color: var(--texte); white-space: nowrap; }
.puces { display: flex; gap: 6px; flex-wrap: wrap; }

/* --- Formulaires ---------------------------------------------------------------- */

label { display: block; font-weight: 540; font-size: .84rem; margin-bottom: 6px; }
label.case { display: flex; gap: 9px; align-items: center; font-weight: 500; margin: 0; cursor: pointer; }
.champ { margin-bottom: 16px; }
.aide { display: block; color: var(--doux); font-weight: 400; margin-top: 5px; font-size: .8rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; padding: 8px 11px; border: 1px solid var(--bord-fort); border-radius: var(--rayon-petit);
  background: var(--champ); color: var(--texte); font: inherit; transition: border-color .15s, box-shadow .15s;
}
select option { background: var(--surface-pleine); color: var(--texte); }
input::placeholder, textarea::placeholder { color: var(--pale); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--bleu); box-shadow: 0 0 0 3px var(--bleu-doux); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--bleu); }
textarea { min-height: 80px; resize: vertical; }
.ligne { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.recherche { position: relative; max-width: 320px; flex: 1; }
.recherche .icone { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--pale); }
.recherche input { padding-left: 34px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 7px 14px;
  border-radius: var(--rayon-petit); border: 1px solid var(--bleu); background: var(--bleu); color: var(--sur-bleu);
  font: inherit; font-weight: 560; cursor: pointer; white-space: nowrap; line-height: 1.35;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 1px 2px rgba(17, 24, 39, .12);
  transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { background: var(--bleu-survol); border-color: var(--bleu-survol); color: var(--sur-bleu); }
.btn:active { transform: scale(.98); }
.btn.second { background: var(--surface); color: var(--texte); border-color: var(--bord-fort); box-shadow: var(--ombre); }
.btn.second:hover { background: var(--surface-2); }
.btn.fantome { background: transparent; color: var(--doux); border-color: transparent; box-shadow: none; }
.btn.fantome:hover { background: var(--survol); color: var(--texte); }
.btn.danger { background: transparent; color: var(--erreur); border-color: color-mix(in srgb, var(--erreur) 35%, transparent); box-shadow: none; }
.btn.danger:hover { background: var(--erreur-fond); }
.btn.petit { padding: 4px 10px; font-size: .82rem; }
.btn.icone-seule { padding: 7px; }
.btn.large { width: 100%; }

/* --- Messages, blocs de commande -------------------------------------------------- */

.message { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: var(--rayon-petit); margin-bottom: 16px; background: var(--ok-fond); color: var(--ok); font-weight: 520; border: 1px solid color-mix(in srgb, currentColor 18%, transparent); }
.message.erreur { background: var(--erreur-fond); color: var(--erreur); }
.message.alerte { background: var(--alerte-fond); color: var(--alerte); }
.message.info { background: var(--bleu-doux); color: var(--bleu-vif); }
.commande { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--bord); border-radius: var(--rayon-petit); padding: 9px 10px 9px 14px; font-family: var(--mono); font-size: .8rem; margin: 8px 0 4px; }
.commande span { flex: 1; word-break: break-all; }

/* --- Onglets ------------------------------------------------------------------------ */

.onglets { display: flex; gap: 2px; border-bottom: 1px solid var(--bord); margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; }
.onglets::-webkit-scrollbar { display: none; }
.onglets a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px; color: var(--doux); font-weight: 520; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color .15s; }
.onglets a:hover { color: var(--texte); }
.onglets a.actif { color: var(--texte); border-bottom-color: var(--bleu); }
.onglets a.actif .icone { color: var(--bleu); }
.onglets .compte { font-size: .74rem; color: var(--pale); font-variant-numeric: tabular-nums; }

/* --- Passerelles (fiche client) ----------------------------------------------------- */

.site { border-top: 1px solid var(--bord); }
.site:first-child { border-top: 0; }
.site-tete { display: flex; align-items: center; gap: 14px; padding: 16px 20px; flex-wrap: wrap; }
.site-tete .pictogramme { width: 34px; height: 34px; border-radius: var(--rayon-petit); border: 1px solid var(--bord); background: var(--surface-2); color: var(--bleu); display: grid; place-items: center; flex: none; }
.site-tete .titre { flex: 1; min-width: 180px; }
.site-corps { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr); gap: 16px; padding: 0 20px 20px; }
.panneau { background: var(--surface-2); border: 1px solid var(--bord); border-radius: var(--rayon-petit); padding: 14px 16px; }
.panneau h3 { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--doux); font-weight: 560; }
.reseau { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--bord); }
.reseau:last-of-type { border-bottom: 0; }
.ajout { display: flex; gap: 8px; margin-top: 10px; }
.ajout input { font-family: var(--mono); font-size: .84rem; }
.passerelle-ligne { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--bord); flex-wrap: wrap; }
.passerelle-ligne:last-of-type { border-bottom: 0; }
.passerelle-info { flex: 1; min-width: 180px; }
.passerelle-info .ligne-principale { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.passerelle-actions { display: flex; gap: 2px; align-items: center; }
.passerelle-actions form { display: inline-flex; }
.infos { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: .86rem; margin: 0; }
.infos dt { color: var(--doux); }
.infos dd { margin: 0; font-weight: 520; word-break: break-word; }

/* --- Fenetres ----------------------------------------------------------------------- */

dialog.fenetre { border: 1px solid var(--bord-fort); border-radius: 14px; padding: 0; width: min(520px, calc(100vw - 32px)); background: var(--surface-pleine); color: var(--texte); box-shadow: var(--ombre-haute); }
dialog.fenetre::backdrop { background: var(--voile); backdrop-filter: blur(4px); }
dialog.fenetre[open] { animation: entree .18s cubic-bezier(.16, 1, .3, 1); }
@keyframes entree { from { opacity: 0; transform: translateY(6px) scale(.985); } }
.fenetre-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 22px 4px; }
.fenetre-tete p { color: var(--doux); font-size: .86rem; margin: 4px 0 0; }
.fenetre-corps { padding: 16px 22px 4px; }
.fenetre-pied { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px 20px; }
.lignes-reseaux .ligne-reseau { display: flex; gap: 8px; margin-bottom: 8px; }
.lignes-reseaux input { font-family: var(--mono); font-size: .84rem; }

/* --- Pages autonomes (connexion) -------------------------------------------------- */

.seul { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background:
  radial-gradient(900px 480px at 50% -14%, var(--halo), transparent 70%), var(--fond); }
.seul .carte { width: min(420px, 100%); padding: 30px; margin: 0; box-shadow: var(--ombre-haute); border-color: var(--bord-fort); border-radius: 14px; }
.seul .carte.ample { width: min(760px, 100%); }
.seul .logo { justify-content: center; padding-bottom: 20px; }
.seul h1 { font-size: 1.35rem; margin-bottom: 6px; }
.poste { display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; background: var(--surface-2); border: 1px solid var(--bord); border-radius: var(--rayon-petit); padding: 12px 14px; margin: 14px 0 18px; font-size: .88rem; }
.poste dt { color: var(--doux); }
.poste dd { margin: 0; font-weight: 560; word-break: break-word; }
details.bloc { border: 1px solid var(--bord); border-radius: var(--rayon-petit); padding: 10px 14px; background: var(--surface-2); }
details.bloc > summary { cursor: pointer; font-weight: 560; }
details.bloc[open] > summary { margin-bottom: 12px; }
.qr { background: #fff; padding: 10px; border-radius: 10px; display: inline-block; }

@media (max-width: 900px) {
  .cadre { grid-template-columns: 1fr; }
  .volet { position: static; height: auto; padding: 12px; }
  .volet nav { display: flex; flex-wrap: wrap; gap: 2px; }
  .nav-titre { display: none; }
  .volet .bas { flex-direction: row; flex-wrap: wrap; border-top: 0; padding-top: 6px; }
  .barre-interieur, .contenu { padding-left: 16px; padding-right: 16px; }
  .site-corps { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* --- Page d'accueil (publique) ----------------------------------------------------
   Meme palette et memes coins que la console ; captures reelles de la console et
   du client, une par theme. Apparitions au defilement (IntersectionObserver,
   app.js), coupees si l'utilisateur limite les animations. */

.vitrine { font-size: 15px; }
.v-largeur { width: min(1200px, 100% - 32px); margin: 0 auto; }
.vitrine h1, .vitrine h2, .vitrine h3 { text-wrap: balance; }

.v-entete { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px); background: color-mix(in srgb, var(--fond) 80%, transparent); border-bottom: 1px solid var(--bord); }
.v-entete-interieur { display: flex; align-items: center; gap: 24px; height: 64px; }
.v-entete .logo { padding: 0; }
.v-nav { display: flex; gap: 2px; margin: 0 auto; }
.v-nav a { color: var(--doux); padding: 6px 12px; border-radius: var(--rayon-petit); font-weight: 500; font-size: .9rem; transition: color .15s, background .15s; }
.v-nav a:hover { color: var(--texte); background: var(--survol); }
.v-entete-actions { display: flex; gap: 6px; align-items: center; }

/* Captures : une version claire, une sombre ; le theme choisit. */
.capture-sombre { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="clair"]) .capture-clair { display: none; }
  :root:not([data-theme="clair"]) .capture-sombre { display: block; }
}
:root[data-theme="sombre"] .capture-clair { display: none; }
:root[data-theme="sombre"] .capture-sombre { display: block; }
:root[data-theme="clair"] .capture-sombre { display: none; }
:root[data-theme="clair"] .capture-clair { display: block; }
.v-capture { margin: 0; border-radius: var(--rayon); border: 1px solid var(--bord-fort); background: var(--surface); overflow: hidden;
  box-shadow: 0 30px 80px -30px color-mix(in srgb, var(--bleu) 30%, transparent), var(--ombre-haute); }
.v-capture img { width: 100%; height: auto; }

/* Heros : titre a gauche, accroche et boutons a droite, console en pleine
   largeur dessous (coupee en fondu). */
.v-heros { position: relative; padding: 72px 0 0; overflow: hidden;
  background: radial-gradient(900px 420px at 70% 0%, var(--halo), transparent 70%); }
/* Fond anime (maillage.js) : postes, passerelles, VPS et tunnels. Estompe en bas
   et derriere le titre pour garder le texte lisible. */
.v-maillage { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none;
  -webkit-mask-image: linear-gradient(100deg, rgba(0, 0, 0, .18) 0%, rgba(0, 0, 0, .3) 40%, #000 72%);
          mask-image: linear-gradient(100deg, rgba(0, 0, 0, .18) 0%, rgba(0, 0, 0, .3) 40%, #000 72%); }
.v-heros-grille { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 5fr); gap: 56px 48px; align-items: end; }
.v-heros h1 { font-size: clamp(2.2rem, 4vw, 3.3rem); line-height: 1.06; letter-spacing: -.04em; font-weight: 640; margin: 0; text-wrap: initial; }
.v-heros-cote { padding-bottom: 6px; }
.v-chapo { max-width: 42ch; color: var(--doux); font-size: 1.06rem; line-height: 1.6; margin: 0; }
.v-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.btn.v-grand { padding: 10px 18px; font-size: .96rem; }
.v-capture-heros { grid-column: 1 / -1; max-height: 560px; border-bottom: 0; border-radius: var(--rayon) var(--rayon) 0 0;
  -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }

/* Fonctionnement : etapes reliees par un fil, client Windows a cote. */
.v-section { padding: 112px 0 0; }
.v-section h2 { font-size: clamp(1.7rem, 3vw, 2.35rem); letter-spacing: -.035em; line-height: 1.12; font-weight: 620; margin: 0; max-width: 22ch; }
.v-section h3 { font-size: 1.02rem; letter-spacing: -.012em; margin: 0 0 6px; font-weight: 600; }
.v-section p { color: var(--doux); line-height: 1.6; margin: 0; }
.v-intro { font-size: 1.04rem; margin-top: 14px !important; max-width: 52ch; }
.v-fonctionnement { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 72px; align-items: center; }
.v-etapes { list-style: none; margin: 40px 0 0; padding: 0; position: relative; }
.v-etapes::before { content: ""; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 1px; background: var(--bord-fort); }
.v-etapes li { position: relative; padding: 0 0 28px 40px; }
.v-etapes li:last-child { padding-bottom: 0; }
.v-etapes li::before { content: ""; position: absolute; left: 0; top: 4px; width: 15px; height: 15px; border-radius: 50%; background: var(--fond); border: 1.5px solid var(--bleu); box-shadow: 0 0 0 4px var(--fond); }
.v-etapes li:last-child::before { background: var(--bleu); }
.v-etapes p { max-width: 54ch; }
.v-capture-client { max-width: 360px; justify-self: center; border-radius: 18px; }

/* Fonctionnalites : grille asymetrique, six tuiles. */
.v-titre-section { margin-bottom: 40px !important; }
.v-bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.v-tuile { position: relative; border: 1px solid var(--bord); border-radius: var(--rayon); background: var(--surface); padding: 24px; display: flex; flex-direction: column; justify-content: flex-end; min-height: 250px; overflow: hidden; transition: border-color .2s, transform .2s cubic-bezier(.16, 1, .3, 1); }
.v-tuile:hover { border-color: var(--bord-fort); transform: translateY(-2px); }
.v-tuile > .icone { width: 22px; height: 22px; color: var(--bleu); margin-bottom: auto; }
.v-tuile p { font-size: .93rem; }
.v-large { grid-column: span 2; justify-content: flex-start; gap: 20px; }
.v-large .v-tuile-texte { max-width: 46ch; }
.v-capture-tuile { margin: 4px -24px -24px 24px; border-radius: 10px 0 0 0; border-right: 0; border-bottom: 0; box-shadow: none; }
.v-bleue { background: linear-gradient(160deg, color-mix(in srgb, var(--bleu) 92%, #000), color-mix(in srgb, var(--bleu) 70%, #0b1b4d)); border-color: transparent; color: #fff; }
.v-bleue > .icone { color: #fff; }
.v-bleue p { color: rgba(255, 255, 255, .82); }
.v-sourdine { background: var(--surface-2); }
.v-puces { margin-bottom: auto; }

/* Securite : faits a plat, separes par un filet, sans cartes. */
.v-securite-tete { max-width: 640px; }
.v-faits { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 40px; }
.v-faits li { border-top: 1px solid var(--bord-fort); padding-top: 20px; }
.v-faits .icone { width: 20px; height: 20px; color: var(--bleu); margin-bottom: 14px; }

/* Licence : texte a gauche, offre a droite (sans prix : fixe par le revendeur). */
.v-licence { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 56px; align-items: start; }
.v-licence .v-intro + .v-intro { margin-top: 12px !important; }
.v-offre { border: 1px solid var(--bord-fort); border-radius: 16px; background: radial-gradient(420px 220px at 100% 0%, var(--halo), transparent 70%), var(--surface); padding: 28px; display: flex; flex-direction: column; gap: 22px; box-shadow: var(--ombre); }
.v-offre-tete h3 { font-size: 1.5rem; letter-spacing: -.03em; margin: 10px 0 4px; }
.v-offre-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.v-offre-liste li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.45; }
.v-offre-liste .icone { width: 16px; height: 16px; color: var(--bleu); flex: none; margin-top: 3px; }
.v-offre-prix { border-top: 1px solid var(--bord); padding-top: 18px; display: grid; gap: 4px; }
.v-offre-prix strong { font-size: 1.05rem; letter-spacing: -.01em; }
.v-offre-prix span { color: var(--doux); font-size: .9rem; }

/* Appel final : bande, texte a gauche et bouton a droite. */
.v-final { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 40px 44px; border-radius: 16px; border: 1px solid var(--bord);
  background: radial-gradient(520px 260px at 100% 0%, var(--halo), transparent 70%), var(--surface); flex-wrap: wrap; }
.v-final h2 { max-width: none; }
.v-final p { margin-top: 8px; }

.v-pied { margin-top: 112px; border-top: 1px solid var(--bord); }
.v-pied-interieur { display: flex; align-items: center; gap: 18px; padding: 24px 0 32px; flex-wrap: wrap; font-size: .88rem; }
.v-pied-interieur .logo { padding: 0; }
.v-pied-liens { margin-left: auto; display: flex; gap: 20px; }
.v-pied-liens a { color: var(--doux); }
.v-pied-liens a:hover { color: var(--texte); }

/* Apparitions : seulement si le script est la et les animations permises. */
@media (prefers-reduced-motion: no-preference) {
  .anime .revele { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .7s cubic-bezier(.16, 1, .3, 1); transition-delay: var(--retard, 0ms); }
  .anime .revele.vu { opacity: 1; transform: none; }
  .v-heros h1, .v-heros-cote { animation: monte .8s cubic-bezier(.16, 1, .3, 1) both; }
  .v-heros-cote { animation-delay: .08s; }
  .v-capture-heros { animation: monte 1s cubic-bezier(.16, 1, .3, 1) .16s both; }
}
@keyframes monte { from { opacity: 0; transform: translateY(14px); } }

@media (max-width: 1024px) {
  .v-heros-grille { grid-template-columns: 1fr; gap: 28px; }
  .v-capture-heros { max-height: 420px; margin-top: 16px; }
  .v-fonctionnement { grid-template-columns: 1fr; gap: 48px; }
  .v-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v-licence { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 767px) {
  .v-nav, .v-masque-mobile { display: none; }
  .v-entete-actions { margin-left: auto; }
  .v-heros { padding-top: 40px; }
  .v-section { padding-top: 80px; }
  .v-bento { grid-template-columns: 1fr; }
  .v-large { grid-column: auto; }
  .v-tuile { min-height: 0; }
  .v-tuile > .icone, .v-puces { margin-bottom: 18px; }
  .v-faits { grid-template-columns: 1fr; gap: 28px; }
  .v-final { padding: 28px 22px; }
  .v-offre { padding: 22px; }
  .v-pied-liens { margin-left: 0; width: 100%; }
}

/* Interrupteur (case a cocher qui glisse) */
input[type=checkbox].interrupteur {
  appearance: none; -webkit-appearance: none; width: 38px; height: 22px; margin: 0; flex: none;
  border-radius: 999px; background: var(--bord-fort); position: relative; cursor: pointer;
  transition: background .18s ease; vertical-align: middle;
}
input[type=checkbox].interrupteur::before {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .3); transition: transform .18s ease;
}
input[type=checkbox].interrupteur:checked { background: var(--bleu); }
input[type=checkbox].interrupteur:checked::before { transform: translateX(16px); }
input[type=checkbox].interrupteur:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--bleu-doux); }
input[type=checkbox].interrupteur:disabled { opacity: .5; cursor: progress; }

/* Liste deroulante a cases (acces aux passerelles) */
details.deroulant { position: relative; }
details.deroulant > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; max-width: 280px;
  padding: 6px 12px; border: 1px solid var(--bord); border-radius: var(--rayon-petit); background: var(--champ);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .88rem;
}
details.deroulant > summary::-webkit-details-marker { display: none; }
details.deroulant > summary::after {
  content: ""; flex: none; width: 7px; height: 7px; margin-left: auto; border-right: 1.5px solid var(--doux);
  border-bottom: 1.5px solid var(--doux); transform: rotate(45deg) translateY(-2px); transition: transform .15s ease;
}
details.deroulant[open] > summary { border-color: var(--bleu); box-shadow: 0 0 0 3px var(--bleu-doux); }
details.deroulant[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.deroulant-panneau {
  position: fixed; z-index: 50; min-width: 240px; max-height: 320px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px; padding: 14px;
  background: var(--surface-pleine); border: 1px solid var(--bord); border-radius: var(--rayon-petit);
  box-shadow: var(--ombre-haute);
}
.deroulant-sites { display: flex; flex-direction: column; gap: 8px; padding-left: 4px; }
.deroulant-panneau:has(input[name=acces_tous]:checked) .deroulant-sites { opacity: .45; }
.deroulant-panneau .btn { align-self: flex-end; }
.pale { color: var(--pale); }

/* Nom modifiable sur place (appareils) */
input.nom-editable {
  font: inherit; font-weight: 600; color: var(--texte); width: 100%; max-width: 240px;
  padding: 3px 7px; margin-left: -8px; border: 1px solid transparent; border-radius: 7px; background: transparent;
}
input.nom-editable:hover { border-color: var(--bord); }
input.nom-editable:focus { border-color: var(--bleu); background: var(--champ); }
