/*
Theme Name: Mbd.visuals
Theme URI: https://www.instagram.com/mbd.visuals/
Author: Manon Baudry
Description: Thème sur mesure de Mbd.visuals — photographie sportive et affiches de match. Fond noir, orange Mbd, accueil en 3D (appareil photo en verre), curseur viseur et fonds animés. Tout le contenu se modifie dans l'éditeur de blocs.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mbd-visuals
Tags: block-theme, full-site-editing, portfolio, photography, dark
*/

/* ==========================================================================
   Couleurs, polices et marges. Pour changer l'orange : --accent
   (et la couleur « Orange Mbd » dans theme.json).
   ========================================================================== */

:root {
  --bg: #0D0D0C;
  --ink: #F2EFE8;
  --soft: #D9D5CC;
  --muted: #A6A29A;
  --accent: #FF5A1F;
  --line: rgba(242, 239, 232, .12);
  --line-mid: rgba(242, 239, 232, .18);
  --line-strong: rgba(242, 239, 232, .28);
  --stripes: repeating-linear-gradient(135deg, #121211 0 14px, #171715 14px 28px);
  --gutter: clamp(20px, 4vw, 56px);
  --header-h: 76px;
  --admin-h: 0px;
  --ease: cubic-bezier(.2, .75, .1, 1);
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  color-scheme: dark;
}
body.admin-bar { --admin-h: var(--wp-admin--admin-bar--height, 32px); }

@view-transition { navigation: auto; }

/* --- Base ------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
html.is-locked { overflow: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
h1, h2, h3, h4 { font-weight: 400; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
input::placeholder, textarea::placeholder { color: rgba(242, 239, 232, .38); }
.site-main, .site-footer { overflow-x: clip; }

/* Espacement automatique de Gutenberg : coupé dans theme.json (blockGap 0),
   filet de sécurité ici À SPÉCIFICITÉ NULLE pour ne jamais écraser nos marges. */
:where(.wp-block-group) > :where(*), :where(.wp-block-buttons) { margin-block: 0; }
figure.wp-block-image { margin: 0; }
.wp-block-post-content > * { margin-block: 0; }

.skip-link.screen-reader-text:focus { background: var(--accent); color: var(--bg); }

/* --- Typographie ------------------------------------------------------------- */

.label {
  font-family: var(--sans);
  font-stretch: 125%;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .18em;
  line-height: 1.5;
  text-transform: uppercase;
}
.label--sm { font-size: 10px; letter-spacing: .16em; }
.label--bold { font-weight: 700; }
.nocaps { text-transform: none; letter-spacing: .04em; }
.accent { color: var(--accent); }
.muted { color: var(--muted); }

.display {
  font-family: var(--sans);
  font-stretch: 62%;
  font-weight: 800;
  text-transform: uppercase;
  line-height: .88;
}

/* Titres sur deux lignes : la 1re en capitales condensées, la 2e (en italique
   dans l'éditeur) en Instrument Serif. */
.titre {
  font-family: var(--sans);
  font-stretch: 62%;
  font-weight: 800;
  text-transform: uppercase;
  line-height: .88;
  letter-spacing: -.005em;
}
.titre em {
  display: block;
  margin-top: .06em;
  font-family: var(--serif);
  font-size: 1.05em;
  font-style: italic;
  font-stretch: 100%;
  font-weight: 400;
  text-transform: none;
  letter-spacing: -.01em;
  line-height: .98;
}
/* Lignes découpées par app.js pour les faire monter une à une */
.titre .line { display: block; overflow: hidden; padding: .1em .14em .16em 0; margin: -.1em -.14em -.16em 0; }
.titre .line__in { display: block; }
.titre .line__in em { margin-top: 0; }
html.js .titre:not(.is-split) { opacity: 0; animation: mbd-montrer 0s 1.5s forwards; }
@keyframes mbd-montrer { to { opacity: 1; } }

@keyframes mbd-rise { from { transform: translateY(105%); } to { transform: translateY(0); } }
@keyframes mbd-fade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes mbd-appear { from { opacity: 0; } to { opacity: 1; } }

/* --- Boutons ------------------------------------------------------------------ */
/* La classe d'un bouton est posée sur son conteneur : on stylise le lien qu'il contient. */

.wp-block-buttons.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.wp-block-button.b-accent, .wp-block-button.b-contour, .wp-block-button.b-sombre { display: inline-block; margin: 0; }
.wp-block-button.b-accent .wp-block-button__link,
.wp-block-button.b-contour .wp-block-button__link,
.wp-block-button.b-sombre .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 17px 24px;
  border: 0;
  border-radius: 0;
  font-family: var(--sans);
  font-stretch: 125%;
  font-weight: 700;
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: .18em;
  text-transform: uppercase;
  transition: background .25s, color .25s, border-color .25s, translate .35s var(--ease);
}
.wp-block-button.b-accent .wp-block-button__link { background: var(--accent); color: var(--bg); }
.wp-block-button.b-accent .wp-block-button__link:hover { background: var(--ink); color: var(--bg); }
.wp-block-button.b-contour .wp-block-button__link { padding: 16px 23px; border: 1px solid rgba(242, 239, 232, .42); background: transparent; color: var(--ink); }
.wp-block-button.b-contour .wp-block-button__link:hover { border-color: var(--ink); background: rgba(242, 239, 232, .08); color: var(--ink); }
.wp-block-button.b-sombre .wp-block-button__link { padding: 18px 24px; background: var(--bg); color: var(--ink); }
.wp-block-button.b-sombre .wp-block-button__link:hover { background: var(--ink); color: var(--bg); }
.wp-block-button.b-fleche .wp-block-button__link::after { content: "→"; display: inline-block; transition: translate .4s var(--ease); }
.wp-block-button.b-fleche .wp-block-button__link:hover::after { translate: 4px 0; }

/* Lien souligné avec flèche (« Voir le portfolio → ») */
.lien-fleche a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(242, 239, 232, .3);
  color: var(--ink);
  transition: border-color .3s;
}
.lien-fleche a::after { content: "→"; display: inline-block; transition: transform .4s var(--ease); }
.lien-fleche a:hover { color: var(--ink); border-bottom-color: var(--accent); }
.lien-fleche a:hover::after { transform: translateX(8px); }

/* --- En-tête ----------------------------------------------------------------------- */

.site-header {
  position: fixed;
  top: var(--admin-h);
  left: 0;
  right: 0;
  z-index: 95;
  background: rgba(13, 13, 12, 0);
  border-bottom: 1px solid rgba(242, 239, 232, 0);
  transition: background .4s ease, border-color .4s ease;
  view-transition-name: site-header;
}
.site-header.is-solid {
  background: rgba(13, 13, 12, .86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: rgba(242, 239, 232, .1);
}
.entete {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 var(--gutter);
}
.brand { font-stretch: 125%; font-weight: 800; font-size: 15px; letter-spacing: .01em; line-height: 1; }
.brand a { color: var(--ink); }
.brand em, .footer__word em { font-style: normal; color: var(--accent); }

.wp-block-navigation.nav { font-size: 11px; }
.wp-block-navigation.nav .wp-block-navigation__container { gap: clamp(22px, 2.6vw, 40px); align-items: center; }
.wp-block-navigation.nav .wp-block-navigation-item__content {
  position: relative;
  padding: 8px 0;
  color: var(--ink);
  font-stretch: 125%;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  transition: color .2s;
}
.wp-block-navigation.nav .wp-block-navigation-item__content::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s var(--ease);
}
.wp-block-navigation.nav .wp-block-navigation-item__content:hover { color: var(--accent); }
.wp-block-navigation.nav .wp-block-navigation-item__content:hover::after { transform: scaleX(1); transform-origin: left; }
.wp-block-navigation.nav .current-menu-item > .wp-block-navigation-item__content,
.wp-block-navigation.nav .wp-block-navigation-item__content[aria-current="page"] { color: var(--accent); }
.wp-block-navigation.nav .current-menu-item > .wp-block-navigation-item__content::after,
.wp-block-navigation.nav .wp-block-navigation-item__content[aria-current="page"]::after { transform: scaleX(1); }
.wp-block-navigation.nav .nav__cta > .wp-block-navigation-item__content {
  padding: 13px 20px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  transition: background .25s, translate .35s var(--ease);
}
.wp-block-navigation.nav .nav__cta > .wp-block-navigation-item__content::after { content: none; }
.wp-block-navigation.nav .nav__cta > .wp-block-navigation-item__content:hover,
.wp-block-navigation.nav .nav__cta.current-menu-item > .wp-block-navigation-item__content { background: var(--ink); color: var(--bg); }

/* Bouton « Menu » (petits écrans) */
.wp-block-navigation.nav .wp-block-navigation__responsive-container-open,
.wp-block-navigation.nav .wp-block-navigation__responsive-container-close {
  padding: 11px 16px;
  border: 1px solid rgba(242, 239, 232, .35);
  background: none;
  color: var(--ink);
  font-stretch: 125%;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
}
/* Le menu bascule en « Menu » sous 900 px (WordPress le fait à 600 px). */
@media (min-width: 600px) and (max-width: 899px) {
  .site-header .wp-block-navigation.nav .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
  .site-header .wp-block-navigation.nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}
/* Panneau ouvert : plein écran noir, grands liens condensés */
.wp-block-navigation.nav .wp-block-navigation__responsive-container.is-menu-open {
  background-color: var(--bg) !important;
  color: var(--ink) !important;
  padding: 19px var(--gutter) 40px; /* le bouton « Fermer » arrive à la place du bouton « Menu » */
  animation: mbd-appear .25s ease;
}
.wp-block-navigation.nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { align-items: flex-start; padding-top: 100px; }
.wp-block-navigation.nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { align-items: flex-start; gap: 10px; }
.wp-block-navigation.nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
  padding: 0;
  font-stretch: 62%;
  font-weight: 800;
  font-size: clamp(52px, 15vw, 96px);
  line-height: .9;
  letter-spacing: 0;
  text-transform: uppercase;
}
.wp-block-navigation.nav .wp-block-navigation__responsive-container.is-menu-open .nav__cta > .wp-block-navigation-item__content {
  padding: 0;
  background: none;
  color: var(--accent);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-stretch: 100%;
  font-size: clamp(56px, 16vw, 104px);
  line-height: 1;
  text-transform: none;
}
.wp-block-navigation.nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content::after { content: none; }

/* --- Bandeau d'appel (fond orange) ------------------------------------------------- */

.cta-band {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px 64px;
  padding: clamp(72px, 8vw, 128px) var(--gutter);
  background: var(--accent);
  color: var(--bg);
}
.cta-band--spaced { margin-top: clamp(88px, 10vw, 160px) !important; }
.cta-band ::selection, .contact__panel ::selection { background: var(--bg); color: var(--ink); }
.cta-band__title { font-size: clamp(56px, 8.4vw, 156px); line-height: .86; }
.cta-band__title em { line-height: .96; }
.cta-band__side { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; max-width: 420px; }
.cta-band__side p { font-size: 18px; line-height: 1.55; text-wrap: pretty; }
.cta-band a:hover { color: inherit; }

/* --- Pied de page --------------------------------------------------------------------- */

.pied {
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 6vw, 88px);
  padding: clamp(64px, 7vw, 110px) var(--gutter) 28px;
}
.footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px 64px; }
.footer__id { display: flex; flex-direction: column; gap: 10px; }
.footer__brand { font-stretch: 125%; font-weight: 600; font-size: 13px; letter-spacing: .04em; color: var(--accent); }
.footer__role { font-size: 16px; }
.footer__place { font-size: 15px; color: var(--muted); }
.footer__cols { display: flex; flex-wrap: wrap; gap: 40px 72px; }
.footer__col { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.footer__mail { font-size: 13px; }
.footer__col a, .footer__legal a { position: relative; }
.footer__col a::after, .footer__legal a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s var(--ease);
}
.footer__col a:hover::after, .footer__legal a:hover::after { transform: scaleX(1); transform-origin: left; }
.footer__word {
  overflow: hidden;
  text-align: center;
  white-space: nowrap;
  font-stretch: 62%;
  font-weight: 800;
  font-size: 17vw;
  line-height: .8;
  letter-spacing: -.01em;
  color: var(--ink);
}
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.footer__legal { display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* --- Cadres photo --------------------------------------------------------------------- */
/* Le format est porté par l'image elle-même (aspect-ratio) : pas de positionnement absolu,
   l'éditeur affiche donc exactement la même chose que le site. */

.frame { position: relative; overflow: hidden; background: var(--stripes); }
.frame a { display: block; }
.frame img { display: block; width: 100%; aspect-ratio: var(--ar, 1.5); object-fit: cover; }
.frame::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 4px;
  background: var(--accent);
  transition: width .7s var(--ease);
  pointer-events: none;
}
/* La légende de la photo devient la pastille « Voir la médiathèque ↗ » */
.frame .wp-element-caption {
  position: absolute;
  right: 12px;
  bottom: 14px;
  z-index: 1;
  margin: 0;
  padding: 10px 13px;
  background: var(--accent);
  color: var(--bg);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .3s, transform .4s var(--ease);
  pointer-events: none;
  font-stretch: 125%;
  font-weight: 700;
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: .16em;
  text-transform: uppercase;
}

/* ==========================================================================
   ACCUEIL
   ========================================================================== */

/* --- Chapitres (sans 3D, et dans l'éditeur : empilés) ---------------------------- */

.chapter__kicker { margin-bottom: 22px; }
.chapter__title--name { font-size: clamp(76px, min(12.5vw, 22vh), 232px); line-height: .84; }
.chapter__title:not(.chapter__title--name) { font-size: clamp(54px, min(7.4vw, 14vh), 136px); }
.chapter__desc {
  max-width: 46ch;
  margin-top: 24px;
  font-size: clamp(16px, 1.2vw, 19px);
  line-height: 1.6;
  color: var(--soft);
  text-wrap: pretty;
}
.chapter__more { margin-top: 30px; }
.chapter__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.chapter__tags a {
  display: inline-block;
  padding: 10px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(13, 13, 12, .35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--ink);
  font-stretch: 125%;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: background .25s, color .25s, border-color .25s;
}
.chapter__tags a:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.figures { display: flex; flex-wrap: wrap; gap: 28px clamp(32px, 4.4vw, 72px); }
.figure__value {
  font-stretch: 62%;
  font-weight: 800;
  font-size: clamp(72px, min(8vw, 15vh), 150px);
  line-height: .84;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.figure:first-child .figure__value { color: var(--accent); }
.figure__label { margin-top: 14px; color: var(--muted); }

html:not(.verre-on) .stage {
  padding-top: var(--header-h);
  background:
    radial-gradient(60% 50% at 78% 30%, rgba(255, 90, 31, .16), transparent 70%),
    radial-gradient(50% 40% at 10% 90%, rgba(255, 61, 127, .08), transparent 70%),
    var(--bg);
}
html:not(.verre-on) .chapter { padding: clamp(64px, 8vw, 128px) var(--gutter); border-bottom: 1px solid var(--line); }
html:not(.verre-on) .chapter--1 {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* --- Avec la 3D : la scène reste à l'écran pendant 4 écrans de défilement -------- */

.verre { display: none; }
.verre-on .verre {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.verre-on .stage { position: relative; z-index: 1; height: 500vh; }
.verre-on .stage__view { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.verre-on .intro, .verre-on .work, .verre-on .site-footer { position: relative; z-index: 2; background: var(--bg); }
.verre-on .cta-band { position: relative; z-index: 2; }

.verre-on .chapter { position: absolute; bottom: 12%; z-index: 3; pointer-events: none; }
.verre-on .chapter.is-active { pointer-events: auto; }
.verre-on .chapter--1 { left: var(--gutter); width: min(58vw, 900px); bottom: 11%; }
.verre-on .chapter--2 { left: 52vw; right: var(--gutter); }
.verre-on .chapter--3, .verre-on .chapter--4 { left: var(--gutter); width: min(46vw, 660px); }

/* Les titres montent de leur ligne en se nettoyant d'un flou (comme le site en verre). */
.verre-on .chapter__title .line { white-space: nowrap; }
.verre-on .chapter__title .line__in {
  transform: translate3d(0, 112%, 0);
  opacity: 0;
  filter: blur(12px);
  transition: transform 1.15s cubic-bezier(.16, 1, .3, 1), opacity .7s ease-out, filter 1.05s cubic-bezier(.16, 1, .3, 1);
}
.verre-on .chapter__title .line + .line .line__in { transition-delay: .09s; }
.verre-on .chapter.is-active .chapter__title .line__in { transform: none; opacity: 1; filter: blur(0); }
.verre-on .chapter__kicker,
.verre-on .chapter__desc,
.verre-on .chapter__more,
.verre-on .figure {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  transition: opacity 1s cubic-bezier(.16, 1, .3, 1), transform 1s cubic-bezier(.16, 1, .3, 1);
}
.verre-on .chapter.is-active .chapter__kicker { transition-delay: .05s; }
.verre-on .chapter.is-active .chapter__desc { transition-delay: .3s; }
.verre-on .chapter.is-active .chapter__more { transition-delay: .42s; }
.verre-on .chapter.is-active .figure:nth-child(1) { transition-delay: .45s; }
.verre-on .chapter.is-active .figure:nth-child(2) { transition-delay: .53s; }
.verre-on .chapter.is-active .figure:nth-child(3) { transition-delay: .61s; }
.verre-on .chapter.is-active :is(.chapter__kicker, .chapter__desc, .chapter__more, .figure) { opacity: 1; transform: none; }

/* Repères de la scène (créés par verre.js) */
.stage__hud, .stage__dashes, .stage__hint { display: none; }
.verre-on .stage__hud {
  position: absolute;
  top: calc(var(--header-h) + var(--admin-h) + 26px);
  right: var(--gutter);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: opacity .6s;
}
.stage__count { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); }
.stage__count b { font-weight: 700; color: var(--ink); }
.stage__count i { display: block; width: 18px; height: 1px; background: var(--line-strong); }
.stage__name { color: var(--accent); }
.verre-on .stage__dashes {
  position: absolute;
  top: 50%;
  right: calc(var(--gutter) - 12px);
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: translateY(-50%);
  transition: opacity .6s;
}
.stage__dashes button { position: relative; display: block; width: 26px; height: 48px; padding: 0; border: 0; background: none; }
.stage__dashes button::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: rgba(242, 239, 232, .16);
  transition: background .3s;
}
.stage__dashes button:hover::before { background: rgba(242, 239, 232, .4); }
.stage__dashes span {
  position: absolute;
  left: 12px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
}
.verre-on .stage__hint {
  position: absolute;
  left: 50%;
  bottom: 26px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  border: 0;
  background: none;
  color: var(--muted);
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity .6s, color .2s;
  pointer-events: none;
}
.verre-on .stage.is-start .stage__hint { opacity: 1; pointer-events: auto; }
.stage__hint:hover { color: var(--ink); }
.stage__hint span { display: inline-block; animation: mbd-nudge 1.8s var(--ease) infinite; }
@keyframes mbd-nudge { 0%, 100% { transform: none; } 50% { transform: translateY(5px); } }
.verre-on .stage.is-leaving :is(.stage__hud, .stage__dashes) { opacity: 0; pointer-events: none; }

/* Écran en hauteur (téléphone) : texte en haut aux chapitres 1 et 3, en bas aux 2 et 4 */
@media (max-aspect-ratio: 4/5) {
  .verre-on .chapter,
  .verre-on .chapter--1,
  .verre-on .chapter--2,
  .verre-on .chapter--3,
  .verre-on .chapter--4 { left: var(--gutter); right: var(--gutter); width: auto; }
  .verre-on .chapter--1, .verre-on .chapter--3 { top: calc(var(--header-h) + var(--admin-h) + 12px); bottom: auto; }
  .verre-on .chapter--2, .verre-on .chapter--4 { top: auto; bottom: 6%; }
  .chapter__title--name { font-size: clamp(64px, 20vw, 150px); }
  .chapter__title:not(.chapter__title--name) { font-size: clamp(46px, 13.5vw, 96px); }
  .chapter__kicker { margin-bottom: 14px; }
  .chapter__desc { margin-top: 14px; font-size: 15px; max-width: 40ch; }
  .chapter__more { margin-top: 20px; }
  .figure__value { font-size: clamp(56px, 16vw, 96px); }
  .verre-on .stage__hud { display: none; }
  .verre-on .stage__dashes { right: 0; }
  .stage__dashes button { height: 36px; }
}
@media (min-aspect-ratio: 4/5) and (max-height: 560px) {
  .chapter__desc { display: none; }
  .verre-on .stage__hud { display: none; }
}

/* --- Présentation (avec le portrait) -------------------------------------------- */

.intro { padding: clamp(88px, 10vw, 168px) var(--gutter); }
.intro__grid { display: flex; flex-wrap: wrap; align-items: flex-start; gap: clamp(40px, 6vw, 104px); }
.intro__head { flex: 1 1 380px; }
.intro__title { margin-top: 22px; font-size: clamp(52px, 7vw, 128px); }
.hero__portrait { position: relative; width: min(100%, 440px); margin-top: clamp(36px, 4.4vw, 64px) !important; overflow: hidden; background: var(--stripes); }
.hero__portrait img { width: 100%; aspect-ratio: 671 / 1004; object-fit: cover; }
.intro__body { flex: 1 1 520px; display: flex; flex-direction: column; gap: clamp(48px, 5vw, 80px); }
.intro__text { display: flex; flex-direction: column; gap: 22px; max-width: 620px; }
.intro__text p { font-size: 16px; line-height: 1.65; color: var(--muted); text-wrap: pretty; }
.intro__text .lead { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.55; color: var(--ink); }
.clients__head { padding-bottom: 14px; border-bottom: 1px solid var(--line); color: var(--muted); }
.clients__list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.clients__list strong {
  font-stretch: 62%;
  font-weight: 800;
  font-size: clamp(26px, 2.4vw, 36px);
  line-height: 1;
  text-transform: uppercase;
  color: var(--ink);
}

/* --- Mon travail ---------------------------------------------------------------- */

.work { padding: 0 var(--gutter) clamp(88px, 10vw, 168px); }
.work__head {
  margin-bottom: clamp(40px, 5vw, 72px);
  padding-top: clamp(56px, 6vw, 96px);
  border-top: 1px solid var(--line);
}
.work__title { font-size: clamp(48px, 6vw, 112px); }
.work__grid { display: flex; flex-wrap: wrap; align-items: flex-start; gap: clamp(48px, 5vw, 80px) clamp(24px, 3vw, 48px); }
.work-card { display: flex; flex-direction: column; gap: 22px; }
.work-card--a { flex: 1 1 56%; min-width: min(100%, 480px); --ar: 1.5; }
.work-card--b { flex: 1 1 34%; min-width: min(100%, 320px); margin-top: clamp(0px, (100vw - 1000px) * .5, 160px) !important; --ar: .8; }
.work-card__meta { display: flex; align-items: flex-start; gap: clamp(16px, 2vw, 28px); }
.num {
  min-width: 1.3em;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(30px, 2.8vw, 44px);
  line-height: .9;
  color: var(--accent);
}
.work-card__text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.work-card__title { padding-top: .1em; font-size: clamp(40px, 4.6vw, 84px); }
.work-card__title a:hover { color: var(--ink); }
.work-card .lien-fleche { margin-top: 6px; }
.work-card:hover .frame::after { width: 100%; }
.work-card:hover .lien-fleche a { border-bottom-color: var(--accent); }
.work-card:hover .lien-fleche a::after { transform: translateX(8px); }

/* ==========================================================================
   PAGES INTÉRIEURES
   ========================================================================== */

.page-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px 64px;
  padding: calc(clamp(140px, 14vw, 210px) + var(--admin-h)) var(--gutter) clamp(48px, 5vw, 80px);
}
.page-head__main { flex: 1 1 600px; min-width: 0; }
.page-head__title { margin-top: 22px; font-size: clamp(52px, 8vw, 148px); }
.page-head--graphisme .page-head__title { font-size: clamp(56px, 9vw, 168px); }
.page-head__aside { flex: 0 1 400px; font-size: 16px; line-height: 1.65; color: var(--muted); text-wrap: pretty; }
.page-head__more { margin-top: 32px; }

/* Entrée en scène des en-têtes de page (une fois les lignes découpées) */
html.js .page-head__main > .label, html.js .media__titles > .label { animation: mbd-fade .9s var(--ease) 60ms backwards; }
html.js .page-head .titre .line__in, html.js .contact__title .line__in { animation: mbd-rise 1.15s var(--ease) calc(120ms + var(--i, 0) * 120ms) backwards; }
html.js .page-head__aside, html.js .contact__text, html.js .media__title { animation: mbd-fade .9s var(--ease) .38s backwards; }

/* --- Portfolio ---------------------------------------------------------------------- */

.tabs {
  position: sticky;
  top: calc(var(--header-h) + var(--admin-h));
  z-index: 20;
  background: rgba(13, 13, 12, .92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.tabs__nav {
  position: relative;
  display: flex;
  gap: clamp(22px, 2.6vw, 44px);
  padding: 0 var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs__nav::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 20px 0 18px;
  border-bottom: 2px solid rgba(242, 239, 232, 0);
  color: var(--muted);
  white-space: nowrap;
  cursor: pointer;
  font-stretch: 125%;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: color .2s, border-color .2s;
}
.tab:hover { color: var(--ink); }
.tab.est-actif { color: var(--ink); border-bottom-color: var(--accent); }
.tab__count { font-size: 10px; color: var(--muted); }

.portfolio-liste { counter-reset: cat; }
.cat { padding: clamp(56px, 6vw, 104px) var(--gutter) 0; counter-increment: cat; scroll-margin-top: calc(var(--header-h) + var(--admin-h) + 60px); }
.cat.est-cache { display: none; }
.cat__head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  column-gap: clamp(16px, 2vw, 28px);
  row-gap: 10px;
  margin-bottom: clamp(24px, 2.6vw, 40px);
}
.cat__head::before {
  content: counter(cat, decimal-leading-zero);
  grid-row: 1 / span 2;
  align-self: end;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(40px, 4vw, 64px);
  line-height: .9;
  color: var(--accent);
}
.cat__kicker { grid-column: 2; color: var(--muted); }
.cat__title { grid-column: 2; padding-top: .1em; font-size: clamp(44px, 5.6vw, 100px); letter-spacing: -.005em; }

/* Cartes à hauteur égale sur une même ligne : chaque carte grandit selon son format. */
.cards { --basis: 300px; display: flex; flex-wrap: wrap; gap: clamp(14px, 1.6vw, 24px); }
@media (max-width: 1099px) { .cards { --basis: 200px; } }
.match-card {
  --ar: 1.5;
  flex: calc(var(--ar) * 2) 1 calc(var(--ar) * var(--basis));
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cat:nth-child(5n+1) .match-card:nth-child(3n+1) { --ar: 1.5; }
.cat:nth-child(5n+1) .match-card:nth-child(3n+2) { --ar: .8; }
.cat:nth-child(5n+1) .match-card:nth-child(3n+3) { --ar: 1.25; }
.cat:nth-child(5n+2) .match-card:nth-child(3n+1) { --ar: .8; }
.cat:nth-child(5n+2) .match-card:nth-child(3n+2) { --ar: 1.5; }
.cat:nth-child(5n+2) .match-card:nth-child(3n+3) { --ar: 1; }
.cat:nth-child(5n+3) .match-card:nth-child(3n+1) { --ar: 1.33; }
.cat:nth-child(5n+3) .match-card:nth-child(3n+2) { --ar: .8; }
.cat:nth-child(5n+3) .match-card:nth-child(3n+3) { --ar: 1.5; }
.cat:nth-child(5n+4) .match-card:nth-child(3n+1) { --ar: 1.5; }
.cat:nth-child(5n+4) .match-card:nth-child(3n+2) { --ar: 1; }
.cat:nth-child(5n+4) .match-card:nth-child(3n+3) { --ar: .8; }
.cat:nth-child(5n+5) .match-card:nth-child(3n+1) { --ar: .8; }
.cat:nth-child(5n+5) .match-card:nth-child(3n+2) { --ar: 1.25; }
.cat:nth-child(5n+5) .match-card:nth-child(3n+3) { --ar: 1.5; }
.cat:nth-child(n) .cards > .match-card:only-child { --ar: 2.4; flex: 1 1 100%; } /* seul match de sa catégorie : grand format */
.match-card__meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.match-card__titles { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.match-card__title { padding-top: .08em; font-size: clamp(26px, 2.4vw, 36px); line-height: .92; }
.match-card__title a:hover { color: var(--ink); }
.match-card__date { flex-shrink: 0; }
.match-card:hover .frame .wp-element-caption, .match-card:focus-within .frame .wp-element-caption { opacity: 1; transform: none; }
.match-card:hover .frame::after, .match-card:focus-within .frame::after { width: 100%; }
@media (max-width: 899px), (hover: none) {
  .frame .wp-element-caption { opacity: 1; transform: none; }
}

/* --- Médiathèque d'un match --------------------------------------------------------- */

.media-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: calc(var(--header-h) + var(--admin-h) + 22px) var(--gutter) 0;
}
.media__back a { color: var(--ink); }
.media__back a:hover { color: var(--accent); }
.media__pos { color: var(--muted); }
@media (max-width: 899px) { .media__pos { display: none; } }
.media__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 36px 64px;
  padding: clamp(48px, 6vw, 96px) var(--gutter) clamp(36px, 4vw, 64px);
}
.media__titles { flex: 1 1 600px; min-width: 0; }
.media__title {
  margin-top: 16px;
  padding-top: .12em;
  font-size: clamp(56px, 10vw, 190px);
  line-height: .86;
  letter-spacing: -.005em;
  overflow-wrap: anywhere;
}
.facts { flex: 0 1 380px; display: grid; grid-template-columns: auto 1fr; border-top: 1px solid var(--line); }
.fact { display: contents; }
.fact__label { padding: 14px 24px 14px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.fact__value { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }

/* Galerie justifiée : chaque photo garde son format, les rangées s'alignent.
   (:not(#mbd) : même poids que les règles de la galerie de WordPress) */
.wp-block-gallery.has-nested-images.galerie {
  --row: 330px;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(12px, 1.4vw, 20px);
  margin: 0;
  padding: 0 var(--gutter);
}
.wp-block-gallery.has-nested-images.galerie::after { content: ""; flex-grow: 999; }
.wp-block-gallery.has-nested-images.galerie.galerie--peu { --row: 480px; }
.wp-block-gallery.has-nested-images.galerie figure.wp-block-image:not(#mbd) {
  --ar: 1.5;
  flex: calc(var(--ar) * 2) 1 calc(var(--ar) * var(--row));
  width: auto;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background: var(--stripes);
}
.wp-block-gallery.has-nested-images.galerie:not(.galerie--peu) figure.wp-block-image:first-child:not(#mbd) { --ar: 2.4; flex: 1 1 100%; }
.wp-block-gallery.has-nested-images.galerie figure.wp-block-image:not(#mbd) img {
  width: 100%;
  height: auto;
  aspect-ratio: var(--ar);
  object-fit: cover;
  cursor: zoom-in;
}

.media__cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px 40px;
  margin-top: clamp(56px, 6vw, 96px) !important;
  padding: 28px var(--gutter);
  border-top: 1px solid var(--line);
}
.media__cta p { font-size: 16px; color: var(--muted); }
.next-match {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(48px, 6vw, 96px) var(--gutter);
  border-top: 1px solid var(--line);
  transition: background .35s, color .35s;
}
.next-match:hover { background: var(--accent); color: var(--bg); }
.next-match__title { padding-top: .1em; font-size: clamp(48px, 8vw, 148px); transition: translate .6s var(--ease); }
.next-match__title a:hover { color: inherit; }
.next-match__title a::after { content: ""; position: absolute; inset: 0; }
.next-match:hover .next-match__title { translate: 14px 0; }

/* Visionneuse (créée par app.js) */
.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(8, 8, 7, .97);
  color: var(--ink);
  overflow: hidden;
}
.lightbox[open] { display: flex; flex-direction: column; animation: mbd-appear .28s ease; }
.lightbox::backdrop { background: transparent; }
.lightbox__bar { flex-shrink: 0; height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 var(--gutter); }
.lightbox__info { min-width: 0; overflow: hidden; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
.lightbox__info b { font-weight: 600; color: var(--accent); }
.lightbox__stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(16px, 7vw, 110px) clamp(16px, 3vw, 40px);
}
.lightbox__img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.sq {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: var(--accent);
  color: var(--bg);
  font-size: 16px;
  transition: background .2s;
}
.sq:hover { background: var(--ink); }
.lb-nav {
  position: absolute;
  top: 50%;
  width: 52px;
  height: 52px;
  padding: 0;
  transform: translateY(-50%);
  background: rgba(13, 13, 12, .6);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 18px;
  transition: border-color .2s;
}
.lb-nav:hover { border-color: var(--ink); }
.lb-nav--prev { left: clamp(8px, 2vw, 32px); }
.lb-nav--next { right: clamp(8px, 2vw, 32px); }

/* --- Graphisme ------------------------------------------------------------------------ */

.features { padding: 0 var(--gutter) clamp(64px, 7vw, 112px); }
.features__grid {
  counter-reset: feat;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  column-gap: clamp(20px, 2.4vw, 36px);
  border-top: 1px solid var(--line);
}
.feature { counter-increment: feat; display: flex; flex-direction: column; gap: 12px; padding: 26px 0 28px; border-bottom: 1px solid var(--line); }
.feature::before {
  content: counter(feat, decimal-leading-zero);
  font-family: var(--serif);
  font-style: italic;
  font-size: 32px;
  line-height: 1;
  color: var(--accent);
}
.feature__title { font-size: 28px; line-height: 1; }
.feature__desc { font-size: 14px; line-height: 1.55; color: var(--muted); }

.posters { padding: 0 var(--gutter); }
.wp-block-gallery.has-nested-images.affiches { display: block; columns: 3 280px; column-gap: clamp(14px, 1.8vw, 28px); margin: 0; }
.wp-block-gallery.has-nested-images.affiches figure.wp-block-image:not(#mbd) {
  display: block;
  width: 100%;
  margin: 0 0 clamp(28px, 3vw, 44px);
  break-inside: avoid;
  overflow: hidden;
  background: var(--stripes);
}
.wp-block-gallery.has-nested-images.affiches figure.wp-block-image:not(#mbd) img { width: 100%; height: auto; object-fit: contain; cursor: zoom-in; }

/* --- Contact -------------------------------------------------------------------------- */

.contact { display: flex; flex-wrap: wrap; align-items: stretch; min-height: 100vh; }
.contact__panel {
  flex: 1 1 480px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 56px;
  padding: calc(clamp(130px, 12vw, 180px) + var(--admin-h)) var(--gutter) clamp(48px, 5vw, 72px);
  background: var(--accent);
  color: var(--bg);
}
.contact__intro { display: flex; flex-direction: column; gap: 28px; }
.contact__title { font-size: clamp(60px, 8.4vw, 160px); line-height: .86; }
.contact__title em { line-height: .96; }
.contact__text { max-width: 440px; font-size: 18px; line-height: 1.55; text-align: justify; -webkit-hyphens: auto; hyphens: auto; }
.contact__links { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.contact__links a { color: var(--bg); }
.contact__links a:hover { color: var(--ink); }
.contact__mail a {
  display: inline-block;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--bg);
  font-stretch: 62%;
  font-weight: 800;
  font-size: clamp(28px, 2.8vw, 40px);
  line-height: 1;
  overflow-wrap: anywhere;
}
.contact__mail a:hover { border-bottom-color: var(--ink); }
.contact__side { flex: 1 1 520px; padding: calc(clamp(130px, 12vw, 180px) + var(--admin-h)) var(--gutter) clamp(48px, 5vw, 72px); }

/* Formulaire (Contact Form 7), aux couleurs du site */
.contact__side .wpcf7 { max-width: 640px; }
.form { max-width: 640px; display: flex; flex-direction: column; gap: 32px; }
.choices { min-width: 0; margin: 0; padding: 0; border: 0; }
.choices legend { margin-bottom: 14px; padding: 0; color: var(--muted); }
.choices .wpcf7-form-control { display: flex; flex-wrap: wrap; gap: 8px; }
.choices .wpcf7-list-item { position: relative; margin: 0; }
.choices .wpcf7-list-item input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.choices .wpcf7-list-item-label {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
  font-stretch: 125%;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.choices .wpcf7-list-item-label:hover { border-color: rgba(242, 239, 232, .6); }
.choices input:checked + .wpcf7-list-item-label { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.choices input:focus-visible + .wpcf7-list-item-label { outline: 2px solid var(--accent); outline-offset: 3px; }
.fields-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 30px 24px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { color: var(--muted); }
.field .wpcf7-form-control-wrap { display: block; }
.field input, .field textarea {
  display: block;
  width: 100%;
  padding: 10px 0 12px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  outline: none;
  transition: border-color .2s;
}
.field textarea { resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus { border-bottom-color: var(--accent); }
.form input.submit {
  display: block;
  width: 100%;
  padding: 22px 24px;
  border: 0;
  border-radius: 0;
  background: var(--accent);
  color: var(--bg);
  text-align: left;
  cursor: pointer;
  transition: background .25s, opacity .25s;
  font-stretch: 125%;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.form input.submit:hover { background: var(--ink); }
.form input.submit:disabled { opacity: .6; cursor: progress; }
.wpcf7-spinner { display: none !important; }
.wpcf7 .wpcf7-not-valid-tip { margin-top: 8px; color: var(--accent); font-size: 13px; }
.wpcf7 form .wpcf7-response-output {
  margin: 24px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  color: var(--soft);
  font-size: 15px;
  line-height: 1.6;
}
.wpcf7 form.sent .wpcf7-response-output { border-color: var(--accent); color: var(--ink); }
.wpcf7 form.invalid .wpcf7-response-output, .wpcf7 form.failed .wpcf7-response-output { border-color: var(--accent); }
.form-secours { max-width: 560px; display: flex; flex-direction: column; gap: 22px; }
.form-secours__texte { font-size: 18px; line-height: 1.6; color: var(--soft); }

/* --- Mentions légales -------------------------------------------------------------- */

.legal { padding: 0 var(--gutter) clamp(64px, 7vw, 112px); }
.legal__grid { display: flex; flex-wrap: wrap; gap: clamp(32px, 5vw, 80px); border-top: 1px solid var(--line); }
.legal__block { flex: 1 1 420px; max-width: 640px; padding-top: clamp(32px, 4vw, 56px); scroll-margin-top: calc(var(--header-h) + var(--admin-h)); }
.legal__block h2 { margin-bottom: 18px; font-size: clamp(32px, 3vw, 48px); }
.legal__block p { font-size: 16px; line-height: 1.65; color: var(--muted); }
.legal__block p + p { margin-top: 14px; }
.legal__block strong { color: var(--ink); font-weight: 600; }
.legal__block em { font-style: normal; color: var(--accent); }
.legal__block a { color: var(--ink); border-bottom: 1px solid var(--accent); }

/* Blog (si un jour des articles sont publiés) */
.liste-articles { padding: 0 var(--gutter) clamp(64px, 7vw, 112px); }
.liste-articles .wp-block-post { padding: 28px 0; border-top: 1px solid var(--line); }
.liste-articles__titre { font-size: clamp(32px, 3vw, 48px); margin-bottom: 12px; }

/* ==========================================================================
   ANIMATIONS (voir assets/app.js)
   ========================================================================== */

/* Apparition au défilement : « .rv-pending » = pas encore arrivé à l'écran */
[data-rv="up"] { transition: opacity .9s var(--ease) var(--rv-delay, 0ms), transform 1s var(--ease) var(--rv-delay, 0ms); }
[data-rv="up"].rv-pending { opacity: 0; transform: translate3d(0, 28px, 0); }
[data-rv="img"] { transition: clip-path 1.1s var(--ease) var(--rv-delay, 0ms); }
[data-rv="img"].rv-pending { clip-path: inset(100% 0 0 0); }
.frame img, .hero__portrait img, .galerie img, .affiches img { transition: transform 1.4s var(--ease) var(--rv-delay, 0ms), scale 1s var(--ease); }
[data-rv="img"].rv-pending img { transform: scale(1.12); }
[data-rv="lines"] .line__in { transition: transform 1.1s var(--ease) calc(var(--rv-delay, 0ms) + var(--i, 0) * 90ms); }
[data-rv="lines"].rv-pending .line__in { transform: translate3d(0, calc(100% + .75em), 0); }
[data-rv="rise"] { transition: transform 1.3s var(--ease) var(--rv-delay, 0ms); }
[data-rv="rise"].rv-pending { transform: translate3d(0, 100%, 0); }
.rv-instant, .rv-instant * { transition: none !important; }
@media print {
  .rv-pending, .rv-pending img, .rv-pending .line__in { opacity: 1 !important; transform: none !important; clip-path: none !important; }
}

/* Profondeur et attraction du curseur : déplacements adoucis */
.hero__portrait, .work-card--b { transition: translate .25s linear; }

/* Survol : la photo s'approche légèrement */
@media (hover: hover) {
  .match-card:hover .frame img, .work-card:hover .frame img { scale: 1.04; }
  .galerie figure:hover img, .affiches figure:hover img { scale: 1.025; }
}

/* Étiquette « Agrandir » qui suit la souris sur les photos */
.cursor-label {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 400;
  padding: 9px 12px;
  background: var(--ink);
  color: var(--bg);
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  scale: .6;
  transition: opacity .2s ease, scale .3s var(--ease);
  font-stretch: 125%;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.cursor-label.is-on { opacity: 1; scale: 1; }

/* --- Écran de chargement (accueil) ----------------------------------------------- */

.loader { display: none; }
.verre-on .loader {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity .8s var(--ease), visibility 0s linear .8s;
}
.loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader__in { display: grid; justify-items: center; gap: 20px; width: min(340px, 72vw); }
.loader__brand { font-stretch: 125%; font-weight: 800; font-size: 15px; letter-spacing: .01em; color: var(--ink); }
.loader__brand .dot { color: var(--accent); }
.loader__value {
  font-stretch: 62%;
  font-weight: 800;
  font-size: clamp(110px, 17vw, 220px);
  line-height: .8;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.loader__bar { position: relative; width: 100%; height: 2px; overflow: hidden; background: var(--line-mid); }
.loader__bar > span { position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.loader__hint { color: var(--muted); font-stretch: 125%; font-weight: 600; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; }

/* --- Barre de progression sous l'en-tête --------------------------------------- */

.scroll-line { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; overflow: hidden; pointer-events: none; }
.scroll-line > i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }

/* --- Fonds animés (sections fond-orange, fond-rose, fond-bleu, fond-ambre) ----- */

.fond-orange, .fond-rose, .fond-bleu, .fond-ambre { position: relative; isolation: isolate; }
.fond {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.4s var(--ease);
}
.fond.is-on { opacity: 1; }
.fond-orange::after, .fond-rose::after, .fond-bleu::after, .fond-ambre::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  height: 45%;
  background: linear-gradient(to bottom, rgba(13, 13, 12, 0), var(--bg));
  pointer-events: none;
}

/* --- Curseur viseur ------------------------------------------------------------ */

.viseur, .viseur-dot { display: none; }
html.has-viseur .viseur, html.has-viseur .viseur-dot {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2147483000;
  display: block;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
}
html.has-viseur.viseur-visible .viseur, html.has-viseur.viseur-visible .viseur-dot { opacity: 1; }
html.has-viseur, html.has-viseur * { cursor: none !important; }
html.has-viseur :is(input, textarea) { cursor: text !important; }
html.has-viseur select { cursor: default !important; }
html.has-viseur.viseur-text .viseur, html.has-viseur.viseur-text .viseur-dot { opacity: 0; }
.viseur-dot::before {
  content: "";
  position: absolute;
  left: -3px;
  top: -3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(13, 13, 12, .35);
  transition: transform .25s var(--ease), background .25s;
}
html.viseur-link .viseur-dot::before { transform: scale(.6); }
html.viseur-press .viseur-dot::before { transform: scale(1.6); }
html.viseur-dark .viseur-dot::before { background: var(--bg); box-shadow: none; }
.viseur__frame {
  position: absolute;
  left: -18px;
  top: -18px;
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, .55));
  transition: transform .45s cubic-bezier(.25, 1, .5, 1);
}
.viseur__frame i { position: absolute; width: 9px; height: 9px; border: 0 solid rgba(242, 239, 232, .85); transition: border-color .3s; }
.viseur__frame i:nth-child(1) { left: 0; top: 0; border-left-width: 1.5px; border-top-width: 1.5px; }
.viseur__frame i:nth-child(2) { right: 0; top: 0; border-right-width: 1.5px; border-top-width: 1.5px; }
.viseur__frame i:nth-child(3) { left: 0; bottom: 0; border-left-width: 1.5px; border-bottom-width: 1.5px; }
.viseur__frame i:nth-child(4) { right: 0; bottom: 0; border-right-width: 1.5px; border-bottom-width: 1.5px; }
html.viseur-link .viseur__frame { transform: scale(1.4); animation: mbd-focus .5s cubic-bezier(.25, 1, .5, 1); }
html.viseur-link .viseur__frame i { border-color: var(--accent); }
html.viseur-photo .viseur__frame { transform: scale(2.1); }
html.viseur-press .viseur__frame { transform: scale(.85); }
html.viseur-dark .viseur__frame { filter: none; }
html.viseur-dark .viseur__frame i { border-color: var(--bg); }
@keyframes mbd-focus { 0% { transform: scale(1.9); } 60% { transform: scale(1.3); } 100% { transform: scale(1.4); } }
.viseur__hud {
  position: absolute;
  left: 26px;
  top: 12px;
  white-space: nowrap;
  color: rgba(242, 239, 232, .55);
  font-stretch: 125%;
  font-weight: 600;
  font-size: 9px;
  letter-spacing: .2em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 6px rgba(0, 0, 0, .6);
  transition: opacity .3s, transform .45s cubic-bezier(.25, 1, .5, 1);
}
html.viseur-link .viseur__hud { transform: translate(8px, 4px); }
html.viseur-photo .viseur__hud, html.viseur-zoom .viseur__hud { opacity: 0; }
html.viseur-dark .viseur__hud { color: rgba(13, 13, 12, .7); text-shadow: none; }
@media (hover: none), (pointer: coarse) {
  .viseur, .viseur-dot { display: none !important; }
}

/* --- Animations réduites ---------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html.js .titre:not(.is-split) { opacity: 1; animation: none; }
  .wp-block-navigation.nav .wp-block-navigation__responsive-container.is-menu-open,
  .lightbox[open], .stage__hint span { animation: none; }
  html.js .page-head__main > .label, html.js .media__titles > .label, html.js .page-head .titre .line__in,
  html.js .contact__title .line__in, html.js .page-head__aside, html.js .contact__text, html.js .media__title { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
  .frame img, .galerie img, .affiches img { scale: none !important; }
  .viseur, .viseur-dot { display: none !important; }
}
