/* =====================================================================================
   Cnaturel — global.css (CORRIGÉ pour home)
   Rôle : socle global (variables + base + compat legacy)
   IMPORTANT : aucun style spécifique de page/composant (header/footer/home) ici
   ===================================================================================== */

/* =====================================================================================
   CHAPITRE 1 — POLICE (Google Font)
   ===================================================================================== */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap");

/* =====================================================================================
   CHAPITRE 2 — VARIABLES CSS (thème)
   ===================================================================================== */
:root{
  --ink:#2e2e2e;
  --muted:#666666;
  --border:#e6e6e6;
  --font:"Montserrat",system-ui,-apple-system,"Segoe UI",Roboto,Arial,"Helvetica Neue",Helvetica,sans-serif;
}

/* =====================================================================================
   CHAPITRE 3 — BASE / RESET SÛR
   ===================================================================================== */
*,
*::before,
*::after{
  box-sizing: border-box;
}

html{
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  height: 100%;
}

body{
  min-height: 100vh;                 /* clé sticky footer */
  margin: 0;
  padding: 0;
  background: #ffffff;
  font-family: var(--font);
  color: var(--muted);
  overflow-x: hidden;
  
  display: flex;                     /* clé sticky footer */
  flex-direction: column;            /* header -> main -> footer */
}

/* ✅ CORRECTION : Désactiver flex sur la home (sinon le slider est centré) */
body.home {
  display: block;                    /* Pas de flex sur la home */
  min-height: auto;                  /* Pas de contrainte de hauteur */
}

/* Le contenu principal prend la hauteur restante (sticky footer) */
main{
  flex: 1;
}

/* ✅ CORRECTION : Pas de flex:1 sur main.hero */
main.hero {
  flex: none;
}

/* =====================================================================================
   CHAPITRE 4 — LIENS (compat legacy)
   Remarque : header.css/footer.css surchargent leurs zones.
   ===================================================================================== */
a:link{ color: var(--muted); text-decoration:none; }
a:visited{ color: var(--muted); text-decoration:none; }
a:active{ color: var(--muted); text-decoration:none; }
a:hover{ color: var(--muted); text-decoration:underline; }

/* =====================================================================================
   CHAPITRE 5 — IMAGES / MÉDIAS (sécurité responsive)
   ===================================================================================== */
img{
  max-width: 100%;
  height: auto;
  display: block;
}

/* =====================================================================================
   CHAPITRE 6 — TABLES (sécurité responsive)
   ===================================================================================== */
table{
  max-width: 100%;
}