/* ════════════════════════════════════════════════════════════
   KONO COMPANY — Responsive Global
   Couvre : Phone · Tablet · Laptop · Smart TV
   ════════════════════════════════════════════════════════════ */

/* ─── FOCUS VISIBLE (Smart TV + clavier + accessibilité) ─── */
*:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

/* Désactive outline par défaut sur clic souris, garde pour clavier/TV */
*:focus:not(:focus-visible) {
  outline: none;
}

/* TV : focus encore plus visible */
@media (min-width: 1920px) {
  *:focus-visible {
    outline: 4px solid #ffffff;
    outline-offset: 4px;
    box-shadow: 0 0 0 8px rgba(255,255,255,.15);
  }
}

/* ─── TABLES RESPONSIVE ──────────────────────────────────── */
.db-table-wrap,
.adm-table-wrap,
[class*="table-wrap"] {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.db-table,
.adm-table,
[class*="-table"] {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}

/* ─── PHONE (≤ 640px) — Tables en mode carte ─────────────── */
@media (max-width: 640px) {
  .db-table thead { display: none; }

  .db-table,
  .db-table tbody,
  .db-table tr,
  .db-table td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  .db-table tr {
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 10px;
    margin-bottom: 12px;
    padding: 4px 0;
  }

  .db-table td {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 14px;
    font-size: 13px;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,.05);
  }

  .db-table td:last-child { border-bottom: none; }

  .db-table td::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: 11px;
    opacity: .45;
    text-transform: uppercase;
    letter-spacing: .5px;
    min-width: 90px;
    flex-shrink: 0;
    margin-top: 2px;
  }

  .db-actions-cell {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Stats: 1 par ligne sur tout petit écran */
  .db-stats-row {
    grid-template-columns: 1fr !important;
  }
}

/* ─── TABLET (641px – 1024px) ────────────────────────────── */
@media (min-width: 641px) and (max-width: 1024px) {
  .db-table { font-size: 13px; }
  .db-stats-row { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ─── SMART TV (≥ 1920px) ────────────────────────────────── */
@media (min-width: 1920px) {

  /* Zoom général pour lisibilité à distance */
  body { font-size: 18px; }

  /* Nav sidebar plus large */
  .db-sidebar {
    width: 280px !important;
    min-width: 280px !important;
  }
  .db-main { margin-left: 280px !important; }

  .db-nav-item {
    font-size: 16px !important;
    padding: 14px 20px !important;
    border-radius: 10px !important;
    cursor: pointer;
  }

  /* Agrandir les boutons */
  .btn-db-save,
  .btn-db-accept,
  .btn-db-refuse,
  .btn-db-view,
  .btn-db-delete,
  .btn-db-draft {
    font-size: 15px !important;
    padding: 12px 24px !important;
    border-radius: 10px !important;
  }

  /* Agrandir les inputs */
  .db-input,
  .db-textarea,
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="password"],
  select,
  textarea {
    font-size: 16px !important;
    padding: 14px 18px !important;
    border-radius: 10px !important;
  }

  /* Tables plus lisibles */
  .db-table th,
  .db-table td {
    font-size: 15px !important;
    padding: 14px 16px !important;
  }

  /* Stat cards plus grandes */
  .db-stat-val { font-size: 32px !important; }
  .db-stat-label { font-size: 14px !important; }

  /* Page title */
  .db-page-title { font-size: 28px !important; }

  /* Stats row: toujours en grille */
  .db-stats-row {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
  }

  /* Topbar */
  .db-topbar { padding: 0 32px !important; height: 72px !important; }

  /* Cards */
  .db-card { border-radius: 16px !important; padding: 28px !important; }
}

/* ─── NAV ITEMS : pointer + hover visible sur TV ─────────── */
.db-nav-item,
.db-nav-item[data-section],
.db-link-see-all,
button,
[role="button"],
a[href] {
  cursor: pointer;
}

.db-nav-item[data-section]:hover,
.db-nav-item[data-section]:focus-visible {
  background: rgba(255,255,255,.1) !important;
}

/* ─── SECTIONS : smooth display ─────────────────────────── */
.db-section { display: none; }
.db-section.active { display: block; }

/* ─── SCROLL SMOOTH ─────────────────────────────────────── */
html { scroll-behavior: smooth; }

/* ─── IMAGES RESPONSIVE ─────────────────────────────────── */
img { max-width: 100%; height: auto; }

/* ─── BUTTONS MINIMUM TOUCH TARGET ─────────────────────── */
button,
[role="button"],
.db-nav-item {
  min-height: 44px;
}

@media (min-width: 1920px) {
  button, [role="button"], .db-nav-item { min-height: 56px; }
}
