/* ============================================================================
   SORBETTO — base (reset + primitives + header/footer + reveal)
   Auto-contenu. Mobile-first. WCAG AA. transform/opacity only pour le motion.
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--encre);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
ul { list-style: none; padding: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--encre);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
a.sr-only:focus {
  position: fixed; top: 12px; left: 12px; width: auto; height: auto;
  clip: auto; padding: 10px 18px; background: var(--accent); color: #fff;
  border-radius: var(--r-pill); z-index: 200;
}

/* ----------------------------- Layout ----------------------------------- */
.sk-container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2.5rem);
}
.sk-container--narrow { max-width: var(--container-narrow); }

.sk-section { padding-block: var(--space-14); }
@media (min-width: 768px) { .sk-section { padding-block: var(--space-16); } }
.sk-section--compact { padding-block: var(--space-10); }
.sk-section--cream { background: var(--surface-cream); }
.sk-section--mint  { background: var(--surface-mint); }
.sk-section--rose  { background: var(--surface-rose); }

/* --------------------------- Eyebrow / heads ---------------------------- */
.sk-eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.sk-eyebrow::before {
  content: ""; width: 24px; height: 2px; border-radius: var(--r-pill);
  background: var(--accent);
}
.sk-eyebrow--center { justify-content: center; }
.sk-eyebrow--center::before { display: none; }

.sk-head { max-width: 60ch; }
.sk-head--center { margin-inline: auto; text-align: center; }
.sk-head__title { font-size: var(--fs-h2); margin-top: var(--space-3); }
.sk-head__lead {
  margin-top: var(--space-4);
  font-size: var(--fs-lead);
  color: var(--encre-soft);
  max-width: 56ch;
}
.sk-head--center .sk-head__lead { margin-inline: auto; }

/* ------------------------------ Buttons --------------------------------- */
.sk-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1;
  padding: 0.95rem 1.6rem;
  border-radius: var(--r-pill);
  border: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease),
              border-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.sk-btn--primary {
  background: var(--accent); color: var(--on-accent);
  box-shadow: var(--shadow-soft);
}
.sk-btn--primary:hover { background: var(--accent-hover); transform: translateY(-2px); }
.sk-btn--primary:active { transform: translateY(0); }

/* Ghost : AA visible au repos ET au survol, sur clair ET sur surface invert. */
.sk-btn--ghost {
  background: var(--surface-card);
  color: var(--accent-text);
  border-color: var(--corail-soft);
}
.sk-btn--ghost:hover {
  background: var(--corail-wash);
  border-color: var(--accent);
  color: var(--accent-hover);
  transform: translateY(-2px);
}
/* sur fond profond (footer / bandes invert) */
.on-invert .sk-btn--ghost,
.cta-final .sk-btn--ghost {
  background: transparent; color: #fff; border-color: rgba(255,255,255,0.7);
}
.on-invert .sk-btn--ghost:hover,
.cta-final .sk-btn--ghost:hover {
  background: rgba(255,255,255,0.16); color: #fff; border-color: #fff;
}

.sk-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-display); font-weight: 700;
  color: var(--accent-text); text-decoration: none;
}
.sk-link svg { transition: transform 0.2s var(--ease); }
.sk-link:hover svg { transform: translateX(4px); }
.sk-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ------------------------------ Reveal ---------------------------------- */
.sk-reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.sk-reveal.is-in { opacity: 1; transform: none; }
.no-js .sk-reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .sk-reveal { opacity: 1 !important; transform: none !important; transition: none; }
}

/* ============================== HEADER =================================== */
.site-header {
  position: sticky; top: 0; z-index: 90;
  background: rgba(255, 253, 250, 0.82);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__bar {
  display: flex; align-items: center; gap: clamp(0.5rem, 1.4vw, 1rem);
  height: 72px;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1.12rem;
  color: var(--encre); text-decoration: none; white-space: nowrap;
  flex: none;
}
.brand__badge { width: 38px; height: 38px; border-radius: var(--r-pill); object-fit: cover; box-shadow: var(--shadow-soft); }

.nav { display: none; gap: 0.15rem; margin-inline: auto; flex: none; }
.nav__link {
  font-family: var(--font-display); font-weight: 500; font-size: 0.9rem;
  color: var(--encre-soft); text-decoration: none;
  padding: 0.5rem 0.6rem; border-radius: var(--r-pill);
  transition: color 0.2s, background-color 0.2s;
  white-space: nowrap; flex: none;
}
.nav__link:hover { color: var(--accent-hover); background: var(--corail-wash); }
.nav__link[aria-current="page"] { color: var(--accent-text); background: var(--corail-wash); }

.lang { display: none; gap: 2px; background: var(--creme); border-radius: var(--r-pill); padding: 3px; flex: none; }
.lang__btn {
  border: 0; background: transparent; font-family: var(--font-display); font-weight: 700;
  font-size: 0.78rem; color: var(--encre-soft); padding: 0.35rem 0.6rem; border-radius: var(--r-pill);
  transition: background-color 0.2s, color 0.2s;
}
.lang__btn[aria-pressed="true"] { background: var(--surface-card); color: var(--accent-text); box-shadow: var(--shadow-soft); }
.lang__btn:hover { color: var(--accent-hover); }

.header-cta { display: none; flex: none; }
/* Bascule burger -> nav complète seulement quand il y a la place pour les 6
   onglets (libellés courts : Accueil/Parfums/Gâteaux/Boutiques/Histoire/Contact)
   + langue + CTA, sans serrage : nav en flex:none (jamais tronquée), nowrap. */
@media (min-width: 1240px) {
  .nav, .lang, .header-cta { display: inline-flex; }
  .header-cta { padding: 0.68rem 1.15rem; font-size: 0.9rem; }
}

.burger {
  margin-left: auto; display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border: 1px solid var(--line); background: var(--surface-card);
  border-radius: var(--r-md); color: var(--encre);
}
.burger:hover { background: var(--corail-wash); border-color: var(--corail-soft); }
@media (min-width: 1240px) { .burger { display: none; } }

/* --------------------------- Mobile drawer ------------------------------ */
.mobile-menu {
  position: fixed; inset: 0; z-index: 120;
  background: var(--surface-page);
  display: flex; flex-direction: column; padding: var(--space-4);
  transform: translateX(100%); transition: transform 0.35s var(--ease);
  visibility: hidden;
}
.mobile-menu.is-open { transform: none; visibility: visible; }
@media (prefers-reduced-motion: reduce) { .mobile-menu { transition: none; } }
.mobile-menu__top { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.close-x { width: 46px; height: 46px; border: 1px solid var(--line); background: var(--surface-card); border-radius: var(--r-md); display: inline-flex; align-items: center; justify-content: center; }
.close-x:hover { background: var(--corail-wash); }
.mobile-menu__nav { display: flex; flex-direction: column; gap: 0.4rem; margin-top: var(--space-6); }
.mobile-menu__nav a {
  font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; text-decoration: none;
  color: var(--encre); padding: 0.7rem 0.5rem; border-radius: var(--r-md);
}
.mobile-menu__nav a:hover { color: var(--accent-text); background: var(--corail-wash); }
.mobile-menu__foot { margin-top: auto; display: flex; flex-direction: column; gap: var(--space-4); padding-bottom: var(--space-4); }
.mobile-menu__lang { display: inline-flex; align-self: flex-start; gap: 4px; padding: 4px; }
/* Cibles tactiles ≥ 44px dans le drawer (WCAG 2.5.5) */
.mobile-menu__lang .lang__btn {
  min-width: 48px; min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.92rem;
}

/* ============================== FOOTER ================================== */
.site-footer {
  background: var(--surface-invert); color: #EDE6DC;
  padding-block: var(--space-14) var(--space-8);
}
.footer__grid {
  display: grid; grid-template-columns: 1fr; gap: var(--space-8);
}
@media (min-width: 640px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer__brand { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: #fff; }
.footer__brand img { width: 40px; height: 40px; border-radius: var(--r-pill); }
.footer__tag { margin-top: var(--space-4); color: #C7BEB1; max-width: 36ch; }
.footer__col h4 { font-family: var(--font-display); font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; color: #E0A493; margin-bottom: var(--space-4); }
.footer__col ul { display: flex; flex-direction: column; gap: 0.6rem; }
.footer__col a, .footer__col span { color: #DDD5C9; text-decoration: none; }
.footer__col a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer__bottom {
  margin-top: var(--space-12); padding-top: var(--space-6);
  border-top: 1px solid rgba(255,255,255,0.14);
  display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; justify-content: space-between;
  color: #BBB2A5; font-size: 0.92rem;
}
.footer__bottom a { color: #DDD5C9; }
.footer__bottom a:hover { color: #fff; }
.footer__social { display: flex; gap: 0.6rem; }
.footer__social a {
  width: 40px; height: 40px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.1); color: #fff;
  transition: background-color 0.2s, transform 0.2s;
}
.footer__social a:hover { background: var(--accent); transform: translateY(-2px); }

/* --------------------------- Float helper ------------------------------- */
/* Pastilles flottantes — réutilisé partout. transform/opacity only. */
@keyframes sb-float {
  0%, 100% { transform: translateY(var(--parallax-y, 0px)) rotate(var(--rot, 0deg)); }
  50%      { transform: translateY(calc(var(--parallax-y, 0px) - 7px)) rotate(var(--rot, 0deg)); }
}
.sb-float { animation: sb-float var(--float-dur, 9s) ease-in-out infinite; will-change: transform; }
/* Léger délai d'entrée décalé : les billes "prennent vie" l'une après l'autre. */
.hero__sat--1 { animation-delay: 0s; }
.hero__sat--2 { animation-delay: 0.35s; }
.hero__sat--3 { animation-delay: 0.7s; }
.hero__sat--4 { animation-delay: 1.05s; }
.no-js .sb-float { animation: none; }
@media (prefers-reduced-motion: reduce) { .sb-float { animation: none !important; } }

/* --------------------------- Reveal media (gx-rise) --------------------- */
/* Les visuels arrivent en glissant + légère mise à l'échelle au scroll.
   Combinable avec .sk-reveal (le JS pose .is-in sur les deux). Sans-JS et
   reduced-motion : état final, aucune animation. */
.gx-rise { opacity: 0; transform: translateY(34px) scale(0.96); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); will-change: transform; }
.gx-rise.is-in { opacity: 1; transform: none; }
.no-js .gx-rise { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .gx-rise { opacity: 1 !important; transform: none !important; transition: none; } }

/* La 2ᵉ photo flottante des duos média se pose un cran après la 1ʳᵉ. */
.cakes__photo--float, .cake-feature__photo--float { transition-delay: 0.12s; }

/* --------------------------- Stagger des grilles ------------------------ */
/* Quand un conteneur révélé contient une grille de cartes, on cascade les
   enfants .sk-reveal via --i (posé en JS). Effet "carte par carte". */
.sk-reveal { transition-delay: calc(var(--i, 0) * 70ms); }

/* --------------------------- Carte qui se soulève ----------------------- */
.proof__item, .review, .step, .shop {
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
}
.proof__item:hover, .review:hover, .step:hover, .shop:hover {
  transform: translateY(-3px); box-shadow: var(--shadow-card);
}

/* --------------------------- Blobs CTA en flottaison -------------------- */
.cta-final__blob { animation: sb-float 9s ease-in-out infinite; }
.cta-final__blob--2 { animation-duration: 11s; animation-direction: reverse; }
.no-js .cta-final__blob { animation: none; }
@media (prefers-reduced-motion: reduce) { .cta-final__blob { animation: none !important; } }
