/*
 * Page d'accueil provisoire de Ballerin'Attitude : « la scène », aux couleurs de la boutique.
 * Tokens repris de ballerinApp/src/app/globals.css : palette lilas et rose, Fraunces / Geist / Montserrat,
 * rayons (field, card), ombres (card, panel, button). Mêmes briques que la boutique :
 * fond lilas-50, hero en dégradé lilas-200 → lilas-100 → blanc, carte blanche, pied de page lilas-900.
 */
:root {
  --lilas-50: #f8f5fe;
  --lilas-100: #f0eafc;
  --lilas-200: #e2d6f8;
  --lilas-300: #cbb7f1;
  --lilas-400: #ae91e6;
  --lilas-500: #8f6ed6;
  --lilas-600: #7553c0;
  --lilas-700: #5f429e;
  --lilas-800: #4a3479;
  --lilas-900: #2e1f4d;
  --rose-accent: #f4c6d7;

  --font-body: "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --font-caps: "Montserrat", ui-sans-serif, system-ui, sans-serif;

  --radius-field: 0.875rem;
  --radius-card: 1.5rem;
  --shadow-card: 0 2px 20px -8px rgb(117 83 192 / 0.25);
  --shadow-panel: 0 24px 60px -28px rgb(74 52 121 / 0.35);
  --shadow-button: 0 6px 16px -6px rgb(117 83 192 / 0.55);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-curtain: cubic-bezier(0.65, 0, 0.2, 1);

  /* Ouverture du rideau, puis entrée des textes */
  --curtain-delay: 0.3s;
  --curtain-time: 1.7s;
  --stagger: 0.11s;
  --enter-start: 1s;

  --silhouette: url(brand/silhouette.png);
  --spark: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

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

html,
body {
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  overflow-x: clip;
  background: var(--lilas-50);
  color: var(--lilas-900);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.5rem;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Logotype (comme BrandMark / Logotype de la boutique) ---------- */
.logotype {
  display: inline-flex;
  align-items: flex-end;
  color: var(--lilas-800);
  font-size: 15px;
  line-height: 1;
  text-decoration: none;
}
.logotype .script {
  display: block;
  height: 2.6em;
  aspect-ratio: 632 / 230;
  background: currentColor;
  -webkit-mask: url(brand/script.png) center / contain no-repeat;
  mask: url(brand/script.png) center / contain no-repeat;
}
.logotype .attitude {
  margin: 0 0 0.44em 0.05em;
  white-space: nowrap;
  font-family: var(--font-caps);
  font-size: 1.3em;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.top {
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 1rem;
}

/* ---------- Le hero : le dégradé de la boutique, en grand ---------- */
.hero {
  --x: 70%;
  --y: 45%;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: calc(100% - 1.5rem);
  max-width: 80rem;
  min-height: min(52rem, calc(100svh - 6.5rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  border-radius: 2rem;
  background: linear-gradient(135deg, var(--lilas-200) 0%, var(--lilas-100) 45%, #fff 100%);
  box-shadow: var(--shadow-panel);
}

/* Le projecteur : une lumière blanche et rose, douce */
.spot {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle 14rem at var(--x) var(--y), rgb(255 255 255 / 0.75), transparent 70%),
    radial-gradient(circle 34rem at var(--x) var(--y), rgb(244 198 215 / 0.35), transparent 70%);
}

/* ---------- La danseuse en filigrane, dans le halo pointillé de la boutique ---------- */
.dancer {
  --x: 50%;
  --y: 45%;
  position: absolute;
  z-index: 0;
  top: 50%;
  right: 5%;
  height: 90%;
  aspect-ratio: 1;
  transform: translateY(-50%);
  pointer-events: none;
}
.ring {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  border: 1.5px dotted var(--lilas-300);
  animation: spin 80s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.wm {
  position: absolute;
  inset: 0;
  -webkit-mask: var(--silhouette) center 40% / auto 88% no-repeat;
  mask: var(--silhouette) center 40% / auto 88% no-repeat;
}
/* Éteinte : un lilas pâle, ton sur ton */
.wm-base {
  background: var(--lilas-300);
  opacity: 0.55;
}
/* Éclairée : sous le projecteur, la danseuse prend les couleurs de la marque */
.wm-lit {
  background: radial-gradient(
    circle 17rem at var(--x) var(--y),
    var(--lilas-700) 0%,
    rgb(143 110 214 / 0.75) 40%,
    rgb(244 198 215 / 0) 100%
  );
}
.spark {
  position: absolute;
  aspect-ratio: 1;
  clip-path: var(--spark);
  animation: twinkle 3.4s ease-in-out infinite;
}
.spark-1 {
  right: 10%;
  bottom: 16%;
  width: 5%;
  background: var(--rose-accent);
}
.spark-2 {
  left: 12%;
  top: 12%;
  width: 6.5%;
  background: var(--lilas-300);
  animation-delay: -1.2s;
}
.spark-3 {
  right: 18%;
  top: 7%;
  width: 3%;
  background: var(--lilas-400);
  animation-delay: -2.3s;
}
@keyframes twinkle {
  0%,
  100% {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
  50% {
    transform: scale(0.55) rotate(45deg);
    opacity: 0.55;
  }
}

/* ---------- Textes ---------- */
.hero-text {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 3rem 1.5rem;
}

/* Le surtitre de la boutique (.eyebrow) : du texte, rien d'autre */
.eyebrow {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lilas-500);
}

.title {
  margin: 1rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(2.9rem, 8vw, 6.25rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--lilas-800);
}
.title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}
.title .line > span {
  display: inline-block;
}
.title em {
  font-style: italic;
  color: var(--lilas-600);
}

.lead {
  max-width: 31rem;
  margin: 1.5rem 0 0;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--lilas-700);
  text-wrap: pretty;
}

/* ---------- Les trois liens : une carte blanche de la boutique, en lignes ---------- */
.programme {
  max-width: 34rem;
  margin-top: 2.25rem;
  padding: 0.35rem;
  border-radius: var(--radius-card);
  background: rgb(255 255 255 / 0.9);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(6px);
}
.act {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.8rem 0.75rem;
  border-radius: 1.15rem;
  color: inherit;
  text-decoration: none;
  transition: background 0.3s;
}
.act + .act::before {
  content: "";
  position: absolute;
  top: 0;
  left: 4.6rem;
  right: 0.75rem;
  height: 1px;
  background: var(--lilas-100);
}
.act[href]:hover,
.act[href]:focus-visible {
  background: var(--lilas-50);
}
.act:focus-visible {
  outline: 3px solid var(--lilas-200);
  outline-offset: 0;
}

/* Les icônes : le carré aux coins arrondis de l'icône de l'appli */
.act-icon {
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  flex-shrink: 0;
  border-radius: 27%;
  background: var(--lilas-100);
  color: var(--lilas-600);
  transition: transform 0.5s var(--ease);
}
.act-shop .act-icon {
  background: var(--lilas-600);
  color: #fff;
}
.act[href]:hover .act-icon {
  transform: rotate(-6deg) scale(1.05);
}
.act-icon svg,
.act-arrow svg {
  width: 1.3rem;
  height: 1.3rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.act-body {
  display: grid;
  flex: 1;
  min-width: 0;
}
.act-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1.3;
  color: var(--lilas-900);
}
.act-hint {
  font-size: 0.8125rem;
  line-height: 1.25rem;
  color: var(--lilas-600);
}
.act-arrow {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--lilas-200);
  color: var(--lilas-500);
  transition:
    transform 0.5s var(--ease),
    background 0.3s,
    border-color 0.3s,
    color 0.3s;
}
.act-arrow svg {
  width: 1.05rem;
  height: 1.05rem;
}
.act[href]:hover .act-arrow {
  transform: rotate(45deg);
  background: var(--lilas-600);
  border-color: var(--lilas-600);
  color: #fff;
}
/* La boutique, tête d'affiche : le bouton plein de la boutique */
.act-shop .act-arrow {
  background: var(--lilas-600);
  border-color: var(--lilas-600);
  color: #fff;
  box-shadow: var(--shadow-button);
}
.act-shop[href]:hover .act-arrow {
  background: var(--lilas-700);
  border-color: var(--lilas-700);
}

.act.is-soon {
  cursor: default;
  opacity: 0.55;
}
.act.is-soon .act-arrow {
  visibility: hidden;
}

/* ---------- Pied de page : celui de la boutique ---------- */
.foot {
  position: relative;
  overflow: hidden;
  margin-top: 4rem;
  border-radius: 2.5rem 2.5rem 0 0;
  background: var(--lilas-900);
  color: var(--lilas-400);
  font-size: 0.875rem;
}
.foot-dancer {
  position: absolute;
  right: -5rem;
  top: -2rem;
  height: 18rem;
  aspect-ratio: 628 / 800;
  background: var(--lilas-800);
  -webkit-mask: var(--silhouette) center / contain no-repeat;
  mask: var(--silhouette) center / contain no-repeat;
  pointer-events: none;
}
.foot-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 80rem;
  margin: 0 auto;
  padding: 2.5rem 1.75rem calc(2.5rem + env(safe-area-inset-bottom));
}
.foot-inner p {
  margin: 0;
}
.logotype-light {
  color: #fff;
}
.foot-caps {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--font-caps);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--lilas-400);
}

/* ---------- Le rideau ---------- */
/*
 * État de repos = rideau ouvert et effacé. L'animation part du rideau fermé (fill backwards) :
 * si elle ne tourne pas, rien ne reste caché.
 */
.curtain {
  position: fixed;
  top: 0;
  bottom: 0;
  z-index: 10;
  width: 51vw;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgb(46 31 77 / 0.25), transparent 20%, transparent 75%, rgb(46 31 77 / 0.3)),
    repeating-linear-gradient(90deg, #5f429e 0, #8f6ed6 1.6vw, #ae91e6 2.3vw, #7553c0 3.4vw, #5f429e 4.6vw);
  transform: scaleX(0);
  animation-duration: var(--curtain-time);
  animation-timing-function: var(--ease-curtain);
  animation-delay: var(--curtain-delay);
  animation-fill-mode: backwards;
  animation-name: curtain-open;
}
.curtain-left {
  left: 0;
  transform-origin: left center;
}
.curtain-right {
  right: 0;
  transform-origin: right center;
}
@keyframes curtain-open {
  from {
    transform: scaleX(1);
  }
  85% {
    transform: scaleX(0.05);
  }
}

/* ---------- Entrée en scène, après l'ouverture du rideau ---------- */
/* fill backwards : l'état final est l'état normal, rien ne reste caché si l'animation ne tourne pas */
.enter {
  animation: enter 1s var(--ease) backwards;
  animation-delay: calc(var(--enter-start) + var(--d, 0) * var(--stagger));
}
@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}
.enter-up {
  animation: enter-up 1.15s var(--ease) backwards;
  animation-delay: calc(var(--enter-start) + var(--d, 0) * var(--stagger));
}
@keyframes enter-up {
  from {
    transform: translateY(105%);
  }
}

/* ---------- Grand écran : texte à gauche, danseuse à droite ---------- */
@media (min-width: 900px) {
  .top {
    padding: 1.75rem 2rem 1.25rem;
  }
  .logotype {
    font-size: 17px;
  }
  .hero {
    width: calc(100% - 3rem);
  }
  .hero-text {
    padding: 4rem 4.5rem;
  }
  .foot-inner {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    padding-inline: 3rem;
  }
  .foot-dancer {
    right: 3rem;
    height: 20rem;
  }
}

/* ---------- Petit écran : la danseuse passe derrière le texte, plus discrète ---------- */
@media (max-width: 899px) {
  .hero {
    align-items: flex-start;
  }
  .dancer {
    top: -2rem;
    right: -32%;
    height: auto;
    width: 115%;
    transform: none;
  }
  .wm-base {
    opacity: 0.4;
  }
  .wm-lit {
    opacity: 0.45;
  }
  .hero {
    width: calc(100% - 1rem);
    border-radius: 1.75rem;
  }
  .hero-text {
    padding: 13rem 1.1rem 1.1rem;
  }
  .lead {
    padding-inline: 0.15rem;
  }
  .programme {
    padding: 0.2rem;
  }
  .act {
    gap: 0.75rem;
    padding: 0.75rem 0.6rem;
  }
  .act + .act::before {
    left: 4.1rem;
  }
  .act-icon {
    width: 2.6rem;
    height: 2.6rem;
  }
  .act-title {
    font-size: 1.15rem;
  }
  .act-arrow {
    width: 2.2rem;
    height: 2.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
