/* ============================================================
   mobile.css - Informatique86
   Styles responsive pour utilisation sur smartphone (Steve)
   ============================================================ */

@media (max-width: 768px) {

  /* ── NAVIGATION ── */
  nav {
    height: auto;
    padding: 0;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 200;
  }

  .nav-logo {
    padding: 12px 16px;
    font-size: 1.2rem;
  }

  /* Menu burger */
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 8px 0;
    border-top: 1px solid rgba(255,255,255,0.07);
    background: var(--card);
    gap: 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 20px;
    border-radius: 0;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
  }

  .nav-user {
    padding: 8px 16px;
    font-size: 0.8rem;
  }

  .btn-logout {
    font-size: 0.75rem;
    padding: 4px 10px;
  }

  /* Bouton burger */
  .burger-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    margin-right: 8px;
  }

  /* ── CONTAINER ── */
  .container {
    padding: 12px;
    max-width: 100%;
  }

  /* ── GRILLES ── */
  .grid-2,
  .form-grid,
  .form-grid.three,
  .stats-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  /* ── CARDS ── */
  .card {
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 10px;
  }

  /* ── PAGE HEADER ── */
  .page-header {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
  }

  .header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }

  .header-actions .btn {
    flex: 1;
    min-width: calc(50% - 4px);
    justify-content: center;
    font-size: 0.82rem;
    padding: 10px 8px;
  }

  /* ── TITRES ── */
  .page-title,
  .client-title {
    font-size: 1.4rem !important;
  }

  /* ── TABLEAUX ── */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 500px;
  }

  th, td {
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  /* ── FORMULAIRES ── */
  input, select, textarea {
    font-size: 16px !important; /* Évite le zoom auto iOS */
    padding: 12px 14px;
  }

  .btn-save,
  .btn-submit {
    padding: 16px;
    font-size: 1rem;
  }

  /* ── BOUTONS d'action ── */
  .btn {
    padding: 10px 14px;
    font-size: 0.85rem;
  }

  /* ── SECTION HEADER ── */
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .section-title {
    font-size: 1rem;
  }

  /* ── STATUTS GRID ── */
  .statuts-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px;
  }

  .statut-item {
    padding: 10px;
  }

  .statut-label {
    font-size: 0.8rem;
  }

  .statut-sub {
    font-size: 0.7rem;
  }

  /* ── PRIX TOTAL ── */
  .prix-total {
    font-size: 1.2rem;
    padding: 12px;
  }

  /* ── TYPE SELECTOR (nouvelle intervention) ── */
  .type-selector {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
  }

  .type-label {
    padding: 10px;
  }

  .type-label .icon {
    font-size: 1.2rem;
  }

  /* ── MODE SELECTOR (facture) ── */
  .mode-selector,
  .type-selector-facture {
    flex-direction: column;
    gap: 8px;
  }

  /* ── LIGNES FACTURE ── */
  .lignes-table {
    font-size: 0.8rem;
  }

  .lignes-table input {
    font-size: 14px !important;
    padding: 6px 8px;
  }

  /* ── PIÈCES JOINTES ── */
  .pj-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* ── UPLOAD ZONE ── */
  .upload-zone {
    padding: 16px;
  }

  /* ── INFO ROWS ── */
  .info-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 8px 0;
  }

  .info-value {
    text-align: left !important;
    max-width: 100% !important;
  }

  /* ── ACTIONS TABLE ── */
  .actions {
    flex-direction: column;
    gap: 4px;
  }

  .actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* ── RETOUR CARD ── */
  .retour-card {
    margin-top: 0;
  }

  /* ── NOTES TEXTAREA ── */
  textarea[name="notes"] {
    min-height: 100px !important;
  }

  /* ── FACTURE PDF - boutons d'impression ── */
  .actions.pdf-actions {
    flex-direction: column;
    padding: 12px;
    gap: 8px;
  }

  .btn-print,
  .btn-back {
    width: 100%;
    text-align: center;
    padding: 14px;
    font-size: 0.95rem;
  }

  /* ── STAT CARDS ── */
  .stat-card {
    padding: 14px;
    gap: 10px;
  }

  .stat-icon {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }

  .stat-info .number {
    font-size: 1.6rem;
  }

  /* ── RECHERCHE CLIENT ── */
  #client-results {
    max-height: 200px;
  }

  .client-result {
    padding: 10px 14px;
  }

  /* ── DATES RAPIDES (rappels) ── */
  .dates-rapides {
    gap: 6px;
  }

  .date-btn {
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  /* ── HIDE sur mobile ── */
  .mobile-hide {
    display: none !important;
  }

  /* ── SHOW sur mobile seulement ── */
  .mobile-only {
    display: block !important;
  }

}

/* Par défaut, cacher les éléments mobile-only */
.mobile-only {
  display: none;
}

/* Burger button caché sur desktop */
.burger-btn {
  display: none;
}
@media (max-width: 768px) {
  /* Masquer colonnes inutiles pour Steve sur mobile */
  table th:nth-child(5),
  table td:nth-child(5),
  table th:nth-child(6),
  table td:nth-child(6) {
    display: none;
  }

 /* Réduire hauteur des lignes tableau */
  td {
    padding: 6px 8px !important;
    font-size: 0.78rem !important;
    line-height: 1.3 !important;
  }

  /* Masquer colonne Travail sur mobile */
  table th:nth-child(4),
  table td:nth-child(4) {
    display: none;
  }