/* ==========================================================================
   ACCUEIL — « VITRINE À FICHES » (14/11/2026)
   Choisie sur l'artefact « Mur de créatrices » : le mur de créatrices de s2
   (static/js/mosaique.js) en couleur sous un voile dirigé, le titre à gauche,
   et à droite une pile de fiches (nom + badge certifié, prix d'entrée,
   bouton « Commander ») qui tourne toutes les 3 s.
   Ne s'applique qu'au hero marqué .a-vitrine (index.html, s'il y a des
   créatrices à montrer) ; sinon le hero centré de main.css reste en place.
   ========================================================================== */

.hero-member.a-vitrine {
  text-align: left;
  isolation: isolate;
  padding-top: calc(var(--h-header-h) + clamp(40px, 6vw, 72px));
  padding-bottom: clamp(48px, 7vw, 80px);
  background: var(--noir);
}
/* Le halo centré d'origine ferait doublon avec celui du voile */
.hero-member.a-vitrine::before { display: none; }

.a-vitrine .hero-vitrine {
  position: relative;
  z-index: 2;
  max-width: var(--h-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
}
.a-vitrine .hero-member-inner {
  margin: 0;
  max-width: 620px;
  align-items: flex-start;
}
.a-vitrine .hero-member-badges { justify-content: flex-start; }

/* ---------------------------------------------------------------- Mur --- */
.mosaique {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s ease;
}
.mosaique.prete { opacity: 1; }

.mosaique-plan {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  gap: 14px;
  height: 175%;
  transform: translate(-50%, -50%) rotate(-7deg) scale(1.08);
}
.mosaique-col { flex: 0 0 clamp(150px, 14vw, 220px); }
.mosaique-col:nth-child(2n) { margin-top: -90px; }

.mosaique-piste {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: mosaique-defile var(--duree, 70s) linear infinite;
  animation-direction: var(--sens, normal);
  animation-delay: var(--depart, 0s);
  will-change: transform;
}
@keyframes mosaique-defile {
  from { transform: translateY(0); }
  to   { transform: translateY(calc(-50% - 7px)); }   /* une suite + la moitié d'un écart */
}
.mosaique.en-pause .mosaique-piste { animation-play-state: paused; }

.mosaique-carte {
  position: relative;
  margin: 0;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  overflow: hidden;
  background: #151517;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.mosaique-carte img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mosaique-carte::after {
  content: '';
  position: absolute;
  inset: 48% 0 0;
  background: linear-gradient(transparent, rgba(5, 5, 6, 0.85));
}
.mosaique-carte figcaption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 11px;
  z-index: 1;
  display: grid;
  gap: 1px;
  color: var(--blanc);
  font-size: 0.78rem;
  line-height: 1.3;
}
.mosaique-carte figcaption b { display: flex; align-items: center; gap: 5px; min-width: 0; font-weight: 700; font-size: 0.88rem; }
.mosaique-certif { display: inline-flex; flex: none; }

/* Voile dirigé : noir sous le texte (à gauche), plus clair derrière la pile,
   halo rose qui éclaire la pile, fondu vers la section suivante en bas */
.mosaique-voile {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 40% 60% at 80% 46%, rgba(255, 62, 181, 0.22), rgba(255, 62, 181, 0) 64%),
    linear-gradient(96deg, rgba(11, 11, 11, 0.97) 0%, rgba(11, 11, 11, 0.9) 38%, rgba(11, 11, 11, 0.45) 64%, rgba(11, 11, 11, 0.72) 100%),
    linear-gradient(to bottom, rgba(11, 11, 11, 0.85) 0%, rgba(11, 11, 11, 0) 22%, rgba(11, 11, 11, 0) 66%, var(--noir) 100%);
}

/* -------------------------------------------------------------- Pile --- */
.hero-pile {
  justify-self: center;
  width: min(100%, 280px);
  display: grid;
  justify-items: center;
  gap: 18px;
}
.pile {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4.15;
}
.pile-fiche {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 22px;
  background: #151517;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.9);
  transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.55s ease;
  cursor: pointer;
}
.pile-fiche[data-p="0"] {
  z-index: 4;
  transform: none;
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 62, 181, 0.3), 0 0 60px -14px rgba(255, 62, 181, 0.35);
}
.pile-fiche[data-p="1"] { z-index: 3; transform: translateX(-38px) rotate(-8deg) scale(0.94); }
.pile-fiche[data-p="2"] { z-index: 2; transform: translateX(38px) rotate(8deg) scale(0.9); }
.pile-fiche[data-p="3"] { z-index: 1; transform: scale(0.86); opacity: 0; }
.pile-fiche.s-envole { transform: translateX(80%) rotate(18deg) !important; opacity: 0; }

.pile-photo { display: block; width: 100%; height: 100%; object-fit: cover; }
.pile-fiche::after {
  content: '';
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(transparent, rgba(5, 5, 6, 0.85));
  pointer-events: none;
}

/* Photo introuvable (lien mort, hôte bloqué par la CSP) : initiale sur fond sombre
   rosé plutôt qu'une fiche vide. Classe posée par mosaique.js. */
.pile-fiche.sans-photo {
  background:
    radial-gradient(ellipse 70% 55% at 50% 35%, rgba(255, 62, 181, 0.22), transparent 70%),
    #151517;
}
.pile-fiche.sans-photo .pile-photo { visibility: hidden; }
.pile-fiche.sans-photo::before {
  content: attr(data-initiale);
  position: absolute;
  inset: 0 0 30%;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.2);
  font-size: 5.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

/* Seule la fiche du dessus montre ses informations */
.pile-info {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 1;
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(18, 18, 19, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: opacity 0.4s ease;
}
.pile-fiche:not([data-p="0"]) .pile-info { opacity: 0; }

/* Fiche sans prix (14/11/2026) : nom centré, bouton « Commander » sur toute la largeur
   — tout calé à gauche laissait un grand vide à droite du panneau */
.pile-info { justify-items: stretch; gap: 12px; padding: 14px 12px 12px; }
.pile-nom {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  min-width: 0;
  color: var(--blanc);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.pile-certif { display: inline-flex; flex: none; }
/* Prix retiré des fiches le 14/11/2026 : la ligne ne porte plus que le bouton */
.pile-ligne { display: flex; }
.home-page a.pile-commander {
  flex: 1;
  display: block;
  text-align: center;
  padding: 12px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rose), var(--rouge-passion));
  box-shadow: 0 4px 12px rgba(255, 62, 181, 0.3);
  color: var(--blanc);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.home-page a.pile-commander:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255, 62, 181, 0.45); }
.home-page a.pile-commander:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }

/* ------------------------------------------- Tablette, téléphone, web app --- */
/* Une seule colonne, et la pile juste sous le titre (14/11/2026) : le bloc de texte
   (.hero-member-inner) s'efface de la grille (display: contents) pour que ses enfants et
   la pile s'ordonnent ensemble — titre, pile, puis phrase, bouton et garanties. */
@media (max-width: 1024px) {
  .hero-member.a-vitrine { text-align: center; }
  .a-vitrine .hero-vitrine { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 0; }
  .a-vitrine .hero-member-inner { display: contents; }
  .a-vitrine .hero-member-inner > * { order: 2; }
  .a-vitrine .hero-member-title { order: 0; max-width: 680px; }
  .a-vitrine .hero-pile { order: 1; width: min(100%, 240px); margin: 12px 0 40px; }
  .a-vitrine .hero-member-sub { margin-left: auto; margin-right: auto; }
  .a-vitrine .hero-member-badges { justify-content: center; }

  /* Voile vertical : sombre derrière le titre, halo rose derrière la pile */
  .mosaique-voile {
    background:
      radial-gradient(ellipse 90% 26% at 50% 40%, rgba(255, 62, 181, 0.22), rgba(255, 62, 181, 0) 70%),
      linear-gradient(180deg, rgba(11, 11, 11, 0.8) 0%, rgba(11, 11, 11, 0.72) 30%, rgba(11, 11, 11, 0.82) 58%, var(--noir) 100%);
  }
}

@media (max-width: 900px) {
  .mosaique-plan { gap: 12px; height: 160%; transform: translate(-50%, -50%) rotate(-7deg) scale(1.2); }
  .mosaique-col { flex-basis: 120px; }
  .mosaique-piste { gap: 12px; }
  .mosaique-carte { border-radius: 14px; }
  .mosaique-carte figcaption { display: none; }
  /* Même écart (6 px) que la règle .mosaique-piste ci-dessus */
  @keyframes mosaique-defile { to { transform: translateY(calc(-50% - 6px)); } }
}
/* Téléphone et web app : responsive.css décale déjà la page de 70 px sous le header fixe
   (body { padding-top: 70px } jusqu'à 768 px). Sans cette règle, la hauteur du header était
   comptée deux fois : ~110 px de vide entre le menu et le titre. */
@media (max-width: 768px) {
  .hero-member.a-vitrine { padding-top: clamp(32px, 8vw, 44px); }
}

/* 4 colonnes suffisent à couvrir un téléphone ; une tablette garde les 7 */
@media (max-width: 600px) {
  .mosaique-col:nth-child(n+5) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .mosaique-piste { animation: none; }
  .mosaique, .pile-fiche, .pile-info { transition: none; }
  .home-page a.pile-commander:hover { transform: none; }
}
