/* =========================================================
   FLP PREMIUM — Carousel v2 Premium Edition
   Crossfade cinématique · Typographie raffinée · Design luxe
   ========================================================= */

/* ── Conteneur ──────────────────────────────────────────── */
.hero-carousel {
  position: relative;
  width: 100%;
  height: 92svh;
  min-height: 520px;
  max-height: 800px;
  overflow: hidden;
  background: #080e08;
}

/* ── Track — positionnement absolu pour crossfade ───────── */
.carousel-track {
  position: relative;
  height: 100%;
}

/* ── Slides ─────────────────────────────────────────────── */
.c-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}
.c-slide.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}
.c-slide.is-leaving {
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.45s ease;
}

/* ── Fond image — Ken Burns subtil ──────────────────────── */
.c-slide-picture {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.c-slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--obj-pos-mob, center center);
  transform: scale(1);
  transition: transform 12s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
  display: block;
}
.c-slide.active .c-slide-img {
  transform: scale(1.04);
}

/* Vignette bas pour les dots */
.c-slide-vignette {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 140px;
  background: linear-gradient(to top, rgba(0,0,0,0.32) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

/* Overlay — gradient latéral élégant uniquement à gauche */
.c-slide-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      108deg,
      rgba(6,12,6,0.60) 0%,
      rgba(6,12,6,0.32) 42%,
      rgba(6,12,6,0.05) 68%,
      transparent 100%
    );
  z-index: 1;
}
/* ── data-theme : clair — overlay transparent, titre sombre ─── */
.c-slide[data-theme="light"] .c-slide-overlay { background: transparent; }
.c-slide[data-theme="light"] .c-slide-title {
  color: #0a2010;
  text-shadow: 0 1px 3px rgba(255,255,255,0.5);
}
/* Bouton : fond or solide pour visibilité sur image claire */
.c-slide[data-theme="light"] .c-cta-primary {
  background: var(--gold, #C9A84C);
  border-color: var(--gold, #C9A84C);
  color: #fff;
}
.c-slide[data-theme="light"] .c-cta-primary::before {
  background: linear-gradient(135deg, #b8942e, #a07c20);
}

/* ── data-theme : promo — texte baked in image ──────────────── */
.c-slide[data-theme="promo"] .c-slide-overlay { background: none; }
.c-slide[data-theme="promo"] .c-slide-eyebrow,
.c-slide[data-theme="promo"] .c-slide-title   { display: none; }


/* SVG déco — supprimé pour look épuré */
.c-slide-deco { display: none; }

/* ── Contenu ────────────────────────────────────────────── */
.c-slide-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: calc(var(--header-h, 72px) + 16px);
  max-width: 580px;
}

/* États hors-active — cachés sans transition */
.c-slide:not(.active):not(.is-leaving) .c-slide-eyebrow,
.c-slide:not(.active):not(.is-leaving) .c-slide-title,
.c-slide:not(.active):not(.is-leaving) .c-slide-ctas {
  opacity: 0;
  transform: translateY(22px);
  transition: none;
}

/* Sortie — fade rapide vers le haut */
.c-slide.is-leaving .c-slide-eyebrow,
.c-slide.is-leaving .c-slide-title,
.c-slide.is-leaving .c-slide-ctas {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

/* Entrée — stagger élégant */
.c-slide.active .c-slide-eyebrow {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s cubic-bezier(0.22,1,0.36,1), transform 0.5s cubic-bezier(0.22,1,0.36,1);
  transition-delay: 240ms;
}
.c-slide.active .c-slide-title {
  opacity: 1;
  transform: none;
  transition: opacity 0.55s cubic-bezier(0.22,1,0.36,1), transform 0.55s cubic-bezier(0.22,1,0.36,1);
  transition-delay: 320ms;
}
.c-slide.active .c-slide-ctas {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s cubic-bezier(0.22,1,0.36,1), transform 0.5s cubic-bezier(0.22,1,0.36,1);
  transition-delay: 440ms;
}

/* ── Eyebrow catégorie ──────────────────────────────────── */
.c-slide-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.c-eyebrow-line {
  display: block;
  width: 38px;
  height: 1px;
  background: var(--gold, #C9A84C);
  flex-shrink: 0;
}
.c-eyebrow-text {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold, #C9A84C);
}

/* ── Titre ──────────────────────────────────────────────── */
.c-slide-title {
  font-family: var(--font-serif, 'Playfair Display', serif);
  font-size: clamp(2.1rem, 5.2vw, 4rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.07;
  letter-spacing: -0.02em;
  margin-bottom: 38px;
  text-shadow:
    0 1px 4px rgba(0,0,0,0.55),
    0 4px 28px rgba(0,0,0,0.3);
}
.c-slide-title em {
  font-style: italic;
  color: rgba(255,255,255,0.88);
}

/* ── CTA — ghost button gold ────────────────────────────── */
.c-slide-ctas { display: flex; }

.c-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 34px;
  background: rgba(0,0,0,0.18);
  border: 1.5px solid rgba(201,168,76,0.75);
  color: #fff;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
  transition: border-color 0.35s ease, transform 0.32s ease, box-shadow 0.35s ease;
}
.c-cta-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(201,168,76,0.85), rgba(201,168,76,0.55));
  opacity: 0;
  transition: opacity 0.35s ease;
}
.c-cta-primary > span,
.c-cta-primary > svg {
  position: relative;
  z-index: 1;
}
.c-cta-primary svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.c-cta-primary:hover {
  border-color: var(--gold, #C9A84C);
  transform: translateY(-3px);
  box-shadow: 0 14px 44px rgba(201,168,76,0.3);
}
.c-cta-primary:hover::before { opacity: 1; }
.c-cta-primary:hover svg { transform: translateX(5px); }

/* ── Numéro slide ───────────────────────────────────────── */
.c-slide-number {
  position: absolute;
  bottom: 40px;
  left: clamp(20px, 4vw, 52px);
  font-size: 0.68rem;
  font-weight: 400;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.2em;
  z-index: 10;
  font-variant-numeric: tabular-nums;
}

/* ── Flèches ────────────────────────────────────────────── */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  color: rgba(255,255,255,0.8);
  backdrop-filter: blur(12px);
  transition: background 0.28s ease, border-color 0.28s ease, transform 0.28s ease;
  cursor: pointer;
}
.carousel-arrow:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.38);
  color: #fff;
  transform: translateY(-50%) scale(1.07);
}
.carousel-arrow:active { transform: translateY(-50%) scale(0.93); }
.carousel-arrow.prev { left: clamp(14px, 3vw, 36px); }
.carousel-arrow.next { right: clamp(14px, 3vw, 36px); }
.carousel-arrow svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Dots ───────────────────────────────────────────────── */
.carousel-dots {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  align-items: center;
  z-index: 10;
}
.carousel-dot {
  width: 5px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255,255,255,0.28);
  border: none;
  cursor: pointer;
  transition: width 0.4s cubic-bezier(0.22,1,0.36,1), background 0.4s ease;
  padding: 0;
}
.carousel-dot.active {
  width: 30px;
  background: var(--gold, #C9A84C);
}
.carousel-dot:hover:not(.active) { background: rgba(255,255,255,0.55); }

/* ── Vignettes catégories ───────────────────────────────── */
.c-cat-thumbs {
  position: absolute;
  right: clamp(16px, 3vw, 44px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 10;
}
.c-cat-thumb {
  display: flex;
  align-items: center;
  padding: 7px 13px;
  background: rgba(0,0,0,0.42);
  border-left: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.7;
  backdrop-filter: blur(6px);
}
.c-cat-thumb.active,
.c-cat-thumb:hover {
  border-left-color: var(--gold, #C9A84C);
  background: rgba(201,168,76,0.85);
  opacity: 1;
}
.c-cat-thumb-label {
  font-size: 0.66rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── Barre de progression ───────────────────────────────── */
.carousel-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold, #C9A84C), rgba(201,168,76,0.35));
  z-index: 10;
  width: 0%;
}

/* ════════════════════════════════════════════════════════════
   DESKTOP PREMIUM — ≥ 1025px
   Mobile inchangé — toutes les règles ici sont desktop-only
════════════════════════════════════════════════════════════ */
@media (min-width: 1025px) {

  /* ── Hauteur hero : +25%+15%+15% par rapport au ratio natif (1600×799) ── */
  .hero-carousel {
    height: auto;
    aspect-ratio: 1600 / 1321;
    max-height: 100svh;
    min-height: 959px;
  }

  /* ── Image desktop : object-position via CSS var ──────────── */
  .c-slide-img {
    object-position: var(--obj-pos-dk, top center);
  }

  /* ── Slide : alignement vertical raffiné ─────────────
     align-items:center centre dans toute la hauteur.
     margin-top nudge le bloc vers le bas pour tenir
     compte du header fixe sans le masquer.               */
  .c-slide { align-items: center; }

  .c-slide-content {
    padding-top:  0;
    padding-bottom: 56px;
    margin-top:   52px;      /* compensation visuelle header */
    max-width:    600px;
  }

  /* ── Eyebrow ─────────────────────────────────────────── */
  .c-slide-eyebrow { margin-bottom: 28px; }
  .c-eyebrow-line  { width: 44px; }
  .c-eyebrow-text  {
    font-size:      0.71rem;
    letter-spacing: 0.26em;
  }

  /* ── Titre ───────────────────────────────────────────── */
  .c-slide-title {
    font-size:      clamp(2.6rem, 3.5vw, 4.2rem);
    letter-spacing: -0.025em;
    line-height:    1.06;
    margin-bottom:  44px;
  }

  /* ── CTA ─────────────────────────────────────────────── */
  .c-cta-primary {
    padding:        17px 40px;
    font-size:      0.84rem;
    letter-spacing: 0.11em;
  }

  /* ── Navigation ──────────────────────────────────────── */
  .carousel-dots  { bottom: 40px; }
  .carousel-arrow { width: 50px; height: 50px; }
  .carousel-arrow svg { width: 19px; height: 19px; }

  /* ── Numéro slide visible desktop ───────────────────── */
  .c-slide-number {
    display:  block;
    bottom:   42px;
    left:     52px;
    font-size: 0.72rem;
  }

  /* ── Vignettes catégories premium ────────────────────── */
  .c-cat-thumbs {
    right: 40px;
    gap:   8px;
  }
  .c-cat-thumb {
    padding:       8px 16px;
    border-radius: 2px;
  }
  .c-cat-thumb-label {
    font-size:      0.67rem;
    letter-spacing: 0.12em;
  }

  /* ── Vignette bas : plus discrète (image déjà claire) ─ */
  .c-slide-vignette { height: 120px; }
}

/* ── Très grand écran (≥ 1440px) ───────────────────────── */
@media (min-width: 1440px) {
  .c-slide-content { max-width: 640px; }
  .c-slide-title   { font-size: 4rem; }
}

/* ════════════════════════════════════════════════════════════
   MOBILE — inchangé (règles isolées ≤ 1024px)
════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .c-cat-thumbs { display: none; }
}
@media (max-width: 768px) {
  .hero-carousel {
    height:      auto;
    aspect-ratio: 374 / 720;
    max-height:  88svh;
    min-height:  480px;
  }
  .c-slide-img {
    object-fit: cover;
    object-position: center center;
  }
  .c-slide.active .c-slide-img {
    transform: scale(1);
  }
  .c-slide-content {
    max-width:  88%;
    padding-top: calc(var(--header-h, 72px) + 24px);
    margin-top:  0;
  }
  .carousel-arrow { width: 40px; height: 40px; }
  .c-slide-number { display: none; }
  .c-slide-title  { font-size: clamp(1.9rem, 6.5vw, 2.8rem); }
}
@media (max-width: 480px) {
  .carousel-arrow { display: none; }
  .carousel-dots  { bottom: 18px; }
  .c-cta-primary  { padding: 13px 26px; font-size: 0.78rem; }
}
@media (prefers-reduced-motion: reduce) {
  .c-slide,
  .c-slide.active,
  .c-slide.is-leaving { transition: none; opacity: 1; }
  .c-slide-img        { transition: none; }
  .c-slide:not(.active):not(.is-leaving) .c-slide-eyebrow,
  .c-slide:not(.active):not(.is-leaving) .c-slide-title,
  .c-slide:not(.active):not(.is-leaving) .c-slide-ctas,
  .c-slide.active .c-slide-eyebrow,
  .c-slide.active .c-slide-title,
  .c-slide.active .c-slide-ctas { opacity: 1; transform: none; transition: none; }
}
