/* =========================================================
   Gestion Client v0.4.2 — Navigation mobile iPhone
   Corrige l'ordre des calques, les cibles tactiles et
   l'alignement des actions dans l'entête cellulaire.
   ========================================================= */

@media (max-width: 1050px) {
  /* Le menu doit rester au-dessus du voile pour recevoir les touchers. */
  .gc-sidebar {
    z-index: 1200;
    pointer-events: auto;
  }

  .gc-overlay {
    z-index: 1100;
  }

  .gc-topbar {
    z-index: 1000;
  }

  .gc-menu-toggle {
    width: 48px;
    height: 48px;
    min-width: 48px;
    flex: 0 0 48px;
    padding: 0;
    border-radius: 12px;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    touch-action: manipulation;
  }

  .gc-menu-toggle:active,
  .gc-menu-toggle:focus-visible {
    background: color-mix(in srgb, var(--gc-header-fg) 10%, transparent);
  }

  .gc-mobile-brand {
    min-width: 0;
    flex: 0 1 auto;
  }

  .gc-top-actions {
    margin-left: auto;
    flex: 0 0 auto;
  }

  /* La règle desktop de 150 px créait le grand vide à droite sur iPhone. */
  .gc-header-profile {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    justify-content: center;
  }

  .gc-header-profile > div {
    display: none;
  }

  .gc-header-profile .gc-avatar {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    border-radius: 10px;
  }
}

@media (max-width: 620px) {
  .gc-topbar {
    min-height: 72px;
    height: 72px;
    padding: 0 10px;
    gap: 6px;
  }

  .gc-mobile-brand {
    margin-left: 2px;
    margin-right: 0;
  }

  .gc-mobile-brand .gc-brand-logo {
    max-width: 106px;
    max-height: 36px;
  }

  .gc-top-actions {
    gap: 6px;
  }

  .gc-language,
  .gc-renewal-count,
  .gc-header-profile {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .gc-renewal-count {
    padding: 0 6px;
    gap: 4px;
  }
}

@media (max-width: 390px) {
  .gc-topbar {
    padding: 0 7px;
    gap: 4px;
  }

  .gc-menu-toggle {
    width: 46px;
    min-width: 46px;
    flex-basis: 46px;
  }

  .gc-mobile-brand .gc-brand-logo {
    max-width: 92px;
  }

  .gc-top-actions {
    gap: 4px;
  }
}
