/* ============================================================
   PORTFOLIO — VALENTIN MICHEL
   Design: Minimalisme Éditorial / Thème Clair
   Typographie: Cormorant Garamond + DM Sans
   Accent: Terre cuite #C4622D
   ============================================================ */

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }

/* ---------- VARIABLES ---------- */
:root {
  --bg:        #F5F2ED;
  --bg-alt:    #ECE8DF;
  --bg-dark:   #1C1A17;
  --text:      #1C1A17;
  --muted:     #625D54;
  --accent:    #C4622D;
  --border:    rgba(28, 26, 23, 0.12);

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  --nav-h:  72px;
  --ease:   cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 0.22s ease;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---------- SKIP LINK ---------- */
.skip-link {
  position: absolute; top: -100%; left: 1rem;
  padding: 12px 20px; background: var(--accent); color: white;
  font-size: .85rem; font-weight: 600; text-decoration: none;
  z-index: 99999; border-radius: 0 0 4px 4px; transition: top .2s;
}
.skip-link:focus { top: 0; }

/* ---------- FOCUS STYLES ---------- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* ---------- CUSTOM CURSOR ---------- */
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  .cursor-ring {
    width: 36px; height: 36px; border: 1.5px solid var(--accent);
    border-radius: 50%; position: fixed; top: 0; left: 0;
    transform: translate(-50%, -50%); pointer-events: none; z-index: 99999;
    transition: width .3s var(--ease), height .3s var(--ease), opacity .3s, border-color .3s;
    mix-blend-mode: multiply; will-change: transform;
  }
  .cursor-dot {
    width: 5px; height: 5px; background: var(--accent); border-radius: 50%;
    position: fixed; top: 0; left: 0; transform: translate(-50%, -50%);
    pointer-events: none; z-index: 99999; will-change: transform;
  }
  body.cursor-hover .cursor-ring { width: 56px; height: 56px; border-color: var(--text); }
  body.cursor-dark  .cursor-ring { border-color: rgba(255,255,255,.6); }
  body.cursor-dark  .cursor-dot  { background: white; }
  .cursor-ring, .cursor-dot { cursor: none; }
}

/* ---------- PAGE TRANSITION OVERLAY ---------- */
.overlay {
  position: fixed; inset: 0; background: var(--accent); z-index: 9998;
  transform-origin: bottom; animation: overlayIn .85s var(--ease) forwards;
}
@keyframes overlayIn { to { transform: scaleY(0); } }
.overlay-exit {
  position: fixed; inset: 0; background: var(--accent); z-index: 9998;
  transform: scaleY(0); transform-origin: top; pointer-events: none;
}
.overlay-exit.active { animation: overlayOut .5s var(--ease) forwards; }
@keyframes overlayOut { to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) {
  .overlay, .overlay-exit.active { animation: none; }
  .overlay { display: none; }
}

/* ---------- NAVIGATION ---------- */
.nav {
  position: fixed; top: 0; inset-inline: 0; height: var(--nav-h); z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5%; transition: background .4s ease, box-shadow .4s ease;
}
.nav.solid {
  background: rgba(245, 242, 237, 0.96);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--border);
}
.nav.dark-nav { background: linear-gradient(to bottom, rgba(28,26,23,.5) 0%, transparent 100%); }
.nav.dark-nav.solid {
  background: rgba(28, 26, 23, 0.95);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255,255,255,.08);
}
.nav-logo {
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 600;
  text-decoration: none; letter-spacing: .04em; color: var(--text);
  transition: color var(--t-fast); position: relative; z-index: 2;
}
.dark-nav .nav-logo { color: white; }
.nav-links { display: flex; align-items: center; gap: 36px; list-style: none; }
.nav-links a {
  font-size: .78rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; color: var(--muted); position: relative;
  transition: color var(--t-fast); padding-block: 4px;
}
.dark-nav .nav-links a { color: rgba(255,255,255,.7); }
.nav-links a::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 0; height: 1px; background: var(--accent); transition: width .4s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.dark-nav .nav-links a:hover { color: white; }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { width: 100%; }
.nav-links a[aria-current="page"] { color: var(--accent); }
.nav-cta {
  border: 1px solid var(--accent); padding: 8px 22px; color: var(--accent);
  transition: background var(--t-fast), color var(--t-fast);
}
.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--accent); color: white; }

.nav-burger {
  display: none; flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 40px; height: 40px; background: none; border: none;
  position: relative; z-index: 1001;
}
.nav-burger span {
  display: block; width: 24px; height: 1.5px; background: currentColor;
  transition: transform .4s var(--ease), opacity .3s;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- SCROLL REVEAL ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .75s var(--ease), transform .75s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: .08s; }
.reveal-d2 { transition-delay: .16s; }
.reveal-d3 { transition-delay: .24s; }
.reveal-d4 { transition-delay: .32s; }
.line-reveal { overflow: hidden; }
.line-reveal .inner { display: block; transform: translateY(105%); transition: transform .9s var(--ease); }
.line-reveal.visible .inner { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.visible { opacity: 1; transform: none; transition: none; }
  .line-reveal .inner, .line-reveal.visible .inner { transform: none; transition: none; }
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body); font-size: .78rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
  padding: 15px 34px;
  transition: background .3s var(--ease), color .2s, transform .3s var(--ease), border-color .2s, box-shadow .3s;
  border: 1px solid transparent;
}
.btn-dark  { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-dark:hover  { background: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-accent { background: var(--accent); color: white; border-color: var(--accent); }
.btn-accent:hover { background: #A8501F; border-color: #A8501F; transform: translateY(-2px); }
.btn svg { width: 14px; height: 14px; transition: transform .3s var(--ease); flex-shrink: 0; }
.btn:hover svg { transform: translateX(4px); }

/* ---------- SECTION LAYOUT ---------- */
.section { padding: 110px 5%; }
.section-alt { background: var(--bg-alt); }
.section-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  border-bottom: 1px solid var(--border); padding-bottom: 28px; margin-bottom: 72px;
}
.section-tag {
  font-size: .68rem; font-weight: 700; letter-spacing: .22em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display); font-size: clamp(2.4rem, 5vw, 4.5rem);
  font-weight: 600; line-height: .95; letter-spacing: -.02em;
}
.section-more {
  font-size: .76rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; color: var(--muted); display: flex; align-items: center; gap: 8px;
  transition: color var(--t-fast), gap .4s var(--ease); flex-shrink: 0; padding-block: 4px;
}
.section-more:hover { color: var(--accent); gap: 14px; }
.section-more svg { width: 14px; height: 14px; flex-shrink: 0; transition: transform .3s var(--ease); }
.section-more:hover svg { transform: translateX(4px); }

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh;
  padding: var(--nav-h) 5% 80px;
  display: grid; grid-template-columns: 1.1fr .9fr;
  gap: 40px; align-items: end;
}
.hero-left {
  padding-bottom: 70px;
  position: relative; /* nécessaire pour hero-scroll en absolu */
}
.hero-tag {
  font-size: .7rem; font-weight: 700; letter-spacing: .25em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 28px;
  opacity: 0; animation: fadeUp .6s var(--ease) .9s forwards;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 9vw, 9rem);
  line-height: .9; font-weight: 600; letter-spacing: -.025em; margin-bottom: 36px;
}
.hero-line { overflow: hidden; display: block; }
.hero-line .inner {
  display: block; transform: translateY(110%);
  animation: slideUp 1s var(--ease) forwards;
}
.hero-line:nth-child(1) .inner { animation-delay: .55s; }
.hero-line:nth-child(2) .inner { animation-delay: .7s; }
.hero-subtitle {
  font-size: 1rem; color: var(--muted); max-width: 380px; line-height: 1.75;
  opacity: 0; animation: fadeUp .6s var(--ease) 1.05s forwards;
}
.hero-cta {
  display: flex; gap: 16px; margin-top: 50px; flex-wrap: wrap;
  opacity: 0; animation: fadeUp .6s var(--ease) 1.2s forwards;
}
.hero-right { position: relative; height: 72vh; }
.hero-image-wrap { width: 100%; overflow: visible; height: calc(100% + 60px); }
.hero-image-wrap img {
  margin-top: -60px; width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.08); animation: scaleIn 1.4s var(--ease) .3s forwards;
}
@keyframes scaleIn { to { transform: scale(1); } }

/* hero-scroll : positionné par rapport à hero-left sur desktop */
.hero-scroll {
  position: absolute; bottom: 0; left: 0;
  display: flex; align-items: center; gap: 14px;
  font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted);
  opacity: 0; animation: fadeUp .5s ease 1.6s forwards;
  user-select: none; pointer-events: none;
}
.scroll-bar {
  width: 44px; height: 1px; background: var(--border);
  overflow: hidden; position: relative;
}
.scroll-bar::after {
  content: ''; position: absolute; inset: 0; background: var(--accent);
  animation: scrollPulse 2.2s ease-in-out 2s infinite;
}
@keyframes scrollPulse {
  0%   { transform: translateX(-100%); }
  50%  { transform: translateX(0); }
  100% { transform: translateX(100%); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-tag, .hero-subtitle, .hero-cta, .hero-scroll { opacity: 1; animation: none; }
  .hero-line .inner { transform: none; animation: none; }
  .hero-image-wrap img { transform: none; animation: none; }
  .scroll-bar::after { animation: none; }
}

/* ---------- PROJECTS PREVIEW ---------- */
.preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.preview-card { position: relative; overflow: hidden; aspect-ratio: 3/4; display: block; }
.preview-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ease), filter .5s ease; filter: grayscale(25%);
}
.preview-card:hover img { transform: scale(1.06); filter: grayscale(0%); }
.preview-card-body {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(28,26,23,.85) 0%, transparent 55%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 28px; transition: background .5s;
}
.preview-card:hover .preview-card-body {
  background: linear-gradient(to top, rgba(28,26,23,.92) 0%, rgba(28,26,23,.15) 65%);
}
.preview-tag {
  font-size: .62rem; font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 8px;
}
.preview-name {
  font-family: var(--font-display); font-size: 1.65rem; font-weight: 600;
  color: white; line-height: 1.1; margin-bottom: 14px;
}
.preview-link {
  font-size: .7rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
  color: rgba(255,255,255,.7); text-decoration: none; display: flex; align-items: center; gap: 7px;
  transform: translateY(8px); opacity: 0;
  transition: opacity .4s var(--ease), transform .4s var(--ease), color .2s;
}
.preview-card:hover .preview-link { opacity: 1; transform: translateY(0); }
.preview-link:hover { color: white; }
.preview-card:focus-within img { transform: scale(1.06); filter: grayscale(0%); }
.preview-card:focus-within .preview-link { opacity: 1; transform: translateY(0); }

/* ---------- ABOUT ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.about-text {
  font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.6rem);
  line-height: 1.38; font-weight: 400; letter-spacing: -.01em;
}
.about-text em { font-style: italic; color: var(--accent); }
.about-desc { font-size: .95rem; color: var(--muted); line-height: 1.85; margin-bottom: 36px; }
.about-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
  border-top: 1px solid var(--border); padding-top: 36px;
}
.stat-num { font-family: var(--font-display); font-size: 3.2rem; font-weight: 600; line-height: 1; color: var(--accent); }
.stat-label { font-size: .8rem; color: var(--muted); margin-top: 6px; line-height: 1.5; }

/* ---------- FOOTER ---------- */
.footer {
  background: var(--bg-dark); padding: 56px 5%;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 24px;
}
.footer-logo { font-family: var(--font-display); font-size: 1.4rem; color: white; font-weight: 600; text-decoration: none; }
.footer-nav { display: flex; gap: 28px; list-style: none; }
.footer-nav a {
  font-size: .76rem; letter-spacing: .08em; color: rgba(255,255,255,.45);
  text-decoration: none; transition: color var(--t-fast); padding-block: 4px;
}
.footer-nav a:hover { color: white; }
.footer-copy { font-size: .72rem; color: rgba(255,255,255,.3); }

/* ---------- PAGE HERO ---------- */
.page-hero { padding: calc(var(--nav-h) + 90px) 5% 70px; border-bottom: 1px solid var(--border); }
.page-hero-title {
  font-family: var(--font-display); font-size: clamp(4.5rem, 11vw, 11rem);
  font-weight: 600; line-height: .88; letter-spacing: -.03em; margin-bottom: 28px;
}
.page-hero-sub { font-size: .95rem; color: var(--muted); max-width: 440px; line-height: 1.75; }

/* ---------- PROJECTS LIST ---------- */
.proj-list { border-top: 1px solid var(--border); }
.proj-item { border-bottom: 1px solid var(--border); transition: background var(--t-fast); }
.proj-item:hover { background: var(--bg-alt); }
.proj-link {
  display: grid; grid-template-columns: 52px 90px 1fr auto 40px;
  align-items: center; gap: 36px; padding: 30px 5%;
  text-decoration: none; color: var(--text);
}
.proj-num { font-size: .68rem; font-weight: 600; letter-spacing: .14em; color: var(--muted); }
.proj-thumb { width: 90px; height: 60px; object-fit: cover; filter: grayscale(35%); transition: filter .4s ease; }
.proj-item:hover .proj-thumb { filter: grayscale(0%); }
.proj-name {
  font-family: var(--font-display); font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 600; letter-spacing: -.01em; transition: color var(--t-fast);
}
.proj-item:hover .proj-name { color: var(--accent); }
.proj-cat { font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.proj-arrow {
  width: 32px; height: 32px; border: 1px solid var(--border); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.proj-item:hover .proj-arrow { background: var(--accent); border-color: var(--accent); }
.proj-arrow svg { width: 12px; color: var(--text); transition: color var(--t-fast); }
.proj-item:hover .proj-arrow svg { color: white; }

/* ---------- PROJECT DETAIL ---------- */
.proj-hero { height: 62vh; position: relative; overflow: hidden; }
.proj-hero img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.05); animation: scaleIn 1.4s var(--ease) forwards;
}
@media (prefers-reduced-motion: reduce) { .proj-hero img { transform: none; animation: none; } }
.proj-hero::before {
  content: ''; position: absolute; top: 0; inset-inline: 0; height: 220px;
  background: linear-gradient(to bottom, rgba(28,26,23,.6) 0%, transparent 100%);
  z-index: 1; pointer-events: none;
}
.proj-hero-overlay {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(to top, rgba(28,26,23,.82) 0%, transparent 55%);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 56px 5%;
}
.proj-hero-tag {
  font-size: .68rem; font-weight: 700; letter-spacing: .24em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.proj-hero-title {
  font-family: var(--font-display); font-size: clamp(3rem, 6vw, 6.5rem);
  color: white; font-weight: 600; line-height: .92; letter-spacing: -.02em; max-width: 700px;
}
.proj-body {
  padding: 80px 5%; display: grid; grid-template-columns: 2fr 1fr;
  gap: 80px; max-width: 1320px; margin: 0 auto;
}
.proj-desc { font-size: 1.02rem; line-height: 1.88; color: var(--muted); }
.proj-desc p { margin-bottom: 20px; }
.proj-desc p:first-child {
  font-family: var(--font-display); font-size: 1.45rem; color: var(--text);
  line-height: 1.5; letter-spacing: -.01em; margin-bottom: 30px;
}
.proj-meta { border-top: 1px solid var(--border); padding-top: 28px; }
.meta-row { margin-bottom: 26px; }
.meta-label { font-size: .62rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); margin-bottom: 5px; }
.meta-value { font-size: .9rem; font-weight: 500; }
.proj-gallery { padding: 0 5% 90px; max-width: 1320px; margin: 0 auto; }
.gallery-title {
  font-size: .68rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 24px; padding-bottom: 14px; border-bottom: 1px solid var(--border);
}
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.gallery-cell { overflow: hidden; }
.gallery-cell img {
  width: 100%; height: 260px; object-fit: cover; filter: grayscale(15%);
  transition: transform .6s var(--ease), filter .4s ease; cursor: zoom-in;
}
.gallery-cell:hover img { transform: scale(1.04); filter: grayscale(0%); }
.proj-nav {
  border-top: 1px solid var(--border); padding: 36px 5%;
  display: flex; justify-content: space-between; align-items: center;
}
.proj-nav-btn {
  font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none; color: var(--muted); display: flex; align-items: center; gap: 10px;
  transition: color var(--t-fast); padding-block: 6px;
}
.proj-nav-btn:hover { color: var(--accent); }

/* ---------- LIGHTBOX ---------- */
#lightbox {
  position: fixed; inset: 0; background: rgba(28,26,23,.96); z-index: 10000;
  display: none; align-items: center; justify-content: center; padding: 24px;
}
#lightbox.open { display: flex; }
#lightbox img { max-width: 90vw; max-height: 88vh; object-fit: contain; animation: lbIn .3s var(--ease); }
@keyframes lbIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { #lightbox img { animation: none; } }
#lightbox-close {
  position: absolute; top: 20px; right: 24px; background: none; border: none;
  color: white; font-size: 2rem; line-height: 1; opacity: .6; transition: opacity .2s;
}
#lightbox-close:hover { opacity: 1; }
#lightbox-prev, #lightbox-next {
  position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.1);
  border: none; color: white; cursor: pointer; padding: 12px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px; transition: background .2s, opacity .2s; opacity: .7;
}
#lightbox-prev { left: 24px; }
#lightbox-next { right: 24px; }
#lightbox-prev:hover, #lightbox-next:hover { background: rgba(255,255,255,.2); opacity: 1; }
#lightbox-prev svg, #lightbox-next svg { width: 24px; height: 24px; }
@media (max-width: 768px) {
  #lightbox-prev, #lightbox-next { padding: 8px; }
  #lightbox-prev svg, #lightbox-next svg { width: 20px; height: 20px; }
}

/* ---------- CV PAGE ---------- */
.cv-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; margin-top: var(--nav-h); }
.cv-left { padding: 80px 8%; display: flex; flex-direction: column; justify-content: center; }
.cv-left h1 {
  font-family: var(--font-display); font-size: clamp(3rem, 7vw, 7rem);
  font-weight: 600; line-height: .9; letter-spacing: -.03em; margin-bottom: 32px;
}
.cv-left > p { font-size: .98rem; color: var(--muted); line-height: 1.8; margin-bottom: 44px; max-width: 400px; }
.cv-right { background: var(--bg-alt); overflow: hidden; position: relative; }
.cv-right img { width: 100%; height: 100%; object-fit: cover; opacity: .55; filter: grayscale(25%); transition: opacity .6s, filter .6s; }
.cv-right:hover img { opacity: .7; filter: grayscale(0%); }

/* ---------- KEYFRAMES ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { transform: translateY(110%); } to { transform: translateY(0); } }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ---------- 1024px ---------- */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr 1fr; min-height: auto; padding-top: calc(var(--nav-h) + 40px); padding-bottom: 60px; align-items: center; }
  .hero-left { padding-bottom: 0; }
  .hero-right { display: block; height: 55vh; }
  .preview-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
}

/* ---------- 768px ---------- */
@media (max-width: 768px) {
  :root { --nav-h: 60px; }

  /* NAV */
  .nav { padding: 0 1.25rem; }
  .nav-burger { display: flex; color: var(--text); }
  .dark-nav .nav-burger { color: white; }
  .nav-links {
    position: fixed; inset: 0; background: var(--bg-dark);
    flex-direction: column; align-items: center; justify-content: center; gap: 36px;
    transform: translateX(100%); transition: transform .45s var(--ease); z-index: 999;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a {
    font-size: 1.6rem; font-family: var(--font-display); font-weight: 600;
    color: rgba(255,255,255,.7); letter-spacing: .02em; text-transform: none;
  }
  .nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--accent); }
  .nav-links a::after { display: none; }
  .nav-cta { border-color: var(--accent); color: var(--accent); font-family: var(--font-body); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }

  /* HERO mobile : image en haut, texte en dessous */
  .hero {
    display: flex; flex-direction: column;
    min-height: auto; padding: 0; gap: 0;
  }
  .hero-right {
    display: block; order: -1;
    width: 100%; height: 52vw; min-height: 200px; max-height: 360px; position: relative;
  }
  .hero-image-wrap {
    width: 100%; height: 100% !important; overflow: hidden;
  }
  .hero-image-wrap img {
    margin-top: 0 !important; width: 100%; height: 100%; object-fit: cover;
  }
  .hero-left {
    order: 0; width: 100%;
    /* Padding-bottom plus grand pour laisser de la place à "Défiler" */
    padding: 2rem 1.25rem 5rem !important;
    position: relative;
  }
  .hero-title { font-size: clamp(3rem, 13vw, 5.5rem) !important; margin-bottom: 20px; }
  .hero-subtitle { font-size: .9rem !important; max-width: 100% !important; }
  .hero-cta { flex-direction: column; gap: 12px !important; margin-top: 32px; }
  .btn { width: 100%; justify-content: center; text-align: center; }

  /* DÉFILER : visible sur mobile, repositionné en bas de hero-left */
  .hero-scroll {
    display: flex !important;  /* réafficher */
    position: absolute;
    bottom: 1.5rem;             /* descend un peu sous les boutons */
    left: 1.25rem;
    opacity: 1 !important;      /* visible sans attendre l'animation */
    animation: none !important;
    /* Inversion : barre en haut, texte en dessous */
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .scroll-bar {
    /* La barre apparaît EN HAUT du bloc "Défiler" */
    order: -1;
  }

  /* SECTIONS */
  .section { padding: 64px 1.25rem; }
  .section-alt { padding: 64px 1.25rem; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 40px; }

  /* PREVIEW GRID */
  .preview-grid { grid-template-columns: 1fr; gap: 2px; }
  .preview-card { aspect-ratio: 4/3; }

  /* ABOUT */
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-text { font-size: clamp(1.4rem, 5.5vw, 2rem) !important; }
  .about-stats { grid-template-columns: 1fr 1fr; gap: 24px; }
  .stat-num { font-size: 2.6rem; }

  /* PROJECTS LIST */
  .proj-link { grid-template-columns: 1fr auto; gap: 16px; padding: 20px 1.25rem; }
  .proj-num, .proj-thumb, .proj-cat { display: none; }

  /* PROJECT DETAIL */
  .proj-hero { height: 45vw; min-height: 220px; }
  .proj-hero-overlay { padding: 28px 1.25rem; }
  .proj-body { grid-template-columns: 1fr; gap: 40px; padding: 48px 1.25rem; }
  .proj-gallery { padding: 0 1.25rem 60px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-cell img { height: 220px; }
  .proj-nav { padding: 24px 1.25rem; flex-direction: column; gap: 16px; align-items: flex-start; }

  /* CV */
  .cv-wrap { grid-template-columns: 1fr; }
  .cv-right { display: none; }
  .cv-left { padding: 60px 1.25rem; }

  /* PAGE HERO */
  .page-hero { padding: calc(var(--nav-h) + 48px) 1.25rem 40px; }

  /* FOOTER */
  .footer { flex-direction: column; align-items: flex-start; gap: 20px; padding: 40px 1.25rem; }
  .footer-nav { flex-wrap: wrap; gap: 16px; }
}

/* ---------- 480px ---------- */
@media (max-width: 480px) {
  .hero-right { height: 60vw; max-height: 280px; }
  .hero-title { font-size: clamp(2.8rem, 15vw, 4rem) !important; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .stat-num { font-size: 2.2rem; }
  .preview-card { aspect-ratio: 1/1; }
  .section { padding: 48px 1rem; }
  .section-alt { padding: 48px 1rem; }
  .footer { padding: 32px 1rem; }
  .page-hero { padding: calc(var(--nav-h) + 32px) 1rem 32px; }
  .proj-body { padding: 36px 1rem; }
  .proj-gallery { padding: 0 1rem 48px; }
}