@layer components {
/* ── HERO — accueil hero, service detail, page headers ────────── */
/* Breakpoints: XS 480px · SM 720px · MD 1024px · XL 1440px       */
/* JS hook: [data-hero-rotate] → rotateur des lignes du hero       */

/* ══════════════════════════════════════════════════════════════════
   HERO ACCUEIL
   ══════════════════════════════════════════════════════════════════ */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(32px, 5vw, 80px);
  row-gap: 40px;
  align-items: center;
  padding: 40px 0 48px;
  max-height: 70vh;
  min-height: 480px;
}
.hero-copy { display: flex; flex-direction: column; gap: 40px; max-width: 560px; }
.hero-copy .wordmark { color: var(--mj-ink); font-size: 14px; }
.hero-copy h1 {
  line-height: 1.1;
  font-size: clamp(28px, calc(1.9vw + 1.6vh), 52px);
  gap: 8px;
}
@media (min-width: 1440px) { 
  .hero { max-height: 75vh; min-height: 520px; } 
}
@media (min-width: 1024px) { 
  .hero { grid-template-columns: 1fr 1fr; padding: 40px 0 48px; max-height: 60vh; min-height: 420px; } 
}
@media (max-width: 720px) {
  .hero {  padding: 40px 0 48px; max-height: none; min-height: 0; }
  
}
@media (max-width: 480px) {
  .hero {  padding: 32px 0 0px;  align-items: flex-start; }
  .hero-copy { gap: 32px; }
  .hero-copy h1 {  font-size: clamp(18px, calc(1.9vw + 1.6vh), 52px);}
  
}

/* ── Rotateur de titres ────────────────────────────────────────── */
.hero-title-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 1.1;
}
.hero-title-stack .hero-line {
  position: relative;
  display: block;
  color: var(--mj-aubergine);
  opacity: 0.62;
  font-family: var(--font-sans);
  font-weight: 300;
  letter-spacing: 0.015em;
  line-height: 1.3;
  transition: opacity 900ms cubic-bezier(0.22, 1, 0.36, 1);
}
.hero-title-stack .hero-line::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.04em;
  height: 1px;
  width: 0;
  background: var(--mj-gold, currentColor);
  opacity: 0.55;
  transition: width 1100ms cubic-bezier(0.22, 1, 0.36, 1);
}
.hero-title-stack .hero-line.is-active { opacity: 1; }
.hero-title-stack .hero-line--wide { letter-spacing: 0.5px; }
.hero-title-stack .hero-line.is-active::after { width: 1.6em; }
@media (prefers-reduced-motion: reduce) {
  .hero-title-stack .hero-line { opacity: 1; transition: none; }
  .hero-title-stack .hero-line::after { display: none; }
}

/* ── Grille photos (hero-img-1/2/3) ───────────────────────────── */
.hero-stack { position: relative; }
.hero-stack--three {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(4, 1fr);
  gap: clamp(14px, 2vw, 22px);
  height: clamp(360px, 50vh, 480px);
  width: 100%;
  max-width: 100%;
  margin-left: auto;
}
.hero-stack--three .hero-img-1 { border-radius: 28px 0; grid-column: 1; grid-row: 1 / 4; height: 67%; align-self: center; }
.hero-stack--three .hero-img-2 { border-radius: 28px 0; grid-column: 2; grid-row: 2 / 5; height: 67%; align-self: center; }
.hero-stack--three .hero-img-3 { border-radius: 0px 28px 0px 28px; }
.plate {
  background-color: var(--mj-aubergine-06);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .hero-stack--three {
    grid-template-columns: 0.8fr 1fr;
    grid-template-rows: repeat(6, 1fr);
    gap: clamp(10px, 1.4vw, 16px);
    
  }
  .hero-stack--three .hero-img-1 { grid-row: 2 / 6; height: 100%; }
  .hero-stack--three .hero-img-2 { grid-column: 2; grid-row: 4 / 7; height: 100%; }
  .hero-stack--three .hero-img-3 { grid-column: 2; grid-row: 1 / 4; align-self: center; height: 100%; }
}
@media (max-width: 1024px) {
  .hero-stack--three {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(6, 1fr);
    gap: clamp(10px, 1.4vw, 16px);
    
  }
  .hero-stack--three .hero-img-1 { grid-row: 2 / 6; height: 100%; }
  .hero-stack--three .hero-img-2 { grid-column: 2; grid-row: 4 / 7; height: 100%; }
  .hero-stack--three .hero-img-3 { grid-column: 2; grid-row: 1 / 4; align-self: center; height: 100%; }
}
@media (max-width: 720px) {
  .hero-stack--three {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, 1fr);
    gap: clamp(24px, 1.4vw, 16px);
  }
  .hero-stack--three .hero-img-1,
  .hero-stack--three .hero-img-2,
  .hero-stack--three .hero-img-3 {
    grid-column: 1;
    width: 100%;
    height: 100%;
    aspect-ratio: unset;
    align-self: stretch;
  }
  .hero-stack--three .hero-img-1 { grid-row: 1; max-width: 50%;}
  .hero-stack--three .hero-img-2 { grid-row: 2 / 4; }
  .hero-stack--three .hero-img-3 { display: none; }
}

@media (max-width: 480px) {
  .hero-stack--three {
    height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
  }
  .hero-stack--three .hero-img-1 { grid-row: 1; order: -1; width: 100%; aspect-ratio: 477 / 700; max-width: 55vw; }
  .hero-stack--three .hero-img-2 { display: none; }
}


/* ══════════════════════════════════════════════════════════════════
   SERVICE DETAIL HERO
   ══════════════════════════════════════════════════════════════════ */
.detail-hero {
  position: relative;
  z-index: 2;
  background: var(--mj-paper);
  border-radius: 48px;
  padding: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  box-shadow: 0 1px 2px var(--mj-ink-04), 0 16px 40px var(--mj-aubergine-06);
}
.detail-hero-copy { display: flex; flex-direction: column; gap: 20px; }
.detail-hero-title {
  font-family: var(--font-display-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 28px;
  color: var(--mj-aubergine);
  letter-spacing: 0.01em;
  line-height: 1.2;
}
.detail-hero-photo {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 24px 24px 24px 48px;
  background: var(--mj-aubergine-10);
  background-size: cover;
  background-position: center;
}
@media (max-width: 1024px) {
  .detail-hero-photo { order: -1; max-width: 480px;}
  .detail-hero { grid-template-columns: 1fr;  gap: 24px; border-radius: 32px; }

  
}
@media (max-width: 720px) {
  .detail-hero { grid-template-columns: 1fr; padding: 32px; gap: 24px; border-radius: 32px; }
  .detail-hero-photo { order: -1; max-width: 100%;}
  .detail-hero-copy, .detail-hero-photo { min-width: 0; }
}
@media (max-width: 480px) {
  .detail-hero { overflow: hidden; padding: 24px; }
  .detail-hero-photo--gynecologie  { background-image: url('../assets/img-xs/img-gynecologie.jpg') !important; }
  .detail-hero-photo--acupuncture  { background-image: url('../assets/img-xs/img-acupuncture.jpg') !important; }
  .detail-hero-photo--hypnose      { background-image: url('../assets/img-xs/img-hypnose.jpg') !important; }
  .detail-hero-photo--douleurs     { background-image: url('../assets/img-xs/img-douleurs.jpg') !important; }
  .detail-hero-photo--contact      { background-image: url('../assets/img-xs/img-cabinet-salle-attente.jpg') !important; }
}
.btn-short { display: none; }
@media (max-width: 480px) {
  .detail-hero .btn-full  { display: none; }
  .detail-hero .btn-short { display: inline; }
}

/* ══════════════════════════════════════════════════════════════════
   PAGE HEADER (tarifs / contact / service)
   ══════════════════════════════════════════════════════════════════ */
.page-header { padding: 40px 0; }
.page-header h1 { max-width: 760px; }

@media (max-width: 720px) {
  .page-header { padding: 24px 0; }
}

@media (max-width: 480px) {
  .page-header { padding: 16px 0; }
}


/* ══════════════════════════════════════════════════════════════════
   BAND TRANSITION
   ══════════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════════════
   PARTNERS MARQUEE (index.html)
   ══════════════════════════════════════════════════════════════════ */

.partner-caption a {
    text-decoration: underline;
}

.partners {
  padding: 24px 0;
  display: flex; flex-direction: column; gap: 24px;
}
.partners-title {
  text-align: center;
  font-size: 12px;
}
.partner-marquee {
  overflow: hidden;
  position: relative;
  touch-action: pan-y;
  mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%);
}
.partner-track {
  display: flex;
  gap: 32px;
  width: max-content;
  animation: partner-scroll 32s linear infinite;
}

@media (max-width: 1024px) {
  .partner-track { gap: 32px; }
  .partners {
    padding: 24px 0;
    display: flex; flex-direction: column; gap: 12px;
  }
  
}

@media (max-width: 480px) {
  .partners {
    padding: 40px 0 24px;
    display: flex; flex-direction: column;;
  }
}

@media (max-width: 720px) {
  .partner-track { gap: 16px; }
  .partner-marquee {
    mask-image: none;
    -webkit-mask-image: none;
    width: 100vw;
    margin-left: -20px;
    padding-left: 20px;
  }
}
@media (max-width: 480px) {
  .partner-marquee {
    margin-left: -16px;
    padding-left: 16px;
  }
}

.partner-marquee:hover .partner-track { animation-play-state: paused; }
@keyframes partner-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.partner {
  display: flex; align-items: center; gap: 16px;
  flex-shrink: 0;
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--mj-aubergine-03);
  border: 1px solid var(--mj-aubergine-06);
}
.partner img {
  width: auto;
  height: 36px;
  max-width: 140px;
  object-fit: contain;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .partner img { max-width: 100px; }
}
.partner-text-logo {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 10px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.1;
  color: var(--mj-aubergine);
  background: var(--mj-aubergine-06);
  border: 1px dashed var(--mj-aubergine-25);
  border-radius: 6px;
  text-align: center;
  letter-spacing: 0.02em;
}
.partner-caption {
  font-size: 12px;
  line-height: 1.4;
  color: var(--mj-graphite);
  max-width: 200px;
  white-space: pre-line;
}
@media (max-width: 480px) {
  .partner-caption {
    max-width: 180px;
  }
  .partner-track {
    gap: 16px;
  }
}
@media (max-width: 720px) { .partner-track { animation: none; } }
@media (prefers-reduced-motion: reduce) { .partner-track { animation: none; } }

} /* end @layer components */
