/* Feature Carousel - pattern Nissan UK slide PPT 17-18 + 25
   Grande image gauche, panneau texte droite, flèches navigation + dots + auto-play. */

.nissan-fcarousel {
  position: relative;
  padding: clamp(56px, 8vw, 110px) 0;
  font-family: var(--nissan-font, "Inter", system-ui, sans-serif);
  color: var(--ink, #0a0d12);
}

.nissan-fcarousel--bg-light { background: #ffffff; }
.nissan-fcarousel--bg-gray  { background: #f6f7f8; }
.nissan-fcarousel--bg-dark  { background: #0a0d12; color: #ffffff; }
.nissan-fcarousel--bg-dark  .nissan-fcarousel__eyebrow { color: rgba(255,255,255,.6); }
.nissan-fcarousel--bg-dark  .nissan-fcarousel__intro   { color: rgba(255,255,255,.7); }
.nissan-fcarousel--bg-dark  .nissan-fcarousel__counter-sep,
.nissan-fcarousel--bg-dark  .nissan-fcarousel__counter-total { color: rgba(255,255,255,.4); }
.nissan-fcarousel--bg-dark  .nissan-fcarousel__nav { color: #ffffff; border-color: rgba(255,255,255,.25); }
.nissan-fcarousel--bg-dark  .nissan-fcarousel__nav:hover { background: #ffffff; color: #0a0d12; }
.nissan-fcarousel--bg-dark  .nissan-fcarousel__dot { background: rgba(255,255,255,.25); }
.nissan-fcarousel--bg-dark  .nissan-fcarousel__dot.is-active { background: #ffffff; }

.nissan-fcarousel__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

.nissan-fcarousel__head {
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
}

.nissan-fcarousel__eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--nissan-red, #C3002F);
  margin-bottom: 14px;
}

.nissan-fcarousel__title {
  font-size: var(--title-xl, clamp(2rem, 4vw, 3.2rem));
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}

.nissan-fcarousel__title span {
  display: block;
}

.nissan-fcarousel__intro {
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.6;
  color: var(--ink-light, #4a525e);
  margin: 0;
}

/* Stage = grid 2 colonnes image + panneau */
.nissan-fcarousel__stage {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: stretch;
}

/* Alternance image gauche / image droite (Paul, call 19/05/2026 : "des fois
   il faut que ce soit le contraire, le texte à gauche et l'image à droite") */
.nissan-fcarousel--image-right .nissan-fcarousel__stage {
  grid-template-columns: 1fr 1.25fr;
}
.nissan-fcarousel--image-right .nissan-fcarousel__media { order: 2; }
.nissan-fcarousel--image-right .nissan-fcarousel__panel { order: 1; }

@media (max-width: 900px) {
  .nissan-fcarousel__stage,
  .nissan-fcarousel--image-right .nissan-fcarousel__stage {
    grid-template-columns: 1fr;
  }
  /* En mobile on garde image toujours en haut */
  .nissan-fcarousel--image-right .nissan-fcarousel__media { order: 1; }
  .nissan-fcarousel--image-right .nissan-fcarousel__panel { order: 2; }
}

/* Media side - stacked images, only one visible */
.nissan-fcarousel__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #e9ebee;
  border-radius: 6px;
  overflow: hidden;
}

.nissan-fcarousel__slide-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 1.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.nissan-fcarousel__slide-image.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

/* Right panel */
.nissan-fcarousel__panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(8px, 2vw, 24px) 0;
}

.nissan-fcarousel__counter {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.95rem;
  margin-bottom: 24px;
  letter-spacing: 0.05em;
}

.nissan-fcarousel__counter-current {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--nissan-red, #C3002F);
}

.nissan-fcarousel__counter-sep,
.nissan-fcarousel__counter-total {
  font-weight: 500;
  color: #94999f;
}

/* Slides (text panels) - only one visible */
.nissan-fcarousel__slides {
  position: relative;
  min-height: 160px;
}

.nissan-fcarousel__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.nissan-fcarousel__slide.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  position: relative;
}

.nissan-fcarousel__slide-title {
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 14px;
  line-height: 1.15;
}

.nissan-fcarousel__slide-body {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-light, #4a525e);
  margin: 0;
  max-width: 520px;
}

/* Controls : prev arrow - dots - next arrow */
.nissan-fcarousel__controls {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 36px;
}

.nissan-fcarousel__nav {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid rgba(10, 13, 18, 0.18);
  color: #0a0d12;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.nissan-fcarousel__nav:hover {
  background: #0a0d12;
  color: #ffffff;
  border-color: #0a0d12;
}

.nissan-fcarousel__nav:active {
  transform: scale(0.96);
}

.nissan-fcarousel__dots {
  flex: 1 1 auto;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.nissan-fcarousel__dot {
  width: 32px;
  height: 3px;
  border: 0;
  padding: 0;
  border-radius: 2px;
  background: rgba(10, 13, 18, 0.18);
  cursor: pointer;
  transition: background 0.2s ease, width 0.3s ease;
}

.nissan-fcarousel__dot.is-active {
  background: var(--nissan-red, #C3002F);
  width: 56px;
}

/* CTA below controls */
.nissan-fcarousel__ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 30px;
  margin-top: 32px;
}
.nissan-fcarousel__cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  align-self: flex-start;
}
.nissan-fcarousel__ctas .nissan-fcarousel__cta { margin-top: 0; }

.nissan-fcarousel__cta-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--nissan-red, #C3002F);
  color: #ffffff;
  transition: transform 0.2s ease;
}

.nissan-fcarousel__cta:hover .nissan-fcarousel__cta-circle {
  transform: scale(1.08);
}

/* Mobile */
@media (max-width: 600px) {
  .nissan-fcarousel__nav { width: 44px; height: 44px; }
  .nissan-fcarousel__dot { width: 24px; }
  .nissan-fcarousel__dot.is-active { width: 40px; }
  .nissan-fcarousel__controls { gap: 10px; margin-top: 28px; }
}

/* CTA propre à une diapositive (rendu dans l'article, suit la slide active). */
.nissan-fcarousel__slide-cta {
  margin-top: 22px;
}
