/* =========================================================
   Mashiso – feuille de style commune
   Organisation : variables > base > mise en page > composants
   ========================================================= */

@font-face {
  font-family: "ExtraChunk";
  src: url("fonts/ExtraChunkPlease-Regular.woff2") format("woff2");
  font-display: swap;
}

/* ---------- Variables (couleurs, tailles) ---------- */
:root {
  --vert: #22391e;
  --vert-clair: #3d5c37;
  --creme: #ffffd6;
  --creme-fonce: #fdf3c8;
  --blanc: #fff;
  --texte: #1d2a1a;

  --police: system-ui, -apple-system, "Segoe UI", Roboto, "Open Sans", sans-serif;
  --police-titre: "ExtraChunk", var(--police);

  --largeur: 68rem;
  --espace: 1rem;
  --rayon: 1rem;
  --ombre: 0 2px 10px rgb(0 0 0 / .08);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--police);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--texte);
  background: var(--blanc);
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; }

h2 {
  font-family: var(--police-titre);
  font-weight: normal;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  color: var(--vert);
  text-align: center;
  letter-spacing: .03em;
  margin-bottom: 1em;
}

h3 { font-size: 1.3rem; color: var(--vert); }

p { margin: 0 0 .8em; }
p:last-child { margin-bottom: 0; }

a { color: var(--vert); }

/* ---------- Mise en page ---------- */
.conteneur {
  width: 100%;
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 0 var(--espace);
}

.section { padding: calc(var(--espace) * 3) 0; }
.section-alt { background: var(--creme); }

.centre { text-align: center; }
.important { font-weight: 700; font-size: 1.2rem; }

/* Grilles responsives : 1 colonne sur mobile, plus sur grand écran */
.grille {
  display: grid;
  gap: calc(var(--espace) * 1.5);
  padding: 0;
  margin: 0 0 calc(var(--espace) * 2);
  list-style: none;
}
.grille-2 { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.grille-produits { grid-template-columns: repeat(auto-fill, minmax(min(14rem, 100%), 1fr)); }

/* ---------- En-tête ---------- */
.entete {
  background: var(--creme);
  text-align: center;
  padding: calc(var(--espace) * 2) 0 var(--espace);
}
.entete h1 { margin: 0; }
.logo { width: min(26rem, 80%); margin: 0 auto; }
.accroche {
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  font-weight: 700;
  color: var(--vert);
  max-width: 34rem;
  margin: var(--espace) auto;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem 1.5rem;
  margin-top: calc(var(--espace) * 1.5);
}
.nav a { font-weight: 700; text-decoration: none; padding: .3rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a:focus { border-bottom-color: currentColor; }

/* ---------- Composants ---------- */

/* Carte d'information */
.carte {
  background: var(--creme);
  border-radius: var(--rayon);
  padding: calc(var(--espace) * 1.25);
  text-align: center;
  font-size: 1.15rem;
  font-weight: 600;
}

/* Encart explicatif */
.encart {
  background: var(--creme-fonce);
  border-radius: var(--rayon);
  padding: calc(var(--espace) * 1.25);
  margin-bottom: calc(var(--espace) * 1.5);
}
.encart p:first-child { font-weight: 700; font-size: 1.1rem; }

/* Boutons */
.bouton {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1.2rem;
  border-radius: 99rem;
  background: var(--vert);
  color: var(--creme);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--vert);
}
.bouton:hover, .bouton:focus { background: var(--vert-clair); border-color: var(--vert-clair); }
.bouton-grand { font-size: clamp(1.5rem, 6vw, 2.2rem); padding: .5rem 1.6rem; }
.bouton-clair { background: var(--creme); color: var(--vert); border-color: var(--creme); }
.bouton-clair:hover, .bouton-clair:focus { background: var(--blanc); border-color: var(--blanc); }

/* Image avec légende */
/* largeur max réglable par page : style="--largeur-illustration: 40rem" */
.illustration { margin: var(--espace) auto 0; max-width: var(--largeur-illustration, 32rem); }
.illustration img { border-radius: var(--rayon); box-shadow: var(--ombre); width: 100%; }
.illustration figcaption { font-size: .8rem; opacity: .7; text-align: right; margin-top: .3rem; }

/* ---------- Menu ---------- */
.categorie + .categorie { margin-top: calc(var(--espace) * 2); }
.titre-categorie {
  font-family: var(--police-titre);
  font-weight: normal;
  font-size: 1.6rem;
  letter-spacing: .03em;
  border-bottom: 3px solid var(--vert);
  padding-bottom: .2rem;
  margin-bottom: var(--espace);
}

.produit {
  background: var(--blanc);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.produit img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.produit-texte { padding: var(--espace); }
.produit h4 { font-size: 1.2rem; margin: 0; }
.produit h4 span { font-weight: normal; font-size: .9em; opacity: .65; white-space: nowrap; }
.prix { font-weight: 700; font-size: 1.15rem; color: var(--vert-clair); margin: .2rem 0 .5rem; }

/* ---------- Pied de page ---------- */
.pied {
  background: var(--vert);
  color: var(--creme);
  text-align: center;
  padding: calc(var(--espace) * 2.5) 0;
}
.pied a { color: inherit; }
.titre-reseaux { font-weight: 700; margin-top: var(--espace); }
.reseaux {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--espace);
  list-style: none;
  padding: 0;
  margin: 0;
}
.pied .bouton-clair { color: var(--vert); }

/* ---------- Grands écrans ---------- */
@media (min-width: 48rem) {
  .section { padding: calc(var(--espace) * 4) 0; }
  .encart { max-width: 46rem; margin-left: auto; margin-right: auto; }
}
