/* Affichage petits écrans (téléphone) — même site, même code : seules ces règles s'appliquent sous 768 px. */
@media (max-width: 767px) {
  /* 1. En-tête compact */
  .dsn-sticky-toolbar { padding: 8px 12px !important; position: relative !important; }
  .dsn-sticky-toolbar h1 { font-size: 17px !important; line-height: 1.25 !important; white-space: normal !important; }
  .dsn-sticky-toolbar h1 + * { display: none !important; }            /* sous-titre (liste des sections) */
  /* 2. Période et filtres repliés derrière un bouton */
  .dsn-sticky-toolbar .no-export.rounded-xl[data-export-ignore="true"] { display: none !important; }
  .dsn-sticky-toolbar.dsn-mf-ouvert .no-export.rounded-xl[data-export-ignore="true"] { display: block !important; }
  .dsn-mf-bouton { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 7px 12px; border-radius: 999px;
    border: 1px solid #c7d2fe; background: #eef2ff; color: #3730a3; font: 600 13px system-ui, sans-serif; }
  /* 3. Grille : marges réduites, chiffres clés en premier, une carte par ligne */
  .dsn-dashboard-grid { gap: 10px !important; }
  .dsn-dashboard-grid > [data-dsn-type="kpi"] { order: -1; min-height: 0 !important; height: auto !important; }
  .dsn-dashboard-grid > [data-dsn-type="kpi"] .h-full { height: auto !important; }
  .dsn-dashboard-grid > [data-dsn-type="kpi"] [data-dsn-defil] { overflow: visible !important; flex: none !important; }
  .dsn-dashboard-grid > [data-dsn-type="chart"], .dsn-dashboard-grid > [data-dsn-type="special"] { min-height: 240px !important; }
  [data-theme-scope="dashboard"] .flex-1.p-6 { padding: 10px !important; }
  /* 4. Tableaux : défilement horizontal propre dans leur carte */
  .dsn-dashboard-grid table { font-size: 12px; }
  .dsn-dashboard-grid table th:first-child, .dsn-dashboard-grid table td:first-child { position: sticky; left: 0; background: #fff; z-index: 1; }
  /* 5. Un seul bouton d'aide : on masque les boutons flottants redondants */
  [aria-label="Votre avis"], [aria-label="Installer l'application mobile"], #dsn-help-fab,
  [aria-label^="Ouvrir DSN Copilot"], [data-testid="lina-expliquer"], #dsn-tour-toast { display: none !important; }
  [data-testid="formatrice-bouton"] { bottom: 14px !important; right: 14px !important; padding: 8px 14px !important; font-size: 13px !important; }
  [aria-label="Centre de notifications"] { top: 8px !important; right: 8px !important; width: 34px !important; height: 34px !important; }
}
