/* ═══════════════════════════════════════════════════════════════════
   CALEDOHUB STABILIZE v1 — Cache temporairement 3 widgets parasites
   pendant la stabilisation du design global.
   À supprimer pour les remettre.

   Cachés:
   1. PWA Install Banner (Installer CaleDoHub)
   2. AI Chatbot FAB (Recherche IA)
   3. Theme Toggle / Mode Nuit (bouton lune flottant)
   ═══════════════════════════════════════════════════════════════════ */

/* ─── 1. PWA Install Banner — toutes variantes ──────────────────── */
#ch-install-banner,
.ch-install-banner,
.ch-pwa-banner,
[class*="chpwa-body"],
[class*="chpwa-actions"],
[class*="chpwa-btn"],
[class*="chpwa-ico"],
[class*="chpwa-ios"],
[id*="install-banner"],
[id*="pwa-banner"],
[id*="pwa-prompt"],
[class*="install-prompt"],
[class*="pwa-prompt"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  position: absolute !important;
  left: -99999px !important;
}

/* Toast install (premium-ui le crée via toast()) — fallback */
.cds-toast[data-pwa-install],
.cds-toast:has(button.cds-btn-primary:contains("Installer")) {
  display: none !important;
}

/* ─── 2. AI Chatbot FAB + box + styles ────────────────────────────── */
.chai-fab,
.chai-box,
.chai-head,
.chai-msgs,
.chai-form,
.chai-quick,
.chai-close,
.chai-msg,
#ch-ai-styles,
#ch-ai-chatbot,
[class*="chai-fab"],
[class*="ai-chatbot"],
[id*="ai-chatbot"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Bouton "Recherche IA" — toutes variantes textuelles */
button[aria-label*="Recherche IA" i],
button[title*="Recherche IA" i],
button[title*="Assistant IA" i],
button[aria-label*="Assistant IA" i],
a[aria-label*="Recherche IA" i],
a[title*="Recherche IA" i],
[data-action="ai-search"],
[class*="ai-search"],
[class*="search-ai"],
[id*="ai-search"],
[id*="search-ai"],
/* Bouton chai-fab : robot emoji + chatbot — caché definitivement */
.chai-fab, .chai-box, .chai-head, .chai-msgs, .chai-form, .chai-quick, .chai-close, .chai-msg,
button.chai-fab, button[class*="chai-"],
/* Tous les bouton 'bubble' du fab stack */
.fab-bubble, [class*="fab-bubble"],
#bubbleVol, #bubbleGame, #bubbleBot,
.vol-fab, #volFab,
.game-fab, #gameFab,
#cdd-grp-fab,
/* Les FAB site-switcher mini avec emoji palmier/icône */
[class*="site-switch-mini"],
[id*="site-switch-mini"],
[class*="cdh-uh-mini"],
button[class*="quickswitch"],
button[title="🌴 Hub"],
button[title="Hub"][class*="fab"],
/* Catch tout bouton fixed bottom-right avec emoji 🌴 ou 🌙 ou 🤖 */
button[style*="position:fixed"][style*="bottom"][style*="right"],
button[style*="position: fixed"][style*="bottom"][style*="right"],
div[style*="position:fixed"][style*="bottom"][style*="right"][role="button"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  position: absolute !important;
  left: -99999px !important;
  width: 0 !important;
  height: 0 !important;
  transform: scale(0) !important;
  opacity: 0 !important;
}

/* Exception : on garde #ch-admin-shortcut + #ch-devis-widget-btn (qui peuvent matcher) */
#ch-admin-shortcut,
#ch-devis-widget-btn,
.ch-devis-btn {
  display: inline-block !important;
  visibility: visible !important;
  pointer-events: auto !important;
  position: fixed !important;
  left: auto !important;
  width: auto !important;
  height: auto !important;
  transform: scale(1) !important;
  opacity: 1 !important;
}

/* ─── 3. Theme Toggle / Mode Nuit — toutes variantes ──────────────── */
.ch-dark-toggle,
.cds-theme-toggle,
[class*="dark-toggle"],
[class*="theme-toggle"],
[class*="night-mode-toggle"],
[id*="dark-toggle"],
[id*="theme-toggle"],
button[title*="thème" i],
button[aria-label*="thème" i],
button[title*="Thème" i],
button[aria-label*="Mode nuit" i],
button[title*="Mode nuit" i] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Theme toggle dans le header CDS spécifiquement */
#cds-header button[title*="thème" i],
#cds-header .cds-icon-btn[aria-label*="thème" i],
.ch-top-bar button[title*="thème" i] {
  display: none !important;
}

/* ─── Marker idempotence ─────────────────────────────────────────── */
/* CDS-STABILIZE-V1 */
