/* ═══════════════════════════════════════════════════════════════════════════
   animations.css — Styles des sections animées
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── HERO VIDÉO → remplacé par le Hero Slider (voir ci-dessous) ─────────────── */

/* ── SCROLL HORIZONTAL ───────────────────────────────────────────────────────── */
.horizontal-scroll {
    overflow: hidden;
}

/* Neutraliser TOUS les wrappers Gutenberg dans le scroll horizontal */
.horizontal-scroll .wp-block-group__inner-container,
.horizontal-scroll .is-layout-constrained,
.horizontal-scroll .is-layout-flex,
.horizontal-scroll .is-layout-flow {
    display: contents !important;
    /* "contents" fait disparaître le div visuellement
       ses enfants deviennent enfants directs du parent flex */
}
.horizontal-scroll .h-panel .wp-block-columns.is-layout-flex {
    display: flex !important;

}
.horizontal-scroll .h-panel .wp-block-columns.is-layout-flex .wp-block-column.is-layout-flow.wp-block-column-is-layout-flow {
display: block !important;
}
.horizontal-scroll ul {
	list-style: circle;
}
#horizontal-scroll .h-panel h2 {
	margin-bottom: calc(2*var(--gap));
}
#horizontal-scroll .h-panel p {
	padding-left: 10%;
	font-size: 1.3em;
	z-index: 2;
}
a.lien-jouer {
    color: var(--color-accent-light);
    font-weight: bold;
    z-index: 2;
}
/* Reset des marges/paddings Gutenberg */
.horizontal-scroll .wp-block-group,
.horizontal-scroll .wp-block-columns,
.horizontal-scroll .wp-block-column {
    margin-block: 0 !important;
    box-sizing: border-box;
}

.horizontal-scroll__track {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    width: max-content !important;
    will-change: transform;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    /* Annuler le max-width Gutenberg */
    max-width: none !important;
}

/* Le inner-container du track lui-même doit être contents aussi */
#h-track > .wp-block-group__inner-container {
    display: contents !important;
}

.h-panel {
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    height: 100svh !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0 !important;
    box-sizing: border-box;
    padding: 2rem !important;
}

/* Annuler le inner-container des panels — le contenu peut s'y mettre */
.h-panel > .wp-block-group__inner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    max-width: none !important;
}

/* Typographie panels → dans style.css */

/* Couleurs de fond → dans style.css */

/* ── TIMELINE ────────────────────────────────────────────────────────────────── */
.timeline-section {
    padding: var(--space-xl) var(--container-pad);
    max-width: var(--container-max);
    margin-inline: auto;
}

.timeline-section__header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin-inline: auto;
    padding: var(--space-md) 0;
}

/* Neutraliser le inner-container Gutenberg sur le groupe .timeline */
.timeline > .wp-block-group__inner-container {
    display: contents !important;
}

/* Ligne verticale centrale */
.timeline__line {
    position: absolute;
    left: 40px;
    top: 0; bottom: 0;
    width: 1px;
    background: var(--color-border);
}
.timeline__line span {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--color-accent);
    transform-origin: top;
    transform: scaleY(0);
}

.timeline__item {
    display: flex !important;
    flex-direction: row !important;
    gap: 2rem;
    padding: 0 0 var(--space-lg) 0;
    /* NE PAS mettre opacity:0 ici — GSAP le gère via fromTo */
    position: relative;
    z-index: 1;
    /* État initial pour GSAP — sera overridé au scroll */
    will-change: transform, opacity;
}

/* Neutraliser inner-container dans chaque item */
.timeline__item > .wp-block-group__inner-container {
    display: contents !important;
}

.timeline__marker {
    flex-shrink: 0;
    width: 80px;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    padding-top: 0.25rem;
}

/* Neutraliser inner-container dans le marker */
.timeline__marker > .wp-block-group__inner-container {
    display: contents !important;
}

.timeline__content {
    flex: 1;
    min-width: 0;
}

/* Neutraliser inner-container dans le content */
.timeline__content > .wp-block-group__inner-container {
    display: contents !important;
}

.timeline__icon,
.timeline__num {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-family: var(--font-display);
    color: var(--color-accent);
    position: relative;
    z-index: 1;
}

.timeline__title {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 300;
    margin-bottom: 0.75rem;
    color: var(--color-text);
}
.timeline__text {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--color-text-muted);
}

@media (max-width: 600px) {
    .timeline__line { left: 22px; }
    .timeline__marker { width: 44px; }
    .timeline__item { gap: 1rem; }
}

/* ── ARCHIVE HERO ────────────────────────────────────────────────────────────── */
.archive-hero {
    padding: calc(var(--header-h) + var(--space-lg)) var(--container-pad) var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}
.archive-hero__title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 300;
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--color-text);
}

/* ── SINGLE HERO ─────────────────────────────────────────────────────────────── */
.single-hero {
    position: relative;
    height: 60svh;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}
.single-hero__img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
.single-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
}
.single-hero__title {
    position: relative;
    z-index: 1;
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 300;
    padding: var(--space-md) var(--container-pad);
    color: white;
}

/* ── SINGLE PROJET LAYOUT ────────────────────────────────────────────────────── */
.single-projet__inner {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-lg);
    max-width: var(--container-max);
    margin-inline: auto;
    padding: var(--space-lg) var(--container-pad);
}
@media (max-width: 900px) {
    .single-projet__inner { grid-template-columns: 1fr; }
    .projet-meta { position: static; }
}

/* ── À PROPOS ────────────────────────────────────────────────────────────────── */
.about-section {
    padding: var(--space-xl) var(--container-pad);
    max-width: var(--container-max);
    margin-inline: auto;
}
.about-section__inner {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: var(--space-lg);
    align-items: center;
}
@media (max-width: 900px) {
    .about-section__inner { grid-template-columns: 1fr; }
}
.about-section__image img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 4px;
}
.about-section__text .section-title { margin-bottom: 1.5rem; }
.about-section__bio {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--color-text-muted);
}

/* ── GALERIE LIST ────────────────────────────────────────────────────────────── */
.gallery-list { padding: var(--space-md) var(--container-pad); }
.gallery-list__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--gap);
}
.gallery-card { overflow: hidden; }
.gallery-card__link { display: block; }
.gallery-card__image { aspect-ratio: 4/3; overflow: hidden; }
.gallery-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease-out); }
.gallery-card:hover .gallery-card__image img { transform: scale(1.05); }
.gallery-card__info {
    padding: 0.75rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.gallery-card__title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 400; }
.gallery-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    flex-shrink: 0;
}
.gallery-card__year {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-variant-numeric: tabular-nums;
}
.gallery-card__tag {
    font-size: 0.7rem;
    padding: 0.15rem 0.55rem;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    color: var(--color-text-muted);
}
.gallery-card__count {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Sous-galeries */
.gallery-detail__sub-galleries { padding: var(--space-md) var(--container-pad); }
.gallery-detail__sub-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 300; margin-bottom: 1.5rem; }
.gallery-detail__sub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.sub-gallery-card { position: relative; overflow: hidden; border-radius: 4px; display: block; }
.sub-gallery-card .photo-grid__gallery-icon { z-index: 2; }
.sub-gallery-card img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform 0.4s var(--ease-out); }
.sub-gallery-card:hover img { transform: scale(1.05); }
.sub-gallery-card__title {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 1rem 0.75rem 0.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    font-size: 0.85rem;
    font-weight: 500;
    color: #fff;
}

/* Galerie header */
.gallery-detail__header {
    padding: calc(var(--header-h) + var(--space-md)) var(--container-pad) var(--space-md);
}
.gallery-detail__title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 300;
    letter-spacing: -0.02em;
}
.gallery-detail__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.6rem;
}
.gallery-detail__desc {
    margin-top: 1rem;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-text-muted);
    max-width: 65ch;
}
.gallery-detail__desc a {
    color: var(--color-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.gallery-detail__desc a:hover {
    opacity: 0.75;
}

/* ── VIDÉO PILOTÉE PAR LE SCROLL (style Apple) ───────────────────────────────── */

.scroll-video {
    /* Hauteur = durée scroll. 600vh = 6x la hauteur écran pour une vidéo de ~12s
       GSAP calcule le ratio scroll/durée vidéo automatiquement */
    height: 600vh;
    position: relative;
}

.scroll-video__sticky {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100svh;
    overflow: hidden;
}

.scroll-video__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Overlay → dans style.css */

/* Phrases */
.scroll-video__phrases {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.scroll-video__phrase {
    position: absolute;
    color: var(--color-white);
    text-align: center;
    padding: 0 clamp(1.5rem, 8vw, 10rem);
    max-width: 1100px;
    opacity: 0;
    transform: translateY(25px);
    will-change: opacity, transform;
    /* Typographie → dans style.css */
}

/* Barre de progression (optionnelle, bas de l'écran) */
.scroll-video__progress {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: min(200px, 40vw);
    height: 2px;
    background: rgba(255,255,255,0.2);
    border-radius: 1px;
    overflow: hidden;
}

.scroll-video__progress-bar {
    height: 100%;
    width: 0%;
    background: var(--color-accent);
    border-radius: 1px;
    transition: width 0.05s linear;
}

/* Mobile : réduire la hauteur scroll */
@media (max-width: 768px) {
    .scroll-video {
        height: 500vh;
    }
    .scroll-video__phrase {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
        padding: 0 1.5rem;
    }
}

/* ── VIDÉO SCROLL SCRUBBING (style Apple) ────────────────────────────────────── */

/*
 * La section a une hauteur importante pour donner de la "course" au scroll.
 * La vidéo elle-même est sticky — elle reste en place pendant tout le scroll.
 * GSAP ScrollTrigger scrub mappe scroll → video.currentTime
 */

.scroll-video {
    /* Hauteur = durée scroll. 400vh donne ~4x la hauteur écran de "course".
       À ajuster selon la durée de ta vidéo et la vitesse souhaitée. */
    height: 400vh;
    position: relative;
}

.scroll-video__sticky {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100svh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-video__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Pas d'autoplay — piloté par JS */
}

.scroll-video__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.15) 0%,
        rgba(0,0,0,0.3)  50%,
        rgba(0,0,0,0.5)  100%
    );
    pointer-events: none;
}

/* Conteneur des phrases */
.scroll-video__phrases {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
}

/* Chaque phrase */
.scroll-video__phrase {
    position: absolute;
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4.5vw, 4rem);
    font-weight: 300;
    color: var(--color-white);
    text-align: center;
    max-width: 800px;
    padding: 0 var(--container-pad);
    letter-spacing: -0.02em;
    line-height: 1.2;

    /* État initial : invisible — GSAP gère opacity/transform, pas de transition CSS */
    opacity: 0;
    transform: translateY(30px);

    /* Ombre portée pour lisibilité sur toute vidéo */
    text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

/* Barre de progression (optionnelle, en bas de l'écran) */
.scroll-video__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255,255,255,0.15);
    z-index: 3;
}

.scroll-video__progress-bar {
    height: 100%;
    background: var(--color-accent);
    width: 0%;
    transition: width 0.1s linear;
}

/* Mobile : réduire la hauteur de scroll si besoin */
@media (max-width: 768px) {
    .scroll-video {
        height: 350vh;
    }
    .scroll-video__phrase {
        font-size: clamp(1.4rem, 6vw, 2.5rem);
        padding: 0 1.5rem;
    }
}

/* ── HERO SLIDER SCROLL-DRIVEN ───────────────────────────────────────────────── */

.hero-slider {
    position: relative;
    /* Hauteur calculée en JS : (count × 100vh) + 50vh */
}

.hero-slider__sticky {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100svh;
    overflow: hidden;   /* ← CRUCIAL : clippe les slides qui swipent */
}

/* Slides empilées, toutes en position absolue dans le sticky */
.hero-slider__slides {
    position: absolute;
    inset: 0;
    overflow: hidden;   /* double sécurité */
}

.hero-slider__slide {
    position: absolute;
    inset: 0;
    will-change: transform;
    /* yPercent et z-index gérés par GSAP */
}

.hero-slider__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    will-change: transform;
    display: block;
}

.hero-slider__overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    /* Dégradé → dans style.css */
}

/* Messages — au-dessus des slides et de l'overlay */
.hero-slider__messages {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
}

.hero-slider__msg {
    position: absolute;
    text-align: center;
    max-width: 900px;
    padding: 0 var(--container-pad);
    color: var(--color-white);
    opacity: 0;
    will-change: opacity, transform;
    /* Typographie → dans style.css ou tes surcharges */
}

/* Indicateurs */
.hero-slider__dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 3;
}

.hero-slider__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    transition: background 0.4s, transform 0.4s;
}

.hero-slider__dot.is-active {
    background: var(--color-white);
    transform: scale(1.4);
}

/* Hint scroll */
.hero-slider__scroll-hint {
    position: absolute;
    bottom: 2.5rem;
    right: var(--container-pad);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255,255,255,0.5);
    z-index: 3;
}

.hero-slider__scroll-arrow {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
    animation: scrollHint 2s ease-in-out infinite;
}

/* ── INTRO SCREEN ────────────────────────────────────────────────────────────── */
/* L'intro est en position:fixed via JS — pas de sticky ici */

.intro-screen__logo {
    width: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.intro-screen__logo .custom-logo,
.intro-screen__logo img {
    width: 600px !important;
    max-width: 80vw !important;
    max-height: 40vh !important;
    height: auto;
    display: block;
    will-change: transform, opacity;
    flex-shrink: 0;
}

.intro-logo-text {
    font-family: var(--font-display);
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 300;
    color: var(--color-text);
    letter-spacing: -0.03em;
    will-change: transform, opacity;
}

.intro-screen__phrases {
    position: relative;
    min-height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.intro-screen__phrase {
    position: absolute;
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 300;
    color: var(--color-text-muted);
    text-align: center;
    opacity: 0;
    letter-spacing: 0.02em;
    max-width: 800px;
    padding: 0 2rem;
}

.intro-screen__scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-text-muted);
    opacity: 0;
}

.intro-screen__scroll-arrow {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--color-text-muted), transparent);
    animation: scrollHint 2s ease-in-out infinite;
}