/* ============ MIELCO — thème « Terroir & Texture » (Nature Distilled) ============ */
:root {
  --mielco-primary: #d37c0a;
  /* Nuance AA : 4,88:1 avec du texte blanc, 4,6:1 sur fond crème. */
  --mielco-primary-dark: #a85f07;
  --mielco-primary-darker: #8f5306;
  --mielco-gold: #ddad63;
  --mielco-brown: #3a2c1a;
  --mielco-green: #5a7247;
  --mielco-green-dark: #43583a;
  --mielco-cream: #fdf8ef;
  --mielco-sand: #f4ead8;
  --mielco-terracotta: #c67b5c;

  /* Grain papier : bruit SVG noir à très faible alpha, posé par-dessus la couleur de fond. */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.045 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  /* Maillage d'alvéoles très discret (contours dorés). */
  --hexes: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cg fill='none' stroke='%23ddad63' stroke-opacity='.14'%3E%3Cpath d='M28 0 56 16v32L28 64 0 48V16zM28 64l28 16v17M28 64 0 80v17'/%3E%3C/g%3E%3C/svg%3E");

  --radius-organic: 38% 62% 60% 40% / 45% 40% 62% 55%;
  --shadow-soft: 0 14px 40px rgba(58, 44, 26, .12);
  --shadow-pressed: 0 6px 18px rgba(58, 44, 26, .16);

  --bs-primary: var(--mielco-primary);
  --bs-primary-rgb: 211, 124, 10;
  --bs-body-color: #2b2118;
  --bs-body-bg: #fffdf8;
  --bs-body-font-family: 'Raleway', system-ui, sans-serif;
  --bs-body-font-size: 1rem;
  --bs-body-line-height: 1.65;
  --bs-link-color: var(--mielco-primary-dark);
  --bs-link-hover-color: var(--mielco-primary);
}

h1, h2, h3, h4, .navbar-brand, .display-hero {
  font-family: 'Lora', Georgia, serif;
}

h2 { font-weight: 600; }

body { background-color: var(--bs-body-bg); }

/* --- Texture réutilisable --- */
.texture-grain { background-image: var(--grain); }

/* --- Boutons : pilules chaleureuses --- */
.btn {
  padding: .7rem 1.6rem;
  border-radius: 2.5rem;
  letter-spacing: .015em;
  transition: transform .2s ease-out, box-shadow .2s ease-out,
              background-color .2s ease-out, border-color .2s ease-out;
}
.btn-primary {
  --bs-btn-bg: var(--mielco-primary-dark);
  --bs-btn-border-color: var(--mielco-primary-dark);
  --bs-btn-hover-bg: var(--mielco-primary-darker);
  --bs-btn-hover-border-color: var(--mielco-primary-darker);
  --bs-btn-active-bg: var(--mielco-primary-darker);
  --bs-btn-active-border-color: var(--mielco-primary-darker);
  --bs-btn-focus-shadow-rgb: 211, 124, 10;
  box-shadow: 0 8px 22px rgba(168, 95, 7, .32);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(168, 95, 7, .38); }
.btn-primary:active { transform: translateY(0); box-shadow: var(--shadow-pressed); }
.btn-outline-light:hover { color: var(--mielco-brown); }

/* --- Navbar : crème voilée, flou en arrière-plan --- */
.navbar-mielco {
  background: rgba(253, 248, 239, .82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: box-shadow .25s ease, padding .25s ease, background-color .25s ease;
  padding-top: .9rem;
  padding-bottom: .9rem;
}
.navbar-mielco.is-scrolled {
  background: rgba(253, 248, 239, .96);
  box-shadow: 0 2px 16px rgba(58, 44, 26, .12);
  padding-top: .35rem;
  padding-bottom: .35rem;
}
.navbar-mielco .nav-link {
  color: var(--mielco-brown);
  font-weight: 500;
  position: relative;
}
.navbar-mielco .nav-link.active,
.navbar-mielco .nav-link:hover { color: var(--mielco-primary-dark); }
.navbar-mielco .nav-link.active::after {
  content: "";
  position: absolute; left: .9rem; right: .9rem; bottom: .2rem;
  height: 3px; border-radius: 3px;
  background: var(--mielco-gold);
}
.navbar-mielco .navbar-brand img { height: 44px; transition: height .25s ease; }
.navbar-mielco.is-scrolled .navbar-brand img { height: 34px; }

/* --- Hero : carrousel de 3 slides, photo chaude, grain, voile brun --- */
.hero {
  position: relative;
  isolation: isolate;
  background: var(--mielco-brown);
  color: #fff;
}
.hero-slide {
  min-height: 92vh;
  min-height: 92dvh;
  display: flex;
  align-items: center;
  background:
    var(--grain),
    linear-gradient(100deg, rgba(43, 30, 14, .88) 0%, rgba(58, 44, 26, .62) 45%, rgba(211, 124, 10, .38) 100%),
    var(--hero-image, none), var(--mielco-brown);
  background-size: auto, cover, cover, auto;
  background-position: center;
  /* réserve pour la vague et les indicateurs du bas */
  padding-bottom: 6rem;
  padding-top: 5rem;
}
.hero .hero-title {
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  font-family: 'Lora', Georgia, serif;
  font-weight: 700;
  text-wrap: balance;
}
.hero .hero-title em {
  font-style: italic;
  color: var(--mielco-gold);
}
.hero .lead { max-width: 38rem; color: rgba(255, 251, 243, .92); }
.hero .carousel-indicators {
  bottom: clamp(40px, 6vw, 78px);
  margin-bottom: 0;
  z-index: 3;
}
.hero .carousel-indicators [data-bs-target] {
  width: 34px; height: 5px;
  border-radius: 5px;
  background-color: rgba(255, 251, 243, .55);
  border: 0;
  opacity: 1;
  transition: background-color .25s ease;
}
.hero .carousel-indicators .active { background-color: var(--mielco-gold); }
.hero .carousel-control-prev,
.hero .carousel-control-next { width: 8%; z-index: 3; }
@media (prefers-reduced-motion: reduce) {
  .hero .carousel-item { transition: none; }
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(221, 173, 99, .16);
  border: 1px solid rgba(221, 173, 99, .65);
  color: var(--mielco-gold);
  border-radius: 2rem;
  padding: .4rem 1.2rem;
  font-size: .9rem;
  letter-spacing: .05em;
}

/* --- Vagues de transition entre sections --- */
.wave {
  display: block;
  line-height: 0;
  margin-top: -1px;
  margin-bottom: -1px;
}
.wave svg { display: block; width: 100%; height: clamp(34px, 6vw, 72px); }
.wave-overlap-up { position: relative; z-index: 1; margin-top: calc(-1 * clamp(34px, 6vw, 72px)); }

/* --- Sections --- */
.section { padding: 5rem 0; }
.section-cream {
  background-color: var(--mielco-cream);
  background-image: var(--grain);
}
.section-title {
  margin-bottom: .5rem;
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  position: relative;
}
/* trait organique doré sous les titres centrés */
.text-center .section-title::after {
  content: "";
  display: block;
  width: 84px; height: 8px;
  margin: .85rem auto 0;
  border-radius: 50% 50% 50% 50% / 90% 90% 10% 10%;
  background: linear-gradient(90deg, var(--mielco-gold), var(--mielco-primary));
  opacity: .85;
}
.section-subtitle { color: #6b5c49; max-width: 42rem; margin: 0 auto 2.75rem; }
.text-honey { color: var(--mielco-primary-dark); }

/* --- À propos : image organique --- */
.img-organic {
  border-radius: var(--radius-organic);
  box-shadow: var(--shadow-soft);
  transition: border-radius .6s ease;
}
.img-organic:hover { border-radius: 55% 45% 42% 58% / 48% 55% 45% 52%; }

/* --- Produits : alvéoles --- */
.hex-item { text-align: center; }
.hex-frame {
  width: min(100%, 300px);
  aspect-ratio: 1 / 1.05;
  margin: 0 auto 1.1rem;
  clip-path: polygon(50% 0%, 96% 25%, 96% 75%, 50% 100%, 4% 75%, 4% 25%);
  background: var(--mielco-sand);
  display: block;
  transition: transform .25s ease-out;
}
.hex-frame img { width: 100%; height: 100%; object-fit: cover; }
.hex-item:hover .hex-frame { transform: scale(1.035); }
.hex-item h3 { font-size: 1.2rem; }
.hex-item p { max-width: 22rem; margin-inline: auto; }
@media (min-width: 992px) {
  /* léger décalage en quinconce, comme un rayon de miel */
  .hex-item:nth-child(3n+2) { margin-top: 2.75rem; }
}

/* --- Services : cartes papier --- */
.card-mielco {
  border: 1px solid #efe1c8;
  border-radius: 1.5rem 1.5rem 1.5rem .35rem;
  background-color: #fff;
  background-image: var(--grain);
  transition: transform .25s ease, box-shadow .25s ease;
  height: 100%;
}
.card-mielco:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
}
.card-mielco .card-img-top {
  border-radius: 1.5rem 1.5rem 0 0;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 42% 58% 55% 45% / 50% 45% 55% 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(140deg, rgba(221, 173, 99, .28), rgba(211, 124, 10, .16));
  color: var(--mielco-primary-dark);
  font-size: 1.65rem;
}

/* --- Atouts --- */
.atout i { color: var(--mielco-primary-dark); font-size: 1.5rem; }

/* --- Timeline processus : gouttes de miel reliées d'or --- */
.process-step { text-align: center; position: relative; }
.process-step .step-num {
  width: 58px; height: 58px;
  border-radius: 50% 50% 50% 4px;
  transform: rotate(45deg);
  background: linear-gradient(160deg, var(--mielco-primary), var(--mielco-primary-darker));
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 18px rgba(168, 95, 7, .3);
  margin-bottom: 1rem;
}
.process-step .step-num > span {
  transform: rotate(-45deg);
  font-family: 'Lora', serif; font-size: 1.3rem; font-weight: 700;
}
@media (min-width: 992px) {
  .process-step:not(:last-child)::after {
    content: "";
    position: absolute; top: 28px; left: calc(50% + 44px);
    width: calc(100% - 88px); height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--mielco-gold), rgba(221, 173, 99, .25));
  }
}

/* --- Impact : vert forêt texturé d'alvéoles --- */
.section-impact {
  background-color: var(--mielco-green-dark);
  background-image: var(--grain), var(--hexes),
    linear-gradient(135deg, var(--mielco-green), var(--mielco-green-dark));
  color: #fff;
}
.section-impact .section-subtitle { color: rgba(255, 255, 255, .85); }
.section-impact .icon-circle {
  background: rgba(255, 255, 255, .14);
  color: var(--mielco-gold);
}

/* --- Témoignages : fiche papier --- */
.testimonial {
  background-color: #fff;
  background-image: var(--grain);
  border-radius: 1.75rem 1.75rem 1.75rem .4rem;
  padding: 2.25rem;
  border: 1px solid #efe1c8;
  box-shadow: var(--shadow-soft);
  max-width: 44rem;
  margin: 0 auto;
}
.testimonial .bi-quote { font-size: 2.75rem; color: var(--mielco-gold); }
.testimonial blockquote { font-family: 'Lora', serif; font-size: 1.15rem; }

/* --- CTA final : miel profond --- */
.section-cta {
  background-color: var(--mielco-primary-darker);
  background-image: var(--grain), var(--hexes),
    linear-gradient(135deg, var(--mielco-primary-dark), #7c4805);
  color: #fff;
}
.section-cta .section-subtitle { color: rgba(255, 255, 255, .9); }
.btn-whatsapp {
  --bs-btn-bg: #1da851;
  --bs-btn-border-color: #1da851;
  --bs-btn-hover-bg: #178a42;
  --bs-btn-hover-border-color: #178a42;
  --bs-btn-color: #fff;
  --bs-btn-hover-color: #fff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .22);
}

/* --- Contact / footer --- */
.contact-info i { color: var(--mielco-primary-dark); font-size: 1.25rem; }
.footer {
  background-color: var(--mielco-brown);
  background-image: var(--grain);
  color: #d9cdbb;
}
.footer a { color: var(--mielco-gold); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* --- Compteurs --- */
.counter-value {
  font-family: 'Lora', serif;
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--mielco-primary-dark);
}

/* --- Apparition au scroll --- */
/* Le masquage initial n'est appliqué que lorsque le contrôleur Stimulus a
   ajouté .js-reveal : sans JavaScript (ou à l'impression), tout reste visible. */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .25s ease-out, transform .25s ease-out;
  transition-delay: var(--reveal-delay, 0ms);
}
.js-reveal .reveal.is-visible { opacity: 1; transform: none; }

@media print {
  .reveal { opacity: 1 !important; transform: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal { opacity: 1; transform: none; transition: none; }
  .card-mielco, .navbar-mielco, .btn, .hex-frame, .img-organic { transition: none; }
  .card-mielco:hover, .hex-item:hover .hex-frame, .btn-primary:hover { transform: none; }
  .img-organic:hover { border-radius: var(--radius-organic); }
}

/* --- Formulaire --- */
.form-control, .form-select { border-radius: .9rem; border-color: #e8d9bf; }
.form-control:focus, .form-select:focus {
  border-color: var(--mielco-gold);
  box-shadow: 0 0 0 .25rem rgba(211, 124, 10, .15);
}
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
