/* freelance.marchesson.com — palette et polices communes avec marchesson.com */
:root {
  --ink: #1f365c;
  --ink-soft: #4b5f80;
  --sky: #dfecf8;
  --paper: #f6f9fd;
  --card: #fff;
  --line: rgba(31, 54, 92, .14);
  --shadow: 0 6px 14px -6px rgba(24, 39, 75, .12), 0 10px 32px -4px rgba(24, 39, 75, .1);
  --serif: 'EB Garamond', Georgia, serif;
  --sans: Montserrat, system-ui, sans-serif;
  --radius: 14px;
  --header-h: 64px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-underline-offset: 3px; }

h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: 1.15; }
h1, h2 { font-family: var(--serif); letter-spacing: -.01em; }
h1 em, h2 em { color: var(--ink-soft); }

p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }

@media (min-width: 720px) {
  .wrap { padding: 0 32px; }
}

.skip {
  position: absolute; left: 16px; top: -48px; z-index: 20;
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px;
}
.skip:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: 14px 22px; border-radius: 999px;
  background: var(--ink); color: #fff; border: 1px solid var(--ink);
  font-weight: 500; font-size: 15px; text-decoration: none; white-space: nowrap;
  transition: transform .2s ease, background-color .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-small { padding: 9px 16px; font-size: 14px; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); border-color: #fff; }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-ghost-light:hover { border-color: #fff; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(246, 249, 253, .85);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); }
.logo { font: 700 17px/1 var(--sans); text-decoration: none; letter-spacing: -.01em; white-space: nowrap; margin: 0; }
.logo span { color: var(--ink-soft); }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  padding: 8px 12px; border-radius: 999px;
  font-size: 14px; font-weight: 500; text-decoration: none; color: var(--ink-soft);
  transition: color .2s, background-color .2s;
}
.nav a:hover, .nav a.is-active { color: var(--ink); background: var(--sky); }

/* Mobile : la nav passe sous le logo et défile horizontalement */
@media (max-width: 799px) {
  .header-inner { flex-wrap: wrap; padding-top: 10px; gap: 0 12px; }
  .header-inner .btn-small { margin-left: auto; }
  .nav {
    order: 3; width: 100%; margin: 6px -12px 4px; padding: 0 0 4px;
    overflow-x: auto; scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; }
}

/* ---------- Hero ---------- */
.hero { padding: 48px 0 0; background: linear-gradient(180deg, var(--sky), var(--paper)); overflow: hidden; }
.hero-grid { display: grid; gap: 32px; align-items: end; }
.hero-text { padding-bottom: 48px; }
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 16px;
}
.hero h1 { font-size: clamp(44px, 8vw, 84px); margin-bottom: 24px; }
.hero h1 em { display: block; }
.lead { font-size: 18px; color: var(--ink-soft); max-width: 36em; }

.stats { list-style: none; padding: 0; margin: 40px 0 0; display: flex; flex-wrap: wrap; gap: 16px 40px; }
.stats strong { display: block; font: 400 34px/1 var(--serif); }
.stats span { font-size: 13px; color: var(--ink-soft); }

.hero-portrait { margin: 0; justify-self: center; max-width: 300px; }
.hero-portrait img { filter: drop-shadow(0 20px 30px rgba(24, 39, 75, .15)); }

@media (min-width: 900px) {
  .hero { padding-top: 72px; }
  .hero-grid { grid-template-columns: 1.4fr 1fr; }
  .hero-text { padding-bottom: 88px; }
  .hero-portrait { max-width: 394px; justify-self: end; }
}

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section-alt { background: var(--sky); }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(34px, 5vw, 52px); margin-bottom: 16px; }
.section-head p:last-child { color: var(--ink-soft); font-size: 17px; }

@media (min-width: 900px) {
  .section { padding: 112px 0; }
}

.num { display: block; font: 700 13px/1 var(--sans); letter-spacing: .1em; color: var(--ink-soft); margin-bottom: 20px; }

/* ---------- Services ---------- */
.cards { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(2, 1fr); } }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 { font: 700 19px/1.3 var(--sans); margin-bottom: 12px; }
.card p { color: var(--ink-soft); font-size: 15px; }
.card .tags { margin-top: auto; }

.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 999px;
  background: var(--sky); color: var(--ink);
}

/* ---------- Approche ---------- */
.principles { list-style: none; padding: 0; margin: 0; display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.principles li { border-top: 1px solid var(--ink); padding-top: 24px; }
.principles h3 { font: 400 28px/1.15 var(--serif); margin-bottom: 12px; }
.principles p { color: var(--ink-soft); }

/* ---------- Réalisations ---------- */
.projects { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.project {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.project:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.project img { width: 100%; aspect-ratio: 477 / 266; object-fit: cover; background: var(--sky); border-bottom: 1px solid var(--line); }
.project-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.meta { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; }
.project h3 { font: 400 26px/1.15 var(--serif); margin-bottom: 10px; }
.project p:not(.meta) { font-size: 15px; color: var(--ink-soft); }
.link { margin-top: auto; font-weight: 700; font-size: 14px; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* ---------- Témoignages ---------- */
.quotes {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(86%, 440px); gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  padding: 4px 4px 20px; margin: 0 -4px;
  scrollbar-color: var(--ink-soft) transparent;
}
.quote {
  scroll-snap-align: start; margin: 0;
  background: var(--card); border-radius: var(--radius); padding: 32px 28px 28px;
  display: flex; flex-direction: column;
}
.quote p { font: italic 400 20px/1.45 var(--serif); }
.quote p::before { content: "“"; display: block; font-size: 56px; line-height: .6; margin-bottom: 12px; color: var(--ink-soft); }
.quote footer { margin-top: auto; font-size: 14px; color: var(--ink-soft); }
.quote footer strong { color: var(--ink); }

.clients-title { font: 700 13px/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin: 56px 0 20px; }
.clients { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 36px; }
.clients li { font: 400 clamp(22px, 3vw, 30px)/1.3 var(--serif); }

/* ---------- Parcours ---------- */
.cv-current { margin-bottom: 40px; }
.cv-more { border-top: 1px solid var(--line); padding-top: 16px; }
.cv-more summary { cursor: pointer; font-weight: 500; color: var(--ink); }
.cv-more[open] summary { margin-bottom: 32px; }
.cv { display: grid; gap: 48px; }
@media (min-width: 900px) {
  .cv { grid-template-columns: 1.6fr 1fr; gap: 72px; }
}
.cv-title { font: 700 13px/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 20px; }
.cv-side .cv-title:not(:first-child) { margin-top: 40px; }

.timeline { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.timeline li { position: relative; padding: 0 0 32px 28px; }
.timeline li::before {
  content: ""; position: absolute; left: -5px; top: 6px;
  width: 9px; height: 9px; border-radius: 50%; background: var(--ink);
}
.timeline li:last-child { padding-bottom: 0; }
.when { font-size: 13px; font-weight: 700; color: var(--ink-soft); margin-bottom: 4px; }
.timeline h4 { font: 700 17px/1.35 var(--sans); margin-bottom: 6px; }
.timeline h4 span { font-weight: 400; color: var(--ink-soft); }
.timeline h4 span::before { content: " · "; }
.timeline p:last-child { color: var(--ink-soft); font-size: 15px; margin: 0; }

.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink-soft); }
.plain strong { display: block; color: var(--ink); font-size: 15px; }

/* ---------- Contact ---------- */
.contact { background: var(--ink); color: #fff; }
.contact-inner { max-width: 820px; text-align: center; }
.contact .eyebrow { color: rgba(255, 255, 255, .7); }
.contact h2 { font-size: clamp(38px, 6vw, 64px); margin-bottom: 20px; }
.contact h2 em { color: var(--sky); }
.contact .lead { color: rgba(255, 255, 255, .8); margin: 0 auto; }
.contact .cta-row { justify-content: center; }
.small { font-size: 14px; color: rgba(255, 255, 255, .7); margin-top: 28px; }

/* ---------- Footer ---------- */
.site-footer { padding: 48px 0 32px; font-size: 14px; color: var(--ink-soft); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.site-footer .logo { color: var(--ink); margin-bottom: 8px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; }
.footer-links a { text-decoration: none; font-weight: 500; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }
.legal { border-top: 1px solid var(--line); padding-top: 16px; }
.legal summary { cursor: pointer; font-weight: 500; color: var(--ink); }
.legal p { margin: 12px 0 0; max-width: 72em; }
.copy { margin: 16px 0 0; }

/* ---------- Accessibilité / impression ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* Impression : la page sert de CV */
@media print {
  .site-header, .skip, .cta-row, .hero-portrait, #services, #approche, #temoignages, #realisations, .contact, .footer-links { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .hero, .section { padding: 16pt 0; background: none; }
  .hero-text { padding: 0; }
  .hero h1 { font-size: 30pt; }
  .stats { margin-top: 12pt; }
  .timeline li { break-inside: avoid; }
  .legal { display: none; }
  a { text-decoration: none; }
}

/* ---------- Page 404 ---------- */
.section-head h1 { font-size: clamp(40px, 7vw, 72px); margin-bottom: 16px; }
