/* ===== Ferme Almana — feuille de style principale ===== */

:root {
  --navy: #0e3347;
  --navy-dark: #0a2532;
  --navy-light: #1a4a63;
  --orange: #e17b2c;
  --orange-dark: #c2621b;
  --cream: #f7f2e8;
  --cream-dark: #efe6d4;
  --white: #ffffff;
  --text: #26333c;
  --text-light: #5a6b74;
  --border: rgba(14, 51, 71, 0.12);
  --shadow: 0 10px 30px rgba(14, 51, 71, 0.1);
  --radius: 14px;
  --font-head: Georgia, 'Times New Roman', serif;
  --font-body: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }
.section--cream { background: var(--cream); }
.section--white { background: var(--white); }
.section--navy { background: var(--navy); color: var(--cream); }
.section--navy h2, .section--navy h3 { color: var(--white); }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  font-weight: 700;
  margin-bottom: 10px;
}

.section-head { text-align: center; max-width: 680px; margin: 0 auto 44px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--orange { background: var(--orange); color: var(--white); }
.btn--orange:hover { background: var(--orange-dark); box-shadow: 0 8px 20px rgba(225, 123, 44, 0.35); }
.btn--outline { background: transparent; border-color: var(--white); color: var(--white); }
.btn--outline:hover { background: rgba(255,255,255,0.12); }
.btn--navy { background: var(--navy); color: var(--white); }
.btn--navy:hover { background: var(--navy-dark); }

/* ---------- En-tête / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  box-shadow: 0 2px 14px rgba(0,0,0,0.15);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  max-width: 1140px;
  margin: 0 auto;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
}
.nav-brand img { height: 46px; width: 46px; border-radius: 50%; }
.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: block;
  padding: 10px 14px;
  color: var(--cream);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-links a:hover { background: rgba(255,255,255,0.1); }
.nav-links a.active { color: var(--orange); font-weight: 700; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.6rem;
  cursor: pointer;
}

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    padding: 8px 16px 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 8px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 62vh;
  display: flex;
  align-items: center;
  color: var(--white);
  background: linear-gradient(155deg, var(--navy) 0%, var(--navy-dark) 100%);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.38;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,37,50,0.55) 0%, rgba(10,37,50,0.92) 100%);
}
.hero-content { position: relative; z-index: 2; max-width: 720px; padding: 90px 24px; margin: 0 auto; text-align: center; }
.hero-content h1 { color: var(--white); }
.hero-content .lede { font-size: 1.15rem; color: var(--cream); max-width: 560px; margin: 0 auto 28px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.hero--small { min-height: 38vh; }
.hero--small .hero-content { padding: 60px 24px; }

/* ---------- Motif écailles (identité visuelle) ---------- */
.scale-divider {
  height: 46px;
  background-image: radial-gradient(circle at 10px -6px, transparent 12px, var(--cream) 13px);
  background-size: 26px 24px;
  background-repeat: repeat-x;
}

/* ---------- Cartes génériques ---------- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card-img { aspect-ratio: 4/3; background: var(--cream-dark) center/cover no-repeat; }
.card-img.img-missing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  padding: 12px;
  background: repeating-linear-gradient(135deg, var(--cream-dark), var(--cream-dark) 16px, var(--cream) 16px, var(--cream) 32px);
  color: var(--navy);
  font-family: var(--font-head);
  font-size: 0.85rem;
}
.card-img.img-missing .img-missing-icon { font-size: 1.6rem; }
.card-body { padding: 20px 22px 22px; flex: 1; display: flex; flex-direction: column; }

/* ---------- Grilles ---------- */
.grid { display: grid; gap: 28px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

/* ---------- Valeurs (accueil / histoire) ---------- */
.valeur-card { text-align: left; padding: 28px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); }
.valeur-num { color: var(--orange); font-family: var(--font-head); font-size: 1.8rem; font-weight: 700; }
.valeur-tag { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; color: var(--text-light); font-weight: 700; margin-bottom: 10px; display: block; }

/* ---------- Timeline (histoire) ---------- */
.timeline { position: relative; margin: 0 auto; max-width: 780px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--orange);
  opacity: 0.35;
}
.timeline-item { position: relative; padding: 0 0 36px 56px; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--orange);
  border: 3px solid var(--cream);
  box-shadow: 0 0 0 2px var(--orange);
}
.timeline-year { font-family: var(--font-head); color: var(--orange); font-weight: 700; font-size: 1.15rem; }

/* ---------- Boutique ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 40px;
}
.filter-btn {
  padding: 9px 20px;
  border-radius: 999px;
  border: 2px solid var(--navy);
  background: transparent;
  color: var(--navy);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.15s ease;
}
.filter-btn.active, .filter-btn:hover { background: var(--navy); color: var(--white); }

.produit-card { position: relative; }
/* Les photos de produits sont en format portrait (3:4) : on adapte la carte
   pour montrer le pot ou la bouteille en entier, sans recadrage. */
.produit-card .card-img { aspect-ratio: 3/4; }
.produit-code { position: absolute; top: 12px; right: 12px; background: var(--navy); color: var(--white); font-size: 0.68rem; padding: 3px 9px; border-radius: 999px; letter-spacing: 0.05em; }
.produit-prix { color: var(--orange); font-family: var(--font-head); font-size: 1.35rem; font-weight: 700; margin: 6px 0 12px; }
.produit-meta { font-size: 0.85rem; color: var(--text-light); margin-bottom: 4px; }
.produit-meta strong { color: var(--text); }
.produit-accroche { font-style: italic; color: var(--text-light); font-size: 0.92rem; }
.produit-detail-toggle { margin-top: auto; background: none; border: none; color: var(--navy); font-weight: 700; cursor: pointer; padding: 8px 0 0; text-align: left; font-size: 0.88rem; }
.produit-details { display: none; margin-top: 10px; border-top: 1px dashed var(--border); padding-top: 10px; font-size: 0.88rem; }
.produit-details.open { display: block; }

.fraicheur-card .card-body { gap: 4px; }
.fraicheur-dispo { display: inline-block; background: var(--cream-dark); color: var(--navy); font-size: 0.78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; margin: 8px 0; width: fit-content; }

/* ---------- Recettes ---------- */
.recette-card .card-body h3 { margin-bottom: 6px; }
.recette-meta { display: flex; gap: 14px; font-size: 0.82rem; color: var(--text-light); margin-bottom: 12px; }
.recette-tag { background: var(--orange); color: var(--white); font-size: 0.7rem; padding: 3px 10px; border-radius: 999px; font-weight: 700; position: absolute; top: 12px; left: 12px; }
.recette-modal-trigger { margin-top: auto; }

/* ---------- Contact / formulaire ---------- */
.form-field { margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-weight: 600; font-size: 0.9rem; }
.form-field input, .form-field textarea, .form-field select {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--white);
}
.form-field input:focus, .form-field textarea:focus { outline: 2px solid var(--orange); border-color: transparent; }

.contact-info-card { background: var(--navy); color: var(--white); border-radius: var(--radius); padding: 32px; }
.contact-info-card a { color: var(--orange); font-weight: 700; }
.contact-info-row { display: flex; gap: 14px; margin-bottom: 18px; align-items: flex-start; }
.contact-info-row .icon { font-size: 1.3rem; }

/* ---------- Galerie photos ---------- */
.gallery-grid {
  columns: 3 260px;
  column-gap: 18px;
}
.gallery-grid figure {
  margin: 0 0 18px;
  break-inside: avoid;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}
.gallery-grid img { width: 100%; }
.gallery-grid figcaption {
  padding: 10px 14px;
  background: var(--white);
  font-size: 0.82rem;
  color: var(--text-light);
}

/* ---------- Où nous trouver ---------- */
.map-embed { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.map-embed iframe { width: 100%; height: 420px; border: 0; display: block; }
.point-vente-card { display: flex; gap: 16px; padding: 20px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); align-items: flex-start; }
.point-vente-icon { font-size: 1.8rem; }
.pv-map { display: inline-block; margin-top: 8px; font-size: 0.82rem; font-weight: 700; color: var(--orange); text-decoration: none; }
.pv-map:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: var(--cream); padding: 50px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; margin-bottom: 36px; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
.footer-grid h4 { color: var(--white); font-size: 1rem; margin-bottom: 14px; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-brand img { height: 44px; width: 44px; border-radius: 50%; }
.footer-brand span { font-family: var(--font-head); font-size: 1.2rem; color: var(--white); }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a:hover { color: var(--orange); }
.footer-social { display: flex; gap: 10px; margin-top: 10px; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.footer-social a:hover { background: var(--orange); }
.footer-bottom { text-align: center; font-size: 0.82rem; color: rgba(247,242,232,0.55); border-top: 1px solid rgba(255,255,255,0.08); padding-top: 20px; }

/* ---------- Bandeau CTA ---------- */
.cta-band { background: var(--orange); color: var(--white); text-align: center; padding: 56px 0; }
.cta-band h2 { color: var(--white); }

/* ---------- Utilitaires ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.badge { display: inline-block; background: var(--cream-dark); color: var(--navy); font-size: 0.78rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; margin: 3px 4px 3px 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }
.img-rounded { border-radius: var(--radius); box-shadow: var(--shadow); }

.placeholder-photo {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-family: var(--font-head);
  font-size: 0.95rem;
  text-align: center;
  padding: 20px;
  background: repeating-linear-gradient(135deg, var(--navy), var(--navy) 22px, var(--navy-light) 22px, var(--navy-light) 44px);
}

/* ---------- Modale recette ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(10,37,50,0.7);
  display: none; align-items: center; justify-content: center; z-index: 1000; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--white); border-radius: var(--radius); max-width: 640px; width: 100%;
  max-height: 85vh; overflow-y: auto; padding: 32px; position: relative;
}
.modal-close { position: absolute; top: 16px; right: 20px; background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--text-light); }
