/* ==========================================================================
   Youssef Dhane - Artiste 3D
   Feuille de style unique. Les couleurs et polices se règlent dans :root.
   ========================================================================== */

:root {
  /* Couleurs */
  --bg: #0a0a0b;
  --bg-raised: #131315;
  --bg-soft: #1b1b1e;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #ededee;
  --text-muted: #a1a1a8;
  --text-faint: #8b8b93;
  --accent: #ff6b1f;
  --accent-ink: #120700;

  /* Typo */
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Archivo", ui-sans-serif, system-ui, sans-serif;

  /* Mouvement */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  /* Mise en page */
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1440px;
  --header-h: 72px;
  --radius: 4px;

  color-scheme: dark;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-padding-top: calc(var(--header-h) + 88px);
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; line-height: 1.05; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }

button, a, [role="button"], .chip {
  touch-action: manipulation;
}
button, [role="button"], .chip, .btn, .nav a {
  user-select: none;
  -webkit-user-select: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--accent); color: var(--accent-ink); }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  border-radius: var(--radius);
  transition: top 160ms var(--ease-out);
}
.skip-link:focus { top: 12px; }

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

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}


/* --------------------------------------------------------------------------
   En-tête
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background-color 300ms ease, border-color 300ms ease, transform 400ms var(--ease-out);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(10, 10, 11, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.site-header.is-hidden { transform: translateY(-100%); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 15px;
  position: relative;
  z-index: 2;
}
.brand-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  align-self: center;
}

.nav { display: flex; gap: 6px; margin-left: auto; }

.header-actions {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 20px;
}

/* Sélecteur de langue FR / EN */
.lang-switch {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.08em;
}
.lang-switch a {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 32px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--text-muted);
  transition: color 200ms ease, background-color 200ms ease, transform 160ms var(--ease-out);
}
.lang-switch a:active { transform: scale(0.94); }
.lang-switch a[aria-current="page"] { background: var(--text); color: var(--bg); }
@media (hover: hover) and (pointer: fine) {
  .lang-switch a:not([aria-current]):hover { color: var(--text); }
}
.nav a {
  position: relative;
  padding: 10px 14px;
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 200ms ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 4px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 300ms var(--ease-out);
}
.nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"]::after { transform: scaleX(1); }

@media (hover: hover) and (pointer: fine) {
  .nav a:hover { color: var(--text); }
  .nav a:hover::after { transform: scaleX(1); transform-origin: left; }
}

.menu-toggle {
  display: none;
  position: relative;
  z-index: 2;
  width: 44px; height: 44px;
  margin-right: -10px;
  align-items: center;
  justify-content: center;
}
.menu-toggle span {
  position: absolute;
  width: 22px; height: 1.5px;
  background: var(--text);
  transition: transform 300ms var(--ease-out);
}
.menu-toggle span:first-child { transform: translateY(-4px); }
.menu-toggle span:last-child { transform: translateY(4px); }
.menu-open .menu-toggle span:first-child { transform: rotate(45deg); }
.menu-open .menu-toggle span:last-child { transform: rotate(-45deg); }

@media (max-width: 760px) {
  .menu-toggle { display: inline-flex; }
  .header-actions { margin-left: auto; }
  .nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: calc(var(--header-h) + env(safe-area-inset-top, 0px)) var(--gutter) calc(32px + env(safe-area-inset-bottom, 0px));
    background: var(--bg);
    opacity: 0;
    visibility: hidden;
    transition: opacity 260ms ease, visibility 0s linear 260ms;
  }
  .menu-open .nav {
    opacity: 1;
    visibility: visible;
    transition: opacity 260ms ease, visibility 0s;
  }
  .nav a {
    font-size: clamp(36px, 11vw, 56px);
    letter-spacing: -0.02em;
    text-transform: none;
    padding: 6px 0;
    color: var(--text);
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 400ms var(--ease-out), transform 500ms var(--ease-out);
  }
  .nav a::after { display: none; }
  .nav a[aria-current="page"] { color: var(--accent); }
  .menu-open .nav a { opacity: 1; transform: none; }
  .menu-open .nav a:nth-child(2) { transition-delay: 50ms; }
  .menu-open .nav a:nth-child(3) { transition-delay: 100ms; }
  .menu-open .nav a:nth-child(4) { transition-delay: 150ms; }
  .menu-open { overflow: hidden; }
  .menu-open .site-header { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom-color: transparent; }
}

/* --------------------------------------------------------------------------
   Boutons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid var(--line-strong);
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; transition: transform 300ms var(--ease-out); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: rgba(255, 255, 255, 0.04); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: #ff8240; border-color: #ff8240; }
  .btn-ghost:hover { border-color: var(--text); background: rgba(255, 255, 255, 0.08); }
  .btn:hover svg { transform: translateX(3px); }
}

/* --------------------------------------------------------------------------
   Titres de section / éléments communs
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--accent);
}

.section { padding-block: clamp(72px, 12vw, 160px); }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(32px, 5vw, 64px);
}
.section-title {
  font-size: clamp(36px, 6vw, 80px);
  margin-top: 16px;
}
.section-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  color: var(--text-muted);
  padding: 10px 0;
  transition: color 200ms ease;
}
.section-link svg { width: 18px; height: 18px; transition: transform 300ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .section-link:hover { color: var(--text); }
  .section-link:hover svg { transform: translateX(4px); }
}

.page-head {
  padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + clamp(48px, 9vw, 120px));
  padding-bottom: clamp(32px, 5vw, 56px);
}
.page-title {
  font-size: clamp(52px, 12vw, 168px);
  letter-spacing: -0.045em;
  line-height: 0.92;
  margin-top: 20px;
}
.page-intro {
  max-width: 52ch;
  margin-top: 24px;
  color: var(--text-muted);
  font-size: clamp(16px, 1.6vw, 19px);
}

/* Révélation au défilement (seulement si le JavaScript tourne) */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 900ms var(--ease-out), transform 1000ms var(--ease-out);
  transition-delay: var(--delay, 0ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Titre découpé en mots */
.split .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.split .word > span { display: inline-block; }
.js .split .word > span {
  transform: translateY(105%);
  transition: transform 1100ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms + var(--base, 0ms));
}
.js .split.is-visible .word > span,
.js.is-loaded .hero .split .word > span { transform: none; }

/* --------------------------------------------------------------------------
   Accueil - Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}
.hero-slides { position: absolute; inset: 0; z-index: -2; background: var(--bg); }
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1400ms ease;
}
.hero-slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.12);
  transition: transform 9000ms linear;
}
.hero-slide.is-active { opacity: 1; }
.hero-slide.is-active img { transform: scale(1.02); }

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(10,10,11,0.55) 0%, rgba(10,10,11,0) 22%),
    linear-gradient(0deg, rgba(10,10,11,0.96) 0%, rgba(10,10,11,0.7) 40%, rgba(10,10,11,0.3) 62%, rgba(10,10,11,0) 80%);
}

.hero-content {
  width: 100%;
  padding-bottom: calc(clamp(40px, 7vw, 88px) + env(safe-area-inset-bottom, 0px));
}
.hero-h1 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
/* Sous-titre du hero : lisible sur les images claires (blanc + ombre douce) */
.hero-h1 .eyebrow {
  font-weight: 500;
  line-height: 1.6;
  color: var(--text);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 18px rgba(0, 0, 0, 0.55);
}
.hero-title,
.hero-lede,
.hero-caption { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 0 32px rgba(0, 0, 0, 0.35); }
.hero-title {
  display: block;
  font-size: clamp(56px, 13.5vw, 220px);
  letter-spacing: -0.05em;
  line-height: 0.86;
  font-weight: 500;
}
.hero-title .accent { color: var(--accent); }
.hero-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 32px;
  margin-top: clamp(24px, 4vw, 48px);
}
.hero-lede {
  max-width: 42ch;
  color: var(--text-muted);
  font-size: clamp(16px, 1.5vw, 19px);
}
.hero-lede strong { color: var(--text); font-weight: 500; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.hero-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--text-muted);
  text-align: right;
}
.hero-caption { min-height: 1.6em; transition: opacity 400ms ease; }
.hero-progress { display: flex; gap: 6px; }
.hero-progress button {
  position: relative;
  width: 36px; height: 24px;
}
.hero-progress button::before,
.hero-progress button::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 2px;
  margin-top: -1px;
  background: rgba(255, 255, 255, 0.22);
}
.hero-progress button::after {
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
}
.hero-progress button.is-done::after { transform: scaleX(1); }
.hero-progress button.is-active::after {
  animation: progress var(--slide-ms, 6500ms) linear forwards;
}
.hero.is-paused .hero-progress button.is-active::after { animation-play-state: paused; }
@keyframes progress { to { transform: scaleX(1); } }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  width: 1px;
  height: 44px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}
.scroll-cue::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--text);
  animation: cue 2.2s var(--ease-in-out) infinite;
}
@keyframes cue {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(100%); }
}

/* Entrée du hero au chargement */
.js .hero [data-enter] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out);
  transition-delay: var(--delay, 0ms);
}
.js.is-loaded .hero [data-enter] { opacity: 1; transform: none; }

@media (max-width: 760px) {
  .hero-bottom { grid-template-columns: 1fr; }
  .hero-meta { align-items: flex-start; text-align: left; }
  .scroll-cue { display: none; }
}

/* --------------------------------------------------------------------------
   Accueil - Bandeau défilant
   -------------------------------------------------------------------------- */
.marquee {
  border-block: 1px solid var(--line);
  overflow: hidden;
  padding-block: 22px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 40s linear infinite;
}
.marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: 40px;
  padding-right: 40px;
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 36px);
  letter-spacing: -0.01em;
  color: var(--text-muted);
  white-space: nowrap;
}
.marquee-track span::after {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* --------------------------------------------------------------------------
   Accueil - Sélection
   -------------------------------------------------------------------------- */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(10px, 1.4vw, 20px);
}
.featured-grid .tile:nth-child(1) { grid-column: span 8; grid-row: span 2; }
.featured-grid .tile:nth-child(2) { grid-column: span 4; }
.featured-grid .tile:nth-child(3) { grid-column: span 4; }
.featured-grid .tile:nth-child(4) { grid-column: span 4; }
.featured-grid .tile:nth-child(5) { grid-column: span 4; }
.featured-grid .tile:nth-child(6) { grid-column: span 4; }
.featured-grid .tile:nth-child(n+7) { grid-column: span 6; }

@media (max-width: 900px) {
  .featured-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-grid .tile:nth-child(n) { grid-column: span 1; grid-row: auto; }
  .featured-grid .tile:nth-child(1) { grid-column: span 2; }
}

.tile {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-soft);
  min-height: 0;
  aspect-ratio: 16 / 10;
}
.featured-grid .tile:nth-child(1) { aspect-ratio: auto; min-height: 100%; }
@media (max-width: 900px) {
  .featured-grid .tile:nth-child(1) { aspect-ratio: 16 / 10; }
}
.tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform 1200ms var(--ease-out), opacity 600ms ease;
}
.tile-label {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  padding: 48px 18px 16px;
  background: linear-gradient(0deg, rgba(0,0,0,0.75), rgba(0,0,0,0));
  font-family: var(--font-display);
  font-size: 15px;
}
.tile-label small {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}
@media (max-width: 900px) {
  .featured-grid .tile:not(:first-child) .tile-label { padding: 32px 12px 10px; font-size: 13px; }
  .featured-grid .tile:not(:first-child) .tile-label small { display: none; }
}
@media (hover: hover) and (pointer: fine) {
  .tile-label { opacity: 0; transform: translateY(8px); transition: opacity 300ms ease, transform 400ms var(--ease-out); }
  .tile:hover img { transform: scale(1.05); }
  .tile:hover .tile-label,
  .tile:focus-visible .tile-label { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Accueil - Disciplines
   -------------------------------------------------------------------------- */
.disciplines {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
.discipline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 48px;
  justify-content: space-between;
  padding: 28px 24px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.discipline + .discipline { border-left: 1px solid var(--line); }
.discipline-num {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--text-faint);
}
.discipline h3 { font-size: clamp(24px, 2.4vw, 34px); }
.discipline p { color: var(--text-muted); font-size: 15px; margin-top: 10px; }
.discipline-count {
  flex: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-muted);
  transition: color 200ms ease;
}
.discipline-count svg { width: 16px; height: 16px; transition: transform 300ms var(--ease-out); }
.discipline-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  transition: opacity 500ms ease;
}
.discipline-bg img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.32); transform: scale(1.08); transition: transform 1200ms var(--ease-out); }
.discipline { isolation: isolate; }
@media (hover: hover) and (pointer: fine) {
  .discipline:hover .discipline-bg { opacity: 1; }
  .discipline:hover .discipline-bg img { transform: scale(1); }
  .discipline:hover .discipline-count { color: var(--accent); }
  .discipline:hover .discipline-count svg { transform: translateX(4px); }
}
.discipline:active { background: var(--bg-raised); }

@media (max-width: 900px) {
  .disciplines { grid-template-columns: 1fr 1fr; }
  .discipline:nth-child(3) { border-left: 0; }
}
@media (max-width: 520px) {
  .disciplines { grid-template-columns: 1fr; }
  .discipline + .discipline { border-left: 0; }
  .discipline { gap: 20px; flex-direction: row; align-items: end; }
}

/* --------------------------------------------------------------------------
   Lecteur vidéo (façade Vimeo/YouTube)
   -------------------------------------------------------------------------- */
.player {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.player img,
.player iframe {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border: 0;
}
.player img { transition: transform 1200ms var(--ease-out), opacity 500ms ease; opacity: 0; }
.player img.is-ready { opacity: 1; }
.player-btn {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(0deg, rgba(0,0,0,0.5), rgba(0,0,0,0.1));
  width: 100%;
}
.player-btn .play {
  display: grid;
  place-items: center;
  width: clamp(64px, 9vw, 96px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 300ms var(--ease-out), background-color 200ms ease, border-color 200ms ease;
}
.player-btn .play svg { width: 34%; height: 34%; margin-left: 6%; }
.player-btn:active .play { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) {
  .player:hover img { transform: scale(1.04); }
  .player-btn:hover .play { transform: scale(1.08); background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
}
.player.is-playing .player-btn,
.player.is-playing img { display: none; }

/* --------------------------------------------------------------------------
   Appel à l'action / Pied de page
   -------------------------------------------------------------------------- */
.cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-block: clamp(96px, 16vw, 200px);
  text-align: center;
}
.cta-bg { position: absolute; inset: 0; z-index: -1; }
.cta-bg img { width: 100%; height: 120%; object-fit: cover; filter: brightness(0.3); will-change: transform; }
.cta-title { font-size: clamp(44px, 9vw, 136px); letter-spacing: -0.045em; line-height: 0.92; }
.cta p { color: var(--text-muted); margin: 24px auto 32px; max-width: 44ch; }

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 40px calc(40px + env(safe-area-inset-bottom, 0px));
  color: var(--text-muted);
  font-size: 14px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a { padding: 10px 0; transition: color 200ms ease; }
.footer-links a[aria-current="page"] { color: var(--text); }
@media (hover: hover) and (pointer: fine) {
  .footer-links a:hover { color: var(--text); }
}

/* --------------------------------------------------------------------------
   Portfolio - filtres
   -------------------------------------------------------------------------- */
.filters {
  position: sticky;
  top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  z-index: 10;
  margin-bottom: clamp(20px, 3vw, 36px);
  padding-block: 12px;
  background: linear-gradient(180deg, var(--bg) 70%, rgba(10,10,11,0));
  transition: transform 400ms var(--ease-out);
}
.is-header-hidden .filters { transform: translateY(calc(-1 * var(--header-h))); }
.chips {
  position: relative;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
          mask-image: linear-gradient(90deg, #000 88%, transparent);
  padding-right: 32px;
}
.chips::-webkit-scrollbar { display: none; }
@media (min-width: 761px) {
  .chips { -webkit-mask-image: none; mask-image: none; }
}
.chip {
  position: relative;
  z-index: 1;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-muted);
  transition: color 250ms ease, transform 160ms var(--ease-out);
}
.chip:active { transform: scale(0.96); }
.chip sup { font-size: 10px; color: var(--text-faint); transition: color 250ms ease; }
.chip[aria-pressed="true"] { color: var(--accent-ink); }
.chip[aria-pressed="true"] sup { color: var(--accent-ink); }
@media (hover: hover) and (pointer: fine) {
  .chip:hover:not([aria-pressed="true"]) { color: var(--text); }
}
.chip-indicator {
  position: absolute;
  z-index: 0;
  top: 0; left: 0;
  height: 44px;
  border-radius: 999px;
  background: var(--accent);
  transition: transform 450ms var(--ease-drawer), width 450ms var(--ease-drawer);
}
.chips:not(.is-ready) .chip-indicator { transition: none; }

/* --------------------------------------------------------------------------
   Portfolio - galerie maçonnerie
   -------------------------------------------------------------------------- */
.gallery {
  columns: 3 340px;
  column-gap: clamp(10px, 1.2vw, 18px);
  padding-bottom: clamp(64px, 10vw, 140px);
}
@media (max-width: 520px) {
  .gallery { columns: 1; }
}
.gallery-item {
  position: relative;
  display: block;
  width: 100%;
  margin-bottom: clamp(10px, 1.2vw, 18px);
  break-inside: avoid;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-soft);
  cursor: zoom-in;
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  transition: opacity 700ms var(--ease-out), transform 800ms var(--ease-out);
  transition-delay: var(--delay, 0ms);
}
.gallery-item.is-visible { opacity: 1; transform: none; }
.gallery-item.is-hidden { display: none; }
.gallery-item img {
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity 600ms ease, transform 1200ms var(--ease-out);
}
.gallery-item img.is-ready { opacity: 1; }
.gallery-item .tile-label { padding: 40px 16px 14px; }
.gallery-item:active img { transform: scale(0.99); }
@media (hover: hover) and (pointer: fine) {
  .gallery-item .tile-label { opacity: 0; transform: translateY(8px); transition: opacity 300ms ease, transform 400ms var(--ease-out); }
  .gallery-item:hover img { transform: scale(1.04); }
  .gallery-item:hover .tile-label,
  .gallery-item:focus-visible .tile-label { opacity: 1; transform: none; }
}
@media (hover: none) {
  .gallery-item .tile-label { display: none; }
}

.empty-state {
  padding: 48px 0;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Visionneuse (lightbox)
   -------------------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: rgba(6, 6, 7, 0.985);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 260ms ease, visibility 0s linear 260ms;
  overscroll-behavior: contain;
}
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 300ms ease, visibility 0s;
}
.lb-top,
.lb-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px var(--gutter);
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-muted);
}
.lb-top { padding-top: calc(12px + env(safe-area-inset-top, 0px)); }
.lb-bottom { padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
/* Les barres restent toujours au-dessus de l'image */
.lb-top, .lb-bottom { position: relative; z-index: 1; }
.lb-title { color: var(--text); font-size: 16px; }
.lb-stage {
  position: relative;
  min-height: 0;
  touch-action: pan-y pinch-zoom;
}
/* L'image tient exactement dans l'espace entre les deux barres */
.lb-stage img {
  position: absolute;
  inset: 0 var(--gutter);
  margin: auto;
  max-width: calc(100% - 2 * var(--gutter));
  max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  border-radius: 2px;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transition: opacity 250ms ease, transform 400ms var(--ease-out), filter 250ms ease;
}
.lb-stage img.is-loading { opacity: 0.35; filter: blur(6px); }
.lb-stage img.is-swapping-next { opacity: 0; transform: translateX(-24px); transition-duration: 160ms; }
.lb-stage img.is-swapping-prev { opacity: 0; transform: translateX(24px); transition-duration: 160ms; }
.lb-btn {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--text);
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease;
}
.lb-btn svg { width: 20px; height: 20px; }
.lb-btn:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) {
  .lb-btn:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
}
.lb-nav { display: flex; gap: 10px; }

/* --------------------------------------------------------------------------
   Vidéos
   -------------------------------------------------------------------------- */
.video-feature { margin-bottom: clamp(56px, 8vw, 112px); }
.video-feature .player { border-radius: 6px; }
.video-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 24px;
  margin-top: 18px;
}
.video-info h2,
.video-info h3 { font-size: clamp(20px, 2vw, 28px); }
.video-feature .video-info h2 { font-size: clamp(28px, 3.4vw, 44px); }
.video-info p { color: var(--text-muted); font-size: 15px; }
.video-info .meta { font-family: var(--font-display); font-size: 13px; color: var(--text-faint); white-space: nowrap; }

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
  gap: clamp(40px, 5vw, 64px) clamp(16px, 2vw, 28px);
  padding-bottom: clamp(64px, 10vw, 140px);
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact-wrap { padding-bottom: clamp(64px, 10vw, 140px); }
.contact-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.contact-row {
  padding: clamp(22px, 3vw, 36px) 0;
  border-bottom: 1px solid var(--line);
}
.contact-row dt {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.contact-row dd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(19px, 4.4vw, 56px);
  letter-spacing: -0.02em;
  line-height: 1.15;
  overflow-wrap: break-word;
}
.contact-row dd a { transition: color 200ms ease; min-width: 0; }
.contact-row dd > a:first-child, .contact-row dd > span { min-width: 0; }
.ext-link { display: inline-flex; align-items: center; gap: 0.3em; }
.ext-link svg { width: 0.7em; height: 0.7em; flex: none; transition: transform 300ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .contact-row dd a:hover { color: var(--accent); }
}
.copy-btn {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--text-muted);
  transition: transform 160ms var(--ease-out), color 200ms ease, border-color 200ms ease;
}
.copy-btn:active { transform: scale(0.95); }
.copy-btn span { transition: opacity 200ms ease, filter 200ms ease, transform 300ms var(--ease-out); }
.copy-btn .done { position: absolute; opacity: 0; transform: translateY(6px); filter: blur(2px); color: var(--accent); }
.copy-btn.is-copied { border-color: var(--accent); }
.copy-btn.is-copied .label { opacity: 0; transform: translateY(-6px); filter: blur(2px); }
.copy-btn.is-copied .done { opacity: 1; transform: none; filter: none; }
@media (hover: hover) and (pointer: fine) {
  .copy-btn:hover { color: var(--text); border-color: var(--text); }
}


/* --------------------------------------------------------------------------
   Mouvement réduit
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal,
  .gallery-item,
  .hero [data-enter] { transform: none !important; transition: opacity 400ms ease !important; }
  .split .word > span { transform: none !important; transition: none !important; }
  .hero-slide img { transform: none !important; transition: none !important; }
  .marquee-track { animation: none; }
  .scroll-cue::after { animation: none; }
  .tile img, .gallery-item img, .player img, .discipline-bg img { transition: opacity 400ms ease !important; transform: none !important; }
  .nav a { transform: none !important; }
}

/* Boutons de l'appel à l'action + lien externe du contact */
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
@media (hover: hover) and (pointer: fine) {
  .ext-link:hover svg, .btn-ghost:hover svg { transform: translate(2px, -2px); }
}

/* Bouton pause des animations (diaporama, bandeau défilant) */
.motion-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(10, 10, 11, 0.4);
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--text);
  transition: transform 160ms var(--ease-out), border-color 200ms ease;
}
.motion-toggle:active { transform: scale(0.96); }
.motion-toggle svg { width: 14px; height: 14px; }
.motion-toggle .i-play { display: none; }
.motion-toggle[aria-pressed="true"] .i-play { display: block; }
.motion-toggle[aria-pressed="true"] .i-pause { display: none; }
@media (hover: hover) and (pointer: fine) {
  .motion-toggle:hover { border-color: var(--text); }
}
.motion-paused .marquee-track,
.motion-paused .scroll-cue::after,
.motion-paused .hero-progress button.is-active::after { animation-play-state: paused; }
.marquee:hover .marquee-track { animation-play-state: paused; }
