/* ==========================================================================
   Sections éditoriales du gabarit « ferme » (page ferme + 7 pages locales)
   Objectif : casser les pavés de texte — hiérarchie, image d'accompagnement,
   chiffres clés, étapes numérotées et panneau d'engagements.
   ========================================================================== */

/* ---------------------------------------------------------------- intro */
.ferme-intro { padding: clamp(3.5rem, 7vw, 6rem) 0 0; }
.ferme-intro-grid {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.ferme-intro-text .lead {
  font-family: 'Fraunces', Georgia, serif; font-size: clamp(1.12rem, 1.8vw, 1.42rem);
  line-height: 1.45; color: var(--ox); margin-bottom: 1.2rem;
}
.ferme-intro-text > p:not(.lead) { color: var(--muted); }
.ferme-intro-media { position: relative; }
.ferme-intro-media img {
  width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover;
  border-radius: var(--r); box-shadow: var(--shadow-lg);
}
.ferme-intro-media figcaption {
  position: absolute; left: 0; bottom: 0; transform: translate(-8%, 34%);
  background: var(--ox-d); color: var(--cream-2);
  padding: .9rem 1.2rem; border-radius: var(--r); max-width: 74%;
  box-shadow: var(--shadow-lg);
}
.ferme-intro-media figcaption b {
  display: block; font-family: 'Fraunces', serif; font-size: 1.05rem; color: #fff;
}
.ferme-intro-media figcaption span { font-size: .82rem; color: rgba(240, 228, 200, .7); }

/* ---------------------------------------------------------------- chiffres clés */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.stat { background: var(--cream-2); padding: 1.6rem 1.3rem; text-align: center; }
.stat b {
  display: block; font-family: 'Fraunces', Georgia, serif; font-weight: 800;
  font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1; color: var(--ox);
}
.stat span {
  display: block; margin-top: .5rem; font-size: .8rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
}

/* ---------------------------------------------------------------- savoir-faire (étapes) */
.etapes-band { background: var(--cream-3); padding: clamp(3.5rem, 7vw, 6rem) 0; }
.etapes-head { max-width: 58ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.etapes-head p { color: var(--muted); }
.etapes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: clamp(1.2rem, 2.5vw, 2rem); }
.etape {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.8rem 1.6rem; position: relative; transition: transform .3s, box-shadow .3s;
}
.etape:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.etape-num {
  display: block; font-family: 'Bebas Neue', sans-serif; font-size: 2.4rem;
  line-height: 1; color: var(--gold); margin-bottom: .8rem;
}
/* Certaines pages (produits, vente, pro) mettent une ICÔNE dans .etape-num au lieu
   d'un numéro. Un <svg> sans width/height s'étire à la largeur de son conteneur :
   les icônes faisaient plus de 400 px de haut et écrasaient le texte de la carte.
   On les ramène au gabarit d'icône du site, celui de .offer-ico. */
.etape-num svg { width: 22px; height: 22px; display: block; }
.etape-num:has(svg) {
  display: grid; place-items: center; width: 46px; height: 46px;
  color: var(--gold-d); border: 1px solid rgba(199, 154, 62, .4);
  border-radius: 50%; margin-bottom: 1.1rem;
}
.etape h3 { font-size: 1.15rem; margin-bottom: .55rem; }
.etape p { font-size: .96rem; color: var(--ink); }

/* ---------------------------------------------------------------- engagements */
.engagements-grid {
  display: grid; grid-template-columns: .9fr 1.1fr;
  gap: clamp(2rem, 4vw, 3.5rem); align-items: center;
}
.engagements-media img {
  width: 100%; aspect-ratio: 3 / 3.6; object-fit: cover;
  border-radius: var(--r); box-shadow: var(--shadow-lg);
}
.engagements-panel { }
.engagements-panel > p { color: var(--muted); }
.engagements-list { list-style: none; display: grid; gap: .9rem; margin: 1.6rem 0; }
.engagements-list li {
  display: grid; grid-template-columns: auto 1fr; gap: .85rem; align-items: start;
  padding-bottom: .9rem; border-bottom: 1px solid var(--line); font-size: .96rem;
}
.engagements-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.engagements-list .eng-ico {
  width: 26px; height: 26px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 50%; background: rgba(199, 154, 62, .16); color: var(--gold-d);
}
.engagements-list .eng-ico svg { width: 14px; height: 14px; }

/* ---------------------------------------------------------------- produits maison */
.gamme-band { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.gamme-band-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.gamme-band-head p { color: var(--muted); max-width: 46ch; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 860px) {
  .ferme-intro-grid,
  .engagements-grid { grid-template-columns: 1fr; }
  .ferme-intro-media figcaption { position: static; transform: none; max-width: 100%; margin-top: .8rem; }
  /* La photo passe AVANT le texte : empilée derrière, elle laissait le visiteur
     face à quatre paragraphes d'affilée sans rien pour accrocher l'œil. */
  .ferme-intro-media { order: -1; }
  .ferme-intro-grid { gap: 2rem; }
  .ferme-intro-text .lead { font-size: 1.12rem; line-height: 1.55; }
  .ferme-intro-text > p { margin-bottom: .95rem; line-height: 1.72; }
  .ferme-intro-text > p:last-child { margin-bottom: 0; }
  .engagements-media { order: -1; }
  .engagements-media img { aspect-ratio: 4 / 3; }
}
