/* ==========================================================================
   Suada — Dinia Features & Co-Sellers Styling
   Composants : Compte Dinia (Avatar, Modal/Dropdown), Sélecteur Co-vendeurs (@)
   Standard : Sovereign Dark Mode, Lucide SVG, Règle 22 (Zero Emoji), Règle 18 (<800L)
   ========================================================================== */

/* User Account Dropdown in Header */
.user-account-wrapper {
  position: relative;
  display: inline-flex;
}

.btn-user-account {
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 160, 23, 0.3);
  color: var(--suada-gold, #d4a017);
  font-weight: 700;
  font-size: 13px;
  overflow: hidden;
}

.btn-user-account:hover {
  background: rgba(212, 160, 23, 0.15);
  border-color: var(--suada-gold, #d4a017);
}

.user-avatar-initials {
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.user-account-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 290px;
  background: rgba(14, 18, 27, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(212, 160, 23, 0.35);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(212, 160, 23, 0.1);
  padding: 16px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: fadeInDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.user-account-dropdown.hidden {
  display: none !important;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.account-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.account-avatar-large {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(212, 160, 23, 0.25), rgba(212, 160, 23, 0.08));
  border: 1px solid rgba(212, 160, 23, 0.5);
  color: var(--suada-gold, #d4a017);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.account-user-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.account-user-name {
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-user-email {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-badge-role {
  display: inline-block;
  align-self: flex-start;
  margin-top: 4px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(212, 160, 23, 0.15);
  color: var(--suada-gold, #d4a017);
  border: 1px solid rgba(212, 160, 23, 0.3);
  border-radius: 4px;
}

.account-dropdown-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}

.account-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
}

.account-info-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.6);
}

.account-info-label i {
  width: 14px;
  height: 14px;
}

.account-info-value {
  font-weight: 500;
  color: #fff;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.text-gold {
  color: var(--suada-gold, #d4a017) !important;
}

.account-dropdown-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.account-action-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.account-action-link:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
}

.account-btn-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 12px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  color: #fca5a5;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.account-btn-logout:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fff;
}

/* ==========================================================================
   Co-Sellers & @ Auto-completion (Iris Standard)
   ========================================================================== */

.co-sellers-input-group {
  position: relative;
}

.input-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.btn-hint-add-coseller {
  background: none;
  border: none;
  color: var(--suada-gold, #d4a017);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.btn-hint-add-coseller:hover {
  background: rgba(212, 160, 23, 0.1);
}

.btn-hint-add-coseller i {
  width: 12px;
  height: 12px;
}

.co-sellers-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.co-sellers-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
}

.coseller-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  font-size: 12px;
  color: #fff;
  transition: all 0.2s ease;
}

.coseller-chip i {
  width: 13px;
  height: 13px;
}

.coseller-chip.primary-chip {
  background: rgba(212, 160, 23, 0.12);
  border-color: rgba(212, 160, 23, 0.4);
  color: var(--suada-gold, #d4a017);
  font-weight: 600;
}

.coseller-chip.companion-chip {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}

.btn-remove-chip {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-left: 2px;
  opacity: 0.7;
}

.btn-remove-chip:hover {
  opacity: 1;
  color: #ef4444;
}

.btn-remove-chip i {
  width: 12px;
  height: 12px;
}

/* Dropdown Co-Seller Suggestions */
.co-seller-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: rgba(14, 18, 27, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(212, 160, 23, 0.35);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
  padding: 8px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 220px;
  overflow-y: auto;
}

.co-seller-dropdown.hidden {
  display: none !important;
}

.coseller-dropdown-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.5);
  padding: 4px 8px;
  font-weight: 600;
}

.coseller-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
  font-size: 13px;
  color: #fff;
}

.coseller-option:hover,
.coseller-option.active {
  background: rgba(212, 160, 23, 0.15);
}

.coseller-option-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.coseller-option-name {
  font-weight: 500;
}

.coseller-option-role {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
}

.coseller-option-status {
  font-size: 11px;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 4px;
}

.coseller-option-status i {
  width: 12px;
  height: 12px;
}


/* --- Header Actions Compaction & Fit --- */
.header-actions {
  gap: 5px !important;
  flex-shrink: 0 !important;
  flex-wrap: nowrap !important;
}

.header-actions .btn-icon {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  border-radius: 10px !important;
}

.header-actions .btn-icon i,
.header-actions .btn-icon svg {
  width: 17px !important;
  height: 17px !important;
}

.pill-badge {
  padding: 4px 8px !important;
  font-size: 0.72rem !important;
}

/* --- Fix Stacking Context for Co-Sellers Dropdown Over Cockpit --- */
.context-card {
  position: relative !important;
  z-index: 50 !important;
  overflow: visible !important;
}

.co-sellers-input-group {
  position: relative !important;
  z-index: 60 !important;
}

.co-seller-dropdown {
  position: absolute !important;
  top: calc(100% + 4px) !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 1000 !important;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.95), 0 0 20px rgba(212, 160, 23, 0.25) !important;
}

/* ==========================================================================
   Suada — Stacking Context & Responsive Overrides (20260926_1850)
   ========================================================================== */

/* 1. Stacking Context Absolu : Context-card au-dessus de tout cockpit enregistreur */
.context-card {
  position: relative !important;
  z-index: 100 !important;
  overflow: visible !important;
}

.recorder-cockpit {
  position: relative !important;
  z-index: 1 !important;
}

.co-sellers-input-group {
  position: relative !important;
  z-index: 120 !important;
  overflow: visible !important;
}

.co-seller-dropdown {
  position: absolute !important;
  top: calc(100% + 4px) !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 2000 !important;
  background: rgba(14, 18, 27, 0.98) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(212, 160, 23, 0.45) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95), 0 0 25px rgba(212, 160, 23, 0.25) !important;
}

/* 1b. TIROIRS & MODALES PLEIN ÉCRAN (Studio IA & Entraînement, Historique, Modales) */
/* Priorité absolue z-index 9000+ pour recouvrir TOUTES les cartes et dropdowns sans fuite */
.drawer-backdrop,
#aiDrawerBackdrop,
#drawerBackdrop,
.modal-backdrop,
#auditModalBackdrop,
#iosModalBackdrop,
.vp-modal-backdrop {
  z-index: 9000 !important;
}

.drawer-panel,
.drawer-backdrop .drawer-panel,
#aiDrawerBackdrop .drawer-panel,
#drawerBackdrop .drawer-panel,
.modal-card,
.vp-modal-card {
  z-index: 9001 !important;
}

/* 2. Responsive Mobile : Passage en 1 colonne pour éliminer le tassement à droite */
@media (max-width: 600px) {
  .context-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .input-label-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
  }

  .btn-hint-add-coseller {
    font-size: 11px !important;
    white-space: nowrap !important;
  }
}

/* 3. Neutralisation inconditionnelle du bouton FAB flottant */
#btnRefreshApp {
  position: relative !important;
  bottom: auto !important;
  right: auto !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  border-radius: var(--radius-md, 12px) !important;
  background: var(--card-bg, rgba(15, 23, 42, 0.75)) !important;
  color: var(--text-main, #f8fafc) !important;
  border: 1px solid var(--card-border, rgba(255, 255, 255, 0.08)) !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 10 !important;
}

/* 4. Alignement Header Actions */
.header-actions {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  flex-shrink: 0 !important;
  flex-wrap: nowrap !important;
}

.header-actions .btn-icon {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
}

@media (max-width: 480px) {
  .header-actions {
    gap: 4px !important;
  }
  .header-actions .btn-icon {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
  }
}


/* --- Ultra Compact Mobile Header (< 640px, Android & iPhone) --- */
@media (max-width: 640px) {
  .app-header {
    gap: 4px !important;
    padding-bottom: 10px !important;
  }

  .brand-wrapper {
    flex-shrink: 0 !important;
  }

  .brand-logo-full {
    height: 18px !important;
    max-width: 80px !important;
  }

  .brand-subtitle {
    display: none !important;
  }

  /* Affichage complet et unifié des 3 boutons PWA, Refresh et AI Reflex sur smartphone */
  #btnInstallApp,
  #btnRefreshApp,
  #btnAiReflex,
  #btnVoiceprint,
  #btnHistory {
    display: inline-flex !important;
  }

  .header-actions {
    gap: 3px !important;
    margin-left: auto !important;
    flex-shrink: 0 !important;
    flex-wrap: nowrap !important;
  }

  .header-actions .btn-icon {
    width: 27px !important;
    height: 27px !important;
    min-width: 27px !important;
    max-width: 27px !important;
    border-radius: 7px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: rgba(15, 23, 42, 0.75) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--text-main, #f8fafc) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .header-actions .btn-icon i,
  .header-actions .btn-icon svg {
    width: 14px !important;
    height: 14px !important;
    color: var(--text-main, #f8fafc) !important;
  }

  /* Ciblage strict de connectionPill pour ne JAMAIS forcer l'affichage de offlineQueueBadge (bouton rouge parasite) */
  #connectionPill {
    padding: 0 !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(16, 185, 129, 0.15) !important;
    border: 1px solid rgba(16, 185, 129, 0.35) !important;
  }

  #connectionPill .pulse-dot {
    margin: 0 !important;
  }

  #connectionPill #connectionText {
    display: none !important;
  }

  /* Neutralisation totale du badge rouge parasite hors-ligne sur mobile */
  #offlineQueueBadge {
    display: none !important;
  }

  .user-avatar-initials {
    font-size: 10px !important;
    font-weight: 700 !important;
  }

  /* Clavier virtuel Android : ajustement hauteur max dropdown pour zéro recouvrement */
  .co-seller-dropdown {
    max-height: 170px !important;
  }
}

.coseller-option-status.uncalibrated {
  color: rgba(255, 255, 255, 0.45) !important;
  font-size: 11px !important;
}

/* ==========================================================================
   Onglets Guide Installation PWA (iPhone iOS vs Android Chrome)
   ========================================================================== */
.pwa-platform-tabs {
  display: flex;
  gap: 8px;
  background: rgba(15, 23, 42, 0.75);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 16px;
}

.pwa-tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted, #94a3b8);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pwa-tab-btn:hover {
  color: #f8fafc;
}

.pwa-tab-btn.active {
  background: var(--suada-gold, #CC9F33) !important;
  color: #070a13 !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 10px rgba(204, 159, 51, 0.35) !important;
}

.pwa-tab-btn.active i,
.pwa-tab-btn.active svg {
  color: #070a13 !important;
}

/* --- Lead Suada In-Car Controller --- */
.btn-lead-suada {
  color: #c084fc !important;
  background: rgba(168, 85, 247, 0.1) !important;
  border: 1px solid rgba(168, 85, 247, 0.25) !important;
  transition: all 0.2s ease;
}
.btn-lead-suada:hover {
  background: rgba(168, 85, 247, 0.25) !important;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.4);
}
.lead-suada-active-bar {
  position: relative;
  max-width: 860px;
  width: 100%;
  margin: 0 auto 16px auto;
  background: linear-gradient(90deg, rgba(30, 27, 75, 0.92), rgba(49, 46, 129, 0.92), rgba(30, 27, 75, 0.92));
  border: 1px solid rgba(168, 85, 247, 0.45);
  border-radius: var(--radius-md, 12px);
  padding: 12px 18px;
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-sizing: border-box;
  z-index: 50;
  display: none;
}
.lead-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: 0.88rem;
  color: #fff;
}
.lead-bar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  color: #ffffff;
}
.lead-bar-title i {
  color: #c084fc;
}
.lead-pulse-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 10px #f59e0b;
  margin-right: 8px;
  flex-shrink: 0;
  display: inline-block;
  animation: pulse-ring 1s infinite;
}
.lead-bar-gps {
  font-size: 0.76rem;
  color: #c084fc;
  background: rgba(168, 85, 247, 0.2);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(168, 85, 247, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.lead-bar-subhint {
  font-size: 0.78rem;
  color: #c084fc;
  margin-top: 2px;
  opacity: 0.9;
}


/* ==========================================================================
   Menu Gaufre / App Switcher 9 Points (Standard Dinia.ai Suite)
   ========================================================================== */
.app-switcher-container {
  position: relative;
}

.btn-app-switcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-app-switcher:hover,
.btn-app-switcher.active {
  color: var(--text-main);
  background: var(--bg-hover);
  border-color: var(--suada-gold);
}

.app-switcher-container {
  position: relative !important;
  z-index: 100000 !important;
}

.app-switcher-dropdown {
  position: absolute !important;
  top: calc(100% + 10px) !important;
  right: 0 !important;
  width: 380px !important;
  box-sizing: border-box !important;
  background: rgba(14, 18, 27, 0.98) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 14px !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 47, 167, 0.25) !important;
  padding: 12px !important;
  z-index: 100001 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  animation: appSwitcherFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1) !important;
  overflow: hidden !important;
}

@media (max-width: 768px) {
  .app-switcher-dropdown {
    position: fixed !important;
    top: 72px !important;
    left: auto !important;
    right: 12px !important;
    width: 340px !important;
    max-width: calc(100vw - 24px) !important;
    z-index: 999999 !important;
  }
}

.app-switcher-dropdown.hidden {
  display: none !important;
}

@keyframes appSwitcherFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.app-switcher-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 4px 6px 8px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.app-switcher-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.app-switcher-subtitle {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
}

.app-switcher-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-top: 4px;
}

.app-switcher-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.15s ease;
  background: transparent;
  min-width: 0;
  box-sizing: border-box;
  outline: none;
}

.app-switcher-item:hover,
.app-switcher-item:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.app-switcher-item.active {
  background: rgba(204, 159, 51, 0.12);
  border-color: rgba(204, 159, 51, 0.35);
}

.app-switcher-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.app-switcher-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.app-switcher-item-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  flex: 1;
}

.app-switcher-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.app-switcher-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-switcher-active-tag {
  font-size: 0.6rem;
  font-weight: 700;
  color: #070a12;
  background: #CC9F33;
  padding: 1px 4px;
  border-radius: 4px;
  text-transform: uppercase;
  line-height: 1;
  flex-shrink: 0;
}

.app-switcher-desc {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-switcher-item-hub {
  grid-column: span 2;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 4px;
  padding-top: 10px;
}

/* --- AUTH HEADER BUTTON --- */
.btn-auth-header {
  background: rgba(0, 47, 167, 0.15);
  border: 1px solid rgba(0, 47, 167, 0.4);
  color: #60a5fa;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-auth-header:hover {
  background: rgba(0, 47, 167, 0.3);
  border-color: #3b82f6;
  color: #ffffff;
}

.btn-auth-header img {
  width: 14px;
  height: 14px;
}

/* --- SOUVERAINETÉ & ORGANISATION SUADA (CHARTE DINIA IRIS) --- */
.security-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #10b981;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  user-select: none;
  white-space: nowrap;
}

.security-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.tenant-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: none;
}

.tenant-badge i {
  width: 12px;
  height: 12px;
  color: #94a3b8;
}

/* Masquage strict sur mobile (Règle Romain & Parité Iris) */
@media (max-width: 768px) {
  .tenant-badge,
  .security-badge {
    display: none !important;
  }
}

/* Bouton Avatar Compte Dinia (Google-style / Iris-style) */
.account-avatar-btn,
.btn-user-account {
  background: none !important;
  border: 2px solid transparent !important;
  border-radius: 50% !important;
  padding: 2px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  transition: all 0.15s ease !important;
}

.account-avatar-btn:hover,
.btn-user-account:hover,
.account-avatar-btn:focus-visible,
.btn-user-account:focus-visible {
  border-color: rgba(59, 130, 246, 0.6) !important;
  transform: scale(1.05) !important;
}

.avatar-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  padding: 5px;
}

.avatar-picto-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* --- FAB ACTUALISER MOBILE FAÇON JANUS --- */
@media (max-width: 768px) {
  #btnRefreshApp {
    position: fixed !important;
    bottom: calc(20px + env(safe-area-inset-bottom, 0)) !important;
    right: calc(16px + env(safe-area-inset-right, 0)) !important;
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--suada-gold, #CC9F33) !important;
    color: #070a12 !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(204, 159, 51, 0.4) !important;
    z-index: 95 !important;
    cursor: pointer !important;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease !important;
  }

  #btnRefreshApp:active {
    transform: scale(0.92) !important;
  }

  #btnRefreshApp i {
    width: 20px !important;
    height: 20px !important;
    color: #070a12 !important;
  }
}
