/* =============================================================
   Kaola Abidi — Portfolio
   Fonds blanc / noir uniquement, détails en lila pâle.
============================================================= */

:root,
:root[data-theme="light"] {
  --bg: #ffffff;
  --ink: #18161c;
  --muted: #a19cab;
  --line: rgba(24, 22, 28, 0.09);
  --accent: #b9a7ec;        /* lila pâle */
  --accent-ink: #9c87dc;    /* lila un peu plus présent, pour les petits textes */
  --accent-soft: #f5f1fe;
  --shadow: rgba(140, 115, 210, 0.14);
}
:root[data-theme="dark"] {
  --bg: #08070a;
  --ink: #f2eff6;
  --muted: #77727f;
  --line: rgba(242, 239, 246, 0.1);
  --accent: #dcd0fb;
  --accent-ink: #d2c4f8;
  --accent-soft: #17131f;
  --shadow: rgba(0, 0, 0, 0.6);
}

:root {
  --mono: "Inter Tight", "Helvetica Neue", Arial, sans-serif; /* texte courant : Inter */
  --sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --title: "Chloe", "Instrument Serif", Georgia, serif;
  --serif: "Instrument Serif", Georgia, serif;
  --gutter: clamp(16px, 2vw, 28px);
  --ease: cubic-bezier(0.7, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --soft: cubic-bezier(0.25, 0.8, 0.25, 1);
  color-scheme: light dark;
}

@font-face { font-family: "Chloe"; src: url("../fonts/chloe-regular.otf") format("opentype"); font-weight: 400; font-style: normal; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.6s var(--ease), color 0.6s var(--ease);
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-transform: inherit; letter-spacing: inherit; }
::selection { background: var(--accent); color: #18161c; }

.accent { color: var(--accent-ink); }
.serif { font-family: var(--sans); text-transform: none; letter-spacing: 0; }
.muted { color: var(--muted); }

.ulink { position: relative; display: inline-block; }
.ulink::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform 0.6s var(--ease);
}
.ulink:hover::after, .ulink:focus-visible::after { transform: scaleX(1); transform-origin: left; }

main { position: relative; z-index: 1; }

/* ---------- Animations d'entrée ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); filter: blur(12px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes fade {
  from { opacity: 0; filter: blur(10px); }
  to   { opacity: 1; filter: blur(0); }
}
@keyframes chIn {
  from { opacity: 0; transform: translateY(0.35em); filter: blur(10px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
.rv, .fd { opacity: 0; }
html.loaded .rv { animation: rise 1.5s var(--ease-out) var(--d, 0s) both; }
html.loaded .fd { animation: fade 1.6s var(--soft) var(--d, 0s) both; }
.split .w { display: inline-block; white-space: nowrap; }
.split .ch { display: inline-block; opacity: 0; }
html.loaded .split .ch { animation: chIn 1.3s var(--ease-out) calc(var(--d, 0s) + var(--i) * 40ms) both; }

/* Apparition au scroll */
.reveal { opacity: 0; transform: translateY(30px); filter: blur(10px); transition: opacity 1.4s var(--ease-out), transform 1.6s var(--ease-out), filter 1.4s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; filter: none; }

/* ---------- Loading screen (repris de l'ancien portfolio) ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transform: translateY(0);
  transition: transform 0.7s cubic-bezier(0.76, 0, 0.24, 1);
}
.loader.done { transform: translateY(-100%); pointer-events: none; }
.loader.below { transform: translateY(100%); transition: none; }
.ld-inner {
  display: flex; flex-direction: column; align-items: center; gap: 24px;
  transform: translateY(60px); opacity: 0;
  animation: loaderIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}
@keyframes loaderIn { to { opacity: 1; transform: translateY(0); } }
.ld-logo { font-family: "Inter Tight", sans-serif; font-size: 13px; font-weight: 400; letter-spacing: 0.2em; color: var(--ink); text-transform: uppercase; }
.ld-track { width: 120px; height: 1px; background: var(--line); position: relative; overflow: hidden; }
.ld-fill { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: transform 0.3s ease; }

/* ---------- Header & footer (mise en page façon cathydolle.com) ----------
   Grille de 12 colonnes collée aux bords, texte minuscule en capitales.
   Header : nom à gauche, About en colonne 9, Graphic design aligné à droite.
   Footer : Contact seul en bas à droite (+ infos de page en colonne 9). */
:root { --edge: 8px; }
.site-header, .site-footer {
  position: fixed; left: 0; right: 0; z-index: 50;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 6px; align-items: start;
  padding: var(--edge);
  font-family: var(--sans); font-weight: 500; font-size: 12px; line-height: 1.2; letter-spacing: 0.01em; text-transform: uppercase;
  color: #fff; mix-blend-mode: difference;
  pointer-events: none;
}
.site-header { top: 0; }
.site-footer { bottom: 0; align-items: end; z-index: 45; }
.site-header > *, .site-footer > * { pointer-events: auto; }
.site-header .brand { grid-column: 1 / 5; justify-self: start; }
.hd-nav { grid-column: 9 / 13; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 6px; }
.hd-nav > :first-child { grid-column: 1; justify-self: start; }
.hd-nav > :last-child { grid-column: 3 / 5; justify-self: end; }
.site-footer .ft-left { grid-column: 1 / 6; justify-self: start; }
.site-footer .ft-mid { grid-column: 9 / 12; justify-self: start; }
.site-footer .ft-contact { grid-column: 12; justify-self: end; }
.site-footer .ft-dim, .site-header .ft-dim { opacity: .5; }

/* ---------- Boutons ronds : thème + langue, centrés côte à côte ---------- */
.theme-toggle, .lang-toggle {
  position: fixed; left: 50%; bottom: var(--gutter); z-index: 60;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--bg);
  display: grid; place-items: center;
  box-shadow: 0 6px 30px var(--shadow);
  transition: transform 0.6s var(--ease-out), background 0.6s var(--ease), border-color .6s, color .6s;
}
.theme-toggle { margin-left: -42px; }
.lang-toggle { margin-left: 4px; font-size: 9.5px; letter-spacing: 0.06em; padding-left: 0.06em; }
.theme-toggle:hover, .lang-toggle:hover { transform: scale(1.12); border-color: var(--accent); }
.lang-toggle:hover { color: var(--accent-ink); }
.theme-toggle:active, .lang-toggle:active { transform: scale(0.94); }
.lang-toggle:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }
.theme-toggle span {
  width: 16px; height: 16px; border-radius: 50%;
  background: linear-gradient(90deg, var(--accent) 50%, transparent 50%);
  border: 1px solid var(--accent);
  transition: transform 0.9s var(--ease);
}
:root[data-theme="dark"] .theme-toggle span { transform: rotate(180deg); }
.theme-toggle:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }
html.theme-tr::view-transition-old(root),
html.theme-tr::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- Panneau contact ---------- */
.contact-panel {
  position: fixed; inset: 0; z-index: 80;
  background: var(--bg);
  display: grid; grid-template-rows: auto 1fr auto; padding: var(--gutter);
  clip-path: inset(0 0 100% 0); visibility: hidden;
  transition: clip-path 1s var(--ease), visibility 0s 1s;
}
.contact-panel.open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path 1s var(--ease); }
.contact-panel .cp-top, .contact-panel .cp-bottom { display: flex; justify-content: space-between; }
.contact-panel .cp-bottom { color: var(--muted); }
.contact-panel .cp-body { align-self: center; display: grid; gap: 34px; justify-items: start; max-width: 900px; width: 100%; margin: 0 auto; position: relative; }
.contact-panel .cp-body > * { opacity: 0; transform: translateY(20px); filter: blur(10px); transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out), filter 1s; }
.contact-panel.open .cp-body > * { opacity: 1; transform: none; filter: none; }
.contact-panel.open .cp-body > :nth-child(2) { transition-delay: .5s; }
.contact-panel.open .cp-body > :nth-child(1) { transition-delay: .35s; }
.contact-panel h2 {
  font-family: var(--serif); font-style: italic; font-weight: 400; text-transform: none;
  font-size: clamp(48px, 7vw, 116px); line-height: 0.9; letter-spacing: -0.02em; color: var(--accent);
}
.contact-panel h2 span { font-family: var(--title); font-style: normal; font-weight: 400; letter-spacing: 0; color: var(--ink); text-transform: uppercase; }
.cp-list { display: grid; grid-template-columns: max-content 1fr; gap: 10px 32px; font-size: 11.5px; }
.cp-list dt { color: var(--muted); }
.cp-copy .copied { color: var(--accent-ink); margin-left: 8px; opacity: 0; transition: opacity .3s; }
.cp-copy.done .copied { opacity: 1; }

/* =============================================================
   ACCUEIL
============================================================= */
.home { height: 100svh; min-height: 560px; overflow: hidden; }
.home-stage {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
  display: grid; justify-items: center;
}
.strip { display: flex; align-items: center; gap: 1.1vw; height: 34vw; max-height: 470px; }
.card {
  position: relative; flex: none;
  width: 7.6vw; max-width: 106px; height: 10.2vw; max-height: 142px;
  transition: width 1.1s var(--ease), height 1.1s var(--ease), max-width 1.1s var(--ease), max-height 1.1s var(--ease);
}
.card.active { width: 19vw; max-width: 265px; height: 26vw; max-height: 360px; }
.card .ph { position: absolute; inset: 0; overflow: hidden; background: var(--accent-soft); transition: box-shadow 1.2s var(--soft); }
.card.active .ph { box-shadow: 0 40px 90px -20px var(--shadow); }
.card img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) brightness(1.04) opacity(0.75);
  transform: scale(1.15);
  transition: filter 1.1s var(--soft), transform 1.6s var(--ease-out);
}
.card:hover img { filter: grayscale(0.4) opacity(0.95); }
.card.active img { filter: none; transform: scale(1); }
.card .num { position: absolute; left: 0; top: calc(100% + 10px); white-space: nowrap; color: var(--muted); transition: color 0.5s; }
.card.active .num { color: var(--accent-ink); }
.card .num i { font-style: normal; opacity: 0; transition: opacity .4s; }
.card.active .num i { opacity: 1; transition-delay: .4s; }

.card-info {
  position: absolute; left: 0; bottom: calc(100% + 24px);
  width: 260px; pointer-events: none;
}
.card-info > * { opacity: 0; transform: translateY(8px); filter: blur(6px); transition: opacity .35s, transform .6s var(--ease-out), filter .4s; }
.card.active .card-info > * { opacity: 1; transform: none; filter: none; }
.card.active .card-info > :nth-child(1) { transition-delay: .4s; }
.card.active .card-info > :nth-child(2) { transition-delay: .5s; }
.card.active .card-info > :nth-child(3) { transition-delay: .6s; }
.card-info .ci-type { color: var(--muted); }

.home-statement {
  position: absolute; left: var(--gutter); bottom: calc(var(--gutter) + 40px); z-index: 2;
  max-width: 440px;
  font-family: var(--sans); font-weight: 300; text-transform: none; letter-spacing: -0.01em;
  font-size: clamp(20px, 2.1vw, 30px); line-height: 1.12;
}
.home-statement em { color: var(--accent-ink); }
.home-list {
  position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%); z-index: 2;
  display: grid; gap: 5px; text-align: right;
}
.home-list a { color: var(--muted); transition: color .4s, letter-spacing .6s var(--ease-out); }
.home-list a:hover { color: var(--ink); }
.home-list a.active { color: var(--ink); letter-spacing: 0.12em; }
.home-list a.active::before { content: "● "; color: var(--accent); font-size: 7px; vertical-align: 2px; }
.home-intro-m { display: none; }


/* =============================================================
   PAGE PROJET
============================================================= */
.project { display: grid; grid-template-columns: minmax(300px, 34%) 1fr; gap: var(--gutter); padding: 0 var(--gutter); }
.p-side {
  position: sticky; top: 0; height: 100svh;
  display: flex; flex-direction: column; justify-content: center; gap: 24px; padding: 80px 0;
}
.p-index { color: var(--accent-ink); }
.p-title {
  font-family: var(--title); font-weight: 400; text-transform: uppercase;
  font-size: clamp(40px, 5vw, 92px); line-height: 0.9; letter-spacing: 0; margin-left: -0.02em;
}
.p-desc { max-width: 380px; text-transform: none; font-family: var(--sans); font-weight: 400; font-size: 13.5px; line-height: 1.5; letter-spacing: 0; color: color-mix(in srgb, var(--ink) 80%, transparent); }
.p-meta { display: grid; grid-template-columns: 70px 1fr; gap: 5px 12px; border-top: 1px solid var(--line); padding-top: 16px; max-width: 380px; }
.p-meta dt { color: var(--muted); }
.p-visit { color: var(--accent-ink); align-self: flex-start; }

.p-media { padding: 110px 0 60px; display: grid; gap: calc(var(--gutter) * 1.4); }
.p-media figure { overflow: hidden; background: var(--accent-soft); }
.p-media figure img { width: 100%; height: auto; transition: transform 1.8s var(--ease-out); }
.p-media figure video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.p-media figure.reveal img { transform: scale(1.08); }
.p-media figure.reveal.in img { transform: none; }
.p-hero img { aspect-ratio: 16 / 10; object-fit: cover; }
.p-label { display: flex; justify-content: space-between; padding-top: 50px; border-top: 1px solid var(--line); margin-top: 30px; }
.p-label span:first-child { color: var(--accent-ink); }
.p-mobiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: calc(var(--gutter) * 0.75); align-items: start; }

.p-nav { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); padding: 80px 0 120px; border-top: 1px solid var(--line); margin: 0 var(--gutter); }
.p-nav a { display: grid; gap: 10px; }
.p-nav a:last-child { text-align: right; }
.p-nav .big {
  font-family: var(--title); font-weight: 400; font-size: clamp(32px, 5vw, 76px);
  letter-spacing: 0; line-height: 0.9; transition: color .5s, letter-spacing .8s var(--ease-out);
}
.p-nav a:hover .big { color: var(--accent-ink); letter-spacing: 0.04em; }

/* =============================================================
   ABOUT
============================================================= */
.ab {
  min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; gap: 40px;
  padding: 100px var(--gutter) 90px;
}
.ab-top { min-width: 0; }
.ab-kicker { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 14px; }
.ab-name {
  font-family: var(--title); font-weight: 400; text-transform: uppercase;
  font-size: 14.5vw; line-height: 0.82; letter-spacing: 0; margin-left: -0.03em;
}
.ab-statement {
  align-self: center; justify-self: end; width: min(100%, 720px);
  font-family: var(--sans); font-weight: 300; text-transform: none; letter-spacing: -0.01em;
  font-size: clamp(20px, 2.2vw, 32px); line-height: 1.22;
}
.ab-statement .serif { font-size: 1.1em; }
.ab-grid {
  position: relative; display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: var(--gutter);
  padding-top: 18px;
}
.ab-grid::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line);
  transform: scaleX(0); transform-origin: left; transition: transform 1.6s var(--ease) 1s;
}
html.loaded .ab-grid::before { transform: scaleX(1); }
.ab-label { color: var(--accent-ink); margin-bottom: 12px; }
.ab-col p { font-family: var(--sans); text-transform: none; letter-spacing: 0; font-size: 13px; line-height: 1.5; max-width: 340px; }
.ab-col ul { list-style: none; display: grid; gap: 3px; }
.ab-col .interests button { padding: 0; transition: color .3s, letter-spacing .5s var(--ease-out); }
.ab-col .interests button:hover { color: var(--accent-ink); letter-spacing: 0.12em; }
.ab-cv {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 16px;
  padding: 9px 16px; border: 1px solid var(--accent); border-radius: 999px;
  transition: background .4s, color .4s;
}
.ab-cv span { display: inline-block; transition: transform .5s var(--ease-out); }
.ab-cv:hover { background: var(--accent); color: #18161c; }
.ab-cv:hover span { transform: translate(2px, -2px); }
.gif-peek {
  position: fixed; left: 0; top: 0; z-index: 30; width: 170px; pointer-events: none;
  opacity: 0; filter: blur(8px); transform: translate3d(-999px, 0, 0);
  transition: opacity .4s, filter .5s, scale .6s var(--ease-out); scale: .9;
}
.gif-peek.on { opacity: 1; filter: none; scale: 1; }

/* =============================================================
   PLAYGROUND
============================================================= */
.pg-body { overflow: hidden; height: 100svh; overscroll-behavior: none; }
.pg-stage {
  position: fixed; inset: 0; z-index: 1; overflow: hidden;
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab;
}
.pg-stage.grabbing { cursor: grabbing; }
.pg-item {
  position: absolute; left: 0; top: 0;
  will-change: transform; transform-origin: 50% 50%;
  contain: layout style;
}
.pg-item .pg-in { opacity: 0; filter: blur(14px); transition: opacity 1.2s var(--soft), filter 1.4s var(--soft); }
html.loaded .pg-item.ready .pg-in { opacity: 1; filter: none; transition-delay: var(--d, 0s); }
.pg-item img { width: 100%; height: auto; pointer-events: none; -webkit-user-drag: none; transition: filter .6s var(--soft); }
.pg-item figcaption {
  position: absolute; left: 0; right: 0; top: calc(100% + 7px);
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 9px; color: var(--muted); white-space: nowrap;
}
.pg-item figcaption b { font-weight: 400; color: var(--ink); opacity: 0; transform: translateY(4px); transition: opacity .4s, transform .5s var(--ease-out); overflow: hidden; text-overflow: ellipsis; }
.pg-item:hover figcaption b { opacity: 1; transform: none; }
.pg-item:hover figcaption span { color: var(--accent-ink); }
.pg-item.is-web figcaption span::after { content: " ●"; color: var(--accent); font-size: 6px; vertical-align: 2px; }

.pg-hint { opacity: .6; }
.pg-hint b { font-weight: 500; }

/* Curseur du playground : un point + l'étiquette "(Drag)" / "(Open)" */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 70; pointer-events: none;
  margin: -8px 0 0 -3px; height: 16px; padding-left: 17px;
  background: radial-gradient(circle at 3px 50%, #fff 2.6px, transparent 3.2px) no-repeat;
  color: #fff; mix-blend-mode: difference; white-space: nowrap;
  font-family: var(--sans); font-size: 12px; font-weight: 500; line-height: 16px; letter-spacing: .01em; text-transform: uppercase;
  transform: translate3d(-200px, -200px, 0);
  transition: color .3s, opacity .4s;
}
.cursor::before { content: "("; } .cursor::after { content: ")"; }
.cursor.small { color: transparent; }
.cursor.hide { opacity: 0; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* Fiche design (lightbox) */
.lightbox {
  position: fixed; inset: 0; z-index: 90;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(22px) saturate(1.1); -webkit-backdrop-filter: blur(22px) saturate(1.1);
  display: grid; grid-template-columns: 70px 1fr 70px; grid-template-rows: auto 1fr auto;
  padding: var(--gutter);
  opacity: 0; visibility: hidden; transition: opacity .7s var(--soft), visibility 0s .7s;
}
.lightbox.open { opacity: 1; visibility: visible; transition: opacity .7s var(--soft); }
.lb-top { grid-column: 1 / -1; display: flex; justify-content: space-between; }
.lb-count { font-variant-numeric: tabular-nums; }
.lb-count b { font-weight: 400; color: var(--accent-ink); }
.lb-stage { grid-column: 2; display: grid; place-items: center; min-height: 0; padding: 24px 0; }
.lb-stage img {
  max-width: min(100%, 1000px); max-height: calc(100svh - 260px); width: auto; height: auto; object-fit: contain;
  box-shadow: 0 40px 100px -30px var(--shadow);
  transition: opacity .45s var(--soft), transform .7s var(--ease-out), filter .5s var(--soft);
}
.lb-stage img.out-l { opacity: 0; transform: translateX(-40px) scale(.98); filter: blur(10px); }
.lb-stage img.out-r { opacity: 0; transform: translateX(40px) scale(.98); filter: blur(10px); }
.lb-stage img.in-l { opacity: 0; transform: translateX(40px) scale(.98); filter: blur(10px); transition: none; }
.lb-stage img.in-r { opacity: 0; transform: translateX(-40px) scale(.98); filter: blur(10px); transition: none; }
.lightbox:not(.open) .lb-stage img { transform: scale(.96); filter: blur(10px); }
.lb-arrow {
  align-self: center; justify-self: center;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line); display: grid; place-items: center;
  font-size: 15px; letter-spacing: 0; transition: border-color .4s, background .4s, transform .5s var(--ease-out);
}
.lb-arrow:hover { border-color: var(--accent); background: var(--accent-soft); }
.lb-prev:hover { transform: translateX(-4px); }
.lb-next:hover { transform: translateX(4px); }
.lb-info { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 20px; }
.lb-text > * { transition: opacity .4s, filter .4s, transform .6s var(--ease-out); }
.lb-text.swap > * { opacity: 0; filter: blur(6px); transform: translateY(6px); }
.lb-title { font-family: var(--title); font-weight: 400; text-transform: uppercase; letter-spacing: 0; font-size: clamp(26px, 2.6vw, 40px); line-height: 1; margin: 8px 0 10px; }
.lb-desc { font-family: var(--sans); text-transform: none; letter-spacing: 0; font-size: 13px; max-width: 360px; color: color-mix(in srgb, var(--ink) 72%, transparent); }
.lb-link { color: var(--accent-ink); }

/* =============================================================
   RESPONSIVE
============================================================= */
@media (max-width: 860px) {

  .home { height: auto; min-height: 100svh; overflow: visible; }
  .home-stage { position: static; transform: none; padding: 120px 0 170px; justify-items: stretch; }
  .card-info { display: none; }
  .home-intro-m { display: block; padding: 0 var(--gutter); margin-bottom: 18px; }
  .strip { height: auto; max-height: none; gap: 12px; padding: 0 var(--gutter) 34px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .strip::-webkit-scrollbar { display: none; }
  .card, .card.active { width: 64vw; max-width: none; height: 86vw; max-height: none; scroll-snap-align: start; }
  .card img { filter: none; transform: none; }
  .card .num i { opacity: 1; }
  .home-list { display: none; }
  .home-statement { position: static; padding: 0 var(--gutter); margin-top: 12px; }

  .project { grid-template-columns: 1fr; }
  .p-side { position: static; height: auto; padding: 110px 0 10px; }
  .p-title { font-size: clamp(40px, 12vw, 88px); }
  .p-media { padding-top: 10px; }
  .p-mobiles { grid-template-columns: repeat(2, 1fr); }

  .ab { padding-top: 90px; }
  .ab-kicker { flex-direction: column; gap: 4px; }
  .ab-statement { justify-self: start; }
  .ab-grid { grid-template-columns: 1fr 1fr; row-gap: 30px; }
  .ab-grid > :first-child { grid-column: 1 / -1; }

  .lightbox { grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr auto auto; }
  .lb-stage { grid-column: 1 / -1; grid-row: 2; }
  .lb-prev { grid-row: 3; grid-column: 1; justify-self: start; margin: 8px 0 16px; }
  .lb-next { grid-row: 3; grid-column: 2; justify-self: end; margin: 8px 0 16px; }
  .lb-info { grid-row: 4; grid-template-columns: 1fr; padding-bottom: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-delay: 0s !important; }
}

/* Cache la page avant que le loader n'apparaisse (évite un flash) */
/* En arrivant par une transition interne : le loader est déjà en place, pas de deuxième entrée */
html.from-nav .ld-inner { animation: none; opacity: 1; transform: none; }
.pg-in { position: relative; }
.pg-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pg-preload { position: absolute; width: 0; height: 0; overflow: hidden; visibility: hidden; }

/* Apparition des projets sur l'accueil : chaque carte se dévoile du bas vers le haut */
@keyframes cardIn { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes cardImg { from { transform: scale(1.6); } }
@keyframes numIn { from { opacity: 0; transform: translateY(6px); } }
html:not(.loaded) .card { visibility: hidden; }
html.loaded .card .ph { animation: cardIn 1.1s var(--ease) var(--d) backwards; }
html.loaded .card img { animation: cardImg 1.7s var(--ease-out) var(--d) backwards; }
html.loaded .card .num { animation: numIn 0.8s var(--ease-out) calc(var(--d) + 0.5s) backwards; }

/* Pas de barre de défilement visible (le scroll fonctionne toujours) */
html, body { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* Smooth scroll (Lenis) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* =============================================================
   CURSEUR PERSONNALISÉ
============================================================= */
html.has-cursor, html.has-cursor * { cursor: none !important; }
html.has-cursor.c-text input, html.has-cursor.c-text textarea { cursor: text !important; }
.c-dot, .c-ring { position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; border-radius: 50%; }
.c-dot { width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; background: var(--ink); transform: translate3d(-100px, -100px, 0); transition: opacity .3s, background .4s; }
.c-ring {
  width: 30px; height: 30px; margin: -15px 0 0 -15px;
  border: 1px solid var(--accent); background: transparent;
  display: grid; place-items: center; color: #18161c; font-size: 9px;
  transform: translate3d(-100px, -100px, 0);
  transition: width .45s var(--ease-out), height .45s var(--ease-out), margin .45s var(--ease-out), background .4s, border-color .4s, opacity .3s;
}
.c-ring span { opacity: 0; transition: opacity .25s; }
.c-ring.is-link { width: 48px; height: 48px; margin: -24px 0 0 -24px; background: color-mix(in srgb, var(--accent) 22%, transparent); }
/* Sur un projet : l'anneau disparaît, une étiquette "(View)" suit le point */
.c-ring.is-view { width: 6px; height: 6px; margin: -3px 0 0 -3px; border-color: transparent; background: transparent; mix-blend-mode: difference; }
.c-ring span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); white-space: nowrap;
  font-family: var(--sans); font-size: 12px; font-weight: 500; letter-spacing: .01em; text-transform: uppercase; color: #fff; }
.c-ring span::before { content: "("; } .c-ring span::after { content: ")"; }
.c-ring.is-view span { opacity: 1; transition-delay: .1s; }
.c-ring.is-down { width: 22px; height: 22px; margin: -11px 0 0 -11px; }
html.c-out .c-dot, html.c-out .c-ring, html.c-text .c-ring { opacity: 0; }

/* =============================================================
   BOUTONS RONDS : thème, langue, musique (centrés en bas)
============================================================= */
html.has-music .theme-toggle { margin-left: -61px; }
html.has-music .lang-toggle { margin-left: -19px; }
.music-toggle {
  position: fixed; left: 50%; bottom: var(--gutter); z-index: 60; margin-left: 23px;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--bg); box-shadow: 0 6px 30px var(--shadow);
  display: grid; place-items: center;
  transition: transform 0.6s var(--ease-out), background 0.6s var(--ease), border-color .6s;
}
.music-toggle:hover, .music-toggle[aria-expanded="true"] { transform: scale(1.12); border-color: var(--accent); }
.music-toggle:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }
.eq { display: flex; align-items: flex-end; gap: 2px; height: 12px; }
.eq i { display: block; width: 2px; height: 3px; background: var(--accent); border-radius: 1px; transition: height .3s; }
.music-toggle.playing .eq i { animation: eq 0.9s var(--soft) infinite alternate; }
.music-toggle.playing .eq i:nth-child(2) { animation-delay: -.3s; animation-duration: .7s; }
.music-toggle.playing .eq i:nth-child(3) { animation-delay: -.6s; animation-duration: 1.1s; }
.music-toggle.playing .eq i:nth-child(4) { animation-delay: -.15s; animation-duration: .8s; }
@keyframes eq { from { height: 3px; } to { height: 12px; } }

.music-pop {
  position: fixed; left: 50%; bottom: calc(var(--gutter) + 52px); z-index: 61;
  width: 260px; margin-left: -130px; padding: 16px;
  background: var(--bg); border: 1px solid var(--line); box-shadow: 0 30px 70px -20px var(--shadow);
  opacity: 0; transform: translateY(10px); filter: blur(6px); pointer-events: none;
  transition: opacity .4s var(--soft), transform .5s var(--ease-out), filter .4s;
}
.music-pop.open { opacity: 1; transform: none; filter: none; pointer-events: auto; }
.mp-top { display: flex; justify-content: space-between; margin-bottom: 10px; }
.mp-count { color: var(--muted); font-variant-numeric: tabular-nums; }
.mp-title { font-family: var(--title); font-size: 20px; line-height: 1.05; }
.mp-artist { margin-top: 4px; }
.mp-bar { position: relative; height: 1px; background: var(--line); margin: 14px 0 12px; overflow: hidden; }
.mp-bar i { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.mp-ctrl { display: flex; justify-content: space-between; align-items: center; }
.mp-ctrl button { padding: 4px 2px; transition: color .3s; }
.mp-ctrl button:hover { color: var(--accent-ink); }
.mp-play { min-width: 60px; }
.mp-list { list-style: none; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); display: grid; gap: 2px; max-height: 120px; overflow: auto; scrollbar-width: none; }
.mp-list button { display: flex; gap: 10px; width: 100%; text-align: left; color: var(--muted); padding: 2px 0; transition: color .3s; }
.mp-list button span { color: var(--muted); }
.mp-list button:hover, .mp-list button.on { color: var(--ink); }
.mp-list button.on span { color: var(--accent-ink); }

/* =============================================================
   FORMULAIRE DE CONTACT
============================================================= */
.contact-panel .cp-body { max-width: 1100px; grid-template-columns: 1.1fr 1fr; align-items: end; gap: 34px 8vw; }
.cp-info { display: grid; gap: 34px; }
.cp-form { display: grid; gap: 22px; width: 100%; }
.cp-field { display: grid; gap: 6px; }
.cp-field span { color: var(--muted); transition: color .3s; }
.cp-field input, .cp-field textarea {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  padding: 6px 0 9px; color: var(--ink); font-family: var(--sans); font-size: 15px; letter-spacing: 0; text-transform: none;
  outline: none; resize: none; transition: border-color .4s;
}
.cp-field:focus-within span { color: var(--accent-ink); }
.cp-field input:focus, .cp-field textarea:focus { border-color: var(--accent); }
.cp-field.err span { color: #d4708a; }
.cp-field.err input, .cp-field.err textarea { border-color: #d4708a; }
.cp-honey { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cp-send { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cp-submit {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 20px;
  border: 1px solid var(--accent); border-radius: 999px; transition: background .4s, color .4s, opacity .3s;
}
.cp-submit span { display: inline-block; transition: transform .5s var(--ease-out); }
.cp-submit:hover { background: var(--accent); color: #18161c; }
.cp-submit:hover span { transform: translate(2px, -2px); }
.cp-form.sending .cp-submit { opacity: .5; pointer-events: none; }
.cp-status { color: var(--muted); text-transform: none; font-family: var(--sans); letter-spacing: 0; font-size: 12.5px; }
.cp-form.sent .cp-status { color: var(--accent-ink); }

/* =============================================================
   RESPONSIVE (tablette & téléphone) — nouveaux éléments
============================================================= */
@media (max-width: 860px) {

  /* Pied de page : remonté au-dessus des boutons ronds pour ne jamais les chevaucher */
  .site-footer { padding-bottom: calc(var(--gutter) + 50px); }
  .pg-hint { opacity: .6; }
  .ft-copy { display: none; }

  .home-stage { padding-bottom: 24px; }
  .home-slider { padding-bottom: 150px; }
  .strip { scroll-padding-inline: var(--gutter); }

  /* Contact : une colonne, le panneau défile si besoin */
  .contact-panel { overflow-y: auto; overscroll-behavior: contain; }
  .contact-panel .cp-body { grid-template-columns: 1fr; align-self: start; padding: 32px 0 24px; gap: 40px; }
  .contact-panel h2 { font-size: clamp(44px, 13vw, 80px); }
  .cp-list { grid-template-columns: 80px 1fr; gap: 8px 16px; }
  .contact-panel .cp-bottom { flex-direction: column; gap: 4px; padding-bottom: 50px; }

  /* Playground : le texte d'aide prend moins de place */
  .pg-hint { max-width: 46vw; }
}
@media (max-width: 560px) {
  .ab-grid { grid-template-columns: 1fr; }
  .p-nav { grid-template-columns: 1fr; gap: 36px; padding: 56px 0 130px; }
  .p-nav a:last-child { text-align: left; }
  .music-pop { width: calc(100vw - 2 * var(--gutter)); margin-left: calc(-50vw + var(--gutter)); }
}

/* Écrans tactiles : pas de survol, donc images directement en couleur */


/* Header & footer sur téléphone : nom à gauche, liens à droite */
@media (max-width: 560px) {
  .site-header, .site-footer { grid-template-columns: 1fr auto; column-gap: 12px; }
  .site-header .brand { grid-column: 1; }
  .hd-nav { grid-column: 2; display: flex; gap: 14px; }
  .site-footer .ft-left, .site-footer .ft-mid { grid-column: 1; }
  .site-footer .ft-contact { grid-column: 2; }
  .pg-body .site-footer .ft-mid { display: none; }
}
