/* Extrait fidèle : qloa-mobile.css lignes187–445 ; header/tabbar existants. Adaptations de cohérence dans mobile-proposal.css. */
.qm-header,.qm-tabbar,.qm-mobile-fab,.qm-view-strip{display:none}
@media(max-width:768px){
:root{--qm-safe-bottom:env(safe-area-inset-bottom,0px);--qm-header-h:56px;--qm-tabbar-h:78px;--qm-bg:#F5F5F7;--qm-bg-elev:#fff;--qm-border:rgba(0,0,0,.08);--qm-text:#000;--qm-text-2:#6B7280}
  .qm-header {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky, 30);
    height: var(--qm-header-h);
    padding: 4px 12px;
    /* !important : sinon .qm-mobile-only (display:block, défini plus bas) écrase le flex quand les 2 classes coexistent */
    display: flex !important;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 0.5px solid var(--qm-border);
    flex-shrink: 0;
    /* Tap highlight suppression */
    -webkit-tap-highlight-color: transparent;
  }

  .dark .qm-header {
    background: rgba(28, 28, 30, 0.92);
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }

  /* Titre + sous-titre (flex:1 + overflow ellipsis = nowrap sans wrap) */
  .qm-header-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
  }

  .qm-header-title h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--qm-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
  }

  /* .qm-sub : sous-titre nowrap+ellipsis (règle #60 maquette canon) */
  .qm-sub {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--qm-text-2);
    margin-top: -1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Bouton icône standard (touch target 44 px WCAG) */
  .qm-icon-btn {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--qm-text);
    cursor: pointer;
    position: relative;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
  }

  .dark .qm-icon-btn {
    background: rgba(255, 255, 255, 0.08);
    color: var(--qm-text);
  }

  .qm-icon-btn:active {
    background: rgba(0, 0, 0, 0.12);
    transform: scale(0.92);
  }

  .dark .qm-icon-btn:active {
    background: rgba(255, 255, 255, 0.15);
  }

  /* Badge notification sur icon-btn */
  .qm-icon-btn .qm-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #dc2626;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--qm-bg-elev);
  }


  /* ==========================================================================
     QM-TABBAR — bottom navigation 4-5 onglets
     HTML :
       <nav class="qm-tabbar">
         <button class="qm-tab active" type="button">
           <i class="fas fa-inbox"></i>
           <span>Inbox</span>
         </button>
         <button class="qm-tab" type="button">
           <i class="fas fa-ticket"></i>
           <span>Tickets</span>
           <span class="qm-tab-badge">5</span>
         </button>
         <!-- … 2-3 autres onglets … -->
       </nav>
     ========================================================================== */

  .qm-tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--z-sticky, 30);
    height: calc(var(--qm-tabbar-h) + var(--qm-safe-bottom));
    padding: 8px 8px calc(8px + var(--qm-safe-bottom));
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 0.5px solid var(--qm-border);
    -webkit-tap-highlight-color: transparent;
  }

  .dark .qm-tabbar {
    background: rgba(28, 28, 30, 0.92);
    border-top-color: rgba(255, 255, 255, 0.08);
  }

  /* Espace sous le contenu scrollable pour ne pas masquer le dernier item */
  .qm-tabbar-spacer {
    display: block;
    height: calc(var(--qm-tabbar-h) + var(--qm-safe-bottom));
    flex-shrink: 0;
  }

  /* Blocs visibles uniquement sur mobile */
  .qm-mobile-only {
    display: block;
  }

  .qm-tab {
    flex: 1;
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--qm-text);
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
    opacity: 0.4;
    position: relative;
    padding: 4px 0 0;
    transition: opacity 0.15s;
    -webkit-tap-highlight-color: transparent;
    min-width: 44px; /* touch target horizontal */
  }

  .qm-tab i {
    font-size: 20px;
    transition: transform 0.2s cubic-bezier(0.32, 1.5, 0.5, 1);
  }

  .qm-tab.active {
    opacity: 1;
    font-weight: 800;
  }

  .qm-tab:active {
    transform: scale(0.92);
  }

  .qm-tab:active i {
    transform: scale(0.85);
  }

  /* Badge sur onglet tabbar */
  .qm-tab-badge {
    position: absolute;
    top: 0;
    right: 30%;
    background: #dc2626;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--qm-bg-elev);
    animation: qm-badge-bounce 0.5s cubic-bezier(0.32, 1.8, 0.5, 1);
  }

  @keyframes qm-badge-bounce {
    0%   { transform: scale(0); }
    100% { transform: scale(1); }
  }

  /* Onglet central "Qloa" (logo flottant au-dessus de la barre) */
  .qm-tab.qm-tab--qloa {
    opacity: 1 !important;
    margin-top: -38px;
    flex: 0 0 70px;
  }

  .qm-tab.qm-tab--qloa i {
    background: #fff;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22), 0 2px 8px rgba(0, 0, 0, 0.12);
    border: 4px solid var(--qm-bg-elev);
    font-size: 20px;
  }

  /* Bouton central avec le VRAI logo Qloa (img) — badge circulaire blanc */
  .qm-tab.qm-tab--qloa .qm-qloa-logo {
    width: 64px; height: 64px; border-radius: 50%; background: #fff;
    padding: 13px; box-sizing: border-box; object-fit: contain; display: block;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22), 0 2px 8px rgba(0, 0, 0, 0.12);
    border: 4px solid var(--qm-bg-elev);
  }
  .dark .qm-tab.qm-tab--qloa .qm-qloa-logo { background: #1C1C1E; border-color: var(--qm-bg); }

  .dark .qm-tab.qm-tab--qloa i {
    background: #1C1C1E;
    border-color: var(--qm-bg);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
  }



}
