/* =========================================================
 * Soléa — Elevation layer
 * Le saut qualitatif au-dessus de premium-fx.
 *
 * Apporte :
 *   - Typographie editorial serif (Cormorant Garamond)
 *   - Loading screen avec brand reveal
 *   - Séparateurs SVG bespoke (motifs architecturaux or)
 *   - Composant Before/After slider drag
 *   - Hero parallax multicouches (immersion accrue)
 *   - Scroll cinematics via CSS scroll-timeline + GSAP fallback
 *   - Micro-interactions raffinées
 * ========================================================= */

:root {
  --serif: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  --sans:  'Montserrat', system-ui, -apple-system, sans-serif;
}

/* =========================================================
 *  TYPOGRAPHIE — Pairing sans/serif éditorial
 * ========================================================= */
.font-serif,
.fx-pullquote blockquote,
.hero-luxe-h1 .serif,
h1.serif,
h2.serif {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* Pull quote raffinée serif italique */
.fx-pullquote blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1.32;
  letter-spacing: -0.005em;
}

/* H2 éditoriaux : mix sans/serif possible via span.serif */
.fx-editorial-copy h2 .serif,
.cta-final h2 .serif,
.fx-section-header h2 .serif {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0;
}

/* Section header — eyebrow plus aérien */
.eyebrow-tag {
  font-family: var(--sans);
  font-feature-settings: "tnum" 1, "ss01" 1;
}

/* =========================================================
 *  LOADING SCREEN — Brand reveal
 *  Activé via .loading-active sur <html>, retiré par JS au load
 * ========================================================= */
.solea-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d0d10;
  pointer-events: none;
  transition: opacity .8s var(--fx-ease-out), visibility 0s .8s;
  opacity: 0;
  visibility: hidden;
}
html.loading-active .solea-loader {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .4s ease, visibility 0s;
}
.solea-loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
}
/* Loader minimal : trait or 1px dessine un carré 64×64 sans gradient ni glow.
   Le "S" path-drawing (si signature.js charge) ajoutera la lettre par-dessus. */
.solea-loader-mark {
  width: 80px;
  height: 80px;
  position: relative;
  background: transparent;
  box-shadow: none;
  animation: none;
}
.solea-loader-mark::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  border-top-color: var(--fx-gold, #f6b72c);
  animation: loaderDraw 1.4s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
.solea-loader-mark::after {
  display: none;
}
@keyframes loaderDraw {
  0%   { border-top-color: var(--fx-gold); border-right-color: transparent; border-bottom-color: transparent; border-left-color: transparent; clip-path: inset(0 100% 0 0); }
  25%  { clip-path: inset(0 0 0 0); border-right-color: var(--fx-gold); border-bottom-color: transparent; border-left-color: transparent; }
  50%  { border-bottom-color: var(--fx-gold); border-left-color: transparent; }
  75%  { border-left-color: var(--fx-gold); }
  100% { border: 1px solid var(--fx-gold); }
}
.solea-loader-text {
  color: #fbf8f2;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  font-weight: 500;
  opacity: 0.85;
}
.solea-loader-bar {
  width: 140px;
  height: 1px;
  background: rgba(251, 248, 242, 0.18);
  position: relative;
  overflow: hidden;
}
.solea-loader-bar::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0; width: 40%;
  background: #f6b72c;
  animation: loaderBar 1.8s ease-in-out infinite;
}
/* keyframes loaderPulse/loaderRing retirés : code mort (jamais référencés).
   Audit perf : -260 octets, déparasitage CSS. */
@keyframes loaderBar {
  0%   { transform: translateX(-110%); }
  50%  { transform: translateX(110%); }
  100% { transform: translateX(110%); }
}

/* =========================================================
 *  SÉPARATEURS SVG BESPOKE — Motifs architecturaux or
 *  Usage : <div class="fx-rule fx-rule-pattern"></div>
 * ========================================================= */
.fx-rule {
  position: relative;
  display: block;
  width: 100%;
  height: 64px;
  margin: 48px 0;
  overflow: hidden;
}
.fx-rule-pattern {
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='32' viewBox='0 0 240 32'><g fill='none' stroke='%23f6b72c' stroke-width='1' stroke-linecap='round'><path d='M0 16 H80'/><circle cx='100' cy='16' r='2' fill='%23f6b72c'/><path d='M115 8 L125 16 L115 24 Z' fill='%23f6b72c' stroke='none'/><circle cx='140' cy='16' r='2' fill='%23f6b72c'/><path d='M160 16 H240'/></g></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 240px auto;
  height: 32px;
  opacity: 0.7;
}
.fx-rule-cross {
  height: 48px;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='320' height='48' viewBox='0 0 320 48'><g fill='none' stroke='%23f6b72c' stroke-width='1'><path d='M0 24 H140'/><path d='M180 24 H320'/><path d='M160 8 V40' stroke-width='1.5'/><path d='M148 24 H172' stroke-width='1.5'/><circle cx='160' cy='24' r='5'/></g></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 320px auto;
}

/* Section background blueprint subtle */
.fx-bg-blueprint {
  position: relative;
  isolation: isolate;
}
.fx-bg-blueprint::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(246, 183, 44, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 183, 44, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center;
  pointer-events: none;
  z-index: -1;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}

/* =========================================================
 *  BEFORE/AFTER SLIDER
 *  Markup :
 *    <div class="fx-ba" data-fx-ba>
 *      <img class="fx-ba-after" src=".."> (visible)
 *      <div class="fx-ba-before-wrap"><img class="fx-ba-before" src=".."></div>
 *      <span class="fx-ba-handle"></span>
 *      <span class="fx-ba-label fx-ba-label-before">Avant</span>
 *      <span class="fx-ba-label fx-ba-label-after">Après</span>
 *    </div>
 * ========================================================= */
.fx-ba {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 18px;
  cursor: ew-resize;
  user-select: none;
  isolation: isolate;
  background: #efe8d8;
}
.fx-ba img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  display: block;
}
.fx-ba-before-wrap {
  position: absolute;
  inset: 0;
  width: 50%;
  overflow: hidden;
  z-index: 2;
  transition: width 0.05s linear;
}
.fx-ba-before-wrap img {
  width: 100vw;
  max-width: none;
}
/* Handle minimal : trait vertical or 1px + 2 chevrons SVG fins */
.fx-ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--fx-gold, #f6b72c);
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
  box-shadow: 0 0 12px rgba(13, 13, 16, 0.18);
}
.fx-ba-handle::before,
.fx-ba-handle::after {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fx-gold, #f6b72c);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  font-style: italic;
  transform: translateY(-50%);
}
.fx-ba-handle::before { content: "‹"; left: -16px; }
.fx-ba-handle::after  { content: "›"; right: -16px; }
.fx-ba-label {
  position: absolute;
  top: 18px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 8px 14px;
  background: rgba(13, 13, 16, 0.72);
  color: var(--fx-cream, #fbf8f2);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  z-index: 4;
  pointer-events: none;
}
.fx-ba-label-before { left: 18px; }
.fx-ba-label-after  { right: 18px; background: rgba(246, 183, 44, 0.92); color: #0d0d10; }

/* =========================================================
 *  HERO PARALLAX MULTI-COUCHES
 *  Markup :
 *    <section class="hero-luxe hero-cinematic">
 *      <div class="hero-bg" data-parallax="0.15"></div>
 *      <div class="hero-mid" data-parallax="0.08"></div>
 *      <div class="hero-fg">contenu</div>
 *    </section>
 * ========================================================= */
.hero-cinematic {
  position: relative;
}
.hero-cinematic .hero-luxe-media img {
  /* Audit DP : brightness baissée à 0.78 pour laisser place à la key light */
  filter: brightness(0.78) contrast(1.08) saturate(1.04);
}
.hero-cinematic .hero-luxe-overlay::before {
  /* KEY LIGHT MOTIVÉE — single radial-gradient top-right 4400K rasante
     (audit DP : "Un sujet, une source, une intention. Tuer le fill ambiant.") */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 78% 22%, rgba(255, 222, 160, 0.38) 0%, rgba(255, 222, 160, 0.08) 40%, transparent 70%),
    linear-gradient(160deg, transparent 30%, rgba(13, 13, 16, 0.65) 100%);
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: screen;
}
/* Rim doré derrière H1 — séparation chromatique cinématographique */
.hero-cinematic .hero-luxe-h1 {
  text-shadow:
    1px 0 0 rgba(246, 183, 44, 0.32),
    -1px 0 0 rgba(13, 13, 16, 0.7),
    0 4px 32px rgba(13, 13, 16, 0.55);
}
.hero-cinematic .hero-luxe-h1 {
  text-shadow: 0 4px 32px rgba(13, 13, 16, 0.5);
}

/* Brand reveal sur hero (apparition contrôlée) */
.hero-cinematic .hero-luxe-eyebrow,
.hero-cinematic .hero-luxe-h1,
.hero-cinematic .hero-luxe-sub,
.hero-cinematic .hero-luxe-ctas {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  animation: heroEnter 1.2s var(--fx-ease-out, cubic-bezier(.16,1,.3,1)) forwards;
}
.hero-cinematic .hero-luxe-eyebrow { animation-delay: 0.18s; }
.hero-cinematic .hero-luxe-h1     { animation-delay: 0.32s; }
.hero-cinematic .hero-luxe-sub    { animation-delay: 0.50s; }
.hero-cinematic .hero-luxe-ctas   { animation-delay: 0.68s; }
@keyframes heroEnter {
  to { opacity: 1; transform: none; }
}

/* =========================================================
 *  SCROLL CINEMATICS — Section pin progressive
 *  Utilise CSS scroll-timeline (progressive enhancement)
 *  Fallback : visible direct
 * ========================================================= */
@supports (animation-timeline: view()) {
  .fx-scroll-fade {
    animation: scrollFade linear;
    animation-timeline: view();
    animation-range: entry 5% cover 35%;
  }
  @keyframes scrollFade {
    from { opacity: 0; transform: translate3d(0, 24px, 0); }
    to   { opacity: 1; transform: none; }
  }

  .fx-scroll-image-mask {
    animation: scrollImageMask linear;
    animation-timeline: view();
    animation-range: entry 10% cover 40%;
  }
  @keyframes scrollImageMask {
    from { clip-path: inset(0 50% 0 50%); }
    to   { clip-path: inset(0 0 0 0); }
  }

  .fx-scroll-numbergrow {
    animation: scrollNumGrow linear;
    animation-timeline: view();
    animation-range: entry 0% cover 50%;
  }
  @keyframes scrollNumGrow {
    from { letter-spacing: 0.5em; opacity: 0; }
    to   { letter-spacing: -0.03em; opacity: 1; }
  }
}

/* =========================================================
 *  EDITORIAL DROP CAP (initiale luxe)
 * ========================================================= */
.fx-dropcap::first-letter {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 4em;
  line-height: 0.85;
  float: left;
  margin: 8px 14px 0 0;
  color: var(--fx-gold, #f6b72c);
}

/* =========================================================
 *  PRODUCTS GRID — Refinement avec serif accents
 * ========================================================= */
.fx-product-card h3 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 34px;
  letter-spacing: -0.005em;
  line-height: 1.05;
}
.fx-product-tag {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}

/* =========================================================
 *  CTA REFINEMENT — Add micro-arrow animation
 * ========================================================= */
.fx-cta .arrow {
  transition: transform .45s var(--fx-ease-out, cubic-bezier(.16,1,.3,1));
}
.fx-cta:hover .arrow {
  transform: rotate(-45deg) scale(1.08);
}

/* Hero CTAs slight refinement */
.hero-luxe-ctas .fx-cta {
  background: var(--fx-cream, #fbf8f2);
  color: var(--fx-ink, #0d0d10);
  box-shadow: 0 12px 32px rgba(13, 13, 16, 0.25);
}
.hero-luxe-ctas .fx-cta::before {
  background: linear-gradient(120deg, var(--fx-gold, #f6b72c) 0%, #f9c84d 100%);
}
.hero-luxe-ctas .fx-cta .arrow {
  background: var(--fx-ink, #0d0d10);
  color: var(--fx-cream, #fbf8f2);
}

/* =========================================================
 *  SECTION HEADERS — Drop cap + serif accents
 * ========================================================= */
.fx-section-header h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-style: normal;
  letter-spacing: -0.015em;
  line-height: 1.08;
}
.fx-section-header h2 em {
  font-style: italic;
  color: var(--fx-gold, #f6b72c);
}

/* =========================================================
 *  PULL QUOTE elevation — Luxe italic
 * ========================================================= */
.fx-pullquote {
  background:
    radial-gradient(ellipse at 0% 0%, rgba(246, 183, 44, 0.12) 0%, transparent 55%),
    linear-gradient(135deg, #0d0d10 0%, #161618 100%);
  padding: clamp(48px, 7vw, 72px) clamp(48px, 8vw, 96px);
}
.fx-pullquote blockquote {
  position: relative;
  font-size: clamp(24px, 2.8vw, 36px);
  max-width: 880px;
}
.fx-pullquote cite {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.32em;
  margin-top: 36px;
  position: relative;
  padding-left: 36px;
}
.fx-pullquote cite::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 24px;
  height: 1px;
  background: var(--fx-gold, #f6b72c);
}

/* =========================================================
 *  Responsive
 * ========================================================= */
@media (max-width: 880px) {
  .solea-loader-mark { width: 72px; height: 72px; }
  .solea-loader-mark::after { font-size: 34px; }
  .fx-product-card h3 { font-size: 28px; }
}
