/* ═══════════════════════════════════════════════
   JoceOffice Article — article.css v3.0
   Dark · Parallaxe · Glass · Tailles typo dynamiques
═══════════════════════════════════════════════ */

/* ── DARK MODE GLOBAL ── */
html, body {
  background-color: #0a0a0a !important;
  color: #fafafa !important;
}
body, #page, #wrapper, #site-wrapper,
.site, .site-content, #content, #main, .main-content,
.elementor-section-wrap, .elementor-inner,
header.site-header, .site-header,
footer.site-footer, .site-footer {
  background-color: #0a0a0a !important;
  color: #fafafa !important;
}

/* ── VARIABLES (defaults — surchargées inline par PHP) ── */
:root {
  --jo-black:          #0a0a0a;
  --jo-white:          #fafafa;
  --jo-gray:           #666666;
  --jo-border:         rgba(255,255,255,0.1);
  --jo-border-strong:  rgba(255,255,255,0.22);
  --jo-radius:         3px;
  --jo-font:           'Bricolage Grotesque', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --jo-ease:           cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --joart-accroche-size: 0.95rem;
  --joart-content-size:  1rem;
}

/* ════════════════════════════════
   RESET ARTICLE
════════════════════════════════ */
.joart-article * { box-sizing: border-box; }
.joart-article {
  font-family: var(--jo-font);
  color: var(--jo-white);
  background: var(--jo-black);
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}
.joart-article a { color: var(--jo-white); }
.joart-article a:hover { opacity: 0.6; }

/* ════════════════════════════════
   HERO — plein largeur + parallaxe
════════════════════════════════ */
.joart-hero {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  background: #0a0a0a;
  margin-bottom: 4rem;
}

/* Conteneur parallaxe — scale légèrement supérieur pour absorber le décalage */
.joart-hero__parallax {
  position: absolute;
  inset: -15% 0;        /* marge verticale pour le mouvement parallaxe */
  z-index: 1;
  will-change: transform;
}

/* Image — blur → net au chargement */
.joart-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: blur(20px) brightness(0.5);
  transform: scale(1.0);
  opacity: 0;
  transition: filter 1.6s var(--jo-ease),
              opacity 0.6s ease;
  /* PAS de transition sur transform — géré par JS en rAF */
}
.joart-hero__img.joart-revealed {
  filter: blur(0) brightness(0.5);
  opacity: 1;
}

/* Grain */
.joart-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 2;
}

/* ── GLASS EFFECT (apparaît quand hero sort du viewport) ── */
.joart-hero__glass {
  position: absolute;
  inset: 0;
  z-index: 4;
  backdrop-filter: blur(0px) brightness(1);
  -webkit-backdrop-filter: blur(0px) brightness(1);
  background: rgba(0, 0, 0, 0);
  opacity: 0;
  pointer-events: none;
  transition: backdrop-filter 0.4s ease,
              -webkit-backdrop-filter 0.4s ease,
              background 0.4s ease,
              opacity 0.4s ease;
}
.joart-hero__glass.active {
  backdrop-filter: blur(14px) brightness(0.6);
  -webkit-backdrop-filter: blur(14px) brightness(0.6);
  background: rgba(0, 0, 0, 0.35);
  opacity: 1;
}

/* Vidéo hero */
.joart-hero__video-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.joart-hero__play {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0.75rem; cursor: pointer; z-index: 5;
  transition: opacity 0.3s;
}
.joart-hero__play:hover .joart-play-circle { transform: scale(1.1); border-color: #fff; }
.joart-hero__video-embed {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 0.4s; z-index: 4;
}
.joart-hero__video-embed.visible { opacity: 1; }
.joart-hero__video-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

.joart-play-circle {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.6);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.25s var(--jo-ease), border-color 0.25s;
}
.joart-play-circle svg { margin-left: 4px; }
.joart-hero__play-label {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.14em; color: rgba(255,255,255,0.4);
}

/* Ligne déco haut */
.joart-hero__line {
  position: absolute; top: 0; left: 0; right: 0;
  height: 1px; background: rgba(255,255,255,0.08);
  z-index: 6; transform: scaleX(0); transform-origin: left;
  transition: transform 1.2s var(--jo-ease) 0.4s;
}
.joart-hero__line.joart-revealed { transform: scaleX(1); }

/* Eyebrow */
.joart-hero__eyebrow {
  position: absolute; top: 2rem; left: 2.5rem; right: 2.5rem;
  display: flex; justify-content: space-between; align-items: center;
  z-index: 6; opacity: 0; transition: opacity 0.6s ease 0.6s;
}
.joart-hero__eyebrow.joart-revealed { opacity: 1; }
.joart-hero__cat {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.18em; color: rgba(255,255,255,0.4);
}
.joart-hero__num {
  font-size: 10px; letter-spacing: 0.12em; color: rgba(255,255,255,0.2);
}

/* Gradient bas */
.joart-hero__gradient {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 75%;
  background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
  pointer-events: none; z-index: 3;
}

/* Contenu typo */
.joart-hero__content {
  position: relative; z-index: 6;
  padding: 0 2.5rem 3.5rem; max-width: 900px;
}

.joart-hero__subtitle {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.2em; color: rgba(255,255,255,0.35);
  margin-bottom: 1rem; opacity: 0; transform: translateY(12px);
  transition: opacity 0.6s ease 0.5s, transform 0.6s var(--jo-ease) 0.5s;
}
.joart-hero__subtitle.joart-revealed { opacity: 1; transform: translateY(0); }

.joart-hero__title {
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 500; letter-spacing: -0.04em;
  line-height: 0.97; color: #fff; margin-bottom: 1.75rem;
}
.joart-hero__title span {
  display: block; opacity: 0; transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s var(--jo-ease);
}
.joart-hero__title span:nth-child(1) { transition-delay: 0.65s; }
.joart-hero__title span:nth-child(2) { transition-delay: 0.78s; }
.joart-hero__title span.joart-revealed { opacity: 1; transform: translateY(0); }

/* Séparateur */
.joart-hero__sep {
  width: 32px; height: 1px;
  background: rgba(255,255,255,0.22);
  margin-bottom: 1.5rem; opacity: 0;
  transform: scaleX(0); transform-origin: left;
  transition: opacity 0.4s ease 1s, transform 0.6s var(--jo-ease) 1s;
}
.joart-hero__sep.joart-revealed { opacity: 1; transform: scaleX(1); }

/* Accroche hero — taille dynamique via custom property */
.joart-hero__desc {
  font-size: var(--joart-accroche-size);
  line-height: 1.65;
  color: rgba(255,255,255,0.5);
  max-width: 560px;
  font-weight: 400;
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.7s ease 1.1s, transform 0.7s var(--jo-ease) 1.1s;
}
.joart-hero__desc.joart-revealed { opacity: 1; transform: translateY(0); }

/* Accroche grande taille — ajustement line-height */
.joart-hero__desc[style*="xxl"],
:root[style*="--joart-accroche-size: 2rem"] .joart-hero__desc {
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* Meta bas droite */
.joart-hero__meta-corner {
  position: absolute; bottom: 3.5rem; right: 2.5rem;
  z-index: 6; text-align: right;
  opacity: 0; transition: opacity 0.6s ease 1.3s;
}
.joart-hero__meta-corner.joart-revealed { opacity: 1; }
.joart-hero__meta-client {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.14em; color: rgba(255,255,255,0.28); margin-bottom: 3px;
}
.joart-hero__meta-year {
  font-size: 10px; letter-spacing: 0.1em; color: rgba(255,255,255,0.16);
}

/* Scroll indicator */
.joart-hero__scroll {
  position: absolute; bottom: 3rem; left: 50%;
  transform: translateX(-50%); z-index: 6;
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  opacity: 0; transition: opacity 0.6s ease 1.5s;
}
.joart-hero__scroll.joart-revealed { opacity: 1; }
.joart-hero__scroll-line {
  width: 1px; height: 28px;
  background: rgba(255,255,255,0.14);
  position: relative; overflow: hidden;
}
.joart-hero__scroll-line::after {
  content: ''; position: absolute;
  top: -100%; left: 0; width: 100%; height: 100%;
  background: rgba(255,255,255,0.45);
  animation: scrollDown 1.8s ease infinite 2s;
}
@keyframes scrollDown {
  0%   { top: -100%; }
  100% { top: 100%; }
}
.joart-hero__scroll-label {
  font-size: 8px; text-transform: uppercase;
  letter-spacing: 0.18em; color: rgba(255,255,255,0.16);
}

/* ════════════════════════════════
   META BAR
════════════════════════════════ */
.joart-meta {
  display: flex; gap: 2rem; align-items: baseline; flex-wrap: wrap;
  border-bottom: 1px solid var(--jo-border);
  padding-bottom: 1rem; margin-bottom: 2.5rem;
  font-size: 10px; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--jo-gray);
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.5s ease 0.3s, transform 0.5s var(--jo-ease) 0.3s;
}
.joart-meta.joart-revealed { opacity: 1; transform: translateY(0); }
.joart-meta__cat { color: var(--jo-white); font-weight: 600; }

/* ════════════════════════════════
   LAYOUT : ACCROCHE + GALERIE
════════════════════════════════ */
.joart-layout { margin-bottom: 3rem; }
.joart-layout--before .joart-accroche { margin-bottom: 1.75rem; }
.joart-layout--after { display: flex; flex-direction: column; }
.joart-layout--after .joart-gallery  { order: 1; }
.joart-layout--after .joart-accroche { order: 2; margin-top: 1.75rem; }
.joart-layout--over { position: relative; }
.joart-layout--over .joart-accroche {
  position: absolute; z-index: 10;
  top: 1.25rem; left: 1.25rem; right: 1.25rem; max-width: 560px;
  background: rgba(0,0,0,0.62);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-radius: 4px; padding: 1.25rem 1.5rem;
  border: 1px solid rgba(255,255,255,0.07);
}
.joart-layout--over .joart-accroche p {
  color: rgba(255,255,255,0.75) !important;
  border-left-color: rgba(255,255,255,0.3) !important;
}

.joart-accroche p {
  font-size: var(--joart-accroche-size);
  line-height: 1.65;
  color: rgba(255,255,255,0.5);
  border-left: 2px solid rgba(255,255,255,0.2);
  padding-left: 1.25rem; margin: 0; max-width: 680px;
}

/* ════════════════════════════════
   GALERIE — blur → net
════════════════════════════════ */
.joart-gallery__grid { display: grid; gap: 5px; }
.joart-gallery__grid--cols-1 { grid-template-columns: 1fr; }
.joart-gallery__grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.joart-gallery__grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.joart-gallery__grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

.joart-gallery__item {
  overflow: hidden; border-radius: var(--jo-radius);
  background: #1a1a1a; cursor: zoom-in;
}
.joart-gallery__item img {
  width: 100%; display: block;
  aspect-ratio: 4 / 3; object-fit: cover;
  filter: blur(12px) brightness(0.6);
  transform: scale(1.04); opacity: 0;
  transition: filter 1.2s var(--jo-ease),
              transform 1.2s var(--jo-ease),
              opacity 0.5s ease;
}
.joart-gallery__item img.joart-revealed {
  filter: blur(0) brightness(1); transform: scale(1); opacity: 1;
}
.joart-gallery__item:hover img {
  transform: scale(1.02);
  transition: transform 0.6s var(--jo-ease);
}

/* ════════════════════════════════
   CONTENU WYSIWYG — taille dynamique
════════════════════════════════ */
.joart-content {
  font-size: var(--joart-content-size);
  color: rgba(255,255,255,0.6);
  line-height: 1.78;
  max-width: 720px; margin-bottom: 3rem;
}
.joart-content h2, .joart-content h3 {
  color: var(--jo-white); font-weight: 500;
  letter-spacing: -0.02em; margin: 2rem 0 0.75rem;
  font-size: calc(var(--joart-content-size) * 1.4);
}
.joart-content h3 { font-size: calc(var(--joart-content-size) * 1.2); }
.joart-content p { margin-bottom: 1.25rem; }
.joart-content a { color: var(--jo-white); text-decoration: underline; text-underline-offset: 3px; }
.joart-content strong { color: var(--jo-white); font-weight: 600; }
.joart-content blockquote {
  border-left: 2px solid rgba(255,255,255,0.2);
  padding-left: 1.25rem; margin: 2rem 0;
  color: rgba(255,255,255,0.45);
  font-size: calc(var(--joart-content-size) * 1.1);
}

/* ════════════════════════════════
   LIGHTBOX
════════════════════════════════ */
.joart-lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.96); z-index: 99999;
  display: none; align-items: center; justify-content: center; padding: 2rem;
}
.joart-lightbox.open { display: flex; }
.joart-lightbox__img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: 2px; }
.joart-lightbox__close {
  position: absolute; top: 1.25rem; right: 1.5rem;
  color: rgba(255,255,255,0.4); font-size: 1.5rem;
  cursor: pointer; background: none; border: none; padding: 0; line-height: 1;
  transition: color 0.2s;
}
.joart-lightbox__close:hover { color: #fff; }
.joart-lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: rgba(255,255,255,0.3); font-size: 2rem;
  cursor: pointer; padding: 0.5rem 1rem; transition: color 0.2s;
}
.joart-lightbox__nav:hover { color: #fff; }
.joart-lightbox__prev { left: 1rem; }
.joart-lightbox__next { right: 1rem; }

/* ════════════════════════════════
   VIDÉO INLINE
════════════════════════════════ */
.joart-video {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  background: #111;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--jo-radius); overflow: hidden; margin: 2.5rem 0;
}
.joart-video__cover {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0.75rem; cursor: pointer; z-index: 2; transition: opacity 0.3s;
}
.joart-video__cover:hover .joart-play-circle { transform: scale(1.1); border-color: rgba(255,255,255,0.8); }
.joart-video__cover.hidden { opacity: 0; pointer-events: none; }
.joart-video__label {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.12em; color: rgba(255,255,255,0.35);
}
.joart-video__embed {
  position: absolute; inset: 0; opacity: 0; transition: opacity 0.4s;
}
.joart-video__embed.visible { opacity: 1; }
.joart-video__embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* Lecteur HTML5 — vidéo auto-hébergée */
.joart-video__html5 {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}

/* ════════════════════════════════
   POSTS SIMILAIRES
════════════════════════════════ */
.joart-related {
  margin-top: 3rem; border-top: 1px solid var(--jo-border); padding-top: 2rem;
}
.joart-related__label {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.13em; color: var(--jo-gray); margin-bottom: 1.25rem;
}
.joart-related__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.joart-related__card {
  border: 1px solid var(--jo-border); border-radius: var(--jo-radius);
  overflow: hidden; text-decoration: none; color: var(--jo-white);
  display: block; background: #111; transition: border-color 0.2s;
}
.joart-related__card:hover { border-color: rgba(255,255,255,0.3); }
.joart-related__thumb { aspect-ratio: 4 / 3; background: #1a1a1a; overflow: hidden; }
.joart-related__thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.5s var(--jo-ease);
}
.joart-related__card:hover .joart-related__thumb img { transform: scale(1.04); }
.joart-related__info { padding: 0.75rem 0.875rem; }
.joart-related__cat {
  font-size: 9px; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--jo-gray); margin-bottom: 4px;
}
.joart-related__title { font-size: 13px; font-weight: 500; line-height: 1.3; color: var(--jo-white); }

/* ════════════════════════════════
   RESPONSIVE
════════════════════════════════ */
@media (max-width: 680px) {
  .joart-article { padding: 0 1rem 3rem; }
  .joart-hero { min-height: 70vh; }
  .joart-hero__content { padding: 0 1.5rem 2.5rem; }
  .joart-gallery__grid--cols-3,
  .joart-gallery__grid--cols-4 { grid-template-columns: repeat(2, 1fr); }
  .joart-related__grid { grid-template-columns: 1fr 1fr; }
  .joart-layout--over .joart-accroche {
    position: static; background: #1a1a1a; border: 1px solid var(--jo-border);
  }
}
@media (max-width: 420px) {
  .joart-gallery__grid--cols-2,
  .joart-gallery__grid--cols-3,
  .joart-gallery__grid--cols-4 { grid-template-columns: 1fr; }
  .joart-related__grid { grid-template-columns: 1fr; }
  .joart-hero { min-height: 60vh; }
}
