/* TECKCONTENTGENERATION — portfolio
   Système : neutres chauds, un seul accent, graisses 400/500, rayons 6/10/16, grille de 4 px. */

:root {
  --font: "Sulphur Point", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Chap", "Poiret One", var(--font); /* grands titres : Chap si ses fichiers sont fournis, sinon Poiret One */
  --font-mono: var(--font); /* repères techniques : même police que le texte, chiffres alignés */

  /* neutres chauds (thème sombre) */
  --bg: #161513;
  --surface: #1d1b19;
  --surface-2: #252320;
  --surface-3: #2e2b27;
  --text: #efeae1;
  --text-2: #b5afa3;
  --text-3: #8e887c;
  --line: rgba(239, 234, 225, 0.09);
  --line-2: rgba(239, 234, 225, 0.17);

  /* un seul accent : réservé aux états actifs, au focus et aux progressions */
  --accent: #e8954a;
  --danger: #ea8a76;
  --ok: #86c9a6;
  --plate: rgba(22, 21, 19, 0.8); /* fond des étiquettes posées sur une image */
  --plate-ink: #efeae1;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --header-h: 64px;
  --max: 1200px;
  --pad: clamp(16px, 4vw, 32px);
}

[data-theme="light"] {
  --bg: #f6f3ed;
  --surface: #fcfaf6;
  --surface-2: #efebe3;
  --surface-3: #e6e0d5;
  --text: #1c1915;
  --text-2: #5a5348;
  --text-3: #7c7569;
  --line: rgba(28, 25, 21, 0.1);
  --line-2: rgba(28, 25, 21, 0.2);
  --accent: #b5530c;
  --danger: #b4351f;
  --ok: #1d6b4a;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
}

html[data-theme="light"] {
  color-scheme: light;
}

html.nav-lock {
  overflow: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

[hidden] {
  display: none !important;
}

img,
picture,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
select,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

ul,
ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: 0;
}

/* Petits titres : police du texte en gras. */
h3 {
  font-weight: 700;
  letter-spacing: 0.005em;
}

/* Grands titres : police d'affichage en graisse légère (Chap Light si disponible ; Poiret One n'existe qu'en 400). */
h1,
h2 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.1;
}

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

.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;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -100px;
  z-index: 1000;
  padding: 12px 16px;
  background: var(--text);
  color: var(--bg);
  font-weight: 400;
  border-radius: var(--r);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

/* Cible des liens « retour en haut » : tout en haut du document (l'en-tête, lui, est collant). */
#top {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

main,
.footer {
  position: relative;
  z-index: 1;
}

/* ───────── Fond animé (constellations) ───────── */

.space-fill {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--bg);
}

/* Semis d'étoiles statique : sert de repli (sans JavaScript) et de fond cohérent sur les bords. */
.space-fill::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-size: 300px 300px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cg fill='%23efeae1'%3E%3Ccircle cx='24' cy='40' r='1.1' opacity='.5'/%3E%3Ccircle cx='90' cy='18' r='.7' opacity='.35'/%3E%3Ccircle cx='160' cy='70' r='1.2' opacity='.45'/%3E%3Ccircle cx='240' cy='36' r='.8' opacity='.4'/%3E%3Ccircle cx='280' cy='96' r='1' opacity='.3'/%3E%3Ccircle cx='48' cy='140' r='.9' opacity='.35'/%3E%3Ccircle cx='130' cy='166' r='.6' opacity='.4'/%3E%3Ccircle cx='214' cy='120' r='1.1' opacity='.3'/%3E%3Ccircle cx='272' cy='188' r='.7' opacity='.45'/%3E%3Ccircle cx='20' cy='236' r='1' opacity='.3'/%3E%3Ccircle cx='104' cy='262' r='.8' opacity='.35'/%3E%3Ccircle cx='190' cy='244' r='1.1' opacity='.35'/%3E%3Ccircle cx='262' cy='284' r='.6' opacity='.4'/%3E%3C/g%3E%3C/svg%3E");
}

[data-theme="light"] .space-fill::before {
  opacity: 0.2;
  filter: brightness(0.3);
}

.constellation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100lvh;
  z-index: 0;
  pointer-events: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.nav {
  max-width: var(--max);
  height: var(--header-h);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.nav__logo {
  width: auto;
  height: 24px;
  flex-shrink: 0;
  border-radius: 4px;
}

.logo--light {
  display: none;
}

[data-theme="light"] .logo--dark {
  display: none;
}

[data-theme="light"] .logo--light,
[data-theme="light"] .logo--light[hidden] {
  display: block !important;
}

.nav__name {
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav__panel {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__links a {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--text-2);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav__links a:hover,
.nav__links a:focus-visible,
.nav__links a.is-current,
.nav__links a[aria-current="page"] {
  color: var(--text);
  background: var(--surface-2);
}

.nav__idx {
  display: none;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
}

.lang-switch button {
  padding: 6px 8px;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-3);
  transition: color 0.2s ease;
}

.lang-switch button + button {
  border-left: 1px solid var(--line-2);
}

.lang-switch button:hover {
  color: var(--text);
}

.lang-switch button.is-active {
  color: var(--text);
}

.theme-toggle {
  position: relative;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--r);
  transition: background-color 0.2s ease;
}

.theme-toggle:hover {
  background: var(--surface-2);
}

.theme-toggle__icon {
  position: absolute;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--text);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[data-theme="dark"] .theme-toggle__icon--sun,
[data-theme="light"] .theme-toggle__icon--moon {
  display: none;
}

.nav__toggle {
  display: none;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: var(--r);
  border: 1px solid var(--line-2);
}

.nav__burger,
.nav__burger::before,
.nav__burger::after {
  display: block;
  width: 18px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.3s var(--ease), background-color 0.2s ease;
}

.nav__burger {
  position: relative;
}

.nav__burger::before,
.nav__burger::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav__burger::before {
  top: -6px;
}

.nav__burger::after {
  top: 6px;
}

.nav__toggle[aria-expanded="true"] .nav__burger {
  background: transparent;
}

.nav__toggle[aria-expanded="true"] .nav__burger::before {
  top: 0;
  transform: rotate(45deg);
}

.nav__toggle[aria-expanded="true"] .nav__burger::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ───────── Boutons ───────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--r);
  font-size: 0.9375rem;
  font-weight: 400;
  white-space: nowrap;
  transition: background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, transform 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn[disabled] {
  cursor: progress;
}

.btn--sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.875rem;
}

.btn--solid {
  background: var(--text);
  color: var(--bg);
}

.btn--solid:hover {
  background: color-mix(in srgb, var(--text) 86%, var(--bg));
}

.btn--ghost {
  border: 1px solid var(--line-2);
}

.btn--ghost:hover {
  background: var(--surface-2);
}

.btn__spinner {
  display: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--bg) 30%, transparent);
  border-top-color: var(--bg);
  animation: spin 0.7s linear infinite;
}

.btn.is-loading .btn__spinner {
  display: inline-block;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--r);
  border: 1px solid var(--line-2);
  transition: background-color 0.2s ease;
}

.icon-btn:hover {
  background: var(--surface-2);
}

.icon-btn svg,
.lightbox__close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn--sm {
  width: 36px;
  height: 36px;
}

/* ───────── Hero ───────── */

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px var(--pad) 80px;
  display: grid;
  gap: 48px;
  align-items: center;
}

.hero__eyebrow {
  margin-bottom: 16px;
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--text-3);
}

.hero__title {
  max-width: 17ch;
  margin-bottom: 24px;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.1;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero__lead {
  max-width: 44ch;
  margin-bottom: 32px;
  font-size: clamp(1.0625rem, 1.8vw, 1.25rem);
  color: var(--text-2);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Aperçu animé : un projet mis en avant à la fois */

.hero__showcase {
  --slide-ms: 4200ms;
  width: min(100%, 520px);
  justify-self: center;
  display: grid;
  gap: 16px;
}

.hero__collage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}

.collage__pin {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.collage__pin picture,
.collage__pin img {
  width: 100%;
  height: 100%;
}

.collage__pin img {
  object-fit: cover;
}

.collage__pin--a {
  grid-row: span 2;
  aspect-ratio: 3 / 4.4;
}

.collage__pin--b {
  aspect-ratio: 1 / 0.8;
  margin-top: 32px;
}

.collage__pin--c {
  aspect-ratio: 1 / 1.05;
}

.js .collage__pin {
  cursor: pointer;
  transition: opacity 0.4s ease, transform 0.4s var(--ease);
}

.js .collage__pin:not(.is-active) {
  opacity: 0.42;
  transform: scale(0.97);
}

.js .collage__pin.is-active {
  outline: 1.5px solid var(--accent);
  outline-offset: 3px;
}

.showcase__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 12px 12px 12px 16px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}

.showcase__text {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1 1 176px;
}

.showcase__tag {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-3);
}

.showcase__title {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.3;
}

.showcase__tag,
.showcase__title {
  animation: fade-up 0.35s var(--ease) both;
}

.showcase__controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}

.showcase__dots {
  display: flex;
}

.sdot {
  padding: 16px 4px;
}

.sdot span {
  position: relative;
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  overflow: hidden;
  background: var(--line-2);
}

.sdot.is-active span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(1);
}

/* Barre de progression purement visuelle : le changement de projet est géré par le JavaScript. */
.hero__showcase.is-playing .sdot.is-active span::after {
  transform: scaleX(0);
  animation: sdot-fill var(--slide-ms) linear forwards;
}

.hero__showcase.is-paused .sdot.is-active span::after {
  animation-play-state: paused;
}

/* ───────── Sections ───────── */

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px var(--pad);
}

.section__head {
  max-width: 640px;
  margin-bottom: 48px;
}

.eyebrow {
  margin-bottom: 12px;
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--text-3);
}

.section__title {
  margin-bottom: 16px;
  font-size: clamp(2rem, 4vw, 2.875rem);
  text-wrap: balance;
}

.section__text {
  max-width: 48ch;
  color: var(--text-2);
}

.section__cta {
  display: flex;
  justify-content: flex-start;
  margin-top: 32px;
}

/* ───────── Services ───────── */

.service-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 48px;
}

.service {
  padding: 24px 0 40px;
  border-top: 1px solid var(--line-2);
}

.service .icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--text-2);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service h3 {
  margin: 16px 0 8px;
  font-size: 1.25rem;
}

.service p {
  max-width: 44ch;
  color: var(--text-2);
}

/* ───────── Réalisations : cartes ───────── */

.masonry {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.masonry__col {
  display: grid;
  gap: 16px;
}

.pin {
  display: block;
  width: 100%;
  text-align: left;
}

.pin__media {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.2s ease;
}

.pin:hover .pin__media {
  border-color: var(--line-2);
}

.pin--tall .pin__media {
  aspect-ratio: 4 / 5;
}

.pin--square .pin__media {
  aspect-ratio: 1 / 1;
}

.pin--portrait .pin__media {
  aspect-ratio: 5 / 6;
}

.pin__media picture,
.pin__media img {
  width: 100%;
  height: 100%;
}

.pin__media img {
  object-fit: cover;
}

/* Inclinaison 3D au survol (souris) : la carte est poussée là où passe le pointeur. */
.pin__media {
  --rx: 0deg;
  --ry: 0deg;
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
  backface-visibility: hidden;
}

.pin__media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.14), transparent 55%);
}

.pin.is-tilt .pin__media {
  will-change: transform;
  border-color: var(--line-2);
}

.pin.is-tilt .pin__media::before {
  opacity: 1;
}

.pin.is-tilt .pin__media img {
  transform: translate3d(var(--tx, 0px), var(--ty, 0px), 0) scale(1.05);
}

.pin__zoom {
  display: none;
}

.pin__badge,
.pin__flag {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 3px 8px;
  border-radius: var(--r-sm);
  background: var(--plate);
  color: var(--plate-ink);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.4;
  pointer-events: none;
}

.pin__badge {
  left: 12px;
}

.pin__flag {
  right: 12px;
  color: var(--accent);
}

[data-theme="light"] .pin__flag {
  color: #f0a15c;
}

.pin__play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--plate);
  color: var(--plate-ink);
  pointer-events: none;
  transition: background-color 0.2s ease;
}

.pin__play svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  margin-left: 2px;
}

.pin:hover .pin__play {
  background: rgba(22, 21, 19, 0.95);
}

.pin__meta {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 12px 0 0;
}

.pin__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0 12px;
  min-width: 0;
}

.pin__tag {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-3);
}

.pin__spec {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.pin__title {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.35;
}

/* ───────── Page « Réalisations » ───────── */

.page-head {
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px var(--pad) 16px;
}

.portfolio {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px var(--pad) 96px;
}

.filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.filter {
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--text-2);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.filter:hover {
  color: var(--text);
}

.filter[aria-pressed="true"] {
  background: var(--surface-2);
  color: var(--text);
}

.portfolio__count {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-3);
}

/* Mur de cartes : colonnes CSS en secours, colonnes calculées par le JavaScript sinon. */
.mgrid {
  column-count: 2;
  column-gap: 16px;
}

@media (min-width: 1000px) {
  .mgrid {
    column-count: 3;
    column-gap: 24px;
  }
}

.mgrid > .pin {
  break-inside: avoid;
  margin-bottom: 24px;
}

.mgrid.is-js {
  display: grid;
  column-count: auto;
  grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

@media (min-width: 1000px) {
  .mgrid.is-js {
    gap: 24px;
  }
}

.mgrid .mcol {
  display: grid;
  gap: 24px;
  align-content: start;
  min-width: 0;
}

.mgrid .mcol > .pin,
.mgrid.is-js > .pin {
  margin-bottom: 0;
}

.pin--wall .pin__media picture,
.pin--wall .pin__media img {
  height: auto;
}

.pin--wall.pin--cap .pin__media {
  aspect-ratio: 5 / 8;
}

.pin--wall.pin--cap .pin__media picture,
.pin--wall.pin--cap .pin__media img {
  height: 100%;
}

.pin--featured .pin__media {
  border-color: var(--accent);
}

.portfolio__note {
  max-width: 64ch;
  margin: 48px 0 0;
  font-size: 0.875rem;
  color: var(--text-3);
}

.portfolio__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  margin-top: 32px;
  padding: 32px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface);
}

.portfolio__cta h2 {
  font-size: 1.75rem;
}

.nav__links a[aria-current="page"] {
  color: var(--text);
}

/* ───────── Visionneuse ───────── */

.lightbox {
  width: min(1040px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.lightbox::backdrop {
  background: rgba(10, 9, 8, 0.76);
}

.lightbox[open] {
  animation: fade-up 0.25s var(--ease);
}

.lightbox__inner {
  position: relative;
  display: grid;
  max-height: calc(100dvh - 32px);
}

.lightbox__media {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #0b0a09;
  min-height: 0;
  --thumbs-h: 0px;
}

.lightbox__media.has-thumbs {
  --thumbs-h: 92px;
}

.lightbox__stage {
  display: grid;
  place-items: center;
  flex: 1 1 auto;
  min-height: 0;
}

.lightbox__stage img,
.lightbox__stage video {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: calc(58dvh - var(--thumbs-h));
  object-fit: contain;
  background: #0b0a09;
}

.lightbox__thumbs {
  display: flex;
  gap: 8px;
  height: var(--thumbs-h);
  padding: 8px 12px;
  overflow-x: auto;
  background: #11100e;
  border-top: 1px solid rgba(239, 234, 225, 0.1);
}

.lb-thumb {
  position: relative;
  flex: 0 0 auto;
  height: 100%;
  min-width: 86px;
  aspect-ratio: 3 / 4;
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1.5px solid transparent;
  background: #1d1b19;
  opacity: 0.6;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.lb-thumb.is-wide {
  aspect-ratio: 16 / 10;
  min-width: 0;
}

.lb-thumb:hover,
.lb-thumb[aria-pressed="true"] {
  opacity: 1;
}

.lb-thumb[aria-pressed="true"] {
  border-color: var(--accent);
}

.lb-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lb-thumb span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 4px 4px;
  font-size: 0.6875rem;
  font-weight: 400;
  color: #fff;
  text-align: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.75), transparent);
}

.lightbox__info {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 24px;
}

.lightbox__info h3 {
  font-size: clamp(1.375rem, 3vw, 1.75rem);
}

.lightbox__info .eyebrow {
  margin: 0;
}

.lightbox__info .btn {
  justify-self: start;
  white-space: normal;
  text-align: center;
  padding-top: 8px;
  padding-bottom: 8px;
}

.lightbox__nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.lightbox__count {
  min-width: 48px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.lightbox__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--r);
  background: var(--plate);
  color: var(--plate-ink);
  border: 1px solid rgba(239, 234, 225, 0.18);
  transition: background-color 0.2s ease;
}

.lightbox__close:hover {
  background: rgba(22, 21, 19, 0.95);
}

@media (min-width: 860px) {
  .lightbox__inner {
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  }

  .lightbox__stage img,
  .lightbox__stage video {
    max-height: calc(100dvh - 32px - var(--thumbs-h));
  }

  .lightbox__info {
    align-content: center;
    padding: 32px;
  }
}

/* ───────── Méthode ───────── */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 32px;
}

.step {
  padding: 24px 0 8px;
  border-top: 1px solid var(--line-2);
}

.step__num {
  display: block;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-3);
}

.step h3 {
  margin-bottom: 8px;
  font-size: 1.25rem;
}

.step p {
  max-width: 36ch;
  color: var(--text-2);
}

/* ───────── À la une ───────── */

.featured {
  padding-top: 16px;
}

.featured__card {
  display: grid;
  gap: 32px;
  align-items: center;
  padding: 24px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface);
}

@media (min-width: 900px) {
  .featured__card {
    grid-template-columns: minmax(280px, 380px) 1fr;
    gap: 48px;
    padding: 32px;
  }
}

.featured__media {
  position: relative;
  justify-self: center;
  height: min(76vh, 660px);
  width: auto;
  max-width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 12px;
  background: #000;
  cursor: pointer;
}

@media (max-width: 899px) {
  .featured__media {
    width: min(100%, 360px);
    height: auto;
  }
}

.featured__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured__play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  background: var(--plate);
  color: var(--plate-ink);
  transition: opacity 0.25s ease, background-color 0.2s ease;
}

.featured__play svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.featured__play .ico-pause {
  display: none;
  fill: none;
}

.featured__media.is-playing .featured__play {
  opacity: 0;
}

.featured__media.is-playing .featured__play .ico-play {
  display: none;
}

.featured__media.is-playing .featured__play .ico-pause {
  display: block;
}

.featured__media.is-playing:hover .featured__play,
.featured__media.is-playing .featured__play:focus-visible {
  opacity: 1;
}

.featured__sound {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 3;
  background: var(--plate);
  color: var(--plate-ink);
  border-color: rgba(239, 234, 225, 0.18);
}

.featured__sound:hover {
  background: rgba(22, 21, 19, 0.95);
}

.featured__sound .ico-sound-on,
.featured__sound[aria-pressed="true"] .ico-sound-off {
  display: none;
}

.featured__sound[aria-pressed="true"] .ico-sound-on {
  display: block;
}

.featured__text h2 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 4vw, 2.875rem);
  text-wrap: balance;
}

.featured__lead {
  max-width: 44ch;
  margin-bottom: 16px;
  font-size: clamp(1.0625rem, 1.8vw, 1.1875rem);
  color: var(--text-2);
}

.featured__meta {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-3);
}

.featured__note {
  max-width: 52ch;
  margin-bottom: 24px;
  font-size: 0.875rem;
  color: var(--text-3);
}

.featured__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ───────── Contact ───────── */

.contact {
  padding-top: 32px;
}

.contact__panel {
  display: grid;
  gap: 32px;
  padding: 24px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface);
}

@media (min-width: 900px) {
  .contact__panel {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: start;
    gap: 64px;
    padding: 48px;
  }
}

.contact__intro h2 {
  max-width: 16ch;
  margin: 0 0 16px;
  font-size: clamp(2rem, 4vw, 2.875rem);
  text-wrap: balance;
}

.contact__text {
  max-width: 40ch;
  margin-bottom: 24px;
  color: var(--text-2);
}

.contact__mail {
  display: grid;
  gap: 4px;
  font-size: 0.9375rem;
  color: var(--text-3);
}

.contact__mail a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--line-2);
  text-underline-offset: 4px;
  word-break: break-word;
  transition: text-decoration-color 0.2s ease;
}

.contact__mail a:hover {
  text-decoration-color: var(--accent);
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
  align-content: start;
}

.field--full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-2);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: var(--r);
  border: 1px solid var(--line-2);
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-3);
}

.field input:hover,
.field textarea:hover,
.field select:hover {
  border-color: var(--text-3);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
}

.field textarea {
  resize: vertical;
  min-height: 144px;
}

.select {
  position: relative;
}

.select::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--text-3);
  border-bottom: 1.5px solid var(--text-3);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.select select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  cursor: pointer;
}

.select option {
  background: var(--surface);
  color: var(--text);
}

.field[data-invalid] input,
.field[data-invalid] textarea {
  border-color: var(--danger);
}

.field__error {
  display: none;
  font-size: 0.8125rem;
  color: var(--danger);
}

.field[data-invalid] .field__error {
  display: block;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.contact-form__footer {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}

.form-status {
  flex: 1 1 224px;
  min-height: 1.5em;
  font-size: 0.9375rem;
  color: var(--text-2);
}

.form-status a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.form-status[data-state="success"] {
  color: var(--ok);
}

.form-status[data-state="error"] {
  color: var(--danger);
}

/* ───────── Pied de page ───────── */

.footer {
  border-top: 1px solid var(--line);
  padding: 32px var(--pad) calc(32px + env(safe-area-inset-bottom, 0px));
}

.footer__inner {
  max-width: calc(var(--max) - var(--pad) * 2);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}

.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.03em;
}

.footer__brand .nav__logo {
  height: 22px;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer__links a {
  font-size: 0.9375rem;
  color: var(--text-2);
  transition: color 0.2s ease;
}

.footer__links a:hover {
  color: var(--text);
}

.footer__build,
.footer__copy {
  flex-basis: 100%;
  font-size: 0.8125rem;
  color: var(--text-3);
}

.footer__build {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.footer__copy {
  margin-top: -8px;
}

/* ───────── Bandeau de mise à jour ───────── */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: calc(100vw - 32px);
  padding: 8px 8px 8px 16px;
  border-radius: var(--r);
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line-2);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  font-size: 0.9375rem;
  transform: translateX(-50%);
  animation: fade-up 0.3s var(--ease) both;
}

/* ───────── Page 404 ───────── */

.page-404 {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: start;
  gap: 16px;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

.nav__logo--lg {
  height: 40px;
}

/* ───────── Apparition au défilement ───────── */

.js .reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
  transition-delay: calc(min(var(--i, 0), 5) * 50ms);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ───────── Animations ───────── */

@keyframes sdot-fill {
  to {
    transform: scaleX(1);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ───────── Responsive ───────── */

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 64px;
    padding: 96px var(--pad) 96px;
  }

  .hero__showcase {
    justify-self: end;
  }

  .section {
    padding: 96px var(--pad);
  }

  .masonry,
  .masonry__col {
    gap: 24px;
  }
}

@media (max-width: 899px) {
  .steps {
    grid-template-columns: 1fr;
  }

  .step {
    display: grid;
    grid-template-columns: 40px 1fr;
    column-gap: 0;
    padding-bottom: 24px;
  }

  .step__num {
    grid-row: span 2;
    margin: 4px 0 0;
  }
}

@media (max-width: 700px) {
  .service-list {
    grid-template-columns: 1fr;
  }

  .pin__meta {
    padding-top: 8px;
  }

  .pin__title {
    font-size: 0.9375rem;
  }

  .pin__play {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 640px) {
  .contact-form {
    grid-template-columns: 1fr;
  }
}

/* ───────── Menu mobile ───────── */

@media (max-width: 860px) {
  .nav__toggle {
    display: grid;
    position: relative;
    z-index: 3;
  }

  .nav__brand {
    position: relative;
    z-index: 3;
  }

  /* Panneau plein écran, totalement opaque : rien ne transparaît derrière le texte. */
  .nav__panel {
    position: fixed;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 32px;
    padding: calc(env(safe-area-inset-top, 0px) + 88px) var(--pad) calc(env(safe-area-inset-bottom, 0px) + 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--bg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.35s var(--ease), visibility 0s linear 0.35s;
  }

  .nav__panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.25s ease, transform 0.35s var(--ease), visibility 0s;
  }

  .nav__links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav__links a {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 16px 0;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
    background: none;
    font-size: clamp(1.5rem, 7vw, 1.875rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    color: var(--text);
  }

  .nav__links a:hover,
  .nav__links a:focus-visible,
  .nav__links a.is-current,
  .nav__links a[aria-current="page"] {
    background: none;
    color: var(--accent);
  }

  .nav__idx {
    display: inline;
    min-width: 28px;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    letter-spacing: 0;
    color: var(--text-3);
  }

  .nav__actions {
    flex-wrap: wrap;
    justify-content: space-between;
    margin-top: auto;
  }

  .nav__actions .btn {
    flex: 1 1 100%;
    min-height: 48px;
    order: 3;
  }
}

@media (max-width: 480px) {
  .nav__name {
    font-size: 0.8125rem;
    letter-spacing: 0.02em;
  }

  .nav__brand {
    gap: 8px;
  }
}

/* ───────── Mouvement réduit ───────── */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
