/* ==========================================================================
   C&C — styles
   Noir & blanc, épuré. Les couleurs se changent dans les variables ci-dessous.
   ========================================================================== */

:root {
  --gut: clamp(16px, 3.2vw, 44px);
  --gap: clamp(12px, 1.6vw, 24px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --p: 0; /* progression du scroll dans l'accueil (0 → 1), mise à jour par app.js */
}
:root, :root[data-theme="dark"] {
  --bg: #000; --fade: rgba(0, 0, 0, .92); --fg: #f4f4f4; --mute: #8b8b8b; --line: rgba(255, 255, 255, .16); --ph: #111;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f6f6f4; --fade: rgba(246, 246, 244, .92); --fg: #0a0a0a; --mute: #6e6e6e; --line: rgba(0, 0, 0, .16); --ph: #e6e6e3;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.lock { overflow: hidden; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 16px/1.45 var(--font); -webkit-font-smoothing: antialiased;
}
img, video, canvas { 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, p { margin: 0; }
:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }   /* lisible par Google et les lecteurs d'écran, invisible à l'écran */

/* En-tête ---------------------------------------------------------------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--gut) 34px;
  background: linear-gradient(var(--fade) 20%, transparent); /* garde le menu lisible par-dessus les photos */
  transition: transform .5s var(--ease);
}
.site-header.hide { transform: translateY(-110%); }
.logo { font-weight: 600; font-size: 20px; letter-spacing: -.03em; }
.site-header nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 32px); }
.lang { color: var(--mute); transition: color .25s; padding: 2px 0; }
.lang:hover { color: var(--fg); }
@media (max-width: 420px) {
  .site-header nav { gap: 12px; }
  .site-header nav a, .lang { font-size: 12px; letter-spacing: .04em; }
}
.site-header nav a, .lang, .hero-scroll, .filters button, .v-btn, .footer-links a {
  font-size: 13px; letter-spacing: .06em; text-transform: uppercase; font-weight: 500;
}
.site-header nav a { position: relative; }
.site-header nav a::after, .footer-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
.site-header nav a:hover::after, .footer-links a:hover::after { transform: scaleX(1); }

/* Accueil ---------------------------------------------------------------- */
.hero { display: block; }
.hero-inner { padding: 96px var(--gut) 0; }
.hero-people { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); margin-bottom: 12px; }
.hero-title {
  font-weight: 600; line-height: .78; letter-spacing: -.045em;
  font-size: clamp(4.5rem, 13vw, 12rem); margin-left: -.04em;
}
.hero-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: clamp(14px, 2vw, 26px); padding-top: 12px; border-top: 1px solid var(--line); }
.hero-tag { font-size: clamp(15px, 1.6vw, 20px); font-weight: 500; }
.hero-note { margin-top: 6px; font-size: 14px; line-height: 1.4; color: var(--fg); opacity: .78; max-width: 90ch; }
.hero-scroll { white-space: nowrap; flex-shrink: 0; }
.hero-scroll .arr { display: inline-block; animation: bob 2.2s var(--ease) infinite; }
@keyframes bob { 50% { transform: translateY(4px); } }

/* Apparition à l'arrivée */
.hero-title, .hero-people, .hero-foot { animation: rise 1.1s var(--ease) both; }
.hero-people { animation-delay: .05s; } .hero-title { animation-delay: .15s; } .hero-foot { animation-delay: .35s; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } }

/* Sections --------------------------------------------------------------- */
.section { padding: clamp(56px, 9vw, 130px) var(--gut) 0; }
#projets { padding-top: clamp(20px, 2.6vw, 34px); } /* les images commencent dès le premier écran */
.section-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 12px; margin-bottom: clamp(14px, 2vw, 24px); }
.section h2, .footer h2 { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; font-weight: 500; }
.section h2 sup { color: var(--mute); font-size: 11px; margin-left: 4px; }
.filters { display: flex; gap: 18px; }
.filters button { color: var(--mute); transition: color .25s; padding: 4px 0; }
.filters button:hover, .filters button.on { color: var(--fg); }
.filters button.on { text-decoration: underline; text-underline-offset: 5px; }

/* Grille de projets (colonnes, hauteur naturelle des médias) ------------- */
.grid { display: flex; gap: var(--gap); align-items: flex-start; }
.col { flex: 1; min-width: 0; }
.status { color: var(--mute); font-size: 14px; }

.card { margin: 0 0 clamp(20px, 2.6vw, 40px); }
.card-link { display: block; }
.card-media {
  position: relative; overflow: hidden; background: var(--ph);
  aspect-ratio: var(--ar, 4 / 5);
}
.card-media > img, .card-media > video {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.1s var(--ease), filter .6s;
}
.card-link:hover .card-media > img, .card-link:hover .card-media > video { transform: scale(1.035); }
.card-play {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
}
.card-play::before {
  content: ""; width: 54px; height: 54px; border-radius: 50%;
  background: rgba(0, 0, 0, .35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .5);
}
.card-play::after {
  content: ""; position: absolute; border-style: solid; border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent #fff; margin-left: 3px;
}
.card-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 12px; }
.card-meta h3 { font-size: 14px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.card-meta span { font-size: 12px; color: var(--mute); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }

/* Apparition au scroll */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* À propos --------------------------------------------------------------- */
.about { padding-bottom: clamp(56px, 9vw, 130px); }
.about-body { display: grid; grid-template-columns: 1fr; margin-top: clamp(20px, 3vw, 40px); }
.about-text { font-size: clamp(22px, 3.3vw, 46px); line-height: 1.12; letter-spacing: -.02em; font-weight: 500; max-width: 26ch; }
.about-text p + p { margin-top: 1em; color: var(--mute); font-size: .6em; line-height: 1.35; letter-spacing: -.005em; max-width: 46ch; }
.about-text p:nth-child(2) { color: var(--fg); opacity: .85; }   /* le paragraphe qui explique « en vrai, sans IA » reste bien lisible */
@media (min-width: 900px) { .about-text { max-width: 30ch; margin-left: 33%; } }

/* Pied de page ----------------------------------------------------------- */
.footer { padding: clamp(40px, 6vw, 80px) var(--gut) 28px; border-top: 1px solid var(--line); }
.footer-mail { margin: clamp(18px, 3vw, 36px) 0; }
.footer-mail a { display: block; font-size: clamp(22px, 5.6vw, 88px); font-weight: 600; letter-spacing: -.05em; line-height: 1.1; word-break: break-word; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.footer-links a { position: relative; }
.footer-legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; margin-top: clamp(40px, 7vw, 100px); font-size: 12px; color: var(--mute); letter-spacing: .04em; }
.footer-legal a { text-decoration: underline; text-underline-offset: 3px; }

/* Fiche projet ----------------------------------------------------------- */
.viewer {
  position: fixed; inset: 0; z-index: 60; background: var(--bg);
  opacity: 0; visibility: hidden; transform: translateY(16px);
  transition: opacity .45s var(--ease), transform .45s var(--ease), visibility 0s .45s;
}
.viewer.open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.viewer-bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 16px var(--gut) 30px; background: linear-gradient(var(--fade) 20%, transparent); pointer-events: none;
}
.viewer-bar > * { pointer-events: auto; }
.viewer-bar > .v-btn { justify-self: start; }
.v-pos { font-size: 12px; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.v-nav { justify-self: end; display: flex; gap: 22px; }
.v-btn { padding: 6px 0; }
.viewer-scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scroll-behavior: auto; }
.viewer-layout { padding: 84px var(--gut) 0; display: grid; gap: clamp(24px, 4vw, 48px); }
@media (min-width: 1000px) {
  .viewer-layout { grid-template-columns: minmax(260px, 30%) 1fr; align-items: start; }
  .v-head { position: sticky; top: 84px; }
}
.v-head h2 { font-size: clamp(28px, 4.2vw, 64px); line-height: .98; letter-spacing: -.045em; font-weight: 600; text-transform: uppercase; word-break: break-word; }
.v-meta { margin-top: 14px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.v-meta:empty { display: none; }
.v-desc { margin-top: 22px; max-width: 46ch; color: var(--fg); opacity: .82; font-size: 15px; }
.v-desc p + p { margin-top: .8em; }
.v-desc:empty { display: none; }
.v-media { display: grid; gap: var(--gap); }
.v-media img, .v-media video { width: 100%; height: auto; max-height: 92vh; max-height: 92svh; object-fit: contain; background: var(--ph); margin: 0 auto; }
.v-media .embed { position: relative; aspect-ratio: 16 / 9; background: #000; }
.v-media .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.v-media .missing { padding: 40px; text-align: center; color: var(--mute); font-size: 13px; border: 1px solid var(--line); }
.v-next { display: block; margin-top: clamp(64px, 10vw, 140px); padding: clamp(28px, 5vw, 60px) var(--gut) clamp(40px, 6vw, 80px); border-top: 1px solid var(--line); }
.v-next span { display: block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); margin-bottom: 10px; }
.v-next strong { display: block; font-size: clamp(28px, 6vw, 88px); font-weight: 600; letter-spacing: -.05em; line-height: 1; text-transform: uppercase; transition: transform .6s var(--ease); }
.v-next:hover strong { transform: translateX(10px); }

/* Mouvement réduit ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-title, .hero-people, .hero-foot, .hero-scroll span { animation: none; }
  .card-media > img, .card-media > video { transition: none; }
}
