/* Les Histoires des Pétillantes — rubrique éditoriale COMMUNAUTÉ */

.histoires-page {
  --h-aubergine: #4a1942;
  --h-deep: #2a1526;
  --h-coral: #ff6b4a;
  --h-champagne: #f5ebe0;
  --h-ivory: #fffbf7;
  --h-violet: #7c3aed;
  --h-cyan: rgba(34, 211, 238, 0.35);
  --h-anthracite: #3d3340;
}

.histoires-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 8vw, 4.5rem) clamp(1.25rem, 4vw, 2rem) clamp(3rem, 10vw, 5rem);
  background:
    radial-gradient(ellipse 90% 65% at 50% 0%, rgba(255, 107, 171, 0.35) 0%, transparent 62%),
    radial-gradient(circle at 0% 100%, rgba(74, 25, 66, 0.65) 0%, transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(124, 58, 237, 0.25) 0%, transparent 50%),
    linear-gradient(165deg, var(--h-deep) 0%, var(--h-aubergine) 38%, #9b2d6e 72%, #d4237a 100%);
  color: var(--h-ivory);
}

.histoires-hero__sparks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.histoires-hero__sparks span {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 232, 200, 0.85);
  box-shadow: 0 0 12px rgba(255, 200, 140, 0.8);
  animation: histoires-spark 6s ease-in-out infinite;
}

.histoires-hero__sparks span:nth-child(1) { top: 18%; left: 12%; animation-delay: 0s; }
.histoires-hero__sparks span:nth-child(2) { top: 28%; right: 18%; animation-delay: -1.2s; }
.histoires-hero__sparks span:nth-child(3) { top: 55%; left: 8%; animation-delay: -2.4s; }
.histoires-hero__sparks span:nth-child(4) { top: 42%; right: 10%; animation-delay: -3.1s; }
.histoires-hero__sparks span:nth-child(5) { top: 70%; left: 45%; animation-delay: -4s; }

@keyframes histoires-spark {
  0%, 100% { opacity: 0.2; transform: translateY(0) scale(0.8); }
  45% { opacity: 1; transform: translateY(-12px) scale(1.2); }
}

.histoires-hero__inner {
  position: relative;
  z-index: 1;
  max-width: min(920px, 100%);
  margin: 0 auto;
  text-align: center;
}

.histoires-kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--h-champagne);
  margin: 0 0 0.85rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 235, 220, 0.35);
  background: rgba(255, 255, 255, 0.08);
}

.histoires-hero__title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 6vw, 3.35rem);
  font-weight: 700;
  line-height: 1.08;
  margin: 0 0 0.65rem;
  letter-spacing: 0.02em;
}

.histoires-hero__tagline {
  font-family: "Pacifico", cursive;
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  font-weight: 400;
  color: #ffe8f0;
  margin: 0 0 1.25rem;
  line-height: 1.45;
}

.histoires-hero__lead,
.histoires-prose {
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  line-height: 1.7;
  color: rgba(255, 251, 247, 0.92);
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.histoires-hero__lead p {
  margin: 0 0 1rem;
}

.histoires-highlight {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.15rem, 2.8vw, 1.45rem);
  font-style: italic;
  font-weight: 600;
  color: var(--h-champagne);
  margin: 1.25rem auto 0;
  max-width: 36rem;
  line-height: 1.45;
}

.histoires-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin-top: 1.75rem;
}

.histoires-hero__cta .btn {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}

.histoires-hero__cta .btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--h-ivory);
}

.histoires-section {
  padding: clamp(2rem, 6vw, 3.5rem) clamp(1.25rem, 4vw, 2rem);
  background: var(--h-ivory);
}

.histoires-section--alt {
  background: linear-gradient(180deg, #fff 0%, var(--h-champagne) 100%);
}

.histoires-section__head {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 2rem;
}

.histoires-section__head h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.65rem, 4vw, 2.25rem);
  color: var(--h-aubergine);
  margin: 0 0 0.5rem;
}

.histoires-section__head p {
  margin: 0;
  color: var(--h-anthracite);
  line-height: 1.6;
}

.histoires-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--h-coral), #d4237a);
  color: #fff;
  margin-bottom: 0.75rem;
}

.histoires-badge--muted {
  background: rgba(74, 25, 66, 0.12);
  color: var(--h-aubergine);
}

.histoires-feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  max-width: var(--max);
  margin: 0 auto;
  align-items: center;
}

@media (min-width: 820px) {
  .histoires-feature {
    grid-template-columns: minmax(260px, 0.95fr) 1.2fr;
  }
}

.histoires-portrait-slot {
  aspect-ratio: 4 / 5;
  max-width: 420px;
  margin: 0 auto;
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(74, 25, 66, 0.08), rgba(212, 35, 122, 0.12)),
    var(--h-champagne);
  border: 2px solid rgba(201, 169, 98, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  box-shadow: 0 20px 50px rgba(74, 25, 66, 0.12);
}

.histoires-portrait-slot__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px dashed rgba(212, 35, 122, 0.45);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--h-aubergine);
  opacity: 0.7;
}

.histoires-portrait-slot p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--h-anthracite);
  line-height: 1.5;
}

.histoires-feature__body h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  color: var(--h-aubergine);
  margin: 0 0 0.35rem;
}

.histoires-feature__subtitle {
  font-size: 1rem;
  color: #9b2d6e;
  margin: 0 0 1rem;
  font-weight: 600;
}

.histoires-content-note {
  font-size: 0.88rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: rgba(124, 58, 237, 0.08);
  border-left: 3px solid var(--h-violet);
  color: var(--h-anthracite);
  margin: 1rem 0;
}

.histoires-series {
  max-width: var(--max);
  margin: 0 auto;
  text-align: center;
}

.histoires-series blockquote {
  margin: 0;
  padding: 1.25rem 1.5rem;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 32px rgba(74, 25, 66, 0.08);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.2rem, 3vw, 1.55rem);
  color: var(--h-aubergine);
  line-height: 1.45;
}

.histoires-archive {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  max-width: var(--max);
  margin: 0 auto;
}

.histoires-ep-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(74, 25, 66, 0.1);
  box-shadow: 0 6px 24px rgba(74, 25, 66, 0.07);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-height: 100%;
}

.histoires-ep-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(74, 25, 66, 0.12);
}

.histoires-ep-card.is-locked {
  opacity: 0.92;
  cursor: default;
}

.histoires-ep-card__thumb {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #f5ebe0, #ebe0ea);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: rgba(74, 25, 66, 0.25);
  font-family: "Cormorant Garamond", Georgia, serif;
}

.histoires-ep-card__body {
  padding: 1rem 1.1rem 1.15rem;
  flex: 1;
}

.histoires-ep-card__num {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9b2d6e;
}

.histoires-ep-card__title {
  margin: 0.35rem 0 0.25rem;
  font-size: 1.05rem;
  color: var(--h-aubergine);
}

.histoires-ep-card__status {
  font-size: 0.78rem;
  color: var(--h-anthracite);
  margin: 0;
}

.histoires-cta-band {
  text-align: center;
  padding: clamp(2.5rem, 7vw, 4rem) 1.25rem;
  background: linear-gradient(135deg, var(--h-aubergine), #9b2d6e);
  color: var(--h-ivory);
}

.histoires-cta-band h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin: 0 0 0.75rem;
}

.histoires-cta-band p {
  max-width: 32rem;
  margin: 0 auto 1.25rem;
  opacity: 0.95;
  line-height: 1.6;
}

.histoires-signature-hero {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.25rem, 3.5vw, 1.75rem);
  font-style: italic;
  font-weight: 600;
  line-height: 1.45;
  max-width: 36rem;
  margin: 0 auto 1.25rem;
  color: #fff8fc;
  text-shadow: 0 2px 16px rgba(42, 21, 38, 0.35);
}

.histoires-cta-band .histoires-hero__cta {
  margin-top: 1.25rem;
}

.histoires-signature {
  font-family: "Pacifico", cursive;
  font-size: 1rem;
  color: #ffe0ef;
  margin-top: 1.5rem;
}

/* Page épisode */
.histoires-episode-hero {
  padding: clamp(2rem, 6vw, 3rem) 1.25rem;
  background: linear-gradient(160deg, var(--h-champagne) 0%, #fff 55%);
  border-bottom: 1px solid rgba(74, 25, 66, 0.08);
}

.histoires-episode-hero__inner {
  max-width: var(--max);
  margin: 0 auto;
}

.histoires-episode-hero .breadcrumb {
  font-size: 0.85rem;
  margin: 0 0 0.75rem;
}

.histoires-episode-layout {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  display: grid;
  gap: 2rem;
}

@media (min-width: 860px) {
  .histoires-episode-layout {
    grid-template-columns: minmax(280px, 360px) 1fr;
    align-items: start;
  }
}

.histoires-chapter {
  margin-bottom: 1.75rem;
}

.histoires-chapter h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.45rem;
  color: var(--h-aubergine);
  margin: 0 0 0.65rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid rgba(201, 169, 98, 0.45);
}

.histoires-chapter .histoires-placeholder {
  color: var(--h-anthracite);
  line-height: 1.65;
  margin: 0;
  font-size: 0.95rem;
}

.histoires-wait {
  text-align: center;
  max-width: 32rem;
  margin: 0 auto;
  padding: 3rem 1.25rem;
}

.histoires-wait .histoires-ep-card__num {
  display: block;
  margin-bottom: 0.5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .histoires-hero__sparks span {
    animation: none;
    opacity: 0.4;
  }
}
