/* ==========================================================================
   MonBlocRecettes — landing page 2026
   Couleurs et règles reprises du design system de l'app (DESIGN_SYSTEM.md).
   ========================================================================== */

/* Baloo, réservée au nom de la marque : version allégée (WOFF2, 3,6 Ko) qui ne contient que les
   lettres de « MonBlocRecettes » (M o n B l c R e t s), générée avec fonttools (pyftsubset) depuis
   BalooRegular.ttf (licence SIL OFL, assets/fonts/OFL.txt). Pour écrire un autre texte en Baloo,
   régénérer la police avec les lettres voulues. Préchargée dans chaque page (<link rel="preload">). */
@font-face {
  font-family: "Baloo";
  src: url("../assets/fonts/baloo-marque.woff2") format("woff2");
  font-display: swap;
}

:root {
  --orange: #FF6B35;
  --orange-dark: #E85A26;
  --orange-pale: #FFE8DD;
  --blob: #FFF1EA;
  --green: #248256;
  --green-pale: #E4F2EA;
  --text: #1C1C1C;
  --text-2: #666666;
  --text-3: #8A8A8A;
  --bg: #F9F9F9;
  --surface: #FFFFFF;
  --border: #E5E5E5;
  --shot: #E4E4E2;
  --shadow-float: 0 1px 2px rgba(0, 0, 0, .04), 0 12px 32px rgba(0, 0, 0, .06);
  --shadow-phone: 0 30px 60px -20px rgba(28, 28, 28, .28), 0 12px 24px -12px rgba(28, 28, 28, .18);
  --radius: 16px;
  --container: 1160px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
/* défilement fluide géré par Lenis (js/main.js) : on coupe le lissage natif */
html.lenis, html.lenis body { height: auto; scroll-behavior: auto; }

body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.02em; }
p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 15px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s;
}
.btn--primary {
  color: #fff;
  background: linear-gradient(180deg, #FF7542 0%, #FF6B35 50%, #F96835 100%);
  box-shadow: 0 4px 10px rgba(255, 107, 53, .22);
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(255, 107, 53, .28); }
.btn--sm { height: 40px; padding: 0 18px; font-size: 14px; }

/* ---------- en-tête ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background .3s, box-shadow .3s;
}
.nav.is-scrolled {
  background: rgba(249, 249, 249, .86);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .06);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__logo { display: inline-flex; flex-shrink: 0; width: 36px; height: 36px; box-sizing: border-box; padding: 5px; background: var(--orange); border-radius: 10px; }
.brand__logo img { width: 100%; height: 100%; object-fit: contain; filter: brightness(0) invert(1); }
.brand__name { font-family: "Baloo", "Poppins", sans-serif; font-size: 24px; line-height: 1; padding-top: 4px; }
/* mot de la navbar mis en valeur quand sa section arrive (js/main.js) */
.brand__name span { transition: color .4s var(--ease); }

.nav__links { display: flex; align-items: center; gap: 32px; font-size: 15px; color: var(--text-2); }
.nav__links a:not(.btn) { position: relative; transition: color .2s; }
.nav__links a:not(.btn):hover { color: var(--text); }
.nav__links a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transition: transform .25s var(--ease);
}
.nav__links a:not(.btn):hover::after { transform: scaleX(1); }

.nav__toggle {
  display: none;
  width: 44px; height: 44px;
  border: 0; background: transparent; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav__toggle span { width: 22px; height: 2px; border-radius: 2px; background: var(--text); transition: transform .25s, opacity .25s; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 40px 0 80px;
  overflow: hidden;
}
.hero::before {
  /* halo orange très doux en fond */
  content: "";
  position: absolute;
  width: 900px; height: 900px;
  right: -300px; top: -260px;
  background: radial-gradient(closest-side, rgba(255, 107, 53, .10), rgba(255, 107, 53, 0));
  pointer-events: none;
}
/* hero placé directement sous l'en-tête fixe : on retrouve l'espace pour la navbar */
main > .hero:first-child { padding-top: 140px; }
.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero__text { position: relative; z-index: 3; }

.hero h1 {
  margin: 22px 0 20px;
  font-size: clamp(36px, 4.6vw, 56px);
  font-weight: 700;
}
/* titre du hero écrit avec le nom de la marque : police Baloo, comme le logo */
.accent { color: var(--orange); }
.lead { font-size: 18px; color: var(--text-2); max-width: 540px; }

.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.store {
  display: inline-flex; align-items: center; gap: 12px;
  height: 56px; padding: 0 20px 0 16px;
  border-radius: 14px;
  background: var(--text); color: #fff;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.store:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(28, 28, 28, .18); }
.store svg { width: 26px; height: 26px; }
.store span { display: flex; flex-direction: column; font-size: 17px; font-weight: 600; line-height: 1.1; }
.store small { font-size: 11px; font-weight: 400; opacity: .75; }

/* ---------- marque : sections « Mon », « Bloc », « Recettes » ---------- */
.brand-land { padding: 72px 0 120px; text-align: center; }
.brand-land__head { text-align: left; }
.brand-land__title {
  margin: 0;
  font-size: clamp(36px, 4.6vw, 56px); /* même taille et même graisse que le titre du hero (Poppins) */
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
}

/* ---------- sections ---------- */
section { position: relative; }

/* ---------- pied de page ---------- */
.footer { padding: 40px 0 48px; border-top: 1px solid var(--border); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.brand--footer .brand__logo { width: 30px; height: 30px; padding: 4px; border-radius: 8px; }
.brand--footer .brand__name { font-size: 20px; }
.footer__copy { font-size: 13px; color: var(--text-3); }

/* ---------- apparition au défilement ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal--delay { transition-delay: .15s; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .nav__toggle { display: flex; }
  .nav__links {
    position: absolute;
    top: 72px; left: 16px; right: 16px;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 12px;
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow-float);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s, transform .25s, visibility .25s;
  }
  .nav__links a:not(.btn) { padding: 12px 14px; border-radius: 12px; }
  .nav__links a:not(.btn)::after { display: none; }
  .nav__links a:not(.btn):hover { background: var(--bg); }
  .nav__cta { margin-top: 6px; }
  .nav.is-open .nav__links { opacity: 1; visibility: visible; transform: none; }
  .nav.is-open { background: rgba(249, 249, 249, .96); }
  .nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .hero { padding: 24px 0 40px; }
  .brand-land { padding: 56px 0 88px; }
  main > .hero:first-child { padding-top: 116px; }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__text { text-align: center; }
  .hero .lead { margin: 0 auto; }
  .stores { justify-content: center; }
}

@media (max-width: 520px) {
  .container { padding: 0 16px; }
  .brand__name { font-size: 21px; }
  .lead { font-size: 16px; } /* trop serré sur petit écran */
  .store { height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
