/* ═══════════════════════════════════════════════════════════
   PORTFOLIO — AYDIN RESUL  |  style.css
   GPU-first : transform + opacity + filter ciblé. Zéro color animé.
   ═══════════════════════════════════════════════════════════ */

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── VARIABLES ── */
:root {
  --black:        #080808;
  --surface:      #131313;
  --border:       rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.14);
  --text-primary: #e8e6e0;
  --text-muted:   #9b9891;          /* ratio 6.96:1 sur #080808 — WCAG AA ✓ */
  --text-faint:   #7e7c77;          /* ratio 4.80:1 sur #080808 — WCAG AA ✓ */
  --accent:       #c8b89a;          /* Sable mode sombre — ratio 10.28:1 ✓ */
  --scrollbar-thumb: rgba(200,184,154,0.35);
  --font-serif:   'Cormorant Garamond', Georgia, serif;
  --font-mono:    'DM Mono', monospace;
}

/* ── LIGHT MODE — gris ardoise avec caractère ── */
body.light-mode {
  --black:        #c8c6c2;          /* gris moyen chaud, pas blanc */
  --surface:      #b8b6b2;
  --border:       rgba(0,0,0,0.12);
  --border-hover: rgba(0,0,0,0.26);
  --text-primary: #0e0d0c;
  --text-muted:   #3d3c3a;          /* ratio 6.46:1 sur #c8c6c2 — WCAG AA ✓ */
  --text-faint:   #4e4c4b;          /* ratio 5.01:1 sur #c8c6c2 — WCAG AA ✓ */
  --accent:       #962E22;          /* Rouge foncé — ratio 4.54:1 sur gris — WCAG AA ✓ */
  --scrollbar-thumb: rgba(150,46,34,0.5);
}

/* Anti-flash avant JS */
html.light-mode-pre body { background: #c8c6c2; color: #0e0d0c; }

/* ── SCROLLBAR synced au thème ── */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
  scroll-behavior: smooth;
}
/* scrollbar standard via scrollbar-width + scrollbar-color définis sur html ci-dessus */

/* ── SÉLECTION — inchangée ── */
::selection      { background: var(--accent); color: #080808; }
body.light-mode ::selection { background: #962E22; color: #fff; }

/* ── BASE ── */
body {
  background: #080808; /* fallback WAVE */
  background: var(--black);
  color: #e8e6e0; /* fallback WAVE */
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 14px;
  line-height: 1.8;
  overflow-x: hidden;
  cursor: none;
  transition: background 0.4s ease;
}

a, button, .gallery-item, .mons-trigger { cursor: none !important; }

@media (hover: none) {
  body { cursor: auto; }
  a, button, .gallery-item, .mons-trigger { cursor: auto !important; }
}

/* ── CANVAS ── */
#bg-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

/* ── LAYOUT ── */
main { position: relative; z-index: 1; }

/* ══════════════════════════════════════════════════════
   VOILE DE TRANSITION THÈME
   Posé entre le canvas (z:0) et le contenu (z:1–500).
   Montre en opacité → le thème swap → redescend.
   Le contenu réapparaît doucement, jamais en pop.
   ══════════════════════════════════════════════════════ */
#theme-veil {
  position: fixed; inset: 0;
  z-index: 9995;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.32s ease;
  background: var(--black); /* sera mis à jour par JS avant la transition */
  /* will-change retiré du veil — il ne s'anime qu'une fois, pas besoin de layer permanente */
}
#theme-veil.covering   { opacity: 1; }
#theme-veil.uncovering { opacity: 0; }

/* ══════════════════════════════════════════════════════
   CURSEUR
   ══════════════════════════════════════════════════════ */
.cursor {
  position: fixed; top: 0; left: 0;
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: transform 0.2s cubic-bezier(.18,.89,.32,1.8), opacity 0.25s;
  will-change: transform;
}
.cursor.hide { opacity: 0; transform: translate(-50%,-50%) scale(0); }

.cursor-ring {
  position: fixed; top: 0; left: 0;
  width: 34px; height: 34px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  opacity: 0.55;
  will-change: transform;
  transition: opacity 0.3s,
              border-radius 0.3s,
              transform 0.45s cubic-bezier(.18,.89,.32,1.8);
  isolation: isolate;
}

/* Hover lien → halo */
.cursor-ring.hover-link {
  opacity: 0.18;
  transform: translate(-50%,-50%) scale(2);
}

/* Hover texte → barre I-beam — visible et contrastée */
.cursor-ring.hover-text {
  width: 2px; height: 28px;
  border-radius: 1px;
  border-width: 0;
  opacity: 0.9;
  transform: translate(-50%,-50%);
  /* Couleur injectée par JS depuis --accent courant */
}

/* Idle : pulsation douce — déclenchée uniquement quand la souris quitte la fenêtre */
.cursor-ring.idle {
  animation: cursor-idle-pulse 2.2s ease-in-out infinite;
  border-style: dashed;
  opacity: 0.35;
}
@keyframes cursor-idle-pulse {
  0%,100% { transform: translate(-50%,-50%) scale(1);   }
  50%      { transform: translate(-50%,-50%) scale(1.7); }
}

body.is-dragging,
body.is-dragging * { user-select: none !important; cursor: none !important; }

@media (hover: none) { .cursor, .cursor-ring { display: none !important; } }

/* ══════════════════════════════════════════════════════
   NAVBAR
   ══════════════════════════════════════════════════════ */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 500;
  display: flex; align-items: center; justify-content: space-between;
  padding: 2rem 3rem;
  transition: transform 0.5s cubic-bezier(0.16,1,0.3,1);
  will-change: transform;
}
nav::after {
  content: '';
  position: absolute; bottom: 0; left: 3rem; right: 3rem;
  height: 0.5px; background: var(--border);
  transition: opacity 0.4s;
}
nav.nav-scrolled {
  background: rgba(8,8,8,0.72);
  backdrop-filter: blur(20px) saturate(160%);
}
body.light-mode nav.nav-scrolled { background: rgba(200,198,194,0.82); }
nav.nav-hidden { transform: translateY(-110%); }
nav.nav-hidden::after { opacity: 0; }

.nav-logo {
  font-family: var(--font-serif); font-size: 1.1rem; font-weight: 300;
  color: var(--text-primary); letter-spacing: 0.04em; text-decoration: none;
  transition: opacity 0.3s;
}
.nav-logo:hover { opacity: 0.6; }

.nav-links {
  display: flex; align-items: center; gap: 2.5rem; list-style: none;
}
.nav-links a {
  color: var(--text-faint);
  text-decoration: none; font-size: 12px;
  letter-spacing: 0.12em; text-transform: uppercase;
  transition: color 0.3s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--accent); }

#theme-toggle {
  background: none; border: none; cursor: none; padding: 4px;
  color: var(--text-faint);
  display: flex; align-items: center; justify-content: center;
  transition: color 0.3s, transform 0.3s;
}
#theme-toggle:hover { color: var(--accent); transform: scale(1.12); }

.icon-light { display: none; }
.icon-dark  { display: block; }
body.light-mode .icon-light { display: block; }
body.light-mode .icon-dark  { display: none; }

/* ── BURGER mobile ── */
.burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: auto; padding: 4px; z-index: 501;
}
.burger span {
  display: block; width: 22px; height: 1.5px;
  background: var(--text-primary);
  transition: transform 0.3s, opacity 0.3s; transform-origin: center;
}
.burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
  display: none; position: fixed; inset: 0;
  background: var(--black); z-index: 490;
  flex-direction: column; align-items: center; justify-content: center; gap: 2.5rem;
  opacity: 0; transform: translateY(-20px);
  transition: opacity 0.35s ease, transform 0.35s ease; pointer-events: none;
}
.mobile-menu.open { opacity: 1; transform: none; pointer-events: all; }
.mobile-menu a {
  font-family: var(--font-serif); font-size: clamp(1.8rem,7vw,3rem);
  font-weight: 300; font-style: italic;
  color: var(--text-primary); text-decoration: none; transition: opacity 0.25s;
}
.mobile-menu a:hover { opacity: 0.6; }
.mobile-menu .mm-theme {
  font-family: var(--font-mono); font-size: 12px; font-style: normal;
  color: var(--accent); background: none; border: none; cursor: auto;
  letter-spacing: 0.12em; text-transform: uppercase; margin-top: 0.5rem;
}

@media (max-width: 700px) {
  .nav-links { display: none !important; }
  .burger    { display: flex; }
  .mobile-menu { display: flex; }
}

/* ── SR-ONLY ── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ══════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════ */
#hero {
  height: 100vh; min-height: 600px;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 3rem 4rem;
}
.hero-label { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 1.5rem; }
.hero-title { font-family: var(--font-serif); font-size: clamp(3rem,8vw,7rem); font-weight: 300; font-style: italic; line-height: 1.05; color: var(--text-primary); letter-spacing: -0.01em; max-width: 700px; }
.hero-title em { color: var(--accent); }
.hero-sub { margin-top: 2rem; color: var(--text-muted); font-size: 12px; letter-spacing: 0.08em; max-width: 360px; line-height: 2; }
.hero-scroll { margin-top: 3rem; display: inline-flex; align-items: center; gap: 1rem; color: var(--text-muted); font-size: 12px; letter-spacing: 0.15em; text-transform: uppercase; }
.hero-scroll::before { content: ''; display: block; width: 40px; height: 0.5px; background: var(--text-muted); }

/* ── SECTIONS ── */
section { padding: 8rem 3rem; border-top: 0.5px solid var(--border); }
.section-label { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 3rem; display: inline-flex; align-items: center; gap: 1rem; }
.section-label::after { content: ''; display: block; width: 60px; height: 0.5px; background: var(--text-faint); }

/* ── ABOUT ── */
#about { display: grid; grid-template-columns: 1fr 1fr; gap: 6rem; align-items: start; }
.about-heading { font-family: var(--font-serif); font-size: clamp(2rem,4vw,3.5rem); font-weight: 300; line-height: 1.2; color: var(--text-primary); margin-bottom: 2rem; }
.about-heading span { color: var(--accent); }
.about-right { padding-top: 4rem; }
.about-bio { color: var(--text-muted); line-height: 2; margin-bottom: 2rem; font-size: 13px; }
.skills-list { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 2.5rem; }
.skill-item { display: inline-flex; align-items: center; gap: 1rem; color: var(--text-muted); font-size: 12px; letter-spacing: 0.08em; }
.skill-item::before { content: ''; display: block; width: 3px; height: 3px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

/* ── GALLERY ── */
.gallery-grid { display: grid; grid-template-columns: repeat(12,1fr); gap: 1rem; }
.gallery-item { background: var(--surface); border: 0.5px solid var(--border); overflow: hidden; position: relative; cursor: none; user-select: none; }
.gallery-item:nth-child(1) { grid-column:1/8;   grid-row:1; aspect-ratio:16/9; }
.gallery-item:nth-child(2) { grid-column:8/13;  grid-row:1; aspect-ratio:4/5; }
.gallery-item:nth-child(3) { grid-column:1/5;   grid-row:2; aspect-ratio:1; }
.gallery-item:nth-child(4) { grid-column:5/10;  grid-row:2; aspect-ratio:16/9; }
.gallery-item:nth-child(5) { grid-column:10/13; grid-row:2; aspect-ratio:1; }
.gallery-img { width:100%; height:100%; object-fit:cover; display:block; transition:transform 0.7s cubic-bezier(.25,.46,.45,.94); }
.gallery-item:hover .gallery-img { transform: scale(1.04); }
.gallery-placeholder { width:100%; height:100%; min-height:200px; display:flex; align-items:center; justify-content:center; color:var(--text-muted); font-size:12px; letter-spacing:0.15em; text-transform:uppercase; }
.gallery-overlay { position:absolute; inset:0; background:linear-gradient(to top,rgba(8,8,8,0.8),transparent 50%); opacity:0; transition:opacity 0.4s; display:flex; align-items:flex-end; padding:1.5rem; }
.gallery-item:hover .gallery-overlay { opacity:1; }
.gallery-meta { font-size:12px; color:var(--text-muted); letter-spacing:0.06em; }
.gallery-meta strong { display:block; color:var(--text-primary); font-weight:400; margin-bottom:0.25rem; font-size:13px; }
.gallery-video { width:100%; height:100%; object-fit:cover; display:block; }

/* ── PROCESS ── */
.process-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:0; }
.process-step { padding:2.5rem 2rem; border-right:0.5px solid var(--border); border-bottom:0.5px solid var(--border); }
.process-step:nth-child(4n)        { border-right:none; }
.process-step:nth-last-child(-n+4) { border-bottom:none; }
.process-num   { font-size:12px; letter-spacing:0.15em; color:var(--text-faint); margin-bottom:1.5rem; }
.process-title { font-family:var(--font-serif); font-size:1.4rem; font-weight:300; color:var(--text-primary); margin-bottom:1rem; line-height:1.3; }
.process-desc  { font-size:12px; color:var(--text-muted); line-height:2; }
.wip-strip { margin-top:5rem; display:flex; gap:1rem; overflow-x:auto; padding-bottom:1rem; scrollbar-width:thin; scrollbar-color:var(--scrollbar-thumb) transparent; }

/* Règle unique fusionnée — position:relative indispensable pour l'image absolute */
.wip-item {
  flex-shrink: 0;
  width: 240px;
  aspect-ratio: 4/3;
  background: var(--surface);
  border: 0.5px solid var(--border);
  position: relative;
  overflow: hidden;
  /* Le texte label est masqué quand une image est présente (z-index 0 sous l'img) */
  display: flex;
  align-items: flex-end;
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Image couvre toute la case */
.wip-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1; /* au-dessus du texte → le cache proprement */
  transition: transform 0.6s cubic-bezier(.25,.46,.45,.94);
}
.wip-item:hover img { transform: scale(1.04); }

/* ── CONTACT section ── */
#contact { display:grid; grid-template-columns:1fr 1fr; gap:6rem; align-items:start; }
.contact-heading { font-family:var(--font-serif); font-size:clamp(2.5rem,5vw,4.5rem); font-weight:300; font-style:italic; line-height:1.1; color:var(--text-primary); }
.contact-heading em { color:var(--accent); }
.contact-right { padding-top:1rem; }
.contact-line { display:flex; flex-direction:column; gap:0.5rem; margin-bottom:2.5rem; padding-bottom:2.5rem; border-bottom:0.5px solid var(--border); }
.contact-line:last-child { border-bottom:none; margin-bottom:0; }
.contact-line-label { font-size:12px; color:var(--text-faint); letter-spacing:0.15em; text-transform:uppercase; }
.contact-line-value { color:var(--text-primary); text-decoration:none; font-size:14px; letter-spacing:0.04em; background:none; border:none; padding:0; text-align:left; font-family:var(--font-mono); font-weight:300; transition:opacity 0.3s; }
.contact-line-value:hover { opacity:0.6; }
.mons-trigger { display:inline-flex; align-items:center; gap:6px; }
.contact-cta { display:inline-block; color:var(--accent); text-decoration:none; font-size:12px; letter-spacing:0.15em; text-transform:uppercase; border-bottom:0.5px solid var(--accent); padding-bottom:2px; transition:opacity 0.3s; }
.contact-cta:hover { opacity:1; }

/* ── CV DOWNLOAD ── */
.cv-download {
  display: inline-flex;
  align-items: center;
  transition: opacity 0.3s;
}
.cv-download:hover { opacity: 0.6; }

/* ── BARRE DE PROGRESSION SCROLL ── */
#scroll-progress {
  position: fixed;
  left: 0; top: 0;
  width: 2px;
  height: 0%;           /* mise à jour par JS via scaleY transform */
  background: var(--accent);
  z-index: 9000;
  pointer-events: none;
  transform-origin: top center;
  opacity: 0.55;
  transition: opacity 0.4s;
  will-change: height;
}
/* Disparaît quand on est tout en haut (pas encore scrollé) */
#scroll-progress.hidden { opacity: 0; }

/* Point indicateur en bas de la barre */
#scroll-progress::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 50%;
  transform: translateX(-50%);
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* ── FOOTER ── */
footer {
  padding: 2rem 3rem;
  border-top: 0.5px solid var(--border);
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 0.75rem;
  color: var(--text-faint); font-size: 12px; letter-spacing: 0.08em;
}
.footer-row { display: flex; justify-content: space-between; width: 100%; }

.back-to-top {
  background: none; border: none; cursor: auto;
  color: var(--text-faint); font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.1em;
  display: inline-flex; align-items: center; gap: 6px;
  transition: opacity 0.3s; padding: 0;
  margin-bottom: 0.25rem;
}
.back-to-top:hover { opacity: 1; }

/* ── REVEAL ── */
.reveal { opacity:0; transform:translateY(24px); transition:opacity 0.9s cubic-bezier(.25,.46,.45,.94),transform 0.9s cubic-bezier(.25,.46,.45,.94); }
.reveal.visible { opacity:1; transform:none; }
.reveal:not(.visible) {
  visibility: hidden;
}

/* ══════════════════════════════════════════════════════
   MODAL MONS
   ══════════════════════════════════════════════════════ */
.map-modal {
  position:fixed; inset:0; z-index:9000;
  display:flex; align-items:center; justify-content:center;
  pointer-events:none; opacity:0; transition:opacity 0.3s ease;
}
.map-modal.open { opacity:1; pointer-events:all; }
.map-modal-backdrop {
  position:absolute; inset:0; background:rgba(0,0,0,0.72);
  backdrop-filter:blur(8px);
}
.map-modal-inner {
  position:relative; width:min(720px,90vw); height:min(480px,70vh);
  background:var(--surface); border:0.5px solid var(--border); overflow:hidden;
  transform:scale(0.88) translateY(12px); opacity:0;
  transition:transform 0.45s cubic-bezier(.34,1.56,.64,1), opacity 0.3s; will-change:transform;
}
.map-modal.open .map-modal-inner { transform:scale(1) translateY(0); opacity:1; }
.map-modal-close {
  position:absolute; top:1rem; right:1rem; z-index:1;
  background:rgba(8,8,8,0.8); border:0.5px solid rgba(255,255,255,0.1);
  color:var(--text-muted); width:34px; height:34px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  cursor:auto; transition:opacity 0.25s;
}
.map-modal-close:hover { opacity:0.7; }
body.modal-open { overflow:hidden; }

/* ══════════════════════════════════════════════════════
   OVERSCROLL MSG
   ══════════════════════════════════════════════════════ */
#overscroll-msg {
  position:fixed; bottom:-80px; left:50%; transform:translateX(-50%);
  font-family:var(--font-mono); font-size:12px; letter-spacing:0.08em;
  color:var(--text-faint); white-space:nowrap; pointer-events:none;
  transition:bottom 0.5s cubic-bezier(.34,1.56,.64,1), opacity 0.5s;
  opacity:0; z-index:8000;
}
#overscroll-msg.visible { bottom:2rem; opacity:1; pointer-events:all; }
#overscroll-msg a { color:var(--accent); text-decoration:underline; text-decoration-thickness:0.5px; }

/* ══════════════════════════════════════════════════════
   CHAOS MODE
   GPU-first. will-change:filter uniquement sur des
   sélecteurs CIBLÉS (pas le *-universel → trop de layers).
   Canvas chaos à 10fps. Confettis réduits à 45.
   ══════════════════════════════════════════════════════ */

/* will-change:filter géré par JS uniquement pendant chaos-active (voir script.js)
   → zéro layer GPU permanent, zéro budget dépassé en usage normal */
body.chaos-active .hero-title,
body.chaos-active .hero-label,
body.chaos-active .hero-sub,
body.chaos-active .about-heading,
body.chaos-active .about-bio,
body.chaos-active .skill-item,
body.chaos-active .section-label,
body.chaos-active .process-title,
body.chaos-active .process-desc,
body.chaos-active .process-num,
body.chaos-active .contact-heading,
body.chaos-active .contact-line-label,
body.chaos-active .contact-line-value,
body.chaos-active .nav-logo,
body.chaos-active .nav-links a,
body.chaos-active footer {
  animation: chaos-hue 1.4s linear infinite;
}

/* Phases décalées */
body.chaos-active .hero-title   { animation-delay: 0s; }
body.chaos-active .about-heading { animation-delay: .1s; }
body.chaos-active .nav-logo     { animation-delay: .05s; }
body.chaos-active .hero-sub     { animation-delay: .15s; }
body.chaos-active .skill-item   { animation-delay: .2s; }
body.chaos-active .process-title { animation-delay: .08s; }
body.chaos-active footer        { animation-delay: .25s; }

/* Shake permanent titres — léger pour ne pas agresser */
body.chaos-active .hero-title {
  animation: chaos-hue 1.4s linear infinite,
             chaos-shake-title 0.2s ease-in-out infinite;
}
body.chaos-active .about-heading,
body.chaos-active .process-title,
body.chaos-active .contact-heading {
  animation: chaos-hue 1.4s linear infinite .1s,
             chaos-shake-title 0.24s ease-in-out infinite .06s;
}

@keyframes chaos-hue {
  from { filter: hue-rotate(0deg)   saturate(2.5); }
  to   { filter: hue-rotate(360deg) saturate(2.5); }
}
@keyframes chaos-shake-title {
  0%,100% { transform: none; }
  25%  { transform: translateX(-1.5px) rotate(-0.3deg); }
  75%  { transform: translateX(1.5px)  rotate(0.3deg); }
}

/* Shake one-shot sur main à la fin */
.chaos-shake { animation: chaos-shake-main 0.55s cubic-bezier(.36,.07,.19,.97); }
@keyframes chaos-shake-main {
  0%,100% { transform:none; }
  15% { transform:translateX(-5px) rotate(-.4deg); }
  30% { transform:translateX(5px)  rotate(.4deg); }
  45% { transform:translateX(-3px); }
  60% { transform:translateX(3px); }
  75% { transform:translateX(-1px); }
}

/* ── Overlay chaos ── */
#chaos-overlay {
  position:fixed; inset:0; z-index:9993;
  display:flex; align-items:center; justify-content:center;
  pointer-events:none; opacity:0; transition:opacity 0.5s ease;
}
#chaos-overlay.visible { opacity:1; }

.chaos-inner {
  position: relative; text-align:center; padding:3rem 4rem;
  background: rgba(6,6,6,0.93);
  border-radius: 2px; overflow: hidden; isolation: isolate;
}

/* Glow rotatif — animation rotation standard */
.chaos-inner::before {
  content: '';
  position: absolute;
  inset: -50%;
  background-image: conic-gradient(#ff6b6b, #ffd93d, #6bcb77, #4d96ff, #c77dff, #ff9a3c, #ff6b6b);
  opacity: 0.15;
  animation: chaos-ca-spin 3s linear infinite;
  z-index: -1;
}
@keyframes chaos-ca-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Bordure néon tournante */
.chaos-inner::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 2px;
  padding: 2px;
  background-image: conic-gradient(#ff6b6b, #ffd93d, #6bcb77, #4d96ff, #c77dff, #ff9a3c, #ff6b6b);
  mask-image: linear-gradient(#000, #000), linear-gradient(#000, #000);
  mask-clip: content-box, border-box;
  mask-composite: exclude;
  animation: chaos-ca-spin 2s linear infinite;
  pointer-events: none;
}

/* Texte chaos — net, blanc, zéro animation */
.chaos-label,.chaos-title,.chaos-sub,.chaos-title em {
  animation: none !important; filter: none !important;
  color: #fff !important; position:relative; z-index:1;
}
.chaos-label { font-family:var(--font-mono); font-size:12px; letter-spacing:0.25em; text-transform:uppercase; margin-bottom:1rem; color:#bfbfbf; }
.chaos-title { font-family:var(--font-serif); font-size:clamp(3rem,7vw,5.5rem); font-weight:300; line-height:1.05; }
.chaos-title em { font-style:italic; }
.chaos-sub   { margin-top:1rem; font-size:12px; letter-spacing:0.08em; color:#9a9a9a; }

#chaos-particles { position:fixed; inset:0; pointer-events:none; z-index:9992; overflow:hidden; }

/* ══════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  nav { padding:1.5rem; }
  nav::after { left:1.5rem; right:1.5rem; }
  #hero { padding:0 1.5rem 3rem; }
  section { padding:5rem 1.5rem; }
  footer { padding:1.5rem; }
  #about { grid-template-columns:1fr; gap:3rem; }
  .about-right { padding-top:0; }
  .gallery-grid { grid-template-columns:1fr 1fr; gap:0.75rem; }
  .gallery-item:nth-child(n) { grid-column:auto; grid-row:auto; aspect-ratio:4/3; }
  .process-grid { grid-template-columns:1fr 1fr; }
  .process-step:nth-child(2n) { border-right:none; }
  .process-step:nth-last-child(-n+4) { border-bottom:0.5px solid var(--border); }
  .process-step:nth-last-child(-n+2) { border-bottom:none; }
  #contact { grid-template-columns:1fr; gap:3rem; }
}
@media (max-width: 600px) {
  .hero-title { font-size:2.5rem; }
  .gallery-grid { grid-template-columns:1fr; }
  .process-grid { grid-template-columns:1fr; }
  .process-step:nth-child(n) { border-right:none; border-bottom:0.5px solid var(--border); }
  .process-step:last-child { border-bottom:none; }
}

/* Fallbacks explicites pour WAVE (ne résout pas les CSS variables) */
.section-label  { color: #7e7c77; color: var(--text-faint); }
.hero-label     { color: #7e7c77; color: var(--text-faint); }
.hero-sub       { color: #9b9891; color: var(--text-muted); }
.about-bio      { color: #e8e6e0; color: var(--text-primary); }
.process-desc   { color: #9b9891; color: var(--text-muted); }
.form-label     { color: #7e7c77; color: var(--text-faint); }
.form-notice    { color: #7e7c77; color: var(--text-faint); }
.contact-line-label { color: #7e7c77; color: var(--text-faint); }
.nav-links a    { color: #7e7c77; color: var(--text-faint); }
footer          { color: #7e7c77; color: var(--text-faint); }
