/* ---------- Polices locales (aucune connexion internet nécessaire) ---------- */
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* ---------- Tokens (couleurs du CV + support clair/sombre) ---------- */
:root {
  color-scheme: light dark;

  &:has(> head > meta[name="color-scheme"][content="dark"]) {
    color-scheme: dark;
  }
  &:has(> head > meta[name="color-scheme"][content="light"]) {
    color-scheme: light;
  }

  --navy: #142e48;
  --navy-2: #1d3d5e;
  --navy-deep: #0d2034;
  --gold: #be963f;
  --gold-light: #d9b766;
  --white: #ffffff;

  /* Couleurs adaptatives selon le thème */
  --bg: light-dark(#f8f6f1, #0b1623);
  --surface: light-dark(#ffffff, #13253a);
  --surface-2: light-dark(#f8f6f1, #0f1e30);
  --ink: light-dark(#1b1f24, #edf2f7);
  --heading: light-dark(#142e48, #f3e3b8);
  --muted: light-dark(#5e646c, #a5b4c4);
  --line: light-dark(#e6e0d3, #243b56);
  --chip-bg: light-dark(#142e48, #1d3652);
  --tag-bg: light-dark(rgb(20 46 72 / 0.08), rgb(217 183 102 / 0.14));
  --tag-fg: light-dark(#142e48, #f3e3b8);

  --font-title: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 18px;
  --shadow: 0 12px 32px rgb(0 0 0 / 0.1);
  --container: 1140px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s, color .25s;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--font-title); line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0 0 1rem; text-wrap: pretty; }

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--gold); color: var(--navy); padding: .6rem 1rem; border-radius: 8px;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* ---------- Header ---------- */
.header-wrap {
  position: sticky; top: 0; z-index: 50;
  container-type: scroll-state;
  container-name: site-header;
}
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem max(1.25rem, (100% - var(--container)) / 2);
  background: var(--navy);
  backdrop-filter: blur(10px);
  color: var(--white);
  border-bottom: 1px solid rgb(190 150 63 / 0.25);
  transition: box-shadow .3s, background-color .3s;
}
@container site-header scroll-state(stuck: top) {
  .site-header { background: rgb(13 32 52 / 0.97); box-shadow: 0 6px 20px rgb(0 0 0 / 0.28); }
}
.logo {
  font-family: var(--font-title); font-weight: 700; font-size: 1.45rem;
  text-decoration: none; letter-spacing: .02em;
  border: 2px solid var(--gold); border-radius: 10px; padding: .1rem .5rem;
}
.logo span { color: var(--gold); }
.site-header ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; align-items: center; }
.site-header nav a {
  display: block; padding: .45rem .8rem; border-radius: 999px;
  text-decoration: none; font-size: .94rem; font-weight: 500; color: rgb(255 255 255 / 0.86);
  transition: color .2s, background-color .2s;
}
.site-header nav a:hover { color: var(--white); background: rgb(255 255 255 / 0.08); }
.site-header nav a.nav-cta { background: var(--gold); color: var(--navy); font-weight: 600; }
.site-header nav a.nav-cta:hover { background: var(--gold-light); }

/* Bouton thème clair / sombre */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.4rem; height: 2.4rem; border-radius: 999px;
  border: 1.5px solid rgb(190 150 63 / 0.55);
  background: rgb(255 255 255 / 0.07); color: var(--gold-light);
  font-size: 1.05rem; transition: transform .2s, border-color .2s, background-color .2s;
}
.theme-toggle:hover { transform: scale(1.07); border-color: var(--gold); background: rgb(190 150 63 / 0.18); }
.theme-icon-sun { display: none; }
:root:has(> head > meta[name="color-scheme"][content="dark"]) .theme-icon-sun { display: inline; }
:root:has(> head > meta[name="color-scheme"][content="dark"]) .theme-icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not(:has(> head > meta[name="color-scheme"][content="light"])) .theme-icon-sun { display: inline; }
  :root:not(:has(> head > meta[name="color-scheme"][content="light"])) .theme-icon-moon { display: none; }
}

@media (max-width: 780px) {
  .site-header { flex-wrap: wrap; padding-block: .65rem; }
  .site-header nav { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .site-header nav a { font-size: .88rem; padding: .38rem .68rem; white-space: nowrap; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .75rem 1.35rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
  text-decoration: none; border: 2px solid transparent;
  transition: transform .2s, background-color .2s, color .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgb(0 0 0 / 0.14); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-light); }
.btn-ghost { background: transparent; border-color: rgb(255 255 255 / 0.4); color: var(--white); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-light); }
.btn-navy { background: var(--navy); color: var(--white); border-color: rgb(190 150 63 / 0.35); }
.btn-navy:hover { background: var(--navy-2); border-color: var(--gold); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(60rem 30rem at 85% -10%, rgb(190 150 63 / 0.24), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--white);
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 4px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 3rem; align-items: center; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .18em; font-size: .8rem; font-weight: 600;
  color: var(--gold-light); margin-bottom: .6rem;
}
.hero h1 { font-size: clamp(2.8rem, 6.5vw, 4.8rem); font-weight: 700; margin-bottom: .75rem; }
.hero h1 span { color: var(--gold); }
.hero-role {
  font-family: var(--font-title); font-size: clamp(1.2rem, 2.3vw, 1.45rem);
  color: rgb(255 255 255 / 0.92); min-height: 1.8em;
}
.cursor { color: var(--gold); font-weight: 700; margin-left: 2px; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { display: none; } }

.hero-lead { max-width: 56ch; color: rgb(255 255 255 / 0.78); }
.hero-lead strong { color: var(--white); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }

.hero-card {
  background: rgb(255 255 255 / 0.05);
  border: 1px solid rgb(190 150 63 / 0.45);
  border-radius: var(--radius);
  padding: 1.5rem;
  backdrop-filter: blur(6px);
}
.stats-counters {
  display: grid; grid-template-columns: 1fr 1fr; gap: .75rem;
  margin-bottom: 1.25rem;
}
.stat-box {
  background: rgb(0 0 0 / 0.22); border: 1px solid rgb(190 150 63 / 0.28);
  border-radius: 12px; padding: .85rem .95rem;
  transition: transform .2s, border-color .2s;
}
.stat-box:hover { transform: translateY(-2px); border-color: var(--gold); }
.stat-num {
  display: block; font-family: var(--font-title); font-size: 1.65rem; font-weight: 700;
  color: var(--gold-light); line-height: 1.1;
}
.stat-label { font-size: .78rem; color: rgb(255 255 255 / 0.72); }

.hero-meta { margin: 0; display: grid; gap: .65rem; }
.hero-meta div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid rgb(255 255 255 / 0.1); padding-bottom: .55rem; font-size: .9rem; }
.hero-meta dt { color: rgb(255 255 255 / 0.62); }
.hero-meta dd { margin: 0; font-weight: 600; text-align: right; }
.status { display: flex; align-items: center; gap: .6rem; margin: 1rem 0 0; font-size: .9rem; color: var(--gold-light); }
.dot { width: .6rem; height: .6rem; border-radius: 50%; background: #4cc38a; box-shadow: 0 0 0 4px rgb(76 195 138 / 0.25); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(3.8rem, 8vw, 6rem); }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.35rem); color: var(--heading);
  display: inline-block; padding-bottom: .45rem; margin-bottom: 1.5rem;
  border-bottom: 3px solid var(--gold);
}
.section-intro { color: var(--muted); max-width: 66ch; margin-top: -.4rem; margin-bottom: 2.5rem; }
.mini-title {
  font-family: var(--font-body); font-size: .8rem; text-transform: uppercase; letter-spacing: .14em;
  color: var(--gold); margin: 0 0 .8rem; font-weight: 600;
}
.mini-title:not(:first-child) { margin-top: 1.75rem; }

/* Profil */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3.5rem; }
.big { font-size: 1.22rem; color: var(--heading); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0; }
.chips li {
  background: var(--chip-bg); color: var(--white); padding: .42rem .95rem;
  border-radius: 999px; font-size: .92rem; border: 1px solid rgb(190 150 63 / 0.35);
  transition: transform .2s, border-color .2s;
}
.chips li:hover { transform: translateY(-2px); border-color: var(--gold); }
.chips-outline li { background: transparent; color: var(--heading); border: 1.5px solid var(--gold); }

/* ---------- Projets & Galeries ---------- */
.project {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 0;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px);
  overflow: hidden; box-shadow: var(--shadow);
  transition: border-color .25s, transform .25s;
}
.project:hover { border-color: rgb(190 150 63 / 0.65); }
.project + .project { margin-top: 2.75rem; }
.project-reverse .project-media { order: 2; }

.project-media {
  display: flex; flex-direction: column; justify-content: flex-start;
  background: var(--navy-deep); padding: 1.15rem; gap: .85rem;
}
.main-shot { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid rgb(190 150 63 / 0.3); }
.main-shot .lightbox-trigger {
  display: block; width: 100%; padding: 0; border: 0; background: none; position: relative;
}
.main-shot .lightbox-trigger img {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .35s ease;
}
.main-shot .lightbox-trigger:hover img { transform: scale(1.03); }
.zoom-badge {
  position: absolute; left: .75rem; bottom: .75rem;
  background: rgb(13 32 52 / 0.85); color: var(--gold-light);
  border: 1px solid rgb(190 150 63 / 0.5); padding: .28rem .7rem;
  border-radius: 999px; font-size: .78rem; font-weight: 600;
  backdrop-filter: blur(4px);
}
.main-shot .robot {
  position: absolute; right: 2%; bottom: -4px; width: 22%; pointer-events: none;
  filter: drop-shadow(0 8px 16px rgb(0 0 0 / 0.5));
}

.gallery-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: .55rem;
}
.thumb {
  padding: 0; border: 1.5px solid rgb(255 255 255 / 0.16); border-radius: 9px;
  overflow: hidden; background: rgb(0 0 0 / 0.3); color: var(--white);
  display: flex; flex-direction: column; text-align: center;
  transition: transform .2s, border-color .2s;
}
.thumb:hover { transform: translateY(-2px); border-color: var(--gold); }
.thumb img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.thumb span { font-size: .7rem; padding: .28rem .2rem; color: rgb(255 255 255 / 0.82); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.project-body { padding: clamp(1.6rem, 3.5vw, 2.5rem); }
.project-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-bottom: .8rem; }
.badge {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  padding: .28rem .7rem; border-radius: 999px;
}
.badge-live { background: rgb(190 150 63 / 0.18); color: var(--gold); border: 1px solid rgb(190 150 63 / 0.4); }
.badge-live::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: var(--gold); }
.tag-small { font-size: .86rem; color: var(--muted); }
.project h3 { font-size: clamp(1.65rem, 3.2vw, 2.15rem); color: var(--heading); }
.project-sub { font-style: italic; color: var(--muted); margin-top: .2rem; }

.features { list-style: none; padding: 0; margin: 1.1rem 0; display: grid; gap: .45rem; font-size: .95rem; }
.features li { position: relative; padding-left: 1.4rem; }
.features li::before {
  content: ""; position: absolute; left: 0; top: .6em;
  width: .52rem; height: .52rem; border: 2px solid var(--gold); border-radius: 2px; transform: rotate(45deg);
}

.tags { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 1.1rem 0 0; }
.tags li {
  font-size: .8rem; font-weight: 600; padding: .25rem .65rem; border-radius: 6px;
  background: var(--tag-bg); color: var(--tag-fg);
}
.project-links { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.5rem; }

/* Avancement */
.steps {
  list-style: none; padding: 0; margin: 1.25rem 0 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: .35rem;
}
.steps li {
  font-size: .74rem; line-height: 1.3; color: var(--muted);
  padding-top: .6rem; border-top: 4px solid var(--line);
}
.steps li.done { border-color: var(--heading); color: var(--heading); font-weight: 500; }
.steps li.current { border-color: var(--gold); color: var(--gold); font-weight: 700; }

/* ---------- Section Formation TIP (Ce que j'apprends) ---------- */
.learning-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); gap: 1.35rem;
}
.learn-card {
  background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--gold);
  border-radius: var(--radius); padding: 1.5rem;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: var(--shadow); transition: transform .25s, border-color .25s;
}
.learn-card:hover { transform: translateY(-4px); border-color: var(--gold); }
.learn-icon {
  width: 2.8rem; height: 2.8rem; border-radius: 12px;
  background: rgb(190 150 63 / 0.16); border: 1px solid rgb(190 150 63 / 0.4);
  display: grid; place-items: center; font-size: 1.35rem; margin-bottom: 1rem;
}
.learn-card h3 { font-size: 1.25rem; color: var(--heading); margin-bottom: .6rem; }
.learn-card p { font-size: .94rem; color: var(--muted); flex-grow: 1; }
.mini-tags { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; padding: 0; margin: .75rem 0 0; }
.mini-tags li {
  font-size: .75rem; font-weight: 600; padding: .2rem .55rem; border-radius: 999px;
  background: var(--tag-bg); color: var(--tag-fg);
}

/* ---------- Parcours ---------- */
.path-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 1.75rem 1.5rem; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: .35rem;
  width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--gold);
}
.timeline li:first-child::before { background: var(--gold); }
.timeline time { font-size: .85rem; font-style: italic; color: var(--muted); }
.timeline h3 { font-size: 1.15rem; color: var(--heading); margin: .15rem 0 .3rem; }
.timeline p { color: var(--muted); font-size: .95rem; margin: 0; }

/* ---------- Compétences ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 1.5rem; }
.skill-card {
  background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--gold);
  border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow);
  transition: transform .25s, border-color .25s;
}
.skill-card:hover { transform: translateY(-3px); border-color: var(--gold); }
.skill-card h3 { color: var(--heading); font-size: 1.35rem; margin-bottom: 1rem; }
.skill-card ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .55rem; }
.skill-card li::marker { color: var(--gold); }

/* ---------- Contact + Formulaire ---------- */
.contact {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--white); padding-block: clamp(4rem, 8vw, 6rem);
}
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 3rem; align-items: start; }
.contact h2 { font-size: clamp(2rem, 4.2vw, 2.75rem); color: var(--gold); margin-bottom: 1rem; }
.contact-info p { color: rgb(255 255 255 / 0.8); }
.contact-direct { list-style: none; padding: 0; margin: 1.75rem 0 0; display: grid; gap: .85rem; }
.contact-direct li {
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline;
  padding-bottom: .75rem; border-bottom: 1px solid rgb(255 255 255 / 0.12);
}
.contact-direct span { color: var(--gold-light); font-size: .9rem; min-width: 5.5rem; }
.contact-direct a { font-weight: 600; text-decoration: underline; text-decoration-color: var(--gold); }
.contact-direct a:hover { color: var(--gold-light); }

.contact-form {
  background: rgb(255 255 255 / 0.05);
  border: 1px solid rgb(190 150 63 / 0.45);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3.5vw, 2.2rem);
}
.contact-form h3 { color: var(--gold-light); font-size: 1.4rem; margin-bottom: 1.2rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: .35rem; color: rgb(255 255 255 / 0.92); }
.field label span { color: var(--gold-light); }
.field input,
.field textarea {
  width: 100%; padding: .7rem .9rem; border-radius: 10px;
  border: 1.5px solid rgb(255 255 255 / 0.22);
  background: rgb(7 18 30 / 0.65); color: var(--white);
  font: inherit; font-size: .96rem;
  transition: border-color .2s, background-color .2s;
}
.field input::placeholder,
.field textarea::placeholder { color: rgb(255 255 255 / 0.45); }
.field input:focus,
.field textarea:focus { border-color: var(--gold); outline: none; background: rgb(7 18 30 / 0.9); }

/* Validation après interaction (:user-invalid) */
.error-msg {
  display: none; color: #ffb4ab; font-size: .84rem; margin-top: .35rem; font-weight: 500;
}
.field :is(input, textarea):user-invalid {
  border-color: #ff897d; background-color: rgb(140 29 24 / 0.25);
}
.field :is(input, textarea):user-invalid + .error-msg { display: block; }
.field :is(input, textarea):required:user-valid { border-color: #4cc38a; }

.form-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.form-feedback { margin: .85rem 0 0; font-size: .9rem; color: var(--gold-light); min-height: 1.4em; }

/* ---------- Modales (<dialog>) & Lightbox ---------- */
dialog:modal { overscroll-behavior: contain; }
dialog::backdrop {
  overflow: hidden; overscroll-behavior: contain;
  background-color: rgb(7 16 26 / 0);
  backdrop-filter: blur(4px);
  transition-property: background-color, display, overlay;
  transition-duration: .25s;
  transition-timing-function: ease-out;
  transition-behavior: allow-discrete;
}
dialog[open]::backdrop {
  background-color: rgb(7 16 26 / 0.78);
  @starting-style { background-color: rgb(7 16 26 / 0); }
}

dialog {
  border: 1px solid rgb(190 150 63 / 0.55);
  border-radius: calc(var(--radius) + 2px);
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.5);
  max-width: min(94vw, 960px);
  max-height: 88vh;
  opacity: 0;
  transform: scale(0.95);
  transition-property: opacity, transform, display, overlay;
  transition-duration: .25s;
  transition-timing-function: ease-out;
  transition-behavior: allow-discrete;
}
dialog[open] {
  opacity: 1;
  transform: scale(1);
  @starting-style {
    opacity: 0;
    transform: scale(0.95);
  }
}

@media (prefers-reduced-motion: reduce) {
  dialog { transform: none; transition-duration: .1s; }
  @starting-style { dialog[open] { transform: none; } }
}

.dialog-inner { padding: clamp(1.5rem, 3.5vw, 2.25rem); overflow-y: auto; max-height: 86vh; }
.dialog-header {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
  padding-bottom: 1rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--line);
}
.dialog-header h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); color: var(--heading); margin-top: .35rem; }
.close-btn {
  width: 2.3rem; height: 2.3rem; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface-2); color: var(--ink);
  font-weight: 700; display: grid; place-items: center;
  transition: border-color .2s, background-color .2s;
}
.close-btn:hover { border-color: var(--gold); background: var(--gold); color: var(--navy); }

.dialog-lead { font-size: 1.06rem; color: var(--heading); font-weight: 500; }
.dialog-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-block: 1.25rem; }
.dialog-cols h3 { font-size: 1.15rem; color: var(--heading); margin: 1rem 0 .6rem; }
.dialog-cols h3:first-child { margin-top: 0; }
.modal-steps { padding-left: 1.2rem; margin: 0; display: grid; gap: .55rem; font-size: .94rem; }
.modal-steps li::marker { color: var(--gold); font-weight: 700; }

.dialog-gallery {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: .85rem; margin-top: 1.5rem;
}
.dialog-gallery img {
  border-radius: 10px; border: 1px solid var(--line); width: 100%; aspect-ratio: 16 / 10; object-fit: cover;
}

/* Lightbox plein écran */
.lightbox-dialog {
  background: var(--navy-deep); color: var(--white);
  max-width: min(95vw, 1180px);
}
.lightbox-inner { position: relative; padding: 1rem; text-align: center; }
.lightbox-close {
  position: absolute; top: 1.5rem; right: 1.5rem; z-index: 2;
  background: rgb(13 32 52 / 0.85); color: var(--white); border-color: var(--gold);
}
.lightbox-inner img {
  max-height: 76vh; width: auto; margin-inline: auto; border-radius: 10px;
  border: 1px solid rgb(190 150 63 / 0.35);
}
.lightbox-caption { margin: .8rem 0 .2rem; font-size: .95rem; color: var(--gold-light); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: rgb(255 255 255 / 0.65); font-size: .9rem; border-top: 1px solid rgb(190 150 63 / 0.3); }
.site-footer .container { display: flex; justify-content: space-between; gap: 1rem; padding-block: 1.25rem; }
.site-footer p { margin: 0; }
.site-footer a { text-decoration: none; color: var(--gold-light); }
.site-footer a:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero-grid, .about-grid, .path-grid, .project, .contact-grid, .dialog-cols { grid-template-columns: 1fr; }
  .hero-grid { gap: 2.2rem; }
  .project-reverse .project-media { order: 0; }
}
@media (max-width: 560px) {
  .gallery-strip { grid-template-columns: repeat(2, 1fr); }
  .dialog-gallery { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(3, 1fr); row-gap: .9rem; }
}

/* ---------- Animations au défilement (amélioration progressive) ---------- */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes reveal-in {
      from { opacity: 0; transform: translateY(36px); }
    }
    .reveal {
      animation: reveal-in auto ease-out backwards;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
  }

  @keyframes hero-in {
    from { opacity: 0; transform: translateY(20px); }
  }
  .hero-text > * { animation: hero-in .7s ease-out backwards; }
  .hero-text > :nth-child(2) { animation-delay: .08s; }
  .hero-text > :nth-child(3) { animation-delay: .16s; }
  .hero-text > :nth-child(4) { animation-delay: .24s; }
  .hero-text > :nth-child(5) { animation-delay: .32s; }
  .hero-card { animation: hero-in .8s .3s ease-out backwards; }
}
