/* ===========================================================================
   PROST — base styles
   Barlow (titres + corps). TTF chargés localement.
   Tout le reste passe par Tailwind. On garde ici seulement ce que Tailwind
   ne fait pas nativement : @font-face, keyframes, quelques helpers.
   =========================================================================== */

/* ---- Barlow (titres + corps) ---- */
@font-face {
  font-family: "Barlow";
  src: url("../fonts/Barlow/Barlow-Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("../fonts/Barlow/Barlow-Medium.ttf") format("truetype");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("../fonts/Barlow/Barlow-SemiBold.ttf") format("truetype");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("../fonts/Barlow/Barlow-Bold.ttf") format("truetype");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("../fonts/Barlow/Barlow-ExtraBold.ttf") format("truetype");
  font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("../fonts/Barlow/Barlow-Black.ttf") format("truetype");
  font-weight: 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("../fonts/Barlow/Barlow-Italic.ttf") format("truetype");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("../fonts/Barlow/Barlow-MediumItalic.ttf") format("truetype");
  font-weight: 500; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("../fonts/Barlow/Barlow-BoldItalic.ttf") format("truetype");
  font-weight: 700; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("../fonts/Barlow/Barlow-BlackItalic.ttf") format("truetype");
  font-weight: 900; font-style: italic; font-display: swap;
}

/* ---- réglages globaux ---- */
/* overflow-x: clip empêche le débordement horizontal des photos décoratives
   en mobile, sans casser position:sticky (clip ne crée pas de conteneur de scroll) */
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

/* wordmark espacé (couverture du magazine) */
.wordmark { letter-spacing: 0.34em; }
.wordmark-lg { letter-spacing: 0.22em; }

/* ---- marquee PROST ---- */
.marquee { overflow: hidden; white-space: nowrap; }
.marquee__track {
  display: inline-flex;
  will-change: transform;
  animation: marquee 38s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---- lettrine (page article) ---- */
.dropcap::first-letter {
  font-family: "Barlow", sans-serif;
  font-weight: 700;
  float: left;
  font-size: 4.6rem;
  line-height: 0.82;
  padding: 0.06em 0.12em 0 0;
  color: #E5341B;
}

/* ---- barre de progression audio (factice) ---- */
.player-bar { cursor: pointer; }
.player-bar__fill { transition: width 0.15s linear; }

/* ---- éditions : dépliage « voir toutes les éditions » ---- */
.edition-extra { display: none; }
[data-editions].is-expanded .edition-extra { display: block; }
[data-editions-toggle][aria-expanded="true"] [data-editions-icon] { transform: rotate(180deg); }

/* ---- menu mobile animé (ouverture par glissement + fondu) ---- */
.mobile-nav {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transition: max-height 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.32s ease;
}
.mobile-nav > nav {
  transform: translateY(-10px);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.mobile-nav.is-open { max-height: 24rem; opacity: 1; pointer-events: auto; }
.mobile-nav.is-open > nav { transform: translateY(0); }

/* ---- lightbox : photos cliquables pour agrandir ---- */
[data-zoomable] { cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(20, 17, 16, 0);
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease, background 0.4s ease;
}
.lightbox.is-open { opacity: 1; pointer-events: auto; background: rgba(20, 17, 16, 0.93); cursor: zoom-out; }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 0.85rem; max-width: 100%; max-height: 100%; }
.lightbox img {
  max-width: 100%; max-height: 84vh; object-fit: contain;
  transform: scale(0.94); transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.lightbox.is-open img { transform: scale(1); }
.lightbox figcaption { color: rgba(243, 235, 221, 0.7); font-size: 0.78rem; letter-spacing: 0.04em; text-align: center; max-width: 40rem; }
.lightbox__close {
  position: fixed; top: 1.25rem; right: 1.25rem; width: 2.75rem; height: 2.75rem;
  border-radius: 9999px; background: rgba(243, 235, 221, 0.12); color: #F3EBDD;
  display: flex; align-items: center; justify-content: center; transition: background 0.25s ease;
}
.lightbox__close:hover { background: rgba(243, 235, 221, 0.25); }

@media (prefers-reduced-motion: reduce) {
  .mobile-nav, .mobile-nav > nav, .lightbox, .lightbox img { transition: none !important; }
}

/* ---- focus accessible ---- */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid #E5341B;
  outline-offset: 2px;
}

/* respecte la préférence de réduction de mouvement */
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
  html { scroll-behavior: auto; }
}
