:root {
  --bg: #f6f3f3;      /* blanc rosé */
  --ink: #2a0e14;     /* bordeaux très sombre */
  --muted: #6e5a5e;
  --line: #e2d8d9;
  --accent: #4a1621;  /* bordeaux */
  --pop: #e9a9b0;     /* rose poudré */
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --pad: clamp(20px, 4vw, 56px);
  /* Échelle unique : nom, titres, texte mis en avant, sous-titres */
  --t-name: clamp(52px, 7.4vw, 112px);
  --t-title: clamp(34px, 4vw, 56px);
  --t-lead: clamp(24px, 2.6vw, 36px);
  --t-sub: clamp(20px, 1.9vw, 26px);
  --space: clamp(72px, 9vw, 120px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
::selection { background: var(--accent); color: var(--bg); }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--ink); color: var(--bg); padding: 8px 12px; z-index: 10; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.hero-label { font-size: 13px; color: var(--muted); }

/* ---------- Header ---------- */
.top {
  position: fixed; inset: 0 0 auto; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--pad);
  background: var(--accent); color: var(--bg);
}
.logo { font-weight: 600; letter-spacing: -.01em; }
.logo span { font-size: 10px; vertical-align: super; margin-left: 1px; }
.top nav { display: flex; gap: 28px; font-size: 14px; }
.top nav a { position: relative; }
.top nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -3px; height: 1px; background: currentColor;
  transition: right .35s var(--ease);
}
.top nav a:hover::after { right: 0; }
.top sup { font-size: 9px; opacity: .6; }

/* ---------- Hero ---------- */
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding: 120px var(--pad) 40px; background: var(--accent); color: var(--bg); }
.hero .hero-label { color: #d9aeb4; }
.hero .hero-grid { border-top-color: rgba(246, 243, 243, .4); }
.hero .scroll-cue { border-color: var(--bg); }
.hero .scroll-cue:hover { background: var(--pop); color: var(--ink); border-color: var(--pop); }
h1 {
  font-size: clamp(44px, 8.6vw, 136px);
  line-height: .95; letter-spacing: -.055em; font-weight: 500;
}
h1 .line { display: block; overflow: hidden; }
h1 em { color: var(--pop); letter-spacing: -.035em; }
.hero-grid {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px;
  margin-top: clamp(40px, 7vw, 88px); padding-top: 20px; border-top: 1px solid var(--ink);
  align-items: start;
}
.hero-grid > .hero-label { grid-column: 1 / span 2; }
.lead { grid-column: 3 / span 5; font-size: 18px; line-height: 1.45; max-width: 44ch; }
.hero-now { grid-column: 9 / span 3; font-size: 15px; }
.hero-now .hero-label { margin-bottom: 4px; }
.hero-now .hero-gap { margin-top: 16px; }
.timeline small { font-size: 13px; color: var(--muted); }
.scroll-cue {
  grid-column: 12; justify-self: end;
  width: 44px; height: 44px; border: 1px solid var(--ink); border-radius: 50%;
  display: grid; place-items: center; transition: background .25s, color .25s;
}
.scroll-cue:hover { background: var(--ink); color: var(--bg); }

/* Haut de page avec photo */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px); align-items: end;
  padding: 110px var(--pad) 48px;
}
.hero-main { align-self: center; }
.hero h1 { font-size: var(--t-name); line-height: .95; letter-spacing: -.05em; }
.hero-intro { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 32px; }
.hero .lead { font-size: clamp(18px, 1.6vw, 22px); max-width: 34ch; }
.cv-button {
  flex: none; display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border-radius: 999px;
  background: var(--pop); color: var(--ink); font-size: 16px; font-weight: 600; transition: background .25s;
}
.cv-button:hover { background: var(--bg); }
.hero .cv-button:focus-visible { outline-color: var(--bg); }
.hero-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  margin-top: 40px; padding-top: 18px; border-top: 1px solid rgba(246, 243, 243, .35);
  font-size: 15px;
}
.hero-meta .hero-label { margin-bottom: 4px; }
.hero-photo { margin: 0; align-self: stretch; }
.hero-photo img {
  display: block; width: 100%; height: 100%; max-height: calc(100svh - 150px);
  object-fit: cover; object-position: 50% 30%;
  border-radius: 4px;
}

/* ---------- Bandeau ---------- */
.marquee { overflow: hidden; padding: 18px 0; background: var(--pop); color: var(--ink); }
.marquee-track { display: flex; width: max-content; animation: slide 64s linear infinite; }
.marquee span { font-size: var(--t-sub); letter-spacing: -.02em; font-weight: 500; padding-right: 40px; white-space: nowrap; }
.marquee span::after {
  content: ""; display: inline-block; width: .42em; height: .42em; margin-left: 40px; vertical-align: middle; background: var(--accent);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
}
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: var(--space) var(--pad) 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 48px; flex-wrap: wrap; }
h2 { font-size: var(--t-title); letter-spacing: -.04em; line-height: 1.05; font-weight: 500; }

/* Filtres */
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter {
  font: inherit; font-size: 14px; cursor: pointer;
  padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  transition: border-color .2s, background .2s, color .2s;
}
.filter:hover { border-color: var(--ink); }
.filter.is-active { background: var(--accent); color: var(--bg); border-color: var(--accent); }

/* ---------- Compétences ---------- */
.head-note { color: var(--muted); max-width: 36ch; }
.skills { list-style: none; border-top: 1px solid var(--ink); }
.skills li {
  display: grid; grid-template-columns: 48px 540px 1fr 260px; gap: 24px; align-items: baseline;
  padding: 26px 0; border-bottom: 1px solid var(--line);
}
/* Le décalage au survol passe par transform : aucun recalcul de largeur, donc pas de retour à la ligne */
.skills li > * { transition: transform .4s var(--ease), color .3s; }
.skills li:hover > * { transform: translateX(12px); }
.skills li:hover h3 { color: var(--accent); }
.skill-n { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.skills h3 { white-space: nowrap; font-size: var(--t-sub); font-weight: 500; letter-spacing: -.04em; line-height: 1.05; transition: color .3s; }
.skills p { color: var(--muted); max-width: 40ch; }
.skill-tools { font-size: 13px; text-align: right; }

/* ---------- Réalisations (grille asymétrique) ---------- */
.works { display: grid; grid-template-columns: repeat(12, 1fr); gap: 72px 32px; }
.work { grid-column: span 6; cursor: pointer; }
.work:nth-child(4n+1) { grid-column: 1 / span 7; }
.work:nth-child(4n+2) { grid-column: 9 / span 4; margin-top: 160px; }
.work:nth-child(4n+3) { grid-column: 2 / span 5; }
.work:nth-child(4n+4) { grid-column: 7 / span 6; margin-top: 96px; }
.works.is-filtered .work { grid-column: span 6; margin-top: 0; }
.work[hidden] { display: none; }

.thumb {
  position: relative; display: flex; align-items: flex-end;
  width: 100%; aspect-ratio: 4 / 5; overflow: hidden;
  padding: clamp(18px, 2.4vw, 32px);
  object-fit: cover;
  transition: transform .7s var(--ease), filter .4s;
}
.work:nth-child(4n+1) .thumb, .work:nth-child(4n+4) .thumb { aspect-ratio: 4 / 3; }
.works.is-filtered .thumb { aspect-ratio: 4 / 3; }
.work:hover .thumb { transform: scale(.985); }
.work > a { display: block; }
img.thumb { display: block; padding: 0; background: #e4e0d6; }

/* Couvertures provisoires en attendant les vraies images */
.cover-title { font-family: var(--serif); font-style: italic; font-size: var(--t-lead); line-height: 1.05; letter-spacing: -.02em; max-width: 12ch; }
.c-ink    { background: var(--ink); color: var(--pop); }
.c-ink2   { background: var(--pop); color: var(--accent); }
.c-accent { background: var(--accent); color: #f6e3e5; }
.c-sand   { background: #efe1e2; color: var(--accent); }
.c-forest { background: #7a2a38; color: #f6e3e5; }
.c-stone  { background: #d9c3c6; color: var(--ink); }

.work-info {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: baseline;
  padding-top: 16px; border-bottom: 1px solid var(--line); padding-bottom: 12px;
}
.work-n { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.work h3 { font-size: 20px; font-weight: 500; letter-spacing: -.02em; }
.work-cat { font-size: 13px; color: var(--muted); white-space: nowrap; }
.work-desc { padding-top: 10px; color: var(--muted); font-size: 15px; max-width: 48ch; }
.work h3::after { content: " ↗"; color: var(--accent); opacity: 0; transition: opacity .25s; }
.work:hover h3::after { opacity: 1; }

/* ---------- À propos ---------- */
.about { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.about > .hero-label { grid-column: 1 / span 2; padding-top: 12px; }
.about-text { grid-column: 3 / -1; font-size: var(--t-lead); line-height: 1.2; letter-spacing: -.03em; font-weight: 500; max-width: 32ch; }
.about-text em { color: var(--accent); }
.about-cols { grid-column: 3 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 64px; }
.col-title { font-size: 13px; font-weight: 400; color: var(--muted); padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.timeline li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.timeline .when { color: var(--muted); font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 16px; }
.tools li { font-size: 14px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; }

/* ---------- Hors écran ---------- */
.perso { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; align-items: center; }
.perso-text { order: -1; grid-column: 3 / span 5; }
.perso-big {
  font-size: var(--t-name); font-weight: 500; letter-spacing: -.05em; line-height: .95; justify-self: center; grid-column: 9 / -1;
  color: var(--accent); white-space: nowrap;
}
.perso-text h2 { margin-bottom: 18px; }
.perso-text p { font-size: 16px; line-height: 1.5; max-width: 46ch; margin-bottom: 14px; }
.perso-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--ink); }
.perso-facts strong { display: block; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.perso-facts span { font-size: 14px; color: var(--muted); }

/* ---------- Contact ---------- */
.contact {
  margin-top: var(--space);
  padding: var(--space) var(--pad) calc(var(--space) * .6);
  background: var(--ink); color: var(--bg);
}
.contact .hero-label { color: #c79aa1; margin-bottom: 24px; }
.contact h2 { max-width: none; }
.contact h2 em { color: var(--pop); }
.mail {
  display: inline-flex; gap: 10px; margin-top: 32px;
  font-size: clamp(17px, 1.6vw, 22px); letter-spacing: -.01em;
  border-bottom: 1px solid #5a2a33; padding-bottom: 6px; transition: border-color .25s, color .25s;
}
.mail:hover { color: var(--pop); border-color: var(--pop); }
.socials { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 40px; font-size: 14px; color: #d8b9bd; }
.socials a:hover { color: var(--bg); }

.foot { display: flex; justify-content: space-between; padding: 20px var(--pad); background: var(--ink); color: #c79aa1; font-size: 13px; border-top: 1px solid #3f1a21; }

/* ---------- Animations ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .skills li { grid-template-columns: 48px 1fr 240px; gap: 6px 24px; }
  .skills h3 { white-space: normal; }
  .skills p { grid-column: 2; grid-row: 2; }
  .skill-tools { grid-column: 3; grid-row: 1 / span 2; }
}
@media (max-width: 900px) {
  .top nav { gap: 18px; }
  .hero-grid, .about { grid-template-columns: 1fr; }
  .hero-grid > *, .about > *, .about-text, .about-cols { grid-column: 1 / -1 !important; }
  .scroll-cue { display: none; }
  .skills li { grid-template-columns: 40px 1fr; gap: 6px 12px; }
  .skills p, .skill-tools { grid-column: 2; grid-row: auto; text-align: left; }
  .top nav a[href="#competences"] { display: none; }
  .works { grid-template-columns: 1fr; gap: 56px; }
  .work, .works .work:nth-child(n) { grid-column: 1 / -1; margin-top: 0; }
  .thumb, .work:nth-child(n) .thumb { aspect-ratio: 4 / 3; }
  .about-cols { grid-template-columns: 1fr; gap: 40px; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 90px; }
  .hero-photo { order: -1; }
  .hero-photo img { max-height: 70svh; aspect-ratio: 4 / 5; height: auto; }
  .hero-meta { grid-template-columns: 1fr; }
  .hero-intro { flex-direction: column; align-items: stretch; margin-top: 24px; }
  .cv-button { justify-content: center; }
  .perso { grid-template-columns: 1fr; gap: 24px; }
  .perso-text, .perso-big { grid-column: 1 / -1; }
}

/* Petits écrans : menu sur une seule ligne */
@media (max-width: 560px) {
  .logo, .top nav a { white-space: nowrap; }
  .top nav { gap: 14px; font-size: 13px; }
  .top nav a[href="#apropos"], .top nav sup { display: none; }
}
