/* ================================================================
 * ProVsup Design System — pv-navbar.css
 * Barre de commande (header).
 * Toutes les règles ciblent des classes pv-* — zéro conflit Bootstrap.
 * Nécessite : pv-variables.css + pv-layout.css
 * ================================================================ */


/* ── Réinitialisation du conteneur Bootstrap (styles de base seulement) ── */

.pv-theme .app-header.navbar {
  background: var(--cmd-bg) !important;
  border: none !important;
  border-bottom: 1px solid var(--cmd-border) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  min-height: var(--cmdbar-h) !important;
  /* Passage en flex — on contrôle entièrement la structure via pv-* */
  display: flex !important;
  align-items: stretch !important;
  padding: 0 !important;
}


/* ── Zone brand ─────────────────────────────────────────────────── */

.pv-theme .pv-brand-zone {
  display: flex;
  align-items: center;
  flex: none;
}

.pv-theme .pv-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--cmdbar-h);
  padding: 0 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.14s;
}

.pv-theme .pv-brand:hover,
.pv-theme .pv-brand:focus {
  text-decoration: none;
  opacity: 0.85;
}

.pv-theme .pv-brand-logo {
  width: 30px;
  height: 30px;
  flex: none;
  display: block;
}

.pv-theme .pv-brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.pv-theme .pv-brand-name {
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-ui);
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: #fff;
}

.pv-theme .pv-brand-sub {
  font-size: 9px;
  font-weight: 700;
  font-family: var(--font-ui);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: oklch(1 0 0 / 0.42);
  line-height: 1;
}


/* ── Séparateur brand / horloge ─────────────────────────────────── */

.pv-theme .pv-brand-sep {
  width: 1px;
  height: 20px;
  background: var(--cmd-border);
  flex: none;
  margin: 0 6px;
  align-self: center;
}


/* ── Horloge automate (navbar) ──────────────────────────────────── */

.pv-theme .pv-clock {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  cursor: pointer;
  color: var(--cmd-fg);
  background: oklch(1 0 0 / 0.07);
  white-space: nowrap;
  overflow: hidden;
  flex: none;
  transition: background 0.14s, color 0.14s;
}

.pv-theme .pv-clock:hover {
  background: oklch(1 0 0 / 0.13);
  color: #fff;
}

.pv-theme .pv-clock > i {
  font-size: 14px;
  flex: none;
}

.pv-theme .pv-clock-label {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  opacity: 0.55;
  flex: none;
}

.pv-theme .pv-clock-text {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: inherit;
  white-space: nowrap;
}


/* ── Corps de la navbar ─────────────────────────────────────────── */

.pv-theme .pv-navbar-body {
  flex: 1;
  display: flex;
  align-items: stretch;
  min-width: 0;
  /* pas de overflow: hidden — les dropdown menus sont position:absolute et doivent sortir */
}


/* ── Boutons gauche ─────────────────────────────────────────────── */

.pv-theme .pv-navbar-left {
  display: flex;
  align-items: center;
  padding: 0 6px;
  gap: 2px;
  flex: none;
}


/* ── Bouton icône générique (icône seule, taille fixe) ──────────── */

.pv-theme .pv-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  color: var(--cmd-fg);
  background: transparent;
  border: none;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  flex: none;
  transition: background 0.13s, color 0.13s;
}

.pv-theme .pv-icon-btn:hover,
.pv-theme .pv-icon-btn:focus {
  background: oklch(1 0 0 / 0.10);
  color: #fff;
  text-decoration: none;
}

/* ── Bouton action (icône + badge, largeur flexible) ─────────────── */

.pv-theme .pv-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  color: var(--cmd-fg);
  background: transparent;
  border: none;
  font-size: 14px;
  font-family: var(--font-ui);
  cursor: pointer;
  text-decoration: none;
  flex: none;
  transition: background 0.13s, color 0.13s;
}

.pv-theme .pv-action-btn:hover,
.pv-theme .pv-action-btn:focus {
  background: oklch(1 0 0 / 0.10);
  color: #fff;
  text-decoration: none;
}


/* ── Section droite ─────────────────────────────────────────────── */

.pv-theme .pv-navbar-right {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0 0 0 auto;
  padding: 0 8px 0 0;
  gap: 4px;
  /* pas de overflow: hidden — les dropdown menus doivent sortir vers le bas */
}

.pv-theme .pv-navbar-right > li {
  display: flex;
  align-items: center;
  height: var(--cmdbar-h);
  flex: none;
}

/* Séparateur de groupe — insère une barre verticale avant l'item */
.pv-theme .pv-navbar-right > li.pv-group-start {
  margin-left: 6px;
  padding-left: 6px;
  border-left: 1px solid var(--cmd-border);
}

/* Séparateur vertical explicite entre groupes */
.pv-theme .pv-navbar-right > li.pv-vsep {
  width: 1px;
  height: 18px;
  background: var(--cmd-border);
  padding: 0;
  margin: 0 6px;
  align-self: center;
  flex: none;
}

/* Liens dans la section droite */
.pv-theme .pv-navbar-right > li > a {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 9px;
  border-radius: var(--r-sm);
  color: var(--cmd-fg);
  font-size: 13px;
  text-decoration: none;
  transition: background 0.13s, color 0.13s;
  white-space: nowrap;
}

.pv-theme .pv-navbar-right > li > a:hover {
  background: oklch(1 0 0 / 0.10);
  color: #fff;
  text-decoration: none;
}

/* Valeur Modbus (lecture seule) — badge pill avec fond dérivé de la couleur */
.pv-theme .pv-navbar-right > li > div.pv-header-value {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: color-mix(in oklch, currentColor 12%, transparent);
  color: var(--cmd-fg);
  font-family: var(--font-ui);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}


/* ── Icônes de statut (alarmes, bits Modbus) ────────────────────── */

.pv-theme .pv-status-group {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 10px;
  border-radius: var(--r-pill);
}

.pv-theme .pv-status-group-icon {
  flex: none;
  opacity: 0.85;
}
.pv-theme .pv-status-group-icon.fa-exclamation-triangle {
  font-size: 12px;
}
.pv-theme .pv-status-group-icon.fa-podcast {
  font-size: 14px;
}

.pv-theme .pv-status-group-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--cmd-fg);
  opacity: 0.85;
}

.pv-theme .pv-status-group--alarm {
  background: color-mix(in oklch, #ef4444 14%, transparent);
}

/* Couleur du pill GSM déduite de l'icône présente dans le DOM (has-bit) */
.pv-theme .pv-status-group--gsm:has(.icon-ap4-ap-gsm-0),
.pv-theme .pv-status-group--gsm:has(.icon-ap4-ap-gsm-1) {
  background: color-mix(in oklch, #ef4444 14%, transparent);
}
.pv-theme .pv-status-group--gsm:has(.icon-ap4-ap-gsm-2) {
  background: color-mix(in oklch, #f97316 14%, transparent);
}
.pv-theme .pv-status-group--gsm:has(.icon-ap4-ap-gsm-3),
.pv-theme .pv-status-group--gsm:has(.icon-ap4-ap-gsm-4) {
  background: color-mix(in oklch, #22c55e 14%, transparent);
}

.pv-theme .pv-status-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cmd-fg);
}

.pv-theme .pv-status-icon > i {
  font-size: 18px;
}


/* ── Indicateur mode simulation ──────────────────────────────────── */

.pv-theme .pv-navbar-right li a.pv-sim-status {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: oklch(0.72 0.19 55 / 0.12);
  color: oklch(0.90 0.10 60);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.14s;
}

.pv-theme .pv-navbar-right li a.pv-sim-status:hover {
  background: oklch(0.72 0.19 55 / 0.20);
  text-decoration: none;
}

.pv-theme .pv-navbar-right li a.pv-sim-status-off {
  background: oklch(0.72 0.19 55 / 0.05);
  color: oklch(0.72 0.10 55 / 0.50);
}

.pv-theme .pv-navbar-right li a.pv-sim-status-off:hover {
  background: oklch(0.72 0.19 55 / 0.12);
  color: oklch(0.90 0.10 60);
}

.pv-theme .pv-sim-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: oklch(0.72 0.19 55);
  flex: none;
}

.pv-theme .pv-sim-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid oklch(0.72 0.19 55);
  animation: pv-dot-ripple 1.8s ease-out infinite;
}

@keyframes pv-dot-ripple {
  0%   { opacity: 0.8; transform: scale(0.7); }
  100% { opacity: 0;   transform: scale(2.2); }
}


/* ── Toggle mode debug ──────────────────────────────────────────── */

.pv-theme .pv-navbar-right li a.pv-debug-status {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: oklch(0.65 0.20 300 / 0.12);
  color: oklch(0.88 0.10 300);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.14s;
}

.pv-theme .pv-navbar-right li a.pv-debug-status:hover {
  background: oklch(0.65 0.20 300 / 0.22);
  text-decoration: none;
}

.pv-theme .pv-navbar-right li a.pv-debug-status-off {
  background: oklch(0.65 0.20 300 / 0.05);
  color: oklch(0.65 0.10 300 / 0.50);
}

.pv-theme .pv-navbar-right li a.pv-debug-status-off:hover {
  background: oklch(0.65 0.20 300 / 0.12);
  color: oklch(0.88 0.10 300);
}


/* ── Bouton labellé (personalHeader : raccourcis, actions MODBUS) ── */
/* Spécificité volontairement plus haute (.pv-navbar-right) pour gagner
   sur la règle générique li > a qui a (0,2,2) vs (0,2,0) sinon */

.pv-theme .pv-navbar-right .pv-header-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  background: oklch(1 0 0 / 0.07);
  border: 1px solid oklch(1 0 0 / 0.11);
  color: oklch(0.80 0 0);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.13s, border-color 0.13s, color 0.13s;
  white-space: nowrap;
  flex: none;
}

.pv-theme .pv-navbar-right .pv-header-btn:hover {
  background: oklch(1 0 0 / 0.13);
  border-color: oklch(1 0 0 / 0.20);
  color: #fff;
  text-decoration: none;
}


/* ── Badges ─────────────────────────────────────────────────────── */

.pv-theme .pv-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  height: 17px;
  min-width: 17px;
  padding: 0 4px;
  border-radius: var(--r-pill);
  line-height: 1;
  vertical-align: middle;
  flex: none;
}

.pv-theme .pv-badge-warn  { background: var(--warn);   color: #1a1d23; }
.pv-theme .pv-badge-stop  { background: var(--stop);   color: #fff; }
.pv-theme .pv-badge-ok    { background: var(--ok);     color: #1a1d23; }
.pv-theme .pv-badge-info  { background: var(--info);   color: #fff; }
.pv-theme .pv-badge-muted { background: oklch(1 0 0 / 0.15); color: var(--cmd-fg); }


/* ── Couleurs statut machine ─────────────────────────────────────── */

.pv-theme .app-header .text-success { color: var(--ok)     !important; }
.pv-theme .app-header .text-danger  { color: var(--stop)   !important; }
.pv-theme .app-header .text-warning { color: var(--warn)   !important; }
.pv-theme .app-header .text-info    { color: var(--info)   !important; }
.pv-theme .app-header .text-primary { color: var(--accent) !important; }
.pv-theme .app-header .text-muted   { color: var(--muted)  !important; }


/* ── Animations blink ────────────────────────────────────────────── */

@keyframes pv-blink-stop {
  0%, 100% { color: var(--stop);   opacity: 1;    }
  50%       { color: var(--stop);   opacity: 0.25; }
}

@keyframes pv-blink-accent {
  0%, 100% { color: var(--accent); opacity: 1;    }
  50%       { color: var(--accent); opacity: 0.25; }
}

.pv-theme .ap-text-blink-1000-danger-fl  { animation: pv-blink-stop   1s infinite; }
.pv-theme .ap-text-blink-1000-primary-fl { animation: pv-blink-accent 1s infinite; }


/* ── Dropdowns ───────────────────────────────────────────────────── */

/* Container avec positionnement relatif pour les menus */
.pv-theme .pv-dropdown {
  position: relative;
}

/* Affichage du menu quand ouvert (Angular UI Bootstrap ajoute la class "open") */
.pv-theme .pv-dropdown.open .dropdown-menu {
  display: block;
}

/* Menu aligné à droite (profil) */
.pv-theme .pv-dropdown-end .dropdown-menu {
  right: 0;
  left: auto;
}

/* Style du menu déroulant */
.pv-theme .dropdown-menu {
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  min-width: 200px;
  animation: pv-dropdown-in 0.14s ease forwards;
}

/* Les .pv-menu gèrent leur animation via opacity/visibility/transform —
   le keyframe forwards écraserait l'opacity:0 du state fermé */
.pv-theme .dropdown-menu.pv-menu {
  animation: none;
}

.pv-theme .dropdown-menu > li > a {
  display: block;
  color: var(--text) !important;
  border-radius: var(--r-sm);
  padding: 7px 12px;
  font-size: 13.5px;
  font-family: var(--font-ui);
  text-decoration: none;
  transition: background 0.12s;
}

.pv-theme .dropdown-menu > li > a:hover {
  background: var(--surface-2) !important;
  color: var(--text) !important;
  text-decoration: none;
}

.pv-theme .dropdown-menu .divider {
  background: var(--divider);
  margin: 4px 0;
  height: 1px;
}

/* Modificateurs de flèche (infobulle) pour les dropdowns surface claire */
.pv-theme .dropdown-menu--arrow-tl::before,
.pv-theme .dropdown-menu--arrow-tr::before {
  content: '';
  position: absolute;
  top: -5px;
  width: 10px;
  height: 10px;
  background: var(--elevated);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  transform: rotate(45deg);
  border-radius: 2px 0 0 0;
}

.pv-theme .dropdown-menu--arrow-tl::before { left: 14px; }
.pv-theme .dropdown-menu--arrow-tr::before { right: 14px; }


/* ── Panel dans les dropdowns (équipements MANU, événements) ─────── */

.pv-theme .pv-dropdown-panel {
  padding: 0;
  overflow: hidden;
}

.pv-theme .pv-panel {
  background: var(--elevated);
  border: none;
  box-shadow: none;
  margin: 0;
  color: var(--text);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.pv-theme .pv-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-2);
  border-bottom: 1px solid var(--divider);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  padding: 10px 14px;
}

.pv-theme .pv-panel-head-caret {
  color: var(--text-3);
}

.pv-theme .pv-panel-foot {
  display: flex;
  align-items: center;
  background: var(--surface-2);
  border-top: 1px solid var(--divider);
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
}

.pv-theme .pv-panel-foot a {
  color: var(--accent) !important;
  text-decoration: none;
}

.pv-theme .pv-panel-foot a:hover {
  text-decoration: underline;
}

.pv-theme .pv-panel-foot-right {
  margin-left: auto;
}


/* ── Liste dans les dropdowns ────────────────────────────────────── */

.pv-theme .pv-list {
  overflow-y: auto;
  max-height: 300px;
}

.pv-theme .pv-list-item {
  padding: 9px 14px;
  border-bottom: 1px solid var(--divider);
  color: var(--text);
  font-size: 13px;
}

.pv-theme .pv-list-item:last-child {
  border-bottom: none;
}

.pv-theme .pv-list-item-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-decoration: none;
  color: var(--text) !important;
  transition: background 0.12s;
}

.pv-theme .pv-list-item-link:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.pv-theme .pv-list-item-warn {
  background: var(--warn-soft);
}

/* Événements */
.pv-theme .pv-event-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  object-fit: cover;
  flex: none;
  margin-top: 2px;
}

.pv-theme .pv-event-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.pv-theme .pv-event-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pv-theme .pv-event-label {
  font-size: 12px;
  color: var(--text-2);
}

.pv-theme .pv-event-date {
  font-size: 11px;
  color: var(--text-3);
}


/* ── Bouton notification (icône + dot compteur + texte + flèche) ──── */

.pv-theme .pv-notif-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  color: var(--cmd-fg);
  background: transparent;
  border: none;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  flex: none;
  transition: background 0.13s, color 0.13s;
  white-space: nowrap;
}

.pv-theme .pv-notif-btn:hover,
.pv-theme .pv-notif-btn:focus {
  background: oklch(1 0 0 / 0.10);
  color: #fff;
  text-decoration: none;
}

/* Conteneur icône — margin-right réserve la place pour le dot qui déborde */
.pv-theme .pv-notif-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-right: 5px;
  flex: none;
}

.pv-theme .pv-notif-icon > i {
  font-size: 18px;
  line-height: 1;
}

/* Dot compteur — plus petit, superposé coin haut-droit */
.pv-theme .pv-notif-dot {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 13px;
  height: 13px;
  padding: 0 3px;
  border-radius: var(--r-pill);
  font-size: 8px;
  font-weight: 700;
  font-family: var(--font-ui);
  line-height: 13px;
  text-align: center;
}

/* Événements — bleu accent */
.pv-theme .pv-notif-dot-events {
  background: color-mix(in oklch, var(--accent) 78%, transparent);
  color: #fff;
}
/* Défauts — violet #DA2AFF */
.pv-theme .pv-notif-dot-faults {
  background: color-mix(in oklch, #DA2AFF 78%, transparent);
  color: #fff;
}
/* Manuel — orange */
.pv-theme .pv-notif-dot-manu {
  background: color-mix(in oklch, #FF8C00 78%, transparent);
  color: #fff;
}

/* Label texte */
.pv-theme .pv-notif-label {
  font-size: 12px;
  font-weight: 500;
}

/* Flèche — tourne quand dropdown ouvert */
.pv-theme .pv-notif-caret {
  opacity: 0.55;
  transition: transform 0.18s ease, opacity 0.15s;
  flex: none;
}


/* ── Panneau dropdown Manuel (MANU) ─────────────────────────────── */

.pv-theme .pv-manu-panel {
  min-width: 300px;
  padding: 0;
}

.pv-theme .pv-manu-header {
  padding: 10px 14px;
  border-bottom: 1px solid oklch(1 0 0 / 0.08);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: oklch(1 0 0 / 0.30);
  font-family: var(--font-ui);
}

.pv-theme .pv-manu-list {
  max-height: 300px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: oklch(1 0 0 / 0.12) transparent;
}

.pv-theme .pv-manu-list::-webkit-scrollbar { width: 4px; }

.pv-theme .pv-manu-list::-webkit-scrollbar-thumb {
  background: oklch(1 0 0 / 0.12);
  border-radius: 2px;
}

.pv-theme .pv-manu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: 1px solid oklch(1 0 0 / 0.05);
  transition: background 0.12s;
}

.pv-theme .pv-manu-item:last-child {
  border-bottom: none;
}

.pv-theme .pv-manu-item:hover {
  background: oklch(1 0 0 / 0.04);
}

.pv-theme .pv-manu-item-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--cmd-fg);
  cursor: pointer;
  flex: 1;
  transition: color 0.12s;
}

.pv-theme .pv-manu-item-name:hover {
  color: #fff;
}

.pv-theme .pv-manu-item-btn {
  flex: none;
  height: 26px;
  padding: 0 10px;
  border: none;
  border-radius: var(--r-sm);
  background: color-mix(in oklch, #FF8C00 22%, transparent);
  color: oklch(0.90 0.10 60);
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-ui);
  cursor: pointer;
  transition: background 0.12s;
}

.pv-theme .pv-manu-item-btn:hover {
  background: color-mix(in oklch, #FF8C00 35%, transparent);
}

.pv-theme .pv-manu-item-btn--loading {
  opacity: 0.5;
  cursor: default;
}

.pv-theme .pv-navbar-right > li.open .pv-notif-caret {
  transform: rotate(180deg);
  opacity: 0.9;
}


/* ── Dropdown Défauts actifs (pleine largeur) ────────────────────── */

/* Position static = le menu se positionne par rapport à .app-header.navbar */
/* + séparateur visuel gauche pour marquer le groupe "défauts" */
.pv-theme .pv-faults-item {
  position: static;
}

.pv-theme .pv-faults-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  color: var(--cmd-fg);
  background: oklch(1 0 0 / 0.07);
  border: 1px solid oklch(1 0 0 / 0.11);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.13s, border-color 0.13s, color 0.13s;
  white-space: nowrap;
}

.pv-theme .pv-faults-toggle:hover,
.pv-theme .pv-faults-toggle:focus {
  background: oklch(1 0 0 / 0.13);
  border-color: oklch(1 0 0 / 0.20);
  color: #fff;
  text-decoration: none;
}

.pv-theme .pv-faults-item.open .dropdown-menu,
.pv-theme .pv-faults-item.open .pv-faults-menu {
  display: block;
}

.pv-theme .pv-faults-menu {
  position: absolute;
  top: var(--cmdbar-h);
  left: 0;
  right: 0;
  width: auto;
  max-width: none;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: 16px;
  z-index: 1000;
  color: var(--text);
}


/* ── Icônes section droite — taille alignée sur pv-notif-icon ─────── */

.pv-theme .pv-navbar-right .pv-icon-btn > i,
.pv-theme .pv-navbar-right .pv-icon-btn .text,
.pv-theme .pv-navbar-right .pv-icon-btn .text-active {
  font-size: 18px;
}


/* ── Bouton toggle thème ─────────────────────────────────────────── */

.pv-theme .pv-theme-toggle {
  /* hérite de .pv-icon-btn */
}


/* ── Bouton plein écran ──────────────────────────────────────────── */
/* pv-fs-expand visible par défaut, pv-fs-compress caché.
   html.pv-is-fullscreen (ajouté par pv-theme.js) inverse les deux. */

.pv-fs-compress                          { display: none; }
.pv-is-fullscreen .pv-fs-expand          { display: none; }
.pv-is-fullscreen .pv-fs-compress        { display: inline-block; }


/* ── Profil utilisateur ──────────────────────────────────────────── */

.pv-theme .pv-profile-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  color: var(--cmd-fg);
  font-size: 13px;
  text-decoration: none;
  transition: background 0.13s, color 0.13s;
  white-space: nowrap;
  cursor: pointer;
}

.pv-theme .pv-profile-btn:hover,
.pv-theme .pv-profile-btn:focus {
  background: oklch(1 0 0 / 0.10);
  color: #fff;
  text-decoration: none;
}

.pv-theme .pv-user-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.pv-theme .pv-user-avatar img {
  width: 20px;
  height: 20px;
  border-radius: var(--r-pill);
  object-fit: cover;
  box-shadow: 0 0 0 1.5px var(--cmd-bg), 0 0 0 3px oklch(1 0 0 / 0.22);
  transition: box-shadow 0.14s;
  margin-right: 4px;
}

.pv-theme .pv-profile-btn:hover .pv-user-avatar img,
.pv-theme .pv-profile-btn:focus .pv-user-avatar img {
  box-shadow: 0 0 0 1.5px var(--cmd-bg), 0 0 0 3px oklch(1 0 0 / 0.50);
}

.pv-theme .pv-user-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pv-theme .pv-version-item {
  font-family: var(--font-mono);
  font-size: 11px;
  color: oklch(1 0 0 / 0.30) !important;
  cursor: pointer;
}

.pv-theme .pv-version-item:hover {
  color: oklch(1 0 0 / 0.60) !important;
}

[data-theme="light"] .pv-theme .pv-version-item {
  color: oklch(0.4 0 0 / 0.45) !important;
}

[data-theme="light"] .pv-theme .pv-version-item:hover {
  color: oklch(0.2 0 0 / 0.75) !important;
}


