/* =========================================================
   Erwan Vaniscotte — Portfolio
   Palette : Or #c8a549 / Blanc / Noir — Josefin Sans (+ Syne sur les cartes valeurs)
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,300;0,400;0,600;0,700;1,400&family=Syne:wght@400;700;800&display=swap');

:root {
  --gold: #c8a549;
  --gold-dark: #a88a3a;
  --gold-soft: rgba(200, 165, 73, 0.4);
  --gold-faint: rgba(200, 165, 73, 0.12);
  --black: #111111;
  --ink: #1a1a1a;
  --grey: #777777;
  --line: #e8e3d6;
  --white: #ffffff;
  --cream: #faf8f3;
  --radius: 14px;
  --nav-h: 76px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Josefin Sans', sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 24px; }
section { padding: 100px 0; }

/* ---------- Titres de section ---------- */
.eyebrow {
  display: block;
  font-size: 13px; font-weight: 600;
  letter-spacing: 5px; text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(30px, 4.5vw, 44px);
  font-weight: 700; letter-spacing: 1px; line-height: 1.15;
  color: var(--black);
}
.section-head { text-align: center; margin-bottom: 56px; }
.section-head .gold-line { width: 60px; height: 2px; background: var(--gold); margin: 18px auto 0; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 34px;
  font-size: 13px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase;
  border: 1px solid var(--gold);
  transition: background .35s var(--ease), color .35s var(--ease), transform .35s var(--ease);
}
.btn-gold { background: var(--gold); color: var(--white); }
.btn-gold:hover { background: transparent; color: var(--gold-dark); }
.btn-outline { color: var(--black); border-color: var(--black); }
.btn-outline:hover { background: var(--black); color: var(--white); }
.btn:hover { transform: translateY(-2px); }

/* =========================================================
   NAVIGATION
   ========================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: transform .4s var(--ease), border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav.hidden { transform: translateY(-100%); }
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.nav-logo img { height: 40px; width: auto; }
.nav-links { display: flex; gap: 38px; }
.nav-links a {
  position: relative;
  font-size: 13px; font-weight: 600; letter-spacing: 2.5px; text-transform: uppercase;
  padding: 6px 0;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease);
}
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); transform-origin: left; }
.nav-links a.active { color: var(--gold-dark); }

.burger { display: none; width: 30px; height: 22px; position: relative; }
.burger span {
  position: absolute; left: 0; width: 100%; height: 2px; background: var(--black);
  transition: transform .35s var(--ease), opacity .3s;
}
.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { top: 10px; }
.burger span:nth-child(3) { top: 20px; }
.burger.open span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

/* =========================================================
   ANIMATION D'APPARITION (reveal)
   ========================================================= */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }

/* =========================================================
   PAGE INTÉRIEURE : en-tête
   ========================================================= */
.page-hero { padding: calc(var(--nav-h) + 90px) 0 40px; text-align: center; }
.page-hero .section-title { font-size: clamp(38px, 6vw, 64px); }

/* =========================================================
   ACCUEIL
   ========================================================= */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: var(--nav-h) 24px 60px;
  position: relative;
}
.hero-eyebrow { margin-bottom: 26px; }
.hero h1 {
  font-size: clamp(38px, 7vw, 86px);
  font-weight: 700; line-height: 1.08; letter-spacing: 1px;
  color: var(--black);
  margin-bottom: 44px;
}
.hero h1 .gold { color: var(--gold); display: block; }
.hero-buttons { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.scroll-indicator {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  width: 1px; height: 60px; background: var(--line); overflow: hidden;
}
.scroll-indicator::after {
  content: ''; position: absolute; left: 0; top: -60px; width: 1px; height: 60px; background: var(--gold);
  animation: scrollLine 2.2s var(--ease) infinite;
}
@keyframes scrollLine { to { top: 60px; } }

/* =========================================================
   À PROPOS
   ========================================================= */
.about-text {
  max-width: 760px; margin: 0 auto; text-align: center;
  font-size: 19px; line-height: 1.9; color: #444;
}

/* ---------- Timeline double colonne ---------- */
.timeline-legend {
  display: flex; justify-content: center; gap: 30px; margin-top: 20px;
  font-size: 13px; letter-spacing: 1px;
}
.timeline-legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }
.legend-dot.outline { background: transparent; border: 1.5px solid var(--gold); }

.timeline { position: relative; max-width: 900px; margin: 0 auto; }
.tl-track, .tl-fill {
  position: absolute; left: 50%; top: 0; width: 2px; transform: translateX(-50%);
}
.tl-track { bottom: 0; background: var(--line); }
.tl-fill { height: 0; background: var(--gold); box-shadow: 0 0 10px rgba(200, 165, 73,.45); }

.tl-item { position: relative; width: 50%; padding: 14px 0; }
.tl-item.tl-left { padding-right: 46px; text-align: right; }
.tl-item.tl-right { margin-left: 50%; padding-left: 46px; }

.tl-dot {
  position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%;
  background: var(--white); border: 2px solid var(--gold-soft);
  transform: translateY(-50%); z-index: 2;
  transition: background .4s, border-color .4s;
}
.tl-left .tl-dot { right: -8px; }
.tl-right .tl-dot { left: -8px; }
.tl-dot.lit { border-color: var(--gold); animation: pulse 2.2s ease-in-out infinite; }
.tl-left .tl-dot.lit { background: var(--gold); }            /* Formation = point plein */
.tl-right .tl-dot.lit { background: var(--white); }          /* Expérience = point contour */
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200, 165, 73,.55); }
  50% { box-shadow: 0 0 0 8px rgba(200, 165, 73,0); }
}

.tl-card {
  display: inline-block; text-align: left; max-width: 380px; width: 100%;
  background: var(--white);
  border: 1px solid var(--gold-soft); border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 4px 16px rgba(200, 165, 73,.07);
  opacity: 0; transition: opacity .7s var(--ease), transform .7s var(--ease), box-shadow .3s;
}
.tl-left .tl-card { transform: translateX(-30px); }
.tl-right .tl-card { transform: translateX(30px); }
.tl-card.visible { opacity: 1; transform: none; }
.tl-card:hover { box-shadow: 0 10px 28px rgba(200, 165, 73,.18); }
.tl-date { font-size: 12px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold-dark); }
.tl-title { font-size: 16px; font-weight: 700; color: var(--black); line-height: 1.3; margin-top: 3px; }
.tl-sub { font-size: 13.5px; color: var(--grey); margin-top: 3px; line-height: 1.4; }

/* ---------- Mes valeurs ---------- */
.values-stage {
  position: relative; overflow: hidden;
  background: var(--cream); border-radius: 20px;
  padding: 70px 24px 80px;
}
.values-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.values-stage .section-head { position: relative; z-index: 2; }
.values-grid {
  position: relative; z-index: 2;
  display: flex; justify-content: center; gap: 26px; flex-wrap: wrap;
}
.vcard {
  position: relative; width: 220px; min-height: 240px;
  background: var(--white);
  border: 1px solid var(--gold-soft); border-radius: var(--radius);
  box-shadow: 0 4px 18px rgba(200, 165, 73,.08);
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform .18s ease, border-color .3s, box-shadow .3s;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif;
}
.vcard.reveal { transition: opacity .8s var(--ease), transform .8s var(--ease), border-color .3s, box-shadow .3s; }
.vcard.reveal.visible { transition: opacity .8s var(--ease), transform .18s ease, border-color .3s, box-shadow .3s; }
.vcard:hover, .vcard.open { border-color: var(--gold); box-shadow: 0 12px 32px rgba(200, 165, 73,.2); }
.vc-inner {
  padding: 24px 18px; text-align: center;
  display: flex; flex-direction: column; align-items: center;
  transform: translateZ(40px);
}
.vc-num {
  font-size: 13px; font-weight: 700; letter-spacing: 2px; color: var(--gold);
  border: 1px solid rgba(200, 165, 73,.5); border-radius: 40px; padding: 3px 13px;
  margin-bottom: 16px;
}
.vc-title { font-size: 22px; font-weight: 800; color: var(--ink); line-height: 1.15; transition: color .3s; overflow-wrap: anywhere; }
.vcard:hover .vc-title, .vcard.open .vc-title { color: var(--gold-dark); }
.vc-text {
  font-size: 13px; line-height: 1.55; color: #8a7339;
  max-height: 0; opacity: 0; overflow: hidden; margin-top: 0;
  transition: max-height .45s ease, opacity .35s ease, margin-top .45s ease;
}
.vcard:hover .vc-text, .vcard.open .vc-text { max-height: 120px; opacity: 1; margin-top: 12px; }
.vc-hint {
  font-family: 'Josefin Sans', sans-serif; font-style: italic;
  font-size: 12px; color: #b3a07a; margin-top: 14px;
  transition: opacity .3s, max-height .3s; max-height: 30px; overflow: hidden;
}
.vcard:hover .vc-hint, .vcard.open .vc-hint { opacity: 0; max-height: 0; margin-top: 0; }
.hint-touch { display: none; }
@media (hover: none) {
  .hint-hover { display: none; }
  .hint-touch { display: inline; }
}

/* =========================================================
   COMPÉTENCES
   ========================================================= */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.skill-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 28px; background: var(--white);
  transition: border-color .3s, box-shadow .3s, transform .3s;
}
.skill-card:hover { border-color: var(--gold-soft); box-shadow: 0 12px 30px rgba(0,0,0,.05); transform: translateY(-4px); }
.skill-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 22px; display: flex; align-items: center; gap: 10px; }
.skill-card h3 .cat-num { font-size: 12px; color: var(--gold); letter-spacing: 2px; }
.skill-list { display: flex; flex-wrap: wrap; gap: 10px; }
.skill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 40px;
  font-size: 14px; background: var(--white);
  transition: border-color .3s, background .3s;
}
.skill:hover { border-color: var(--gold); background: var(--gold-faint); }
.skill img { width: 20px; height: 20px; object-fit: contain; }

.languages-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; max-width: 900px; margin: 0 auto; align-items: start; }
.lang-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; background: var(--white); }
.lang-head { display: flex; align-items: center; gap: 16px; }
.lang-flag { width: 40px; height: 40px; object-fit: contain; border-radius: 4px; flex-shrink: 0; }
.lang-name { font-size: 19px; font-weight: 700; }
.lang-level { font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold-dark); }
.lang-bar { height: 3px; background: var(--line); border-radius: 3px; margin-top: 18px; overflow: hidden; }
.lang-bar span { display: block; height: 100%; width: 0; background: var(--gold); transition: width 1.4s var(--ease); }
.lang-card.visible .lang-bar span { width: var(--level); }

.lang-toggle {
  margin-left: auto; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--gold-soft); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  transition: background .3s, transform .4s var(--ease);
}
.lang-toggle:hover { background: var(--gold-faint); }
.lang-toggle svg { width: 18px; height: 18px; transition: transform .4s var(--ease); }
.lang-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.lang-panel { max-height: 0; opacity: 0; overflow: hidden; transition: max-height .5s var(--ease), opacity .4s; }
.lang-panel.open { opacity: 1; }
.lang-panel-inner { padding-top: 22px; }
.lang-panel p { font-size: 15px; color: #555; line-height: 1.75; margin-bottom: 16px; }

/* =========================================================
   PROJETS
   ========================================================= */
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.projects-block + .projects-block { margin-top: 110px; }
.project-card {
  border: 1px solid var(--line); background: var(--white); cursor: pointer;
  transition: border-color .35s, box-shadow .35s, transform .35s var(--ease);
  display: flex; flex-direction: column;
}
.project-card:hover { border-color: var(--gold-soft); box-shadow: 0 18px 40px rgba(0,0,0,.08); transform: translateY(-6px); }
.project-thumb { aspect-ratio: 16 / 10; overflow: hidden; background: var(--cream); position: relative; }
.project-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.project-card:hover .project-thumb img { transform: scale(1.05); }
.thumb-placeholder {
  position: absolute; inset: 0; display: none; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; letter-spacing: 2px; color: var(--gold-dark); text-align: center; padding: 20px;
  background: linear-gradient(135deg, var(--cream), #f1ebdc);
}
.project-thumb.no-img .thumb-placeholder { display: flex; }
.project-body { padding: 26px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.project-num { font-size: 11px; letter-spacing: 3px; color: var(--gold); margin-bottom: 10px; }
.project-title { font-size: 19px; font-weight: 700; margin-bottom: 10px; }
.project-desc { font-size: 14px; color: var(--grey); line-height: 1.7; margin-bottom: 20px; }
.project-desc strong { color: var(--black); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.tag { font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase; padding: 6px 12px; border: 1px solid var(--line); color: var(--grey); }

/* ---------- Fenêtre modale projet ---------- */
.modal {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(17,17,17,.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s;
}
.modal.open { opacity: 1; visibility: visible; }
.modal-box {
  position: relative; background: var(--white);
  width: 100%; max-width: 860px; max-height: 90vh; overflow-y: auto;
  padding: 50px 46px;
  transform: translateY(30px); transition: transform .45s var(--ease);
}
.modal.open .modal-box { transform: none; }
.modal-close {
  position: absolute; top: 18px; right: 18px; width: 40px; height: 40px;
  font-size: 26px; line-height: 1; color: var(--black); transition: color .3s, transform .3s;
}
.modal-close:hover { color: var(--gold); transform: rotate(90deg); }
.modal-cat { font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--gold-dark); }
.modal-title { font-size: clamp(24px, 3.5vw, 34px); font-weight: 700; margin: 8px 0 20px; }
.modal-desc { font-size: 16px; color: #444; line-height: 1.85; }
.modal-sub { font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--gold-dark); margin: 34px 0 14px; }

.stats { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; margin-top: 30px; }
.stat {
  flex: 1 1 160px; max-width: 220px; text-align: center;
  border: 1px solid var(--gold-soft); padding: 20px 14px;
}
.stat-value { font-size: 30px; font-weight: 700; color: var(--gold-dark); line-height: 1; }
.stat-label { font-size: 13px; color: var(--grey); margin-top: 8px; line-height: 1.4; }

.workflow { border: 1px solid var(--line); }
.workflow-step { display: flex; align-items: center; gap: 22px; padding: 18px 22px; border-bottom: 1px solid var(--line); font-size: 15px; }
.workflow-step:last-child { border-bottom: none; }
.workflow-step span { flex-shrink: 0; width: 34px; height: 34px; border: 1px solid var(--gold); color: var(--gold-dark); display: flex; align-items: center; justify-content: center; font-size: 12px; }

/* ---------- Galerie (vignettes) ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.gallery img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; cursor: zoom-in;
  border: 1px solid var(--line); background: var(--cream);
  transition: transform .4s var(--ease), border-color .3s, box-shadow .3s;
}
.gallery img:hover { transform: translateY(-3px); border-color: var(--gold); box-shadow: 0 8px 20px rgba(200, 165, 73,.2); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(10,10,10,.88);
  display: flex; align-items: center; justify-content: center; padding: 60px 70px;
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: min(85vw, 100%); max-height: 85vh; width: auto; height: auto;
  object-fit: contain; box-shadow: 0 20px 60px rgba(0,0,0,.5);
  transform: scale(.94); transition: transform .35s var(--ease), opacity .25s;
}
.lightbox.open img { transform: scale(1); }
.lb-btn {
  position: absolute; width: 50px; height: 50px; border-radius: 50%;
  border: 1px solid rgba(200, 165, 73,.6); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  background: rgba(17,17,17,.5); transition: background .3s, transform .3s;
}
.lb-btn:hover { background: var(--gold); color: var(--white); }
.lb-btn svg { width: 22px; height: 22px; }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
.lb-counter { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: var(--gold); font-size: 13px; letter-spacing: 3px; }
.lightbox.single .lb-prev, .lightbox.single .lb-next, .lightbox.single .lb-counter { display: none; }

/* =========================================================
   CONTACT
   ========================================================= */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 60px; align-items: start; }
.contact-info p { font-size: 17px; color: #555; line-height: 1.8; margin-bottom: 30px; }
.contact-link {
  display: flex; align-items: center; gap: 16px; padding: 18px 0;
  border-bottom: 1px solid var(--line); font-size: 15px; transition: color .3s;
}
.contact-link:hover { color: var(--gold-dark); }
.contact-link svg { width: 22px; height: 22px; color: var(--gold); flex-shrink: 0; }
.contact-info .btn { margin-top: 34px; }

.form-group { margin-bottom: 22px; }
.form-group label { display: block; font-size: 12px; letter-spacing: 2.5px; text-transform: uppercase; margin-bottom: 8px; }
.form-group input, .form-group textarea {
  width: 100%; padding: 15px 16px; font: inherit; font-size: 15px;
  border: 1px solid var(--line); background: var(--white); color: var(--ink);
  transition: border-color .3s, box-shadow .3s; border-radius: 0;
}
.form-group textarea { min-height: 170px; resize: vertical; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-faint); }
.form-message { margin-top: 18px; padding: 16px 18px; font-size: 15px; display: none; }
.form-message.success { display: block; border: 1px solid var(--gold); background: var(--gold-faint); color: var(--ink); }
.form-message.error { display: block; border: 1px solid #c0504d; background: #fbeeee; color: #8a2a28; }

/* =========================================================
   FOOTER + RETOUR EN HAUT
   ========================================================= */
.footer { border-top: 1px solid var(--line); padding: 50px 24px; text-align: center; }
.footer-icons { display: flex; justify-content: center; gap: 22px; margin-bottom: 18px; }
.footer-icons a {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); border: 1px solid var(--gold-soft);
  transition: transform .3s var(--ease), background .3s, color .3s;
}
.footer-icons a:hover { transform: translateY(-3px) scale(1.08); background: var(--gold); color: var(--white); }
.footer-icons svg { width: 20px; height: 20px; }
.footer p { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--grey); }

.to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 800;
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--gold); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(200, 165, 73,.35);
  opacity: 0; visibility: hidden; transform: translateY(16px);
  transition: opacity .35s, visibility .35s, transform .35s var(--ease), background .3s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--gold-dark); transform: translateY(-3px); }
.to-top svg { width: 22px; height: 22px; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 960px) {
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 50px; }
}

@media (max-width: 768px) {
  section { padding: 70px 0; }
  .burger { display: block; z-index: 2; }
  .nav-links {
    position: fixed; inset: 0; background: var(--white);
    flex-direction: column; align-items: center; justify-content: center; gap: 34px;
    opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s;
  }
  .nav-links.open { opacity: 1; visibility: visible; }
  .nav-links a { font-size: 18px; }

  .skills-grid, .languages-grid, .projects-grid { grid-template-columns: 1fr; }

  /* Timeline sur une seule colonne */
  .tl-track, .tl-fill { left: 18px; }
  .tl-item, .tl-item.tl-left, .tl-item.tl-right { width: 100%; margin-left: 0; padding: 12px 0 12px 48px; text-align: left; }
  .tl-left .tl-dot, .tl-right .tl-dot { left: 10px; right: auto; }
  .tl-left .tl-card, .tl-right .tl-card { transform: translateX(24px); max-width: none; }
  .tl-card.visible { transform: none; }

  .vcard { width: 100%; max-width: 320px; min-height: 200px; }
  .modal { padding: 0; }
  .modal-box { max-height: 100vh; height: 100%; padding: 60px 22px 40px; }
  .lightbox { padding: 70px 12px; }
  .lb-prev, .lb-next { top: auto; bottom: 14px; transform: none; }
  .lb-prev { left: 20px; }
  .lb-next { right: 20px; }
  .lb-counter { bottom: 30px; }
  .to-top { right: 16px; bottom: 16px; width: 46px; height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .tl-card { opacity: 1; transform: none; }
}
