/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --bg:            #ffffff;
  --bg-subtle:     #f8f6f3;
  --bg-card:       #ffffff;
  --border:        rgba(0,0,0,.09);
  --border-md:     rgba(0,0,0,.16);
  --text:          #111210;
  --text-muted:    #6b6860;
  --text-faint:    #a8a49e;
  --accent:        #c05a2a;
  --accent-bg:     #fdf0e9;
  --green:         #4a9e6a;
  --featured-bg:   #1a1714;
  --featured-text: #f5f0eb;
  --featured-muted:#9c9690;
  --font-head:     'Syne', sans-serif;
  --font-body:     'Literata', Georgia, serif;
  --max-w:         1080px;
  --nav-h:         60px;
  --radius:        10px;
  --radius-sm:     6px;
  --radius-pill:   20px;
  --t:             .2s ease;
  --nav-bg:        rgba(17,18,16,.8);
  --code-col:      rgba(192,90,42,.52);
  --btn-sec-b:     rgba(255,255,255,.15);
  --btn-sec-h:     rgba(255,255,255,.06);
  --btn-sec-t:     #9c9690;
}
[data-theme="dark"] {
  --bg:            #111210;
  --bg-subtle:     #1a1917;
  --bg-card:       #1e1c1a;
  --border:        rgba(255,255,255,.08);
  --border-md:     rgba(255,255,255,.15);
  --text:          #f0ece6;
  --text-muted:    #9c9690;
  --text-faint:    #5c5a56;
  --accent:        #d4703a;
  --accent-bg:     #2a1a10;
  --green:         #5ab87c;
  --featured-bg:   #0d0c0b;
  --featured-text: #f0ece6;
  --featured-muted:#7a7672;
}
[data-theme="light"] {
  --nav-bg:    rgba(255,255,255,.9);
  --code-col:  rgba(192,90,42,.5);
  --btn-sec-b: rgba(0,0,0,.12);
  --btn-sec-h: rgba(0,0,0,.04);
  --btn-sec-t: #6b6860;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  font-size: 112%;
  height: 100%;
  background: var(--bg);
  transition: background .4s;
}
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  background: var(--bg);
  color: var(--text);
  transition: background var(--t), color var(--t);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ── Navigation ─────────────────────────────────────────── */
.nav {
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px;
  background: var(--bg);
  border-bottom: 0.5px solid var(--border);
  transition: background var(--t), border-color var(--t);
}
header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  transition: background var(--t);
}
.nav-logo {
  font-family: var(--font-head);
  font-weight: 700; font-size: 18px; letter-spacing: -.01em;
  color: var(--text);
  display: flex; align-items: center; gap: 10px;
}
.nav-logo span { font-weight: 400; color: var(--accent); }
.nav-logo-sub {
  font-family: var(--font-head);
  font-size: 18px; font-weight: 400;
  color: var(--text-faint);
  letter-spacing: .04em;
  padding-left: 10px;
}
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a {
  font-family: var(--font-head);
  font-size: 14px; font-weight: 500; letter-spacing: .04em;
  color: var(--text-muted); transition: color var(--t);
}
.nav-links a:hover { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 12px; }

.btn-theme {
  width: 34px; height: 34px; border-radius: 50%;
  border: 0.5px solid var(--border-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 15px;
  transition: background var(--t), color var(--t);
  background: transparent;
}
.btn-theme svg { width: 16px; height: 16px; stroke-width: 1.5; display: block; }
#icon-sun, #icon-moon { display: flex; align-items: center; justify-content: center; }
.btn-theme:hover { background: var(--bg-subtle); color: var(--text); }

.btn-contact-nav {
  font-family: var(--font-head);
  font-size: 15px; font-weight: 500; letter-spacing: .04em;
  padding: 7px 16px; border-radius: var(--radius-pill);
  border: 0.5px solid var(--border-md);
  color: var(--text); background: transparent;
  transition: background var(--t);
}
.btn-contact-nav:hover { background: var(--bg-subtle); }

.nav-burger {
  display: none; flex-direction: column;
  gap: 5px; padding: 4px; cursor: pointer;
}
.nav-burger span {
  display: block; width: 22px; height: 1.5px;
  background: var(--text);
  transition: transform var(--t), opacity var(--t);
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  border-bottom: 0.5px solid var(--border);
  position: relative;
  overflow: hidden;
}
.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 84px 32px 72px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(192,90,42,.1) 1.5px, transparent 1.5px),
    linear-gradient(90deg, rgba(192,90,42,.1) 1.5px, transparent 1.5px);
  background-size: 32px 32px;
  background-attachment: fixed;
  pointer-events: none;
  z-index: 0;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(
    to top,
    rgba(192,90,42,.08) 0%,
    rgba(192,90,42,.03) 50%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
}
.hero-text { position: relative; z-index: 1; min-width: 0; }
.profile-wrap { position: relative; z-index: 1; flex-shrink: 0; }
.hero-eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.eyebrow-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
}
.eyebrow-txt {
  font-family: var(--font-head);
  font-size: 15px; font-weight: 500; letter-spacing: .07em; color: var(--text-muted);
}
.hero-name {
  font-family: var(--font-head);
  font-size: 15px; font-weight: 500; letter-spacing: .06em;
  color: var(--text-muted); margin-bottom: 10px;
}
.hero-firstname { color: var(--accent); }
.hero-age {
  font-size: 28px;
  font-weight: 400; color: var(--text-faint); letter-spacing: -.01em;
}
.hero h1 {
  font-family: var(--font-head);
  font-size: 58px;
  font-weight: 700; line-height: 1.08;
  letter-spacing: -.025em; margin-bottom: 20px; color: var(--text);
}
.hero h1 .dim { font-weight: 400; color: var(--text-faint); }
.hero-desc {
  font-size: 17px; line-height: 1.8; color: var(--text-muted);
  max-width: 480px; margin-bottom: 32px; font-style: italic;
}
.hero-cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ── Photo de profil ────────────────────────────────────── */
.profile-photo {
  width: 360px;
  height: 360px;
  border-radius: 50%;
  border: 0.5px solid var(--border);
  background: var(--bg-subtle);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: border-color var(--t), box-shadow var(--t);
  box-shadow: 0 8px 30px rgba(0,0,0,.35);
}
.profile-photo:hover { border-color: var(--border-md); }
.profile-photo img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.profile-avatar-icon { display: flex; align-items: center; justify-content: center; color: var(--text-faint); }
.profile-avatar-icon svg { width: 56px; height: 56px; stroke-width: 1; }
.profile-input { display: none; }

.btn-primary {
  font-family: var(--font-head);
  font-size: 14px; font-weight: 600; letter-spacing: .04em;
  padding: 11px 24px; background: var(--text); color: var(--bg);
  border-radius: var(--radius-sm);
  transition: opacity var(--t), transform var(--t);
  display: inline-flex; align-items: center; gap: 7px;
}
.btn-primary:hover { opacity: .82; transform: translateY(-1px); }
.btn-secondary {
  font-family: var(--font-head);
  font-size: 14px; font-weight: 500; letter-spacing: .04em;
  padding: 11px 20px; border: 0.5px solid var(--border-md);
  border-radius: var(--radius-sm); color: var(--text-muted);
  background: var(--bg); transition: background var(--t), color var(--t);
  display: inline-flex; align-items: center; gap: 7px;
}
.btn-secondary svg { flex-shrink: 0; }
.btn-secondary:hover { background: var(--bg-subtle); color: var(--text); }

.hero-avail {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--font-head);
  font-size: 15px; font-weight: 500; color: var(--green); margin-left: 4px;
}
.avail-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--green);
  animation: pulse 2.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .45; transform: scale(.65); }
}

/* ── Stats ──────────────────────────────────────────────── */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-bottom: 0.5px solid var(--border);
  width: 100%;
}
.stat {
  padding: 26px 32px;
  border-right: 0.5px solid var(--border);
}
.stat:last-child { border-right: none; }
.stat-n {
  font-family: var(--font-head);
  font-size: 32px; font-weight: 700; letter-spacing: -.02em;
  color: var(--text); margin-bottom: 3px;
}
.stat-l {
  font-family: var(--font-head);
  font-size: 15px; font-weight: 400; letter-spacing: .04em; color: var(--text-faint);
}

/* ── Sections ───────────────────────────────────────────── */
.section { padding: 72px 32px; max-width: 1200px; margin: 0 auto; }
.section + .section { border-top: 0.5px solid var(--border); }
.section-head { display: flex; align-items: center; gap: 16px; margin-bottom: 40px; }
.section-label {
  font-family: var(--font-head);
  font-size: 14px; font-weight: 600; letter-spacing: .1em;
  color: var(--text-faint); white-space: nowrap;
}
.section-line { flex: 1; height: 0.5px; background: var(--border); }

/* ── Carrousel ──────────────────────────────────────────── */
.carousel-wrap { position: relative; overflow: hidden; }
.carousel-track {
  display: flex; gap: 16px;
  transition: transform .4s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}
.carousel-slide { flex: 0 0 calc(50% - 8px); min-width: 0; }

.proj-card {
  border: 0.5px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--bg-card);
  transition: border-color var(--t), transform var(--t), background var(--t);
  display: flex; flex-direction: column; height: 100%;
}
.proj-card:hover { border-color: var(--border-md); }

.proj-card-visual {
  width: 100%; aspect-ratio: 16/9;
  background: var(--bg-subtle);
  border-bottom: 0.5px solid var(--border);
  overflow: hidden; position: relative;
  min-height: 0;
}
.proj-card-visual img { width: 100%; height: 100%; object-fit: cover; }
.proj-visual-placeholder { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.proj-visual-icon { display: flex; align-items: center; justify-content: center; color: var(--text-faint); }
.proj-visual-icon svg { width: 36px; height: 36px; stroke-width: 1; }
.proj-visual-label {
  font-family: var(--font-head); font-size: 14px;
  letter-spacing: .08em; color: var(--text-faint);
}

/* ── Mini-carrousel dans les cards ──────────────────────── */
.mini-carousel { position: absolute; inset: 0; overflow: hidden; }
.mini-carousel-track {
  display: flex; height: 100%;
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}
.mini-carousel-slide {
  flex: 0 0 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-subtle); overflow: hidden;
}
.mini-carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mini-carousel-slide .proj-visual-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
}
.mini-carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(0,0,0,.28); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px;
  opacity: 0; transition: opacity var(--t);
}
.mini-carousel-btn svg { width: 14px; height: 14px; stroke-width: 2.5; }
.mini-carousel:hover .mini-carousel-btn { opacity: 1; }
.mini-carousel-btn:disabled { opacity: 0 !important; cursor: default; }
.mini-carousel-btn.prev { left: 8px; }
.mini-carousel-btn.next { right: 8px; }

.proj-card.featured {
  border-color: var(--featured-bg); background: var(--featured-bg);
}
.proj-card.featured .proj-card-visual {
  background: #0d0c0b; border-color: rgba(255,255,255,.06);
}
.proj-card.featured .proj-card-name  { color: var(--featured-text); }
.proj-card.featured .proj-card-desc  { color: var(--featured-muted); }
.proj-card.featured .proj-tag {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.1); color: #9c9690;
}
.proj-card.featured .proj-tag-group-label { color: rgba(255,255,255,.25); }

.proj-card-body { padding: 18px 20px 16px; flex: 1; display: flex; flex-direction: column; }
.proj-card-name {
  font-family: var(--font-head);
  font-size: 15px; font-weight: 600; color: var(--text);
  margin-bottom: 6px; letter-spacing: -.01em;
}
.proj-card-desc {
  font-size: 17px; line-height: 1.65; color: var(--text-muted);
  font-style: italic; flex: 1; margin-bottom: 14px;
}
.proj-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.proj-tag {
  font-family: var(--font-head); font-size: 14px; font-weight: 500;
  padding: 3px 8px; border-radius: 4px;
  background: var(--bg-subtle); border: 0.5px solid var(--border);
  color: var(--text-faint); letter-spacing: .02em;
}

/* ── Tags groupés (Langages / Compétence E5) ────────────── */
.proj-tag-groups { display: flex; flex-direction: column; gap: 8px; }
.proj-tag-group { display: flex; flex-direction: column; gap: 5px; }
.proj-tag-group-label {
  font-family: var(--font-head);
  font-size: 11px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-faint);
}

.carousel-controls {
  display: flex; align-items: center;
  justify-content: space-between; margin-top: 24px;
}
.carousel-dots { display: flex; gap: 6px; }
.carousel-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--border-md);
  transition: background var(--t), width var(--t), border-radius var(--t);
  cursor: pointer; border: none; padding: 0;
}
.carousel-dot.active {
  background: var(--accent); width: 20px; border-radius: 3px;
}
.carousel-arrows { display: flex; gap: 8px; }
.carousel-arrow {
  width: 36px; height: 36px; border-radius: 50%;
  border: 0.5px solid var(--border-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 14px;
  background: transparent;
  transition: background var(--t), color var(--t); cursor: pointer;
}
.carousel-arrow svg { width: 16px; height: 16px; stroke-width: 2; }
.carousel-arrow:hover { background: var(--bg-subtle); color: var(--text); }
.carousel-arrow:disabled { opacity: .3; cursor: default; }

/* ── Timeline ───────────────────────────────────────────── */
.timeline { display: flex; flex-direction: column; }
.tl-item {
  display: grid; grid-template-columns: 64px 24px 1fr;
  gap: 0 20px; align-items: start;
}
.tl-year {
  font-family: var(--font-head); font-size: 14px; font-weight: 600;
  color: var(--accent); text-align: right; padding-top: 5px; letter-spacing: .02em;
}
.tl-spine { display: flex; flex-direction: column; align-items: center; }
.tl-dot {
  width: 9px; height: 9px; border-radius: 50%;
  border: 1.5px solid var(--accent); background: var(--bg);
  flex-shrink: 0; margin-top: 4px; transition: background var(--t);
}
.tl-dot.fill { background: var(--accent); }
.tl-line { width: 0.5px; background: var(--border); flex: 1; min-height: 28px; }
.tl-item:last-child .tl-line { display: none; }
.tl-content { padding-bottom: 36px; }
.tl-item:last-child .tl-content { padding-bottom: 0; }
.tl-role {
  font-family: var(--font-head); font-size: 14px; font-weight: 600;
  color: var(--text); margin-bottom: 3px; letter-spacing: -.005em;
}
.tl-org {
  font-family: var(--font-head); font-size: 15px; font-weight: 500;
  color: var(--accent); margin-bottom: 7px; letter-spacing: .02em;
}
.tl-desc {
  font-size: 17px; line-height: 1.7; color: var(--text-muted);
  font-style: italic; margin-bottom: 10px;
}
.tl-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.tl-tag {
  font-family: var(--font-head); font-size: 14px; font-weight: 500;
  padding: 2px 8px; border-radius: 4px;
  background: var(--accent-bg); color: var(--accent); letter-spacing: .02em;
}

/* ── Contact ────────────────────────────────────────────── */
.contact-desc {
  font-size: 17px; line-height: 1.75;
  color: var(--text-muted); font-style: italic;
  margin-bottom: 20px; max-width: 440px;
}
.contact-links { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Footer ─────────────────────────────────────────────── */
.footer {
  border-top: 0.5px solid var(--border);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 32px 32px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
}
.footer-brand-logo {
  font-family: var(--font-head); font-size: 18px; font-weight: 700;
  color: var(--text); letter-spacing: -.01em; margin-bottom: 10px;
}
.footer-brand-logo span { color: var(--accent); }
.footer-brand-desc {
  font-size: 17px; line-height: 1.7; color: var(--text-muted);
  font-style: italic; max-width: 220px; margin-bottom: 18px;
}
.footer-socials { display: flex; gap: 8px; }
.footer-social {
  width: 34px; height: 34px; border-radius: 6px;
  border: 0.5px solid var(--border-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); background: transparent;
  transition: border-color var(--t), color var(--t), background var(--t);
}
.footer-social:hover { background: var(--bg-subtle); color: var(--text); }
.footer-social svg { width: 15px; height: 15px; }
.footer-social i { display: flex; }
.footer-social i svg { width: 15px; height: 15px; stroke-width: 1.5; }
.footer-col-title {
  font-family: var(--font-head); font-size: 14px; font-weight: 600;
  letter-spacing: .09em; color: var(--text-faint);
  text-transform: uppercase; margin-bottom: 14px;
}
.footer-nav-links { display: flex; flex-direction: column; gap: 9px; }
.footer-nav-links a {
  font-family: var(--font-head); font-size: 15px; font-weight: 400;
  color: var(--text-muted); transition: color var(--t);
}
.footer-nav-links a:hover { color: var(--text); }
.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 32px;
  border-top: 0.5px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.footer-copy {
  font-family: var(--font-head); font-size: 15px; color: var(--text-faint);
}
.footer-version {
  font-family: var(--font-head); font-size: 14px;
  letter-spacing: .06em; color: var(--text-faint);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav { padding: 0 20px; }
  .nav-links { display: none; }
  .btn-contact-nav { display: none; }
  .nav-burger { display: flex; }
  .nav-logo-sub { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--bg); border-bottom: 0.5px solid var(--border);
    padding: 20px 24px; gap: 16px;
  }
  .hero-content {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    padding: 48px 24px 40px;
    gap: 28px;
  }
  .hero-text { order: 2; }
  .profile-wrap { order: 1; display: flex; justify-content: center; }
  .profile-photo { width: 180px; height: 180px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(3) { border-top: 0.5px solid var(--border); }
  .stat { padding: 18px 20px; }
  .section { padding: 48px 24px; max-width: 100%; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; padding: 36px 24px 24px; }
}

@media (max-width: 480px) {
  .hero-content { padding: 36px 16px 32px; gap: 20px; }
  .hero h1 { font-size: 34px; }
  .hero-age { font-size: 20px; }
  .hero-cta { flex-direction: column; align-items: flex-start; }
  .profile-photo { width: 120px; height: 120px; }
  .section { padding: 36px 16px; }
  .carousel-slide { flex: 0 0 calc(100% - 24px); }
  .skills-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; padding: 28px 16px 20px; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; padding: 12px 16px; }
}

/* ── Animations scroll ──────────────────────────────────── */
.anim { opacity: 0; transform: translateY(14px); transition: opacity .45s ease, transform .45s ease; }
.anim.visible { opacity: 1; transform: translateY(0); }

/* ── Compétences ────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.skills-cat {
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--bg-card);
}
.skills-cat-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px;
}
.skills-cat-icon {
  width: 32px; height: 32px; border-radius: 5px;
  background: var(--accent-bg); border: 0.5px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--accent);
}
.skills-cat-icon svg { width: 16px; height: 16px; stroke-width: 1.5; }
.skills-cat-title {
  font-family: var(--font-head);
  font-size: 15px; font-weight: 600; letter-spacing: .08em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.skills-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.skill-chip {
  font-family: var(--font-head);
  font-size: 14px; font-weight: 500;
  padding: 5px 12px; border-radius: 6px;
  background: var(--bg-subtle); border: 0.5px solid var(--border);
  color: var(--text-muted); letter-spacing: .01em;
}
@media (max-width: 900px) { .skills-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .skills-grid { grid-template-columns: 1fr; } }

/* ══════════════════════════════════════════════════════════
   404
   ══════════════════════════════════════════════════════════ */

.page-404 {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-404::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(192,90,42,.12) 1.5px, transparent 1.5px),
    linear-gradient(90deg, rgba(192,90,42,.12) 1.5px, transparent 1.5px);
  background-size: 32px 32px;
  background-attachment: fixed;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
  transition: opacity .4s ease;
}
[data-theme="light"] .page-404::before { opacity: 0.55; }

.page-404::after {
  content: '';
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 1200px; height: 700px;
  background: radial-gradient(ellipse at center,
    rgba(192,90,42,.1) 0%,
    rgba(192,90,42,.06) 25%,
    rgba(192,90,42,.02) 55%,
    transparent 75%
  );
  pointer-events: none;
  z-index: 0;
}

.nav-404 {
  position: relative; z-index: 10;
  padding: 0 32px; height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 0.5px solid var(--border);
  background: var(--nav-bg);
  backdrop-filter: blur(8px);
  transition: background .4s, border-color .4s;
}
.nav-404 .nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 700; font-size: 16px;
  color: var(--text); letter-spacing: -.01em;
  text-decoration: none;
}
.nav-404 .nav-logo span { color: var(--accent); font-weight: 400; }

.main-404 {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
  padding: 48px 32px;
}

.error-wrap { text-align: center; max-width: 560px; }

.error-code {
  font-family: 'Syne', sans-serif;
  font-size: clamp(100px, 20vw, 180px);
  font-weight: 700; line-height: 1; letter-spacing: -.04em;
  color: var(--code-col);
  text-shadow: 0 0 30px rgba(192,90,42,.35), 0 0 60px rgba(192,90,42,.12);
  margin-bottom: 8px; user-select: none;
}

.error-divider {
  width: 40px; height: 1.5px;
  background: rgba(192,90,42,.5);
  margin: 0 auto 24px;
}

.error-title {
  font-family: 'Syne', sans-serif;
  font-size: 22px; font-weight: 600;
  color: var(--text); letter-spacing: -.01em; margin-bottom: 12px;
}

.error-desc {
  font-size: 15px; line-height: 1.8;
  color: var(--text-muted); font-style: italic; margin-bottom: 36px;
}

.error-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn-primary-404 {
  font-family: 'Syne', sans-serif;
  font-size: 13px; font-weight: 600; letter-spacing: .04em;
  padding: 11px 24px; background: var(--accent); color: #fff;
  border-radius: 6px; border: none; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  transition: opacity .2s;
}
.btn-primary-404:hover { opacity: .85; }
.btn-primary-404 svg { width: 15px; height: 15px; stroke-width: 2; }

.btn-secondary-404 {
  font-family: 'Syne', sans-serif;
  font-size: 13px; font-weight: 500; letter-spacing: .04em;
  padding: 11px 20px; border: 0.5px solid var(--btn-sec-b);
  border-radius: 6px; color: var(--btn-sec-t); background: transparent;
  text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
  transition: background .4s, color .4s;
}
.btn-secondary-404:hover { background: var(--btn-sec-h); color: var(--text); }
.btn-secondary-404 svg { width: 15px; height: 15px; stroke-width: 2; }

.footer-404 {
  position: relative; z-index: 10;
  padding: 20px 32px;
  border-top: 0.5px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg);
  transition: background .4s, border-color .4s;
}
.footer-logo {
  font-family: 'Syne', sans-serif; font-size: 13px; font-weight: 700;
  color: var(--text-faint); letter-spacing: -.01em;
}
.footer-logo span { color: rgba(192,90,42,.5); }
.footer-hint {
  font-family: 'Syne', sans-serif; font-size: 11px;
  color: var(--text-faint); letter-spacing: .04em;
}

@media (max-width: 480px) {
  .nav-404 { padding: 0 20px; }
  .error-code { font-size: 100px; }
  .error-actions { flex-direction: column; align-items: center; }
  .footer-404 { flex-direction: column; gap: 8px; text-align: center; padding: 16px 20px; }
}

/* ── Modal projet ─────────────────────────────────────────── */
.proj-modal {
  display: none;
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
  padding: 24px;
}
.proj-modal.open { display: flex; }

.proj-modal-inner {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  width: 100%; max-width: 780px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  display: flex; flex-direction: column;
}

/* ── Bouton fermer ── */
.proj-modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 10;
  width: 32px; height: 32px; border-radius: 50%;
  border: 0.5px solid var(--border-md);
  background: var(--bg-card);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--t), color var(--t);
}
.proj-modal-close:hover { background: var(--bg-subtle); color: var(--text); }
.proj-modal-close svg   { width: 15px; height: 15px; stroke-width: 2; }

/* ── Visual / carousel ── */
.proj-modal-visual {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--bg-subtle);
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  flex-shrink: 0;
}

.proj-modal-track-wrap { overflow: hidden; width: 100%; height: 100%; }

.proj-modal-track {
  display: flex; height: 100%;
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}

.proj-modal-slide {
  flex: 0 0 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.proj-modal-slide img {
  width: 100%; height: 100%; object-fit: contain;
}
.proj-modal-slide .proj-visual-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
}

/* ── Flèches modal ── */
.proj-modal-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(0,0,0,.35); border: none;
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.proj-modal-arrow:hover    { background: rgba(0,0,0,.6); }
.proj-modal-arrow:disabled { opacity: .3; cursor: default; }
.proj-modal-arrow.prev     { left: 12px; }
.proj-modal-arrow.next     { right: 12px; }
.proj-modal-arrow svg      { width: 16px; height: 16px; stroke-width: 2; }

/* ── Dots modal ── */
.proj-modal-dots {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px;
}

/* ── Corps modal ── */
.proj-modal-body { padding: 24px 28px 28px; }

.proj-modal-name {
  font-family: var(--font-head);
  font-size: 20px; font-weight: 700;
  color: var(--text); letter-spacing: -.01em;
  margin-bottom: 10px;
}

.proj-modal-desc {
  font-size: 15px; line-height: 1.8;
  color: var(--text-muted); font-style: italic;
  margin-bottom: 20px;
}

.proj-modal-tags { display: flex; flex-direction: column; gap: 12px; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .proj-modal { padding: 12px; }
  .proj-modal-body { padding: 16px 18px 20px; }
  .proj-modal-name { font-size: 17px; }
}