/* SIAUAC — Mode compact global + héros resserrés
   Charger APRÈS tous les autres CSS. */

html { font-size: 87.5%; }

/* ---------- Typographie & composants ---------- */
body { font-size: 0.95rem; line-height: 1.45; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }
h4, h5, h6 { font-size: 1rem; }

.btn { padding: 0.4rem 0.85rem; font-size: 0.85rem; border-radius: 0.5rem; }
.btn-sm { padding: 0.3rem 0.65rem; font-size: 0.78rem; }
.btn-lg { padding: 0.55rem 1.1rem; font-size: 0.95rem; }

.form-control, .form-select { padding: 0.4rem 0.7rem; font-size: 0.88rem; }
.form-label { font-size: 0.82rem; margin-bottom: 0.25rem; }

.card { border-radius: 0.75rem; }
.card-body { padding: 1rem 1.1rem; }
.card-header, .card-footer { padding: 0.65rem 1rem; }

.table { font-size: 0.85rem; }
.table > :not(caption) > * > * { padding: 0.5rem 0.6rem; }

.badge { font-size: 0.72rem; padding: 0.28em 0.55em; }
.alert { padding: 0.65rem 0.9rem; font-size: 0.88rem; border-radius: 0.6rem; }

.container, .container-fluid { padding-left: 1rem; padding-right: 1rem; }

/* ---------- HÉROS resserrés (pages d'administration uniquement) ----------
   Important : ne pas réintroduire de sélecteur générique basé sur le nom
   des classes. Il attraperait aussi les enfants du module Déclaration (.decl-hero-title,
   .decl-hero-meta, .decl-hero-progress...) et cassait leur disposition. */
.page-hero,
.admin-hero,
.hero-card,
.hero-banner {
  padding: 1.1rem 1.35rem !important;
  border-radius: 0.9rem !important;
  margin-bottom: 1rem !important;
  min-height: 0 !important;
}

.page-hero h1,
.admin-hero h1,
.hero-card h1,
.hero-banner h1,
.page-hero .hero-title,
.admin-hero .hero-title,
.hero-card .hero-title,
.hero-banner .hero-title {
  font-size: 1.35rem !important;
  margin-bottom: 0.35rem !important;
  line-height: 1.25 !important;
}

.page-hero p,
.admin-hero p,
.hero-card p,
.hero-banner p,
.page-hero .hero-subtitle,
.admin-hero .hero-subtitle,
.hero-card .hero-subtitle,
.hero-banner .hero-subtitle,
.page-hero .lead,
.admin-hero .lead,
.hero-card .lead,
.hero-banner .lead {
  font-size: 0.88rem !important;
  margin-bottom: 0.6rem !important;
  line-height: 1.4 !important;
  max-width: 60ch;
}

/* Chips / stats dans les héros d'administration */
:is(.page-hero, .admin-hero, .hero-card, .hero-banner) :is(.badge, .chip, .hero-chip, .stat-pill) {
  padding: 0.32rem 0.65rem !important;
  font-size: 0.78rem !important;
  border-radius: 999px !important;
}

/* Bouton d'action à droite du héros (Exporter CSV, Nouveau, etc.) */
.page-hero .btn,
.admin-hero .btn,
.hero-card .btn,
.hero-banner .btn {
  padding: 0.42rem 0.9rem !important;
  font-size: 0.85rem !important;
}

/* Grilles de stats sous le héros */
.stats-grid,
.stat-cards,
.dashboard-stats {
  gap: 0.75rem !important;
  margin-top: 0.75rem !important;
}

.stat-card,
.stats-card {
  padding: 0.85rem 1rem !important;
  border-radius: 0.75rem !important;
}

.stat-card .stat-value,
.stat-card h3,
.stats-card h3 {
  font-size: 1.5rem !important;
  margin: 0.2rem 0 !important;
}

.stat-card .stat-label,
.stat-card p,
.stats-card p {
  font-size: 0.78rem !important;
  margin: 0 !important;
}

.stat-card .stat-icon,
.stats-card .stat-icon {
  width: 2.2rem !important;
  height: 2.2rem !important;
  font-size: 1rem !important;
}

/* Sidebar — un cran plus compacte */
.admin-sidebar { width: 15rem; }
.admin-sidebar .sidebar-brand { padding: 0.85rem 1rem; }
.admin-sidebar .nav-link { padding: 0.5rem 0.85rem; font-size: 0.88rem; }

/* Mobile : héros encore plus serrés */
@media (max-width: 576px) {
  .page-hero,
  .admin-hero,
  .hero-card,
  .hero-banner {
    padding: 0.9rem 1rem !important;
    border-radius: 0.75rem !important;
  }
  :is(.page-hero, .admin-hero, .hero-card, .hero-banner) h1 { font-size: 1.15rem !important; }
  :is(.page-hero, .admin-hero, .hero-card, .hero-banner) p { font-size: 0.82rem !important; }
}
