/* ══════════════════════════════════════════════════════════════════════
   ★ MODE COMPACT (Paramètres → Affichage → Mode compact)
   Activé par <html data-density="compact"> (voir App.razor, orionDensity).
   Plus d'informations à l'écran : marges et hauteurs réduites, barre IA
   sur une seule ligne, tuiles et tableaux plus serrés. Les sélecteurs sont
   préfixés par html[...] pour passer devant les styles isolés des composants.
   ══════════════════════════════════════════════════════════════════════ */

html[data-density="compact"] body {
    font-size: 0.8438rem;
}

/* ── Barre IA / recherche : une seule ligne ─────────────────────────── */
html[data-density="compact"] .aichat-inner {
    max-width: 47.5rem;
    padding: 0.375rem 0 0.625rem;
}

html[data-density="compact"] .aichat-composer {
    display: flex;
    align-items: center;
    border-radius: 0.75rem;
}

html[data-density="compact"] .aichat-composer-top {
    flex: 1;
    min-width: 0;
    padding: 0.4375rem 0.25rem 0.4375rem 0.75rem;
}

html[data-density="compact"] .aichat-input {
    font-size: .8rem;
}

html[data-density="compact"] .aichat-composer-bottom {
    border-top: none;
    padding: 0.25rem 0.375rem;
}

html[data-density="compact"] .aichat-hints,
html[data-density="compact"] .aichat-disclaimer {
    display: none;
}

html[data-density="compact"] .aichat-btn-send,
html[data-density="compact"] .aichat-btn-mic,
html[data-density="compact"] .aichat-btn-new,
html[data-density="compact"] .aichat-btn-ai,
html[data-density="compact"] .aichat-btn-lang,
html[data-density="compact"] .aichat-btn-history {
    width: 1.75rem;
    height: 1.75rem;
    min-width: 1.75rem;
    font-size: .72rem;
}

/* ── Tableau de bord ────────────────────────────────────────────────── */
html[data-density="compact"] .hd-root { gap: 0.625rem; }
html[data-density="compact"] .hd-section { padding: 0.75rem 0.75rem 0.625rem; border-radius: 0.75rem; }
html[data-density="compact"] .hd-section-head { margin-bottom: 0.5rem; }
html[data-density="compact"] .hd-section-sub { display: none; }
html[data-density="compact"] .hd-section-icon { width: 1.875rem; height: 1.875rem; border-radius: 0.5625rem; }
html[data-density="compact"] .hd-section-title { font-size: .92rem; }
html[data-density="compact"] .hd-grid { grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); gap: 0.375rem; }
html[data-density="compact"] .hd-tile { min-height: 2.875rem; padding: 0.4375rem 0.625rem; gap: 0.5625rem; grid-template-columns: 1.75rem minmax(0, 1fr) 0.875rem; }
html[data-density="compact"] .hd-tile-icon { width: 1.75rem; height: 1.75rem; border-radius: 0.5rem; }
html[data-density="compact"] .hd-tile-name { font-size: .82rem; }
html[data-density="compact"] .hd-tile-meta { font-size: .72rem; }
html[data-density="compact"] .hd-quick { margin-top: 0.5rem; gap: 0.375rem; }
html[data-density="compact"] .hd-chip { padding: 0.25rem 0.625rem; font-size: .74rem; }

/* ── Tableaux génériques ────────────────────────────────────────────── */
html[data-density="compact"] table th,
html[data-density="compact"] table td {
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
}

/* ── Menus latéraux des fiches boutique / dépôt ─────────────────────── */
html[data-density="compact"] .sdsb-item {
    padding-top: 0.3125rem;
    padding-bottom: 0.3125rem;
    min-height: 0;
}

html[data-density="compact"] .sdsb-group-header,
html[data-density="compact"] .sdsb-group-title {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

/* ── Paramètres ─────────────────────────────────────────────────────── */
html[data-density="compact"] .setting-item {
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
}
