/* ═══════════════════════════════════════════════════════
   MOBILE STYLES — AgencyBox
   Breakpoint : max-width 1023px  (< lg Tailwind)
   Ce fichier est chargé sur toutes les pages via head.ejs.
   Le desktop n'est JAMAIS affecté par ces règles.
   ═══════════════════════════════════════════════════════ */

/* Desktop : cacher la barre basse */
.mobile-bottom-nav { display: none; }

@media (max-width: 1023px) {

  /* ──────────────────────────────────────────────────
     1. BARRE DE NAVIGATION BASSE
  ────────────────────────────────────────────────── */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: white;
    border-top: 1px solid #e2e8f0;
    z-index: 40;
    /* Encoche iPhone : ajoute de l'espace sous la barre d'accueil */
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.15s;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-nav-item:hover,
  .mobile-nav-item.active {
    color: var(--accent-from, #3b82f6);
  }

  /* ──────────────────────────────────────────────────
     2. PADDING DE CONTENU
     Empêche la barre basse de masquer le bas des pages
  ────────────────────────────────────────────────── */
  .ml-60 {
    padding-bottom: 64px !important;
  }

  /* ──────────────────────────────────────────────────
     3. ÉDITEURS — EMPILEMENT VERTICAL
     Écrase le layout deux-colonnes lg+ de src/input.css.
     Ordre DOM : .editor-form en haut, .editor-preview en bas.
  ────────────────────────────────────────────────── */
  body:has(.editor-main) {
    overflow: auto !important;
  }

  .editor-main {
    height: auto !important;
    overflow: visible !important;
  }

  .editor-body {
    display: block !important;
  }

  .editor-form {
    padding: 1rem;
  }

  .editor-preview {
    width: 100% !important;
    border-left: none !important;
    border-top: 1px solid #e2e8f0;
    background: #f1f5f9;
    padding: 1rem;
  }

  /* ──────────────────────────────────────────────────
     4. TABLEAUX — SCROLL HORIZONTAL
     Les tables de liste (QR codes, signatures, projets…)
     deviennent scrollables en largeur.
  ────────────────────────────────────────────────── */
  main table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

}
