/* ============================================================
   V4 — portfolio Mathieu Robert
   Nuances de gris — brume, carousel, feuille
   ============================================================ */

:root {
  --bg: #0e0e10;
  --bg-2: #16161a;
  --bg-3: #1d1d21;
  --paper: #ececee;
  --paper-ink: #16161a;
  --ink: #f4f4f5;
  --dim: #a7a7ad;
  --dim-2: #62626a;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --white: #ffffff;
  --display: 'Space Grotesk', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  color: var(--ink);
  font-family: var(--display);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
}

::selection { background: rgba(255, 255, 255, 0.85); color: #0e0e10; }

.mono { font-family: var(--mono); font-size: .74rem; letter-spacing: .12em; }
.dim { color: var(--dim); }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* ---------- VERRE ---------- */
.glass {
  position: relative;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03) 44%, rgba(255, 255, 255, 0.055));
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04),
    0 24px 60px rgba(0, 0, 0, 0.4);
}

/* ---------- BEAM blanche (libraries.dev/beam) ---------- */
@property --beam {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.beam { position: relative; isolation: isolate; }
.beam::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1.5px;
  pointer-events: none;
  background: conic-gradient(
    from var(--beam),
    rgba(255, 255, 255, 0) 0deg,
    rgba(255, 255, 255, 0) 72deg,
    rgba(255, 255, 255, 0.5) 98deg,
    #ffffff 105deg,
    rgba(255, 255, 255, 0.25) 132deg,
    rgba(255, 255, 255, 0) 175deg,
    rgba(255, 255, 255, 0) 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.45s ease;
}
@keyframes beam-turn { to { --beam: 360deg; } }
.beam--on::before { opacity: .5; animation: beam-turn 7s linear infinite; }
.beam--on:hover::before { opacity: 1; }
.beam--hover:hover::before { opacity: 1; animation: beam-turn 5.5s linear infinite; }

/* ---------- BEAM prismatique (multicolor,à la librairie) ---------- */
.beam-prism::before {
  padding: 2px;
  background: conic-gradient(
    from var(--beam),
    rgba(255, 255, 255, 0) 0deg,
    rgba(255, 255, 255, 0) 62deg,
    #22d3ee 80deg,
    #6366f1 98deg,
    #a855f7 116deg,
    #e879f9 132deg,
    #f43f5e 148deg,
    rgba(255, 255, 255, 0) 172deg,
    rgba(255, 255, 255, 0) 360deg
  );
}
/* halo coloré autour du faisceau */
.beam-prism::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1.5px;
  pointer-events: none;
  background: conic-gradient(
    from var(--beam),
    rgba(255, 255, 255, 0) 0deg,
    rgba(255, 255, 255, 0) 62deg,
    #22d3ee 80deg,
    #6366f1 98deg,
    #a855f7 116deg,
    #e879f9 132deg,
    #f43f5e 148deg,
    rgba(255, 255, 255, 0) 172deg,
    rgba(255, 255, 255, 0) 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  filter: blur(13px);
  opacity: 0;
  transition: opacity .45s ease;
  animation: beam-turn 7s linear infinite;
}
.beam--on.beam-prism::before { opacity: .9; animation-duration: 5s; }
.beam--on.beam-prism::after { opacity: .8; }
.beam--on.beam-prism:hover::before { opacity: 1; }
.beam--on.beam-prism:hover::after { opacity: 1; animation-duration: 2.8s; }

/* ---------- NAV : transparente au repos, verre au scroll ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1.6rem;
  padding: .9rem 2rem;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .4s, border-color .4s, backdrop-filter .4s, box-shadow .4s;
}
.nav.is-scrolled {
  background: rgba(14, 14, 16, 0.72);
  border-bottom-color: var(--line);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 18px 44px rgba(0, 0, 0, .28);
}
.nav-brand {
  display: inline-flex; align-items: center; gap: .6rem;
  color: var(--ink); text-decoration: none;
  font-family: var(--mono); font-size: .8rem; font-weight: 600; letter-spacing: .16em;
}
.nav-led {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--white); box-shadow: 0 0 10px rgba(255,255,255,.8);
  animation: breathe 2.6s ease-in-out infinite;
}
@keyframes breathe { 50% { opacity: .3; } }
.nav-links { display: flex; gap: 1.3rem; margin-left: auto; }
.nav-links a {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .12em;
  color: var(--dim); text-decoration: none;
  padding: .45rem .2rem;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav-links a:hover, .nav-links a.is-active { color: var(--white); border-bottom-color: rgba(255,255,255,.7); }
.nav-right { display: flex; align-items: center; gap: 1.1rem; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .68rem 1.15rem;
  font-family: var(--mono); font-size: .78rem; font-weight: 600; letter-spacing: .06em;
  text-decoration: none; cursor: pointer;
  border-radius: 4px;
  background: transparent;
  border: 1px solid transparent;
  transition: transform .18s, box-shadow .18s, background .18s, border-color .18s, color .18s;
}
.btn svg { width: 1em; height: 1em; }
.btn-solid {
  background: linear-gradient(145deg, #ffffff, #d7d7d7);
  color: #0e0e10;
  border: 1px solid rgba(255, 255, 255, 0.65);
}
.btn-solid:hover { box-shadow: 0 0 28px rgba(255, 255, 255, .3); transform: translateY(-2px); }
/* bouton sombre : laisse le beam prismatique ressortir, hover multicolore */
.btn-dark {
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.btn-dark:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
  box-shadow: none;
}
.btn-ghost {
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative; z-index: 1;
}
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.45); background: rgba(255,255,255,.1); transform: translateY(-2px); }
.btn-sm { padding: .5rem .8rem; font-size: .72rem; }
.btn-big { padding: .85rem 1.5rem; font-size: .85rem; }

.chip {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .1em;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: .4rem .75rem; border-radius: 999px;
  color: var(--dim);
}
.chip-live { color: var(--white); }
.chip-open {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.35);
  background: rgba(74, 222, 128, 0.06);
}
.chip-open .dot { background: #4ade80; box-shadow: 0 0 8px rgba(74, 222, 128, .8); animation: breathe 1.8s infinite; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip-live .dot { animation: breathe 1.6s infinite; box-shadow: 0 0 8px rgba(255,255,255,.9); }

/* ---------- HERO — LA MATIÈRE VIVANTE ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - 58px);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.mist {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.6s ease;
}
.mist.is-on { opacity: 1; }
.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 60% at 50% 110%, rgba(14,14,16,.9), transparent 70%),
    linear-gradient(180deg, rgba(14,14,16,.5), transparent 30%, transparent 75%, rgba(14,14,16,.6));
}
.hero-inner {
  position: relative; z-index: 2;
  flex: 1;
  max-width: 1180px; width: 100%; margin: 0 auto;
  padding: clamp(3rem, 10vh, 7rem) 2rem 2rem;
  display: flex; flex-direction: column; justify-content: center;
}
.kicker { display: flex; align-items: center; gap: .7rem; color: var(--dim); text-transform: uppercase; }
.kicker .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--white); box-shadow: 0 0 8px rgba(255,255,255,.7); }

.hero-name {
  margin: 1.6rem 0 1.4rem;
  font-size: clamp(3.6rem, 12vw, 10rem);
  line-height: .9; font-weight: 700; letter-spacing: -.035em;
  text-transform: none;
}
.hero-name .line-1, .hero-name .line-2 { display: block; }
.hero-name .line-1 { color: var(--ink); }
.hero-name .line-2 {
  background: linear-gradient(105deg, #ffffff 8%, #b4b7bc 48%, #595c62 78%, #e4e5e8 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

.hero-intro { color: var(--dim); max-width: 44ch; font-size: clamp(1.05rem, 1.6vw, 1.3rem); }
.hero-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.1rem;
  margin-top: 2rem; color: var(--dim); text-transform: uppercase;
}

.hero-scroll {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: .7rem;
  padding-bottom: 2rem; text-align: center;
  color: var(--dim-2); text-transform: uppercase;
}
.scroll-line {
  width: 1px; height: 56px;
  background: linear-gradient(rgba(255, 255, 255, .8), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
  transform-origin: top;
}
@keyframes scroll-pulse { 50% { transform: scaleY(.35); opacity: .4; } }

/* ---------- RÉVÉLATIONS ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.22, 1, .36, 1);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- SECTIONS ---------- */
.section { max-width: 1180px; margin: 0 auto; padding: clamp(4.5rem, 12vh, 8rem) 2rem; }
.section-head { margin-bottom: 3rem; padding-bottom: 1.4rem; border-bottom: 1px solid var(--line); }
.section-kicker { color: var(--dim); text-transform: uppercase; }
.section h2 {
  font-size: clamp(2.8rem, 7vw, 5.4rem);
  font-weight: 700; letter-spacing: -.03em; line-height: .95;
  margin-top: .9rem;
}
.dot-end { color: var(--white); }

/* ---------- 01 — CAROUSEL ---------- */
.carousel { position: relative; }
.carousel-viewport {
  overflow: hidden;
  touch-action: pan-y;
  cursor: grab;
}
.carousel-viewport.is-dragging { cursor: grabbing; }
.carousel-track {
  display: flex;
  gap: 2rem;
  will-change: transform;
  transition: transform .55s cubic-bezier(.22, 1, .36, 1);
  list-style: none;
  margin: 0;
}
.carousel-slide {
  flex: 0 0 calc(100% - 4.5rem);
  max-width: calc(100% - 4.5rem);
  border-radius: 18px;
}
.carousel-track:not(.is-transforming) { cursor: pointer; }

.slide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.6rem, 3vw, 3rem);
  padding: clamp(1.6rem, 3vw, 2.6rem);
  border-radius: 18px;
}
.slide-media {
  align-self: center;
  border-radius: 12px;
  overflow: hidden;
}
.slide-media img {
  width: 100%;
  height: auto;
  max-height: min(56vh, 480px);
  object-fit: contain;
  filter: grayscale(1) contrast(1.05) brightness(.85);
  transition: transform .6s, filter .6s;
  user-select: none;
}
.carousel-slide:hover .slide-media img { transform: scale(1.04); filter: grayscale(.15) contrast(1.05) brightness(.95); }
.slide-media-empty {
  aspect-ratio: 4 / 3;
  display: flex; align-items: center; justify-content: center;
  color: var(--dim-2);
  background: repeating-linear-gradient(-45deg, rgba(255,255,255,.03) 0 14px, transparent 14px 28px);
}
.slide-body { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.slide-index { color: var(--ink); margin-bottom: .8rem; }
.slide-body h3 {
  font-size: clamp(1.8rem, 3.4vw, 2.9rem);
  font-weight: 700; letter-spacing: -.025em; line-height: 1;
}
.slide-hook { color: var(--ink); margin-top: .7rem; }
.slide-desc { color: var(--dim); margin-top: .5rem; font-size: .95rem; max-width: 56ch; }

.slide-meta {
  display: flex; flex-wrap: wrap; gap: 1.4rem 2.6rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1rem 0; margin-top: 1.2rem;
}
.meta-cell { display: flex; flex-direction: column; gap: .15rem; }
.meta-label { color: var(--dim-2); text-transform: uppercase; }
.meta-value { font-weight: 500; font-size: .92rem; }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1rem; }
.tags li { color: var(--dim-2); font-size: .66rem; letter-spacing: .08em; }

.slide-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }

.carousel-controls {
  display: flex; align-items: center; justify-content: center; gap: 1.6rem;
  margin-top: 1.8rem;
  color: var(--dim);
}
.carousel-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s, opacity .2s;
}
.carousel-arrow svg { width: 1em; height: 1em; }
.carousel-arrow:hover { border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.1); transform: translateY(-2px); }
.carousel-arrow:disabled { opacity: .3; cursor: default; transform: none; }
.carousel-arrow--next svg { transform: scaleX(1); }
.carousel-arrow:not(.carousel-arrow--next) svg { transform: scaleX(-1); }
.carousel-dots { display: flex; gap: .8rem; }
.carousel-dot {
  width: 8px; height: 8px; padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  border: none; cursor: pointer;
  transition: background .2s, box-shadow .2s, transform .2s;
}
.carousel-dot:hover { background: rgba(255, 255, 255, .45); }
.carousel-dot.is-active { background: var(--white); box-shadow: 0 0 10px rgba(255,255,255,.7); transform: scale(1.25); }
.carousel-counter { color: var(--dim); min-width: 5.4ch; text-align: center; }

/* ---------- 02 — CV : LA FEUILLE ---------- */
.cv-wrap {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}

/* la feuille claire — point le plus lumineux du site, montée dans son cadre beam */
.sheet-frame {
  position: relative;
  padding: 10px;
  border-radius: 16px;
  background: linear-gradient(160deg, #131316, #0f0f12 60%, #141418);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 42px 90px rgba(0, 0, 0, .6),
    0 8px 24px rgba(0, 0, 0, .45);
}
/* le beam prismatique voyage plus lentement autour de la feuille, halo large */
.beam-prism.beam--on.sheet-frame::before {
  padding: 2px;
  animation-duration: 10s;
  opacity: .7;
}
.beam-prism.beam--on.sheet-frame::after {
  padding: 3px;
  inset: -3px;
  filter: blur(16px);
  animation-duration: 10s;
  opacity: .75;
}
.sheet-frame:hover::before { opacity: 1; }
.sheet-frame:hover::after { opacity: 1; animation-duration: 6s; }
.sheet {
  background: var(--paper);
  color: var(--paper-ink);
  border-radius: 10px;
  padding: clamp(1.8rem, 3vw, 2.6rem);
  aspect-ratio: 210 / 297;
  max-height: 82vh;
  display: flex; flex-direction: column;
  box-shadow: 0 10px 32px rgba(0, 0, 0, .5);
  position: relative;
}
.sheet::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(22, 22, 26, 0.08);
  border-radius: 6px;
  pointer-events: none;
}
.sheet-head { padding-bottom: 1.2rem; border-bottom: 2px solid var(--paper-ink); }
.sheet-name { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.sheet-role { color: #4a4a52; margin-top: .5rem; }
.sheet-contact { color: #6a6a72; margin-top: .35rem; word-break: break-all; }
.sheet-block { margin-top: 1.2rem; }
.sheet-label { color: #6a6a72; text-transform: uppercase; letter-spacing: .14em; margin-bottom: .4rem; }
.sheet-line { font-size: .82rem; color: #33333a; padding: .22rem 0; }
.sheet-line strong { color: var(--paper-ink); font-weight: 600; }
.sheet-foot {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(22, 22, 26, 0.12);
  color: #6a6a72;
  text-transform: uppercase;
  font-size: .62rem;
}

/* listes à côté de la feuille */
.cv-side { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.cv-col {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  padding: 1.4rem 1.5rem;
}
.cv-label { color: var(--dim); text-transform: uppercase; margin-bottom: 1rem; }
.cv-entry { padding: .85rem 0; border-bottom: 1px solid var(--line); }
.cv-entry:last-child { border-bottom: none; padding-bottom: 0; }
.cv-period { color: var(--dim-2); text-transform: uppercase; font-size: .66rem; }
.cv-title { font-weight: 600; margin-top: .25rem; }
.cv-place { color: var(--dim); font-size: .9rem; }
.cv-text { color: var(--dim); font-size: .85rem; margin-top: .35rem; }

.cv-skills { margin-top: 2rem; }
.cv-chips {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: .55rem;
  margin-top: .4rem;
}
.cv-chips li {
  padding: .45rem .9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--dim);
  font-size: .68rem; letter-spacing: .08em;
  cursor: default;
  transition: color .2s, border-color .2s, background .2s;
}
.cv-chips li:hover { color: var(--ink); border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.09); }

.cv-actions { margin-top: 2.4rem; }

/* ---------- 03 — CONTACT ---------- */
.section-contact { padding-bottom: 8rem; }
.contact-slab { border-radius: 18px; padding: clamp(2.4rem, 6vw, 4.5rem); }
.contact-slab .section-kicker { text-transform: uppercase; }
.contact-title {
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  font-weight: 700; letter-spacing: -.03em; line-height: .95;
  margin: 1rem 0 1.2rem;
}
.contact-text { color: var(--dim); margin: .6rem 0 2rem; max-width: 52ch; font-size: 1.05rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* ---------- FOOTER ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 1.8rem 2rem;
  display: flex; flex-wrap: wrap; gap: .4rem 2rem; justify-content: space-between;
  color: var(--dim-2);
}
.footer .mono { font-size: .66rem; }

/* ---------- DIVERS ---------- */
.empty { color: var(--dim); }

/* ============================================================
   V4 — FICHE PROJET (page annexe)
   ============================================================ */
.pd { max-width: 1180px; margin: 0 auto; padding: clamp(2rem, 6vh, 4rem) 2rem 6rem; }

.pd-hero { padding-bottom: 2.6rem; border-bottom: 1px solid var(--line); }
.pd-back {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--dim); text-decoration: none; text-transform: uppercase;
  padding: .35rem 0; margin-bottom: 2rem;
  transition: color .2s;
}
.pd-back:hover { color: var(--white); }
.pd-back-arrow { display: inline-flex; }
.pd-back-arrow svg { width: 1em; height: 1em; transform: scaleX(-1); }

.pd-hero .kicker { margin-bottom: 1rem; }
.pd-title {
  font-size: clamp(2.6rem, 7.5vw, 6rem);
  font-weight: 700; letter-spacing: -.03em; line-height: .95;
}
.pd-hook { color: var(--dim); max-width: 56ch; font-size: clamp(1.05rem, 1.6vw, 1.25rem); margin-top: 1rem; }
.pd-meta {
  display: flex; flex-wrap: wrap; gap: 1.4rem 2.6rem;
  margin-top: 1.6rem;
}
.pd-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.6rem; }

/* galerie */
.pd-gallery { padding: 2.6rem 0; border-bottom: 1px solid var(--line); }
.pd-cover, .pd-shot {
  border-radius: 12px; overflow: hidden;
  margin: 0 auto;
}
.pd-cover img, .pd-shot img {
  width: 100%; display: block;
  height: auto;
  object-fit: contain;
  filter: grayscale(1) contrast(1.05) brightness(.9);
  transition: filter .6s, transform .6s;
}
.pd-cover img { max-height: 72vh; }
.pd-cover:hover img, .pd-shot:hover img { filter: grayscale(0) contrast(1.05); transform: scale(1.01); }
.pd-shots {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem; margin-top: 1rem;
}
.pd-shot img { max-height: 340px; }
.pd-video {
  margin-top: 1rem; border-radius: 12px; padding: 6px;
  aspect-ratio: 16/9;
}
.pd-video iframe { width: 100%; height: 100%; border: 0; border-radius: 8px; display: block; }

/* étude de cas */
.pd-case { padding: clamp(2rem, 5vh, 3.4rem) 0; display: flex; flex-direction: column; gap: 2.4rem; }
.pd-block {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 1.6rem;
}
.pd-label { color: var(--dim-2); text-transform: uppercase; line-height: 1.9; }
.pd-text { color: var(--dim); max-width: 68ch; font-size: 1.02rem; line-height: 1.75; }

/* technologies — dévoilement progressif */
.pd-tech { border-radius: 12px; overflow: hidden; }
.pd-tech summary {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.1rem 1.4rem;
  cursor: pointer; list-style: none;
  color: var(--ink);
}
.pd-tech summary::-webkit-details-marker { display: none; }
.pd-tech summary .mono { flex: 1; color: var(--ink); text-transform: uppercase; }
.pd-tech-count {
  color: var(--dim);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: .2rem .6rem;
}
.pd-tech-arrow svg { width: 1em; height: 1em; transition: transform .3s; color: var(--dim); }
.pd-tech[open] .pd-tech-arrow svg { transform: rotate(90deg); }
.pd-tech-grid {
  list-style: none;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: .9rem;
  padding: 0 1.4rem 1.4rem;
}
.pd-tech-item {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  padding: .8rem;
}
.pd-tech-item img { width: 100%; height: 100%; object-fit: contain; filter: grayscale(1) brightness(1.6); transition: filter .4s; }
.pd-tech-item:hover img { filter: grayscale(0) brightness(1); }

/* projets liés */
.pd-related { padding: 1rem 0 2.6rem; }
.pd-related-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1rem; margin-top: 1rem;
}
.pd-related-item {
  display: flex; flex-direction: column; gap: .3rem;
  padding: 1.2rem 1.4rem;
  border-radius: 12px;
  color: var(--ink); text-decoration: none;
  transition: transform .25s, background .25s;
}
.pd-related-item:hover { transform: translateY(-3px); }
.pd-related-num { color: var(--dim-2); }
.pd-related-title { font-weight: 600; font-size: 1.05rem; }
.pd-related-hook { color: var(--dim); font-size: .85rem; }

/* navigation de lecture */
.pd-nav {
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: 1rem; align-items: center;
  border-radius: 14px;
  padding: 1rem 1.2rem;
  margin-top: 2rem;
}
.pd-nav-item { display: flex; flex-direction: column; gap: .3rem; text-decoration: none; color: var(--ink); padding: .4rem .6rem; border-radius: 8px; transition: background .2s; position: relative; z-index: 1; }
.pd-nav-item:hover { background: rgba(255, 255, 255, .05); }
.pd-nav-dir { color: var(--dim-2); text-transform: uppercase; }
.pd-nav-title { font-weight: 500; font-size: .95rem; }
.pd-nav-item--next { text-align: right; align-items: flex-end; }
.pd-nav-item--all { color: var(--dim); justify-self: center; text-transform: uppercase; }
.pd-nav-item--all:hover { color: var(--white); }
.pd-nav-item--empty { color: var(--dim-2); text-transform: uppercase; text-align: center; padding: .4rem .6rem; }

.pd-contact { padding-top: 4rem; }

/* ---------- RESPONSIVE FICHE PROJET ---------- */
@media (max-width: 840px) {
  .pd-block { grid-template-columns: 1fr; gap: .4rem; }
  .pd-related-grid { grid-template-columns: 1fr; }
  .pd-nav { grid-template-columns: 1fr; }
  .pd-nav-item--next { text-align: left; align-items: flex-start; }
  .pd-nav-item--all { justify-self: start; }
}

/* ---------- DIVERS (suite) ---------- */

a:focus-visible, button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7); outline-offset: 3px; border-radius: 2px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 980px) {
  .cv-wrap { grid-template-columns: 1fr; }
  .sheet { max-height: none; aspect-ratio: auto; }
  .cv-side { grid-template-columns: 1fr; }
}
@media (max-width: 840px) {
  .slide { grid-template-columns: 1fr; }
  .slide-media img { max-height: 56vh; }
  .carousel-slide { flex-basis: 100%; max-width: 100%; }
  .carousel-controls { gap: 1rem; }
  .carousel-counter { display: none; }
}
@media (max-width: 680px) {
  .nav { padding: .7rem 1rem; gap: .8rem; flex-wrap: wrap; }
  .nav-links { order: 3; width: 100%; justify-content: space-between; gap: .5rem; }
  .nav-links a { padding: .35rem 0; }
  .section { padding: 3.4rem 1.2rem; }
  .hero-inner { padding: 2.6rem 1.2rem 1.4rem; }
  .cv-col { padding: 1.1rem 1.1rem; }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .beam--on::before, .beam--hover:hover::before { opacity: .5; }
}
