/* Page d'accueil : bannière en carrousel. */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(60rem 40rem at 78% 40%, var(--ps-glow) 0%, transparent 70%),
    var(--ps-bg);
}

/* Arcs fins tirés du logo rond, tracés au chargement. */
.hero__arcs {
  display: none;
  position: absolute;
  top: 50%;
  right: -12rem;
  width: 58rem;
  height: auto;
  transform: translateY(-50%);
  pointer-events: none;
  fill: none;
  stroke: var(--ps-lavender-300);
  stroke-width: 1;
}

.hero__arcs path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: hero-draw 1.6s var(--ps-ease) forwards;
}

.hero__arcs path:nth-child(2) { animation-delay: 0.15s; }
.hero__arcs path:nth-child(3) { animation-delay: 0.3s; }

.hero-slide {
  position: relative;
}

.hero-slide__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
  padding-block: 1.5rem 4.5rem;
}

.hero-slide__title {
  margin-bottom: 0.5rem;
  font-size: clamp(3rem, 8.5vw, 5.75rem);
}

/* Les noms d'articles sont plus longs que le nom de la boutique : taille réduite. */
.hero-slide__title--product {
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
}

.hero-slide--product .hero-slide__tagline {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
}

.hero-slide__tagline {
  margin-bottom: 1rem;
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
  line-height: 1.1;
}

.hero-slide__text {
  max-width: 30rem;
  margin-bottom: 1.75rem;
  font-size: 1.0625rem;
}

.hero-slide__price {
  margin-bottom: 2rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ps-ink);
}

.hero-slide__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 1.75rem;
}

/* Visuel : hauteur fixe pour que le carrousel ne saute pas d'une diapositive à l'autre. */
.hero-slide__visual {
  --visual-height: 13.5rem;

  position: relative;
  perspective: 1000px;
  order: -1;
  display: grid;
  place-items: center;
  height: var(--visual-height);
}

/* Sur mobile, un disque lavande remplace les arcs, qui passeraient derrière le texte. */
.hero-slide__visual::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: calc(var(--visual-height) * 1.15);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--ps-bg-alt);
}

/* Diapositive de marque : photo découpée en arche. */
.hero-arch-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius:
    calc(var(--visual-height) * 0.4) calc(var(--visual-height) * 0.4)
    var(--ps-radius) var(--ps-radius);
  box-shadow: var(--ps-shadow);
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 400ms var(--ps-ease);
}

/* Reflet qui suit la souris, pour donner du volume à la photo. */
.hero-arch-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(22rem circle at var(--glare-x, 30%) var(--glare-y, 20%), rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 60%);
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.hero-arch {
  display: block;
  width: auto;
  height: var(--visual-height);
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* Diapositive produit : produit détouré avec son ombre au sol. */
.hero-slide__visual--product::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 4%;
  height: 8%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(31, 16, 41, 0.22), rgba(31, 16, 41, 0));
}

.hero-product {
  width: auto;
  height: var(--visual-height);
  max-width: 100%;
  object-fit: contain;
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateZ(40px);
  transition: transform 400ms var(--ps-ease);
}

/* L'ombre au sol glisse à l'opposé de l'inclinaison. */
.hero-slide__visual--product::after {
  translate: calc(var(--tilt-y-ratio, 0) * -1.5rem) 0;
  transition: translate 400ms var(--ps-ease);
}

.hero-slide--product.is-current .hero-product {
  animation: hero-float 7s ease-in-out 1.4s infinite;
}

@media (min-width: 992px) {
  .hero__arcs {
    display: block;
  }

  .hero-slide__visual {
    order: 0;
  }

  .hero-slide__visual::before {
    display: none;
  }

  .hero-slide__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 4rem;
    min-height: max(36rem, calc(100svh - 7.5rem));
    padding-block: 4rem;
  }

  .hero-slide__visual {
    --visual-height: min(32rem, calc(100svh - 15rem));
  }
}

/*
  Changement de diapositive : fondu enchaîné lent (durée lue par Bootstrap sur la diapositive).
  Le contenu de la nouvelle diapositive arrive ensuite, en douceur.
*/
.hero .carousel-fade .carousel-item {
  transition: opacity var(--ps-duration-slide) var(--ps-ease);
}

.hero .carousel-fade .active.carousel-item-start,
.hero .carousel-fade .active.carousel-item-end {
  transition: opacity var(--ps-duration-slide) var(--ps-ease);
}

.hero-slide [data-anim] {
  opacity: 0;
  transform: translateY(0.5rem);
  transition: opacity 400ms var(--ps-ease), transform 400ms var(--ps-ease);
}

.hero-slide.is-current [data-anim] {
  opacity: 1;
  transform: none;
  transition:
    opacity 800ms var(--ps-ease),
    transform 900ms var(--ps-ease);
  transition-delay: calc(var(--i, 0) * 100ms + 200ms);
}

/* Le visuel ne se déplace pas : il apparaît en fondu en se posant à sa taille. */
.hero-slide [data-anim].hero-slide__visual {
  transform: scale(0.97);
}

.hero-slide.is-current [data-anim].hero-slide__visual {
  transform: none;
  transition:
    opacity 1000ms var(--ps-ease),
    transform 1200ms var(--ps-ease);
  transition-delay: 100ms;
}

/* Le surlignage de l'étiquette se dessine de gauche à droite. */
.hero-slide .eyebrow::before {
  clip-path: inset(0 100% 0 0);
}

.hero-slide.is-current .eyebrow::before {
  animation: highlight-draw 900ms var(--ps-ease) 500ms forwards;
}

/* La diapositive sortante garde son surlignage pendant que son texte s'efface. */
.hero-slide.active:not(.is-current) .eyebrow::before {
  clip-path: inset(0 0 0 0);
}

/* Navigation : points verticaux à droite sur ordinateur, horizontaux sur mobile.
   Le point actif s'allonge et se remplit pendant le temps d'affichage. */
.hero__nav {
  position: absolute;
  left: 50%;
  bottom: 1.75rem;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 1rem;
  transform: translateX(-50%);
}

.hero__nav[hidden] {
  display: none;
}

.hero__dots.carousel-indicators {
  /* Le point visible reste petit ; une bordure transparente agrandit la zone cliquable
     (24 px entre deux centres). Le fond s'arrête au contenu grâce à background-clip. */
  --dot: 0.5rem;
  --dot-long: 2.25rem;
  --hit-along: 0.5rem;
  --hit-across: 0.75rem;

  position: static;
  display: flex;
  gap: 0;
  margin: 0;
  padding: 0;
}

.hero__dots.carousel-indicators [data-bs-target] {
  position: relative;
  box-sizing: border-box;
  width: calc(var(--dot) + 2 * var(--hit-along));
  height: calc(var(--dot) + 2 * var(--hit-across));
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: solid transparent;
  border-width: var(--hit-across) var(--hit-along);
  border-radius: var(--ps-radius-pill);
  background: var(--ps-line-strong);
  background-clip: padding-box;
  opacity: 1;
  text-indent: 0;
  transition: width var(--ps-duration-hover) var(--ps-ease), height var(--ps-duration-hover) var(--ps-ease), background-color var(--ps-transition);
}

.hero__dots.carousel-indicators [data-bs-target]:hover {
  background-color: var(--ps-text-muted);
}

.hero__dots.carousel-indicators .active {
  width: calc(var(--dot-long) + 2 * var(--hit-along));
  background: var(--ps-lavender-300);
  background-clip: padding-box;
}

.hero__dots .active::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--ps-violet-600);
  transform: scaleX(0);
  transform-origin: left;
}

.is-progressing .hero__dots .active::after {
  animation: hero-progress-x var(--hero-interval, 6500ms) linear forwards;
}

.hero__toggle {
  display: inline-grid;
  place-items: center;
  width: var(--ps-tap);
  height: var(--ps-tap);
  padding: 0;
  border: 1px solid var(--ps-line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--ps-ink);
  font-size: 0.75rem;
  transition: background-color var(--ps-transition), border-color var(--ps-transition), color var(--ps-transition);
}

.hero__toggle:hover,
.hero__toggle:focus-visible {
  border-color: var(--ps-violet-600);
  background: var(--ps-violet-600);
  color: var(--ps-white);
}

@media (min-width: 992px) {
  .hero__nav {
    left: auto;
    right: 1.75rem;
    top: 50%;
    bottom: auto;
    flex-direction: column;
    transform: translateY(-50%);
  }

  .hero__dots.carousel-indicators {
    flex-direction: column;
  }

  .hero__dots.carousel-indicators [data-bs-target] {
    width: calc(var(--dot) + 2 * var(--hit-across));
    height: calc(var(--dot) + 2 * var(--hit-along));
    border-width: var(--hit-along) var(--hit-across);
  }

  .hero__dots.carousel-indicators .active {
    width: calc(var(--dot) + 2 * var(--hit-across));
    height: calc(var(--dot-long) + 2 * var(--hit-along));
  }

  .hero__dots .active::after {
    transform: scaleY(0);
    transform-origin: top;
  }

  .is-progressing .hero__dots .active::after {
    animation-name: hero-progress-y;
  }
}

/* Invitation à faire défiler, sur ordinateur seulement. */
.hero__scroll-wrap {
  display: none;
}

@media (min-width: 992px) {
  .hero__scroll-wrap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 1.5rem;
    z-index: 2;
    pointer-events: none;
  }

  .hero__scroll {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    pointer-events: auto;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ps-text-muted);
    text-decoration: none;
  }

  .hero__scroll::before {
    content: "";
    order: -1;
    width: 1px;
    height: 2.5rem;
    background: linear-gradient(var(--ps-accent), var(--ps-accent)) top / 100% 40% no-repeat, var(--ps-line);
    animation: hero-scroll 2.2s var(--ps-ease) infinite;
  }
}

@keyframes highlight-draw {
  to { clip-path: inset(0 0 0 0); }
}

@keyframes hero-draw {
  to { stroke-dashoffset: 0; }
}

/* Flottement avec une légère rotation sur lui-même, pour l'effet de volume. */
@keyframes hero-float {
  0%, 100% { translate: 0 0; rotate: y -7deg; }
  50% { translate: 0 -14px; rotate: y 7deg; }
}

@keyframes hero-progress-x {
  to { transform: scaleX(1); }
}

@keyframes hero-progress-y {
  to { transform: scaleY(1); }
}

@keyframes hero-scroll {
  0% { background-position: 0 -1rem, 0 0; }
  100% { background-position: 0 2.5rem, 0 0; }
}

/* Nos univers : rangée à faire glisser sur mobile, grille de 4 colonnes sur ordinateur. */
.universes__list {
  --gutter: calc(var(--bs-gutter-x, 1.5rem) * 0.5);

  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(70%, 17rem);
  gap: 1rem;
  margin: 0 calc(var(--gutter) * -1);
  padding: 0.5rem var(--gutter) 1.5rem;
  overflow-x: auto;
  list-style: none;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}

.universes__list::-webkit-scrollbar {
  display: none;
}

.universe {
  scroll-snap-align: start;
}

.universe__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.universe__media {
  display: block;
  overflow: hidden;
  border-radius: var(--ps-radius);
  background: var(--ps-bg-alt);
  box-shadow: var(--ps-shadow);
  transition: transform var(--ps-duration-hover) var(--ps-ease), box-shadow var(--ps-duration-hover) var(--ps-ease);
}

.universe__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform var(--ps-duration-hover) var(--ps-ease);
}

.universe__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0.25rem 0;
}

.universe__text {
  display: grid;
  gap: 0.1rem;
}

.universe__name {
  transition: color var(--ps-transition);
  font-size: var(--ps-text-card);
  font-weight: var(--ps-weight-title);
  letter-spacing: -0.01em;
  color: var(--ps-ink);
}

.universe__count {
  font-size: 0.875rem;
  color: var(--ps-text-muted);
}

.universe__arrow {
  display: inline-grid;
  flex-shrink: 0;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--ps-line-strong);
  border-radius: 50%;
  color: var(--ps-ink);
  font-size: 0.9rem;
  transition: background-color var(--ps-duration-hover) var(--ps-ease), border-color var(--ps-duration-hover) var(--ps-ease), color var(--ps-duration-hover) var(--ps-ease);
}

.universe__arrow .icon {
  transition: transform var(--ps-duration-hover) var(--ps-ease);
}

.universe__link:hover .universe__media,
.universe__link:focus-visible .universe__media {
  transform: translateY(-6px);
  box-shadow: var(--ps-shadow-hover);
}

.universe__link:hover .universe__image,
.universe__link:focus-visible .universe__image {
  transform: scale(1.05);
}

.universe__link:hover .universe__name,
.universe__link:focus-visible .universe__name {
  color: var(--ps-accent);
}

.universe__link:hover .universe__arrow,
.universe__link:focus-visible .universe__arrow {
  border-color: var(--ps-violet-600);
  background: var(--ps-violet-600);
  color: var(--ps-white);
}

.universe__link:hover .universe__arrow .icon,
.universe__link:focus-visible .universe__arrow .icon {
  transform: translateX(3px);
}

@media (min-width: 992px) {
  .universes__list {
    grid-auto-flow: row;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-columns: auto;
    gap: 2.5rem 1.75rem;
    margin: 0;
    padding: 0;
    overflow: visible;
  }
}

/* Nos coups de cœur : bande blanche pour alterner avec le fond lavande. */
.favorites {
  background: var(--ps-surface);
}

.favorites .product-card--photo .product-card__media,
.favorites .product-card--cutout .product-card__media {
  box-shadow: none;
}

/* Présentation : portrait de Gracias Matadi et texte de la boutique. */
.intro__inner {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.intro__visual {
  position: relative;
  justify-self: center;
  width: min(100%, 22rem);
}

/* Médaillon : logo entouré d'un anneau de texte qui tourne lentement, posé sur le coin de la photo. */
.intro__badge {
  position: absolute;
  right: -0.25rem;
  bottom: -1.5rem;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 8.5rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--ps-bg);
  box-shadow: var(--ps-shadow);
}

.intro__ring {
  position: absolute;
  inset: 0.35rem;
  width: calc(100% - 0.7rem);
  height: calc(100% - 0.7rem);
  overflow: visible;
  fill: var(--ps-accent);
  font-family: var(--ps-font-sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  animation: intro-spin 30s linear infinite;
}

.intro__logo {
  width: 52%;
  height: auto;
  border-radius: 50%;
}

@keyframes intro-spin {
  to { transform: rotate(360deg); }
}

.intro__photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 11rem 11rem var(--ps-radius) var(--ps-radius);
  box-shadow: var(--ps-shadow);
}

.intro__title {
  margin-bottom: 1.25rem;
  font-size: var(--ps-text-h2);
}

.intro__statement {
  max-width: 34rem;
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
  line-height: 1.7;
}

.intro__signature {
  margin-bottom: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--ps-line);
  color: var(--ps-text-muted);
}

.intro__signature strong {
  font-family: var(--ps-font-serif);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--ps-ink);
}

@media (min-width: 992px) {
  .intro__inner {
    grid-template-columns: 5fr 7fr;
    gap: 6rem;
  }

  .intro__visual {
    width: min(100%, 26rem);
  }

  .intro__badge {
    right: -3rem;
    bottom: -2rem;
    width: 10rem;
  }
}

/* Comment commander : trois cartes blanches sur le fond lavande de la page. */
.intro {
  background: var(--ps-bg-alt);
}

.steps {
  display: grid;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.step {
  position: relative;
  padding: 2rem 1.75rem;
  border: 1px solid var(--ps-line);
  border-radius: var(--ps-radius);
  background: var(--ps-surface);
}

.step__number {
  display: block;
  margin-bottom: 1.5rem;
  font-family: var(--ps-font-serif);
  font-size: 3rem;
  line-height: 1;
  color: var(--ps-accent);
}

.step__title {
  margin-bottom: 0.5rem;
  font-size: var(--ps-text-card);
}

.step__text {
  margin: 0;
  color: var(--ps-text);
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }
}
