/* ============================================================
   Erwan Dumerchez — Portfolio
   Refonte 2026 · style.css
   ============================================================ */

/* ── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
@media (pointer: fine) { *, *::before, *::after { cursor: none !important; } }

/* ── DESIGN TOKENS ──────────────────────────────────────────── */
:root {
  /* surfaces */
  --bg: #050505;
  --bg2: #0b0b0a;
  --bg3: #141413;
  --bg-elev: #1b1b19;

  /* ink */
  --ink: #fafaf7;
  --ink2: #b5b5ad;
  --ink3: #807d76;

  /* borders */
  --border: rgba(255, 255, 255, .12);
  --border2: rgba(255, 255, 255, .07);
  --border-hi: rgba(255, 255, 255, .28);

  /* accent — teinte chaude « étalonnage » */
  --accent: #ff7a3c;
  --accent2: #ffb27a;
  --accent-soft: rgba(255, 122, 60, .14);
  --accent-glow: rgba(255, 122, 60, .35);

  /* fonts */
  --ff: 'Barlow', system-ui, sans-serif;
  --ff-mono: 'Space Grotesk', ui-monospace, monospace;

  /* spacing & radii */
  --pad: max(48px, calc((100vw - 1240px) / 2));
  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-pill: 999px;

  /* motion */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur: .4s;

  /* shadows */
  --shadow-sm: 0 4px 20px rgba(0, 0, 0, .35);
  --shadow-md: 0 18px 50px rgba(0, 0, 0, .5);
}

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  position: relative;
  z-index: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ff);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ambient grain + accent aura on the page background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% -10%, var(--accent-soft) 0%, transparent 42%),
    radial-gradient(circle at 88% 8%, rgba(255, 178, 122, .06) 0%, transparent 38%);
  opacity: .9;
}

::selection { background: var(--accent); color: #060606; }

/* ── ACCESSIBLE FOCUS ───────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 10000;
  background: var(--accent); color: #060606;
  font-family: var(--ff-mono); font-size: 12px; letter-spacing: .1em;
  text-transform: uppercase; text-decoration: none;
  padding: 12px 20px; border-radius: var(--r-pill);
  transform: translateY(-150%); transition: transform .25s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ── CUSTOM CURSOR ──────────────────────────────────────────── */
.cursor-dot {
  position: fixed; width: 7px; height: 7px;
  background: var(--accent); border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none; z-index: 9999;
  transition: opacity .2s, width .2s, height .2s;
  opacity: 0;
}
.cursor-ring {
  position: fixed; width: 38px; height: 38px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none; z-index: 9998;
  transition: width .25s var(--ease-out), height .25s var(--ease-out),
              border-color .25s, opacity .2s;
  opacity: 0;
}
.cursor-ring.hover {
  width: 60px; height: 60px;
  border-color: var(--accent);
}

/* ── NAV ────────────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  display: flex; align-items: center; justify-content: space-between;
  padding: 30px var(--pad);
  background: linear-gradient(to bottom, rgba(5, 5, 5, .65) 0%, rgba(5, 5, 5, .25) 60%, transparent 100%);
  transition: padding .35s var(--ease), background .35s var(--ease),
              box-shadow .35s;
}
nav.scrolled {
  padding: 16px var(--pad);
  background: rgba(8, 8, 8, .72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .3);
}
.nav-logo {
  font-family: var(--ff); font-size: 15px; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink); text-decoration: none;
  display: inline-flex; align-items: center; gap: 9px;
}
.nav-logo::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

.nav-links { display: flex; gap: 34px; align-items: center; }
.nav-links a {
  font-family: var(--ff-mono); font-size: 12px; font-weight: 300;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink2); text-decoration: none;
  transition: color .25s; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1px; background: var(--accent);
  transition: width .3s var(--ease-out);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }
.nav-cta {
  background: var(--accent) !important; color: #060606 !important;
  padding: 9px 22px; border-radius: var(--r-pill);
  font-weight: 600 !important;
  transition: transform .2s var(--ease-out), box-shadow .25s !important;
  box-shadow: 0 4px 18px var(--accent-glow);
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 26px var(--accent-glow); }
.nav-lut-link { opacity: .6; font-size: .82em; }
.nav-lut-link:hover { opacity: 1; }

.nav-social {
  display: flex; gap: 18px; align-items: center;
  margin-left: 8px; padding-left: 24px; border-left: 1px solid var(--border);
}
.nav-social a { display: flex; align-items: center; color: var(--ink2); transition: color .25s, transform .2s; }
.nav-social a:hover { color: var(--accent); transform: translateY(-2px); }
.nav-social svg { width: 16px; height: 16px; fill: currentColor; }

/* ── HERO SOCIAL ───────────────────────────────────────────── */
.hero-social { position: absolute; bottom: 48px; left: var(--pad); z-index: 3; display: flex; gap: 20px; }
.hero-social a { display: flex; align-items: center; color: rgba(255, 255, 255, .5); transition: color .25s, transform .2s; }
.hero-social a:hover { color: var(--accent); transform: translateY(-3px); }
.hero-social svg { width: 20px; height: 20px; fill: currentColor; }

/* ── LANG SWITCHER ─────────────────────────────────────────── */
.lang-switcher { position: relative; }
.lang-current {
  background: rgba(255, 255, 255, .04); border: 1px solid var(--border);
  color: var(--ink); font-family: var(--ff-mono); font-size: 11px;
  letter-spacing: .15em; padding: 9px 14px; cursor: none;
  border-radius: var(--r-pill);
  transition: background .25s, border-color .25s;
  display: flex; align-items: center; gap: 8px;
}
.lang-current:hover, .lang-switcher:hover .lang-current {
  background: rgba(255, 255, 255, .08); border-color: var(--border-hi);
}
.lang-flag { font-size: 13px; line-height: 1; display: flex; align-items: center; }
.lang-label { font-family: var(--ff-mono); font-size: 11px; font-weight: 400; letter-spacing: .15em; text-transform: uppercase; }
.lang-chevron { transition: transform .3s var(--ease); opacity: .5; flex-shrink: 0; }
.lang-switcher:hover .lang-chevron { transform: rotate(180deg); }
.lang-dropdown {
  position: absolute; top: 100%; right: 0; padding-top: 8px;
  background: transparent; opacity: 0; pointer-events: none;
  transform: translateY(-6px); transition: opacity .22s, transform .22s var(--ease-out);
  min-width: 150px; z-index: 200;
}
.lang-dropdown-inner {
  background: rgba(17, 17, 16, .92); backdrop-filter: blur(14px);
  border: 1px solid var(--border); border-radius: var(--r-md);
  overflow: hidden; box-shadow: var(--shadow-md);
}
.lang-switcher:hover .lang-dropdown { opacity: 1; pointer-events: auto; transform: translateY(0); }
.lang-option {
  width: 100%; background: none; border: none; color: var(--ink);
  font-family: var(--ff-mono); font-size: 11px; font-weight: 400;
  letter-spacing: .15em; padding: 12px 16px; cursor: none;
  display: flex; align-items: center; gap: 10px;
  transition: background .15s; text-align: left; text-transform: uppercase;
}
.lang-option:hover { background: var(--accent-soft); }
.lang-option.active { color: var(--ink3); pointer-events: none; }

/* ── HERO ──────────────────────────────────────────────────── */
#hero {
  position: relative; height: 100vh; min-height: 600px;
  display: flex; align-items: flex-end;
  padding: 0 var(--pad) 100px; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; background: #0d0d0c; }
.hero-carousel { position: absolute; inset: 0; overflow: hidden; }
.hero-carousel img {
  position: absolute; inset: -30px;
  width: calc(100% + 60px); height: calc(100% + 60px);
  object-fit: cover; opacity: 0;
  filter: blur(0px);
}
.hero-carousel img.active { opacity: .5; filter: blur(0px); }
.hero-carousel-overlay {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(to bottom, rgba(6, 6, 6, .3) 0%, rgba(6, 6, 6, .1) 40%, rgba(6, 6, 6, .95) 100%);
}
.hero-content { position: relative; z-index: 3; max-width: 920px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--ff-mono); font-size: 11px; font-weight: 400;
  letter-spacing: .28em; text-transform: uppercase; color: var(--accent2);
  margin-bottom: 24px;
  opacity: 0; animation: fadeUp .8s var(--ease-out) .15s forwards;
}
.hero-eyebrow::before { display: none; }
.hero-name {
  font-size: clamp(64px, 10vw, 150px); font-weight: 900;
  line-height: .9; letter-spacing: -.045em; text-transform: uppercase;
  color: var(--ink);
  opacity: 0; animation: fadeUp .9s var(--ease-out) .3s forwards;
}
.hero-name em {
  font-style: normal;
  background: linear-gradient(120deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub {
  font-size: clamp(15px, 1.5vw, 21px); font-weight: 500;
  color: var(--ink2); margin-top: 30px; letter-spacing: .04em;
  opacity: 0; animation: fadeUp .8s var(--ease-out) .55s forwards;
}
.hero-scroll {
  position: absolute; right: var(--pad); bottom: 100px; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--ff-mono); font-size: 10px; letter-spacing: .2em;
  color: var(--ink3); text-transform: uppercase;
  animation: fadeIn 1s ease 1.2s both;
}
.hero-scroll-line { width: 1px; height: 60px; background: linear-gradient(to bottom, transparent, var(--accent)); animation: scrollLine 2s ease-in-out infinite; }
@keyframes scrollLine { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── SECTIONS ──────────────────────────────────────────────── */
section { padding: 130px var(--pad); position: relative; }
.section-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: .26em;
  text-transform: uppercase; color: var(--accent2); margin-bottom: 18px;
}
.section-eyebrow::before { display: none; }
.section-title {
  font-size: clamp(44px, 6vw, 92px); font-weight: 900;
  line-height: .95; letter-spacing: -.035em; text-transform: uppercase;
  margin-bottom: 64px;
}

/* ── ABOUT ─────────────────────────────────────────────────── */
#about { background: var(--bg2); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: stretch; min-height: 600px; }
.about-photo { overflow: hidden; border-radius: var(--r-lg); position: relative; }
.about-photo::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, var(--accent-soft));
  mix-blend-mode: overlay; pointer-events: none;
}
.about-photo img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: grayscale(12%);
  transition: transform .8s var(--ease-out), filter .6s;
}
.about-photo:hover img { transform: scale(1.04); filter: grayscale(0%); }
.about-content {
  padding: 60px 64px; display: flex; flex-direction: column; justify-content: center;
  background: rgba(255, 255, 255, .02); border-radius: var(--r-lg);
  border: 1px solid var(--border2);
}
.about-heading {
  font-size: clamp(24px, 2.6vw, 36px); font-weight: 900;
  text-transform: uppercase; letter-spacing: -.025em;
  color: var(--ink); margin-bottom: 32px; line-height: 1.15;
}
.about-text { font-size: 17px; font-weight: 400; color: var(--ink2); line-height: 1.85; }
.about-text p { margin-bottom: 20px; }
.about-text p:last-child { margin-bottom: 0; }

/* ── PORTFOLIO ─────────────────────────────────────────────── */
#portfolio { background: var(--bg); }
.portfolio-filters { display: flex; gap: 8px; margin-bottom: 48px; flex-wrap: wrap; }
.filter-btn {
  font-family: var(--ff-mono); font-size: 11px; font-weight: 400;
  letter-spacing: .14em; text-transform: uppercase;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--border);
  color: var(--ink2); padding: 11px 22px; border-radius: var(--r-pill);
  transition: all .25s var(--ease-out); cursor: none;
}
.filter-btn:hover { border-color: var(--border-hi); color: var(--ink); }
.filter-btn.active {
  border-color: var(--accent); color: #060606; background: var(--accent);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.portfolio-carousel-wrap { position: relative; margin: 0 calc(var(--pad) * -1); padding: 0; }
.portfolio-carousel-wrap::before, .portfolio-carousel-wrap::after {
  content: ''; position: absolute; top: 0; bottom: 24px;
  width: clamp(180px, 22vw, 360px); pointer-events: none; z-index: 5;
  transition: opacity .35s ease;
}
.portfolio-carousel-wrap::before { left: 0; background: linear-gradient(to right, var(--bg) 0%, rgba(5, 5, 5, .9) 30%, rgba(5, 5, 5, .5) 65%, transparent 100%); opacity: 0; }
.portfolio-carousel-wrap::after { right: 0; background: linear-gradient(to left, var(--bg) 0%, rgba(5, 5, 5, .9) 30%, rgba(5, 5, 5, .5) 65%, transparent 100%); opacity: 1; }
.portfolio-carousel-wrap.fade-start::before { opacity: 1; }
.portfolio-carousel-wrap.fade-end::after { opacity: 0; }
.portfolio-carousel {
  display: flex; gap: 20px; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0 24px var(--pad); scroll-padding-left: var(--pad);
  scrollbar-width: none; -ms-overflow-style: none;
  user-select: none; -webkit-user-select: none; cursor: grab;
}
.portfolio-carousel.dragging { cursor: grabbing; scroll-behavior: auto; scroll-snap-type: none; }
.portfolio-carousel.auto-scrolling { scroll-snap-type: none; scroll-behavior: auto; }
.portfolio-carousel::-webkit-scrollbar { display: none; }
.portfolio-item {
  flex: 0 0 calc((100% - 60px) / 3.3); height: 440px;
  position: relative; overflow: hidden; cursor: pointer;
  background: var(--bg3); border-radius: var(--r-lg);
  scroll-snap-align: start;
  transition: transform .4s var(--ease-out), box-shadow .4s;
  user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  border: 1px solid var(--border2);
}
.portfolio-item:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.portfolio-item.hidden { display: none; }
.portfolio-thumb {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .7s var(--ease-out), filter .4s;
  filter: brightness(.9) saturate(1.02); display: block;
  -webkit-user-drag: none; user-drag: none; pointer-events: none;
}
.portfolio-item:hover .portfolio-thumb { transform: scale(1.07); filter: brightness(.7) saturate(1.05); }
.portfolio-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(5, 5, 5, .96) 0%, rgba(5, 5, 5, .2) 55%, transparent 100%);
  opacity: 1; transition: opacity .4s;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 28px; pointer-events: none;
}
.portfolio-title {
  font-size: 21px; font-weight: 800; color: var(--ink);
  letter-spacing: -.015em; text-transform: uppercase; line-height: 1.1;
  transition: transform .4s var(--ease-out);
}
.portfolio-item:hover .portfolio-title { transform: translateY(-4px); }
.portfolio-cat {
  font-family: var(--ff-mono); font-size: 10px; letter-spacing: .2em;
  color: var(--accent2); text-transform: uppercase;
  margin-bottom: 10px; display: inline-block;
}
.portfolio-loading {
  flex: 0 0 100%; display: flex; align-items: center; justify-content: center;
  padding: 80px; color: var(--ink3); font-family: var(--ff-mono);
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase; gap: 12px;
}
.portfolio-loading span { animation: spin 1s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.portfolio-empty { flex: 0 0 100%; text-align: center; padding: 80px; color: var(--ink3); font-size: 15px; line-height: 2; }
.portfolio-empty code { font-family: var(--ff-mono); font-size: 12px; background: var(--bg3); padding: 4px 10px; border-radius: var(--r-sm); }
.portfolio-carousel-nav { display: flex; gap: 14px; margin-top: 36px; justify-content: flex-end; align-items: center; }
.portfolio-progress { flex: 1; height: 3px; background: rgba(255, 255, 255, .08); border-radius: var(--r-pill); overflow: hidden; margin-right: 18px; max-width: 280px; }
.portfolio-progress-bar { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: var(--r-pill); width: 30%; transition: width .35s var(--ease), transform .35s var(--ease); transform-origin: left center; }
.carousel-btn {
  width: 58px; height: 58px; border-radius: 50%;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
  transition: background .25s, border-color .25s, opacity .25s, transform .25s var(--ease-out);
  cursor: none;
}
.carousel-btn:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: #060606; transform: scale(1.08); box-shadow: 0 6px 20px var(--accent-glow); }
.carousel-btn:disabled { opacity: .3; pointer-events: none; }
.carousel-btn svg { width: 18px; height: 18px; }

/* ── MODAL ─────────────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 800; background: var(--bg);
  display: none; flex-direction: column; overflow-y: auto;
  -webkit-overflow-scrolling: touch; overflow-anchor: none;
  opacity: 0; transform: translateY(100%);
  transition: transform .55s var(--ease), opacity .35s ease;
  will-change: transform, opacity;
}
.modal * { overflow-anchor: none; }
.modal.open { display: flex; }
.modal.visible { opacity: 1; transform: translateY(0); }

/* ── MODAL used as a static page (project pages) ───────────── */
.modal[role="main"] {
  position: static !important; inset: auto !important;
  z-index: auto !important; min-height: 100vh;
  opacity: 1 !important; transform: none !important;
  transition: none !important; will-change: auto !important;
  overflow-y: visible !important;
}
/* Close button as <a> link on project pages */
a.modal-close {
  text-decoration: none;
  display: inline-flex;
}
.modal-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 80px; background: var(--bg);
  gap: 24px;
}
.modal-title { font-size: clamp(16px, 2.5vw, 28px); font-weight: 900; text-transform: uppercase; letter-spacing: -.025em; }
.modal-close {
  background: var(--accent); border: 1px solid var(--accent); color: #060606;
  font-family: var(--ff-mono); font-size: 11px; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 22px; border-radius: var(--r-pill);
  transition: all .25s var(--ease-out); flex-shrink: 0; cursor: pointer !important;
  user-select: none !important; -webkit-user-select: none !important;
}
.modal-close svg line { stroke: #060606; }
.modal-close span { user-select: none !important; -webkit-user-select: none !important; pointer-events: none; }
.modal-close:hover { background: transparent; color: var(--accent); }
.modal-close:hover svg line { stroke: var(--accent); }
.modal-body { flex: 1; padding: 60px 120px; max-width: 1400px; margin: 0 auto; width: 100%; box-sizing: border-box; }
.modal-subtitle { font-family: var(--ff-mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent2); margin-bottom: 16px; }
.modal-accroche { font-family: var(--ff); font-size: clamp(22px, 2.5vw, 34px); font-weight: 900; text-transform: uppercase; letter-spacing: -.025em; color: var(--ink); line-height: 1.12; margin-bottom: 20px; }
.modal-desc { font-family: var(--ff); font-size: clamp(16px, 1.3vw, 19px); font-weight: 400; color: var(--ink2); line-height: 1.75; max-width: 900px; margin-bottom: 28px; }
.modal-credits { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 60px; margin-bottom: 40px; padding-top: 24px; border-top: 1px solid var(--border2); }
.modal-credit { font-family: var(--ff); font-size: 14px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--ink3); line-height: 1.7; }
.modal-credit strong { color: var(--ink); font-weight: 800; font-size: 15px; }
.modal-video { position: relative; aspect-ratio: 16/9; margin-bottom: 40px; background: var(--bg2); border-radius: var(--r-md); overflow: hidden; }
.modal-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }

.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 40px; }
.gallery-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; margin-bottom: 40px; }
.gallery-item { border-radius: var(--r-md); overflow: hidden; background: var(--bg3); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-item video { width: 100%; display: block; background: #000; }
.gallery-item.instagram-wrap { background: transparent; grid-column: span 3; }
.gallery-item.instagram-wrap iframe { width: 100%; height: 600px; border: none; display: block; }
.gallery-item.image-wrap { grid-column: span 4; }
.gallery-item.image-wrap img { aspect-ratio: 16/9; }
.gallery-item.video-wrap { grid-column: span 6; }
.gallery-item.video-wrap video { aspect-ratio: 16/9; }

.compare-slider { position: relative; overflow: hidden; border-radius: var(--r-md); aspect-ratio: 4/3; user-select: none; touch-action: none; cursor: col-resize; background: var(--bg3); }
.cmp-before, .cmp-after { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.cmp-after { clip-path: inset(0 50% 0 0); }
.cmp-handle { position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); width: 2px; background: rgba(255, 255, 255, .5); z-index: 3; pointer-events: none; }
.cmp-handle-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 255, 255, .5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 24px rgba(0, 0, 0, .5); }
.cmp-handle-btn svg path { stroke: #060606; }
.cmp-label { position: absolute; bottom: 16px; z-index: 4; font-family: var(--ff-mono); font-size: 10px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; padding: 7px 14px; background: rgba(6, 6, 6, .7); border-radius: var(--r-pill); pointer-events: none; }
.cmp-label.before { left: 16px; color: var(--ink2); }
.cmp-label.after { right: 16px; color: var(--ink); }

/* ── CONTACT ───────────────────────────────────────────────── */
#contact { background: var(--bg2); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 100px; }
.contact-info { display: flex; flex-direction: column; gap: 32px; }
.contact-line { padding-bottom: 32px; border-bottom: 1px solid var(--border2); }
.contact-line-val { font-size: 22px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.contact-line-val a { color: inherit; text-decoration: none; transition: color .25s; position: relative; }
.contact-line-val a:hover { color: var(--accent); }
.contact-form { display: flex; flex-direction: column; gap: 14px; }
.form-input, .form-textarea {
  background: var(--bg3); border: 1px solid var(--border); color: var(--ink);
  font-family: var(--ff); font-size: 16px; font-weight: 500;
  padding: 16px 20px; outline: none; border-radius: var(--r-md);
  transition: border-color .25s, background .25s, box-shadow .25s; width: 100%;
}
.form-input:focus, .form-textarea:focus { border-color: var(--accent); background: #0f0f0e; box-shadow: 0 0 0 3px var(--accent-soft); }
.form-textarea { resize: vertical; min-height: 140px; }
::placeholder { color: var(--ink3); font-weight: 400; }
.form-submit {
  background: var(--accent); border: 1px solid var(--accent); color: #060606;
  font-family: var(--ff-mono); font-size: 11px; font-weight: 500;
  letter-spacing: .25em; text-transform: uppercase;
  padding: 18px 38px; cursor: pointer;
  transition: all .25s var(--ease-out); align-self: flex-end;
  border-radius: var(--r-pill); margin-top: 8px;
  box-shadow: 0 4px 18px var(--accent-glow);
}
.form-submit:hover { background: transparent; color: var(--accent); transform: translateY(-2px); }
.form-success { display: none; font-family: var(--ff-mono); font-size: 11px; letter-spacing: .15em; color: var(--accent2); text-transform: uppercase; padding: 16px; border: 1px solid var(--accent); text-align: center; margin-top: 8px; border-radius: var(--r-md); background: var(--accent-soft); }

/* ── FOOTER ────────────────────────────────────────────────── */
footer { padding: 40px var(--pad); border-top: 1px solid var(--border2); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.footer-copy, .footer-made { font-family: var(--ff-mono); font-size: 10px; letter-spacing: .15em; color: var(--ink3); }
.footer-center { display: flex; align-items: center; gap: 14px; }
.footer-link { font-family: var(--ff-mono); font-size: 10px; letter-spacing: .15em; color: var(--ink3); text-decoration: none; transition: color .25s; }
.footer-link:hover { color: var(--accent); }
.footer-sep { color: #555; font-size: 10px; }
#toggle-btn {
  display: flex; align-items: center; gap: 7px; padding: 8px 16px;
  border-radius: 100px; font-family: var(--ff-mono); font-size: 10px;
  letter-spacing: .15em; text-transform: uppercase; cursor: pointer !important;
  border: 1px solid var(--border); outline: none;
  transition: all .25s var(--ease-out); white-space: nowrap;
  background: rgba(255, 255, 255, .04); color: var(--ink3);
}
#toggle-btn:hover { color: #060606; border-color: var(--accent); background: var(--accent); }

/* ── MODAL NAV ─────────────────────────────────────────────── */
.modal-nav { border-top: 1px solid var(--border2); margin-top: 60px; padding-top: 40px; padding-bottom: 20px; }
.modal-nav-inner { display: flex; gap: 16px; justify-content: space-between; }
.modal-nav-btn { background: rgba(255, 255, 255, .02); border: 1px solid var(--border); padding: 20px 26px; border-radius: var(--r-md); display: flex; align-items: center; gap: 16px; transition: border-color .25s, background .25s, transform .25s var(--ease-out); flex: 1; max-width: 48%; text-align: left; cursor: none; }
.modal-nav-btn:hover { border-color: var(--accent); background: var(--bg3); transform: translateY(-3px); }
.modal-nav-prev { flex-direction: row; }
.modal-nav-next { flex-direction: row-reverse; text-align: right; }
.modal-nav-thumb { width: 80px; height: 50px; flex-shrink: 0; overflow: hidden; border-radius: var(--r-sm); background: var(--bg3); }
.modal-nav-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.modal-nav-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.modal-nav-info-right { align-items: flex-end; }
.modal-nav-label { font-family: var(--ff-mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent2); white-space: nowrap; }
.modal-nav-title { font-family: var(--ff); font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: -.01em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) { .modal-nav-thumb { width: 56px; height: 36px; } .modal-nav-btn { padding: 14px 16px; gap: 10px; } .modal-nav-title { font-size: 12px; } }

/* ── REVEAL ────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .12s; }
.reveal-delay-2 { transition-delay: .24s; }

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 1100px) { .portfolio-item { flex: 0 0 calc((100% - 40px) / 2.3); height: 380px; } }
@media (max-width: 900px) {
  :root { --pad: 24px; }
  body { font-size: 17px; }
  section { padding: 90px var(--pad); }
  .about-grid { grid-template-columns: 1fr; gap: 20px; min-height: 0; }
  .about-photo { height: 380px; border-radius: var(--r-md); }
  .about-content { padding: 36px 28px; border-radius: var(--r-md); }
  .portfolio-item { flex: 0 0 calc((100% - 40px) / 2.3); height: 340px; }
  .portfolio-carousel-nav { margin-top: 24px; }
  .portfolio-progress { max-width: 200px; }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .compare-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item.instagram-wrap, .gallery-item.image-wrap, .gallery-item.video-wrap { grid-column: span 12; }
  .modal-body { padding: 32px 24px; }
  .modal-header { padding: 16px 24px; }
  .modal-credits { grid-template-columns: 1fr; gap: 8px; }
  .hero-name { font-size: clamp(52px, 12vw, 88px); }
}
@media (max-width: 600px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .nav-social { display: none; }
  .nav-logo { font-size: 12px; letter-spacing: .06em; white-space: nowrap; gap: 7px; }
  .nav-logo::before { width: 6px; height: 6px; }
  .nav-cta { padding: 7px 15px; font-size: 11px; }
  .nav-links { gap: 10px; }
  .lang-current { padding: 7px 10px; }
  body { font-size: 16px; }
  .portfolio-item { flex: 0 0 82%; height: 300px; border-radius: var(--r-md); }
  .portfolio-overlay { padding: 20px; }
  .portfolio-title { font-size: 17px; }
  .portfolio-carousel { gap: 14px; }
  .portfolio-carousel-wrap::before, .portfolio-carousel-wrap::after { width: clamp(60px, 12vw, 120px); }
  .portfolio-carousel-wrap::before { background: linear-gradient(to right, rgba(5, 5, 5, .85) 0%, rgba(5, 5, 5, .4) 60%, transparent 100%); }
  .portfolio-carousel-wrap::after { background: linear-gradient(to left, rgba(5, 5, 5, .85) 0%, rgba(5, 5, 5, .4) 60%, transparent 100%); }
  .portfolio-carousel-nav { flex-wrap: wrap; gap: 10px; }
  .portfolio-progress { width: 100%; max-width: none; margin-right: 0; flex-basis: 100%; }
  .carousel-btn { width: 50px; height: 50px; }
  .hero-name { font-size: clamp(46px, 14vw, 76px); }
  .hero-content { padding-bottom: 80px; }
  .section-title { font-size: clamp(38px, 9vw, 58px); }
  .modal-accroche { font-size: clamp(18px, 5vw, 24px); }
  .modal-body { padding: 24px 18px; }
  .modal-header { padding: 14px 18px; }
  .modal-close span { display: none; }
  .contact-grid { gap: 32px; }
  .about-photo { height: 280px; }
  .about-content { padding: 28px 22px; }
}
@media (max-width: 768px) {
  .compare-slider { touch-action: auto !important; }
  .cmp-before { clip-path: inset(0 0 0 50%) !important; }
  .cmp-after { clip-path: inset(0 50% 0 0) !important; }
  .cmp-handle { display: none !important; }
  .compare-slider::after { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: rgba(255, 255, 255, .5); z-index: 5; pointer-events: none; }
}

/* ── REDUCED MOTION ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-name, .hero-sub, .hero-eyebrow { opacity: 1; animation: none; }
}

/* ============================================================
   MODE TOGGLE + MONTAGE VIEW
   ============================================================ */
html[data-mode="colorist"] #montage-view  { display: none !important; }
html[data-mode="monteur"]  #colorist-view { display: none !important; }
html[data-mode="monteur"] *,
html[data-mode="monteur"] *::before,
html[data-mode="monteur"] *::after { cursor: auto !important; }
html[data-mode="monteur"] a,
html[data-mode="monteur"] button,
html[data-mode="monteur"] [role="button"] { cursor: pointer !important; }
#cursor-dot, #cursor-ring { display: none !important; }
@media (pointer: fine) { *, *::before, *::after { cursor: auto !important; } }
@media (pointer: fine) { a, button, [role="button"] { cursor: pointer !important; } }

#mode-toggle { display: none; }
[data-mode="colorist"] .tgl-colorist { display: none; }
[data-mode="colorist"] .tgl-monteur  { display: inline; }
[data-mode="monteur"]  .tgl-monteur  { display: none; }
[data-mode="monteur"]  .tgl-colorist { display: inline; }

#mode-overlay { position: fixed; inset: 0; pointer-events: none; z-index: 9200; opacity: 0; will-change: opacity; }

/* ── MONTAGE VIEW ──────────────────────────────────────────── */
#montage-view {
  min-height: 100vh; background: #F3F3F0;
  font-family: var(--ff); color: #111;
  padding: 80px max(32px, calc((100vw - 1320px)/2)) 60px;
  box-sizing: border-box;
}
.montage-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.montage-logo {
  font-family: var(--ff); font-size: 13px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: #111;
  display: inline-flex; align-items: center; gap: 9px;
}
.montage-logo::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* ── BENTO GRID ────────────────────────────────────────────── */
.bento-grid { display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: 360px 260px 152px; gap: 10px; }
.bento-tile { border-radius: 16px; overflow: hidden; position: relative; background: #E2E2DE; transition: transform .4s var(--ease-out), box-shadow .4s; }
.bento-tile:hover { box-shadow: 0 20px 50px rgba(0, 0, 0, .18); }
.bento-overlay-link { position: absolute; inset: 0; z-index: 5; display: block; }

.bento-main { grid-column: 6 / 13; grid-row: 1 / 3; }
.bento-main .pl-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease-out); }
.bento-main:hover .pl-thumb { transform: scale(1.05); }
.pl-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .35) 50%, rgba(0, 0, 0, .1) 100%); z-index: 1; }
.pl-thumb { filter: brightness(.82); }
.pl-info { position: absolute; bottom: 28px; left: 28px; z-index: 2; pointer-events: none; }
.pl-year { font-family: var(--ff-mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent2); margin-bottom: 6px; }
.pl-title-big { font-size: clamp(22px, 3vw, 40px); font-weight: 800; text-transform: uppercase; letter-spacing: -.04em; color: #fff; line-height: 1; }
.pl-cta {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 16px;
  font-family: var(--ff-mono); font-size: 10px; letter-spacing: .15em;
  text-transform: uppercase; color: #fff;
  border: 1px solid rgba(255, 255, 255, .4); padding: 8px 18px;
  border-radius: 100px; background: rgba(255, 255, 255, .14);
  backdrop-filter: blur(8px); transition: background .25s, border-color .25s;
}
.bento-main:hover .pl-cta { background: var(--accent); border-color: var(--accent); color: #060606; }
.pl-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 3; pointer-events: none; width: 52px; height: 52px; border-radius: 50%; background: rgba(255, 255, 255, .18); backdrop-filter: blur(8px); border: 1.5px solid rgba(255, 255, 255, .35); display: flex; align-items: center; justify-content: center; transition: background .25s, transform .3s var(--ease-out); }
.bento-tile:hover .pl-play { background: var(--accent); border-color: var(--accent); transform: translate(-50%, -50%) scale(1.12); }
.bento-tile:hover .pl-play svg path { fill: #060606; }
.pl-play svg { margin-left: 3px; }

.bento-profile { grid-column: 1 / 6; grid-row: 1 / 2; border-radius: 16px; overflow: hidden; position: relative; background: #181816; display: flex; flex-direction: row; }
.profile-photo { width: 42%; height: 100%; flex-shrink: 0; object-fit: cover; object-position: top center; display: block; margin: 0; border: none; border-radius: 0; }
.profile-content { flex: 1; min-width: 0; padding: 32px 28px; display: flex; flex-direction: column; justify-content: center; gap: 0; }
.profile-name { font-size: clamp(18px, 2.2vw, 30px); font-weight: 800; text-transform: uppercase; letter-spacing: -.03em; color: #fff; line-height: 1; margin-bottom: 10px; }
.profile-role { font-family: var(--ff-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .45); margin-bottom: 24px; }
.profile-links { display: flex; gap: 7px; flex-wrap: wrap; }
.profile-link { display: inline-flex; align-items: center; gap: 6px; font-family: var(--ff-mono); font-size: 9px; letter-spacing: .11em; text-transform: uppercase; color: rgba(255, 255, 255, .7); border: 1px solid rgba(255, 255, 255, .15); border-radius: 100px; padding: 7px 13px; text-decoration: none; background: rgba(255, 255, 255, .08); cursor: pointer !important; transition: background .2s, border-color .2s, color .2s, transform .2s; }
.profile-link:hover { background: var(--accent); color: #060606; border-color: var(--accent); transform: translateY(-2px); }
.profile-link svg { width: 11px; height: 11px; fill: currentColor; flex-shrink: 0; }

.bento-pl2025 { grid-column: 1 / 4; grid-row: 2 / 3; }
.bento-pl2024 { grid-column: 4 / 6; grid-row: 2 / 3; }
.bento-pl2025 .pl-thumb, .bento-pl2024 .pl-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.bento-pl2025:hover .pl-thumb, .bento-pl2024:hover .pl-thumb { transform: scale(1.06); }
.bento-pl2025 .pl-overlay, .bento-pl2024 .pl-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .92) 0%, rgba(0, 0, 0, .2) 60%, transparent 100%); z-index: 1; }
.bento-pl2025 .pl-info, .bento-pl2024 .pl-info { position: absolute; bottom: 18px; left: 18px; z-index: 2; pointer-events: none; }
.pl-title-sm { font-size: clamp(13px, 1.5vw, 18px); font-weight: 800; text-transform: uppercase; letter-spacing: -.03em; color: #fff; line-height: 1; }

.bento-promo { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; text-decoration: none; background: #181816; border-radius: 16px; padding: 22px 24px; position: relative; overflow: hidden; cursor: pointer !important; transition: background .25s, transform .3s var(--ease-out); grid-row: 3 / 4; }
.bento-promo::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 0% 100%, var(--accent-soft), transparent 60%); opacity: 0; transition: opacity .3s; }
.bento-promo:hover { background: #242420; transform: translateY(-3px); }
.bento-promo:hover::before { opacity: 1; }
.bento-exc { grid-column: 1 / 5; }
.bento-deh { grid-column: 5 / 9; }
.bento-art { grid-column: 9 / 13; }
.promo-label { font-family: var(--ff-mono); font-size: 9px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent2); position: relative; z-index: 1; }
.promo-name { font-size: clamp(15px, 1.6vw, 20px); font-weight: 800; text-transform: uppercase; letter-spacing: -.02em; color: #fff; position: relative; z-index: 1; }
.promo-badge { font-family: var(--ff-mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .1); border-radius: 100px; padding: 4px 10px; margin-top: 2px; position: relative; z-index: 1; }
.promo-arrow, .bento-arrow { position: absolute; bottom: 16px; right: 18px; font-size: 17px; color: rgba(255, 255, 255, .3); transition: transform .25s var(--ease-out), color .25s; z-index: 1; }
.bento-promo:hover .promo-arrow, .bento-promo:hover .bento-arrow { transform: translate(3px, -3px); color: var(--accent); }

.montage-footer { display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap; margin-top: 20px; padding-top: 20px; border-top: 1px solid rgba(0, 0, 0, .08); }
.montage-footer a { font-family: var(--ff-mono); font-size: 9px; letter-spacing: .18em; text-transform: uppercase; color: #666; text-decoration: none; transition: color .25s; cursor: pointer !important; }
.montage-footer a:hover { color: #111; }
.mf-dot { color: #999; }

@media (max-width: 900px) {
  #mode-toggle { top: auto; bottom: 24px; right: 20px; }
  #montage-view { padding: 80px 18px 40px; }
  .bento-grid { grid-template-columns: 1fr 1fr; grid-template-rows: 260px 230px 200px 140px 140px; gap: 8px; }
  .bento-main { grid-column: 1 / 3; grid-row: 1 / 2; }
  .bento-profile { grid-column: 1 / 3; grid-row: 2 / 3; }
  .bento-profile .profile-photo { width: 36%; height: 100%; }
  .bento-profile .profile-content { padding: 24px 22px; }
  .bento-pl2025 { grid-column: 1 / 2; grid-row: 3 / 4; }
  .bento-pl2024 { grid-column: 2 / 3; grid-row: 3 / 4; }
  .bento-exc { grid-column: 1 / 2; grid-row: 4 / 5; }
  .bento-deh { grid-column: 2 / 3; grid-row: 4 / 5; }
  .bento-art { grid-column: 1 / 3; grid-row: 5 / 6; }
}
@media (max-width: 640px) {
  #montage-view { padding: 72px 14px 40px; }
  .bento-grid { grid-template-columns: 1fr; grid-template-rows: 220px 200px 180px 180px 120px 120px 120px; gap: 8px; }
  .bento-main { grid-column: 1; grid-row: 1 / 2; }
  .bento-profile { grid-column: 1; grid-row: 2 / 3; }
  .bento-profile .profile-photo { width: 130px; height: 100%; flex-shrink: 0; }
  .bento-profile .profile-content { padding: 20px 18px; }
  .bento-profile .profile-name { font-size: 20px; }
  .bento-profile .profile-role { font-size: 9px; margin-bottom: 16px; }
  .bento-pl2025 { grid-column: 1; grid-row: 3 / 4; }
  .bento-pl2024 { grid-column: 1; grid-row: 4 / 5; }
  .bento-exc { grid-column: 1; grid-row: 5 / 6; }
  .bento-deh { grid-column: 1; grid-row: 6 / 7; }
  .bento-art { grid-column: 1; grid-row: 7 / 8; }
}

/* Portfolio items are now <a> tags */
a.portfolio-item { text-decoration: none; display: block; }

/* Modal nav — image n'occulte pas le texte sur petits écrans */
@media (max-width: 500px) {
  .modal-nav-inner { gap: 8px; }
  .modal-nav-btn { padding: 10px 12px; max-width: 50%; }
  .modal-nav-thumb { display: none; }
}
/* Bouton mode à droite dans le header sur desktop */
@media (min-width: 601px) {
  #nav { display: flex; align-items: center; justify-content: space-between; }
  #mode-toggle { position: static; transform: none; left: auto; top: auto; right: auto; bottom: auto; margin-left: 16px; flex-shrink: 0; }
  #nav .nav-links { display: flex; align-items: center; gap: 34px; white-space: nowrap; margin-left: auto; }
  #nav .nav-links a { white-space: nowrap; }
}
@media (max-width: 600px) {
  #nav { display: flex; }
  nav.scrolled { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .footer-center { display: none; }
}
