/* =============================================================================
   Nouvelle interface (aperçu) — Vanguard II, version apaisée
   =============================================================================
   Tout ce fichier est scopé sous html[data-interface="nouvelle"], sauf le
   masquage par défaut du nouveau tableau de bord : en interface classique,
   rien ici ne change l'affichage. Le choix se fait dans la fenêtre Apparence
   (bouton palette de la barre du haut, js/theme.js).

   Principes (planche « Fondations » du canevas de design) :
   - un état normal n'est jamais rouge : rouge = panne réelle ;
   - chaque état = couleur + forme + mot ;
   - un seul bouton principal par zone, cibles de 44 px ;
   - six tailles de texte ; le mono pour les chiffres et adresses seulement.
   ========================================================================== */

/* Le nouveau tableau de bord n'existe qu'en interface nouvelle. */
.v4-dash { display: none; }
.v4-seulement, #sidebar .nav-item.v4-seulement { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ----- Interface nouvelle : bascule du tableau de bord --------------------- */
html[data-interface="nouvelle"] #page-dashboard > .page-header,
html[data-interface="nouvelle"] #dash-hero-slot,
html[data-interface="nouvelle"] #dashboard-cards { display: none !important; }
html[data-interface="nouvelle"] .v4-dash { display: flex; }
html[data-interface="nouvelle"] #sidebar .nav-item.v4-seulement { display: flex; }

/* Titres de page : plus coupés en deux couleurs (« DASH|BOARD »). */
html[data-interface="nouvelle"] .page-title span { color: inherit; }
html[data-interface="nouvelle"] .page-title {
  font: 600 30px var(--font-hud, Saira, sans-serif); letter-spacing: .01em; text-transform: none; color: var(--text-0, #F2EFE8);
}
@media (max-width: 720px) { html[data-interface="nouvelle"] .page-title { font-size: 24px; } }

/* Menu : libellés de section lisibles, cibles plus hautes, focus visible. */
html[data-interface="nouvelle"] .sidebar-section-label {
  font: 600 11px var(--font-body, 'IBM Plex Sans', sans-serif);
  letter-spacing: .08em; color: var(--text-2, #8A93A6);
}
html[data-interface="nouvelle"] .nav-item { min-height: 40px; font-size: 14px; }
html[data-interface="nouvelle"] .nav-item:focus-visible { outline: 2px solid var(--secondary, #C89A3A); outline-offset: -2px; }

/* ----- Tableau de bord ----------------------------------------------------- */
.v4-dash {
  flex-direction: column; gap: 26px;
  font-family: var(--font-body, 'IBM Plex Sans', sans-serif); color: var(--text-0, #F2EFE8);
}
.v4-tete { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.v4-tete h1 {
  margin: 0; font: 600 30px var(--font-hud, Saira, sans-serif); letter-spacing: .01em; color: var(--text-0, #F2EFE8);
}
.v4-tete p { margin: 6px 0 0; font-size: 15px; color: var(--text-1, #C6CDDB); }
.v4-tete-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.v4-segment { display: inline-flex; padding: 3px; border: 1px solid var(--border, #1F2636); border-radius: 10px; background: var(--bg-1, #10141D); }
.v4-segment button {
  min-height: 36px; padding: 0 14px; border: 0; border-radius: 7px; background: none;
  color: var(--text-1, #C6CDDB); font: 500 14px var(--font-body, sans-serif); cursor: pointer;
}
.v4-segment button[aria-pressed="true"] { background: var(--bg-3, #1F2636); color: var(--text-0, #F2EFE8); }

.v4-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 10px; cursor: pointer;
  font: 500 14px var(--font-body, 'IBM Plex Sans', sans-serif); white-space: nowrap;
  background: transparent; border: 1px solid var(--border, #1F2636); color: var(--text-1, #C6CDDB);
}
.v4-btn:hover { color: var(--text-0, #F2EFE8); border-color: #2C3548; }
.v4-btn:focus-visible { outline: 2px solid var(--secondary, #C89A3A); outline-offset: 2px; }
.v4-btn:disabled { opacity: .55; cursor: progress; }
.v4-btn-principal { background: var(--secondary, #C89A3A); border-color: var(--secondary, #C89A3A); color: #0A0C12; font-weight: 600; }
.v4-btn-principal:hover { background: #D6AA4E; color: #0A0C12; border-color: #D6AA4E; }
.v4-btn-propose { border-color: rgba(200,154,58,.55); color: var(--secondary, #C89A3A); font-weight: 600; }
.v4-btn-propose:hover { color: #E0B65A; border-color: #E0B65A; }
.v4-btn-danger { border-color: rgba(210,58,58,.5); color: #F07272; }
.v4-btn-danger:hover { color: #FF9494; border-color: #F07272; }
.v4-btn-petit { min-height: 36px; padding: 0 12px; font-size: 13px; }

/* Résumé */
.v4-resume { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.v4-tuile {
  background: var(--bg-1, #10141D); border: 1px solid var(--border-subtle, #171D2A); border-radius: 12px;
  padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; min-width: 0;
}
.v4-tuile-alerte { border-color: rgba(240,162,46,.38); }
.v4-libelle { font-size: 13px; color: var(--text-2, #8A93A6); }
.v4-valeur { font: 600 30px var(--font-hud, Saira, sans-serif); line-height: 1.15; }
.v4-valeur small { font-size: 20px; color: var(--text-2, #8A93A6); font-weight: 500; }
.v4-note { font-size: 13px; color: var(--text-1, #C6CDDB); }
.v4-note-alerte { color: var(--amber, #F0A22E); }
.v4-jauge { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.v4-jauge > span:first-child { width: 40px; color: var(--text-1, #C6CDDB); }
.v4-jauge-barre { flex: 1; height: 6px; border-radius: 3px; background: var(--bg-3, #1F2636); overflow: hidden; }
.v4-jauge-barre > span { display: block; height: 100%; border-radius: 3px; background: var(--primary, #4A9EFF); }
.v4-jauge-barre > span.haut { background: var(--amber, #F0A22E); }
.v4-jauge-barre > span.critique { background: var(--red, #D23A3A); }
.v4-jauge b { width: 44px; text-align: right; font: 500 13px var(--font-mono, monospace); }

/* Sections */
.v4-section { display: flex; flex-direction: column; gap: 14px; }
.v4-section h2 { margin: 0; font: 600 19px var(--font-hud, Saira, sans-serif); color: var(--text-0, #F2EFE8); }

/* États : couleur + forme + mot */
.v4-etat {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px;
  font-size: 13px; font-weight: 500; white-space: nowrap; background: var(--bg-2, #151A25); color: var(--text-1, #C6CDDB);
}
.v4-etat::before { content: ""; width: 8px; height: 8px; border-radius: 50%; box-sizing: border-box; border: 1.5px solid var(--text-2, #8A93A6); }
.v4-etat-en_ligne { background: rgba(16,201,124,.10); color: var(--green, #10C97C); }
.v4-etat-en_ligne::before { border: 0; background: var(--green, #10C97C); }
.v4-etat-demarrage { background: rgba(74,158,255,.10); color: #7DB8FF; }
.v4-etat-demarrage::before { border-color: #7DB8FF; border-right-color: transparent; animation: v4-tourne 1s linear infinite; }
@keyframes v4-tourne { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .v4-etat-demarrage::before { animation: none; } }

/* Vedette : les serveurs en ligne, en grand. La bannière Steam (460×215) est
   montrée à sa taille réelle, à droite : agrandie en fond, elle devenait floue
   et son logo se retrouvait coupé derrière le titre. */
.v4-vedettes { display: grid; grid-template-columns: 1fr; gap: 16px; }
.v4-vedette {
  border-radius: 18px; border: 1px solid rgba(16,201,124,.28);
  background: linear-gradient(135deg, rgba(16,201,124,.07), rgba(16,201,124,0) 55%), var(--bg-1, #10141D);
  padding: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 24px;
}
.v4-vedette-corps { flex: 999 1 380px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.v4-vedette-titre { display: flex; align-items: center; gap: 14px; min-width: 0; }
.v4-vedette h3 { margin: 0; font: 700 40px/1.05 var(--font-hud, Saira, sans-serif); letter-spacing: .01em; color: var(--text-0, #F2EFE8); overflow-wrap: anywhere; }
.v4-vedette .v4-sous { font-size: 14px; margin-top: -6px; }
.v4-vedette-infos { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; color: var(--text-1, #C6CDDB); }
.v4-vedette-infos b { font: 500 14px var(--font-mono, monospace); color: var(--text-0, #F2EFE8); }
.v4-vedette-art {
  flex: 1 1 300px; width: 100%; max-width: 460px; height: auto; aspect-ratio: 460 / 215;
  object-fit: cover; border-radius: 12px; border: 1px solid var(--border, #1F2636); display: block;
}

/* Logo du jeu : icône Steam 32×32 centrée dans une pastille, jamais agrandie
   au-delà de sa taille réelle (elle deviendrait floue). */
.v4-logo {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; background: var(--bg-2, #151A25); border: 1px solid var(--border, #1F2636); overflow: hidden;
}
.v4-logo img { width: 32px; height: 32px; border-radius: 6px; display: block; }
.v4-logo-initiale { font: 600 16px var(--font-hud, Saira, sans-serif); color: var(--secondary, #C89A3A); }
.v4-nom-ligne { display: flex; align-items: center; gap: 12px; }
.v4-nom-ligne .v4-logo { border-radius: 8px; }
.v4-nom-ligne .v4-logo img { width: 24px; height: 24px; border-radius: 4px; }

.v4-mono { font-family: var(--font-mono, monospace); }
.v4-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.v4-calme {
  display: flex; align-items: center; gap: 14px; padding: 20px 22px; border-radius: 14px;
  background: var(--bg-1, #10141D); border: 1px dashed var(--border, #1F2636); color: var(--text-1, #C6CDDB); font-size: 15px;
}

/* Cartes des autres serveurs */
.v4-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.v4-carte {
  background: var(--bg-1, #10141D); border: 1px solid var(--border-subtle, #171D2A); border-radius: 14px;
  padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
.v4-carte-tete { display: flex; align-items: center; gap: 12px; }
.v4-carte h3 { margin: 0; font: 600 18px var(--font-hud, Saira, sans-serif); color: var(--text-0, #F2EFE8); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v4-sous { font-size: 13px; color: var(--text-2, #8A93A6); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v4-carte .v4-actions { margin-top: auto; }
.v4-carte .v4-actions .v4-btn:first-child { flex: 1; }

/* Vue liste */
.v4-liste { overflow-x: auto; border: 1px solid var(--border-subtle, #171D2A); border-radius: 14px; background: var(--bg-1, #10141D); }
.v4-liste table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 760px; }
.v4-liste th {
  text-align: left; padding: 12px 16px; font: 600 11px var(--font-body, sans-serif); letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-2, #8A93A6); border-bottom: 1px solid var(--border, #1F2636);
}
.v4-liste td { padding: 12px 16px; border-bottom: 1px solid var(--border-subtle, #171D2A); vertical-align: middle; color: var(--text-1, #C6CDDB); }
.v4-liste tr:last-child td { border-bottom: 0; }
.v4-liste td.v4-nom { color: var(--text-0, #F2EFE8); font-weight: 600; }
.v4-liste td.v4-actions-cellule { text-align: right; white-space: nowrap; }
.v4-liste td.v4-actions-cellule .v4-btn + .v4-btn { margin-left: 6px; }

@media (max-width: 720px) {
  /* Résumé en deux colonnes compactes : une tuile par ligne remplissait
     tout le premier écran avant d'atteindre un seul serveur. */
  .v4-resume { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .v4-tuile { padding: 14px; }
  .v4-tuile-large { grid-column: 1 / -1; }
  .v4-valeur { font-size: 24px; }
  .v4-valeur small { font-size: 16px; }
  .v4-tete-actions { width: 100%; }
  .v4-vedette { padding: 18px; }
  .v4-vedette h3 { font-size: 30px; }
  .v4-tete h1 { font-size: 24px; }
}

/* ----- Page Système (nouvelle interface) ----------------------------------- */
.v4-sys { max-width: 1400px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.v4-sys-info { margin: -6px 0 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; font-size: 14px; color: var(--text-1, #C6CDDB); }
.v4-sys-info strong { color: var(--text-0, #F2EFE8); font-weight: 600; }
#sys-info-right { font-family: var(--font-mono, monospace); font-size: 13px; color: var(--text-2, #8A93A6); }

.v4-sys-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.v4-kpi {
  background: var(--bg-1, #10141D); border: 1px solid var(--border-subtle, #171D2A); border-radius: 14px;
  padding: 16px 18px 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0;
}
.v4-kpi-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
/* La couleur d'état passe par la barre ; le chiffre reste lisible en crème. */
.v4-kpi-valeur { font: 600 28px var(--font-hud, Saira, sans-serif); color: var(--text-0, #F2EFE8) !important; line-height: 1.1; }
.v4-kpi-detail { font-size: 13px; color: var(--text-1, #C6CDDB); min-height: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v4-kpi-note { font-size: 12px; color: var(--text-2, #8A93A6); margin-top: auto; }
.v4-kpi-barre { flex: none; height: 6px; }
.v4-kpi-barre > span { background: var(--green, #10C97C); transition: width .5s ease; }
.v4-kpi-courbe { display: block; width: 100%; height: 56px; margin-top: 2px; }
.v4-kpi-reseau { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--text-1, #C6CDDB); }
.v4-kpi-reseau span { display: flex; align-items: center; gap: 8px; }
.v4-kpi-reseau i { width: 8px; height: 8px; border-radius: 2px; }
.v4-kpi-reseau b { margin-left: auto; font: 600 15px var(--font-mono, monospace); color: var(--text-0, #F2EFE8); }

.v4-sys-historique { display: flex; flex-direction: column; gap: 14px; }
.v4-sys-historique-tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.v4-sys-historique-tete h2 { margin: 0; font: 600 19px var(--font-hud, Saira, sans-serif); color: var(--text-0, #F2EFE8); }
.v4-sys-historique-choix { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.v4-select {
  width: auto !important; max-width: 220px; min-height: 40px; padding: 0 12px; border-radius: 10px; background: var(--bg-2, #151A25);
  border: 1px solid var(--border, #1F2636); color: var(--text-0, #F2EFE8); font: 500 14px var(--font-body, sans-serif);
}
.v4-sys-courbes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.v4-sys-courbes .v4-libelle { margin-bottom: 6px; }
.v4-courbe-grande { display: block; width: 100%; height: 160px; }
/* Chaque barre prend la couleur de sa mesure, comme sa courbe ; l'ambre et le
   rouge (classes haut / critique) gardent la priorité en cas de charge. */
#gauge-bar-cpu:not(.haut):not(.critique) { background: #10C97C; }
#gauge-bar-ram:not(.haut):not(.critique) { background: #4A9EFF; }
#gauge-bar-disk:not(.haut):not(.critique) { background: #C89A3A; }

/* En-tête de page : titre à gauche à toutes les largeurs (le thème le
   repoussait à droite sous 640 px). */
html[data-interface="nouvelle"] .page-header {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px;
}
@media (max-width: 640px) {
  html[data-interface="nouvelle"] .page-header { flex-direction: column; align-items: flex-start; }
}

/* ----- Page Sauvegardes (nouvelle interface) ------------------------------- */
.v4-sauv { max-width: 1400px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.v4-sauv-resume { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.v4-sauv-carte {
  background: var(--bg-1, #10141D); border: 1px solid var(--border-subtle, #171D2A); border-radius: 14px;
  padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0; font-family: var(--font-body, sans-serif);
}
.v4-sauv-carte h3 { margin: 0; font: 600 18px var(--font-hud, Saira, sans-serif); color: var(--text-0, #F2EFE8); }
.v4-sauv-infos { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.v4-sauv-infos div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.v4-sauv-infos dt { font-size: 12px; color: var(--text-2, #8A93A6); }
.v4-sauv-infos dd { margin: 0; font-size: 14px; color: var(--text-0, #F2EFE8); }
.v4-etat-retard { background: rgba(240,162,46,.12); color: var(--amber, #F0A22E); }
.v4-etat-retard::before { border: 0; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 8px solid var(--amber, #F0A22E); border-radius: 0; }

/* Liste des sauvegardes sur sa page : le rendu vient de renderBackups(), en
   styles en ligne pensés pour un panneau dense de Système. Sur une page dédiée,
   on lui donne de l'air : texte courant au lieu du mono, lignes et boutons plus
   hauts. (!important : seul moyen de reprendre des styles en ligne.) */
#backups-root #sys-backups { padding: 22px 24px; }
#backups-root #sys-backups .sys-label { font: 600 19px var(--font-hud, Saira, sans-serif) !important; letter-spacing: 0 !important; text-transform: none !important; color: var(--text-0, #F2EFE8) !important; }
#backups-root #sys-backup-list > .sys-bk-retention > div[style*="margin-bottom:4px"],
#backups-root #sys-backup-list .sys-bk-group > div[style*="margin-bottom:4px"] {
  min-height: 56px; padding: 10px 14px !important; border-radius: 10px !important; gap: 14px !important;
}
#backups-root #sys-backup-list div[style*="font-size:11px"] { font: 500 14px var(--font-body, 'IBM Plex Sans', sans-serif) !important; color: var(--text-0, #F2EFE8) !important; }
#backups-root #sys-backup-list div[style*="font-size:10px"] { font-size: 12px !important; color: var(--text-2, #8A93A6) !important; }
#backups-root #sys-backup-list button { min-height: 36px; padding: 0 14px !important; font-size: 13px !important; border-radius: 8px !important; }
#backups-root #sys-backup-list .sys-bk-group > div:first-child { font: 600 12px var(--font-body, sans-serif) !important; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2, #8A93A6) !important; padding: 14px 0 8px !important; }
@media (max-width: 720px) {
  /* Rétention et fichiers : les contrôles passent à la ligne au lieu de
     sortir de l'écran (champ « garder » et Purger débordaient à 375 px). */
  #backups-root #sys-backup-list > .sys-bk-retention > div[style*="margin-bottom:4px"],
  #backups-root #sys-backup-list .sys-bk-group > div[style*="margin-bottom:4px"] { flex-wrap: wrap; }
  #backups-root #sys-backups { padding: 16px; }
}
/* Cartes de sauvegarde : boutons alignés en bas, quelle que soit la longueur
   du texte de planification. */
.v4-sauv-carte .v4-actions { margin-top: auto; }
/* Page Sauvegardes : les compteurs globaux de la liste doublonnaient le
   résumé par jeu (et comptaient les copies de Debian, désormais masquées). */
#backups-root #sys-backups > div:first-child > div:last-child { display: none !important; }

/* ----- Panneaux intérieurs de Système et Sauvegardes (nouvelle interface) --
   Leur HTML vient de system.js et status-rail.js, en styles en ligne pensés
   pour la densité : titres en capitales mono de 10-12 px, textes à 10 px, gris
   #616B80 qui n'atteint pas 4,5:1 sur le fond. On ne touche pas au HTML (la
   classique le partage) : on reprend la typographie ici. !important : seul
   moyen de passer devant un style en ligne. */
html[data-interface="nouvelle"] #page-system .sys-panel.has-head > :first-child > .sys-label,
html[data-interface="nouvelle"] #page-system .vg2-panel-title {
  font: 600 16px var(--font-hud, Saira, sans-serif) !important;
  letter-spacing: .01em !important; text-transform: none !important; color: var(--text-0, #F2EFE8) !important;
}
html[data-interface="nouvelle"] #page-system .sys-label {
  font: 600 12px var(--font-body, 'IBM Plex Sans', sans-serif);
  letter-spacing: .06em; color: var(--text-2, #8A93A6);
}
html[data-interface="nouvelle"] #page-system .sys-panel [style*="font-size:9px"],
html[data-interface="nouvelle"] #page-system .sys-panel [style*="font-size:10px"],
html[data-interface="nouvelle"] #page-backups [style*="font-size:9px"],
html[data-interface="nouvelle"] #page-backups [style*="font-size:10px"] { font-size: 12px !important; }
html[data-interface="nouvelle"] #page-system .sys-panel [style*="font-size:11px"],
html[data-interface="nouvelle"] #page-backups [style*="font-size:11px"] { font-size: 13px !important; }
html[data-interface="nouvelle"] #page-system [style*="color:var(--text-3)"],
html[data-interface="nouvelle"] #page-backups [style*="color:var(--text-3)"] { color: var(--text-2, #8A93A6) !important; }
html[data-interface="nouvelle"] #page-system .vg2-panel-head { padding: 14px 18px; }
html[data-interface="nouvelle"] #page-system .sys-panel.has-head > :first-child { padding-top: 14px !important; padding-bottom: 12px !important; }

/* ----- Barre de navigation mobile (nouvelle interface) --------------------- */
.v4-barre-mobile { display: none; }
@media (max-width: 640px) {
  html[data-interface="nouvelle"] .v4-barre-mobile {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
    padding: 6px 4px calc(8px + env(safe-area-inset-bottom, 0px));
    background: rgba(12, 15, 23, .96); border-top: 1px solid var(--border, #1F2636);
    backdrop-filter: blur(8px);
  }
  html[data-interface="nouvelle"] #main { padding-bottom: 84px !important; }
}
.v4-barre-mobile button {
  min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: none; border: 0; color: var(--text-1, #C6CDDB); font: 500 12px var(--font-body, sans-serif); cursor: pointer;
}
.v4-barre-mobile button[aria-current="page"] { color: var(--secondary, #C89A3A); }
.v4-barre-mobile button:focus-visible { outline: 2px solid var(--secondary, #C89A3A); outline-offset: -4px; border-radius: 8px; }
.v4-barre-mobile svg { width: 22px; height: 22px; }
@media (max-width: 640px) {
  /* Les notifications s'affichaient à 24 px du bas, sous la barre. */
  html[data-interface="nouvelle"] #toast-container { bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important; }
}

/* ----- Pages de jeu : en-tête d'état (nouvelle interface) ------------------ */
.v4-jeu-tete { display: none; }
html[data-interface="nouvelle"] .v4-jeu-tete {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; margin: 0 0 18px;
  padding: 18px 20px; border-radius: 16px; background: var(--bg-1, #10141D); border: 1px solid var(--border, #1F2636);
  font-family: var(--font-body, sans-serif);
}
html[data-interface="nouvelle"] .v4-jeu-tete-texte { flex: 999 1 260px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
html[data-interface="nouvelle"] .v4-jeu-tete-infos { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 14px; color: var(--text-1, #C6CDDB); }
html[data-interface="nouvelle"] .v4-jeu-tete-infos b { font: 600 14px var(--font-mono, monospace); color: var(--text-0, #F2EFE8); }
/* Démarrer / Arrêter / Redémarrer de l'ancien en-tête : l'en-tête d'état les
   remplace par les seules actions utiles. Snapshot et mise à jour restent. */
html[data-interface="nouvelle"] :is(#page-conan, #page-valheim, #page-satisfactory) > .page-header :is(.btn-start, .btn-stop, .btn-restart) { display: none; }
/* Onglets : casse normale (le thème les passait en capitales espacées). */
html[data-interface="nouvelle"] .page .tabs > .tab {
  text-transform: none; letter-spacing: 0; font: 500 14px var(--font-body, 'IBM Plex Sans', sans-serif);
}
/* Chemins et commandes longs (« %USERPROFILE%\AppData\… ») : à la ligne plutôt
   que de sortir de leur carte sur mobile. */
html[data-interface="nouvelle"] .page code { overflow-wrap: anywhere; }
