/* /css/site.css */
/* Mode compact SolarMetrics — s'active via <body class="... sm-compact"> */
/* TOUTES les règles agressives scopées à <main> pour ne jamais toucher nav/footer */

/* ── Base ── */
body.sm-compact {
  font-size: 15px;
  line-height: 1.5;
}

/* ══════════════════════════════════════════════════ */
/* ── Tout ce qui suit est scopé à main uniquement ── */
/* ══════════════════════════════════════════════════ */

/* ── Hero : supprimer le plein écran ── */
body.sm-compact main section[class*="min-h-screen"] {
  min-height: auto !important;
  padding-top: 6rem !important;
  padding-bottom: 3rem !important;
}

/* ── Typo ── */
body.sm-compact main h1 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem) !important;
  line-height: 1.15 !important;
  letter-spacing: -0.02em;
}
body.sm-compact main h2 {
  font-size: clamp(1.15rem, 1.8vw, 1.4rem) !important;
  line-height: 1.2 !important;
}
body.sm-compact main h3 {
  font-size: 0.95rem !important;
  line-height: 1.25 !important;
}

/* ── Sections ── */
body.sm-compact main section {
  padding-top: 1.5rem !important;
  padding-bottom: 1.5rem !important;
}

/* ── Marges internes ── */
body.sm-compact main [class*="mb-4"] { margin-bottom: 0.35rem !important; }
body.sm-compact main [class*="mb-6"] { margin-bottom: 0.5rem !important; }
body.sm-compact main [class*="mb-8"] { margin-bottom: 0.6rem !important; }
body.sm-compact main [class*="mb-10"] { margin-bottom: 0.75rem !important; }
body.sm-compact main [class*="mb-12"] { margin-bottom: 0.75rem !important; }
body.sm-compact main [class*="mt-8"],
body.sm-compact main [class*="mt-10"] { margin-top: 0.75rem !important; }

/* ── Paddings internes (cartes, boutons) ── */
body.sm-compact main [class*="p-6"] { padding: 0.65rem !important; }
body.sm-compact main [class*="p-5"] { padding: 0.55rem !important; }
body.sm-compact main [class*="p-4"] { padding: 0.45rem !important; }
body.sm-compact main [class*="px-8"] { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }
body.sm-compact main [class*="py-4"] { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
body.sm-compact main [class*="py-3"] { padding-top: 0.4rem !important; padding-bottom: 0.4rem !important; }

/* ── Polices des chiffres / valeurs ── */
body.sm-compact main [class*="text-4xl"] { font-size: 1.3rem !important; }
body.sm-compact main [class*="text-3xl"] { font-size: 1.1rem !important; }
body.sm-compact main [class*="text-2xl"] { font-size: 1rem !important; }
body.sm-compact main [class*="text-xl"] { font-size: 0.9rem !important; }

/* ── Grilles : resserrer les gaps ── */
body.sm-compact main [class*="gap-6"] { gap: 0.6rem !important; }
body.sm-compact main [class*="gap-8"] { gap: 0.75rem !important; }
body.sm-compact main [class*="gap-4"] { gap: 0.4rem !important; }
body.sm-compact main [class*="gap-3"] { gap: 0.3rem !important; }

/* ── Icônes dans les cartes ── */
body.sm-compact main [class*="w-12"][class*="h-12"] {
  width: 2rem !important;
  height: 2rem !important;
}
body.sm-compact main [class*="w-24"][class*="h-24"] {
  width: 3.5rem !important;
  height: 3.5rem !important;
}

/* ── Paragraphes ── */
body.sm-compact main p {
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

/* ── Border radius ── */
body.sm-compact main [class*="rounded-2xl"] { border-radius: 0.75rem !important; }
body.sm-compact main [class*="rounded-xl"] { border-radius: 0.5rem !important; }

/* ── Tables ── */
body.sm-compact main table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
body.sm-compact main th,
body.sm-compact main td {
  padding: 0.35rem 0.5rem;
}

/* ══════════════════════════════════ */
/* ── Footer : juste un peu réduit ── */
/* ══════════════════════════════════ */
body.sm-compact footer {
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
}
