/* ---------- Couleurs et typographie ---------- */
:root {
  --bg: #fbf9f5;
  --surface: #ffffff;
  --tint: #f1ede4;
  --text: #1c2530;
  --muted: #5b6573;
  --line: #e2ddd2;
  --brand: #1f3a5f;
  --brand-soft: #e3eaf3;
  --accent: #b8572f;
  --dark: #14212f;
  --on-dark: #eef1f5;
  --radius: 14px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11161d;
    --surface: #18202a;
    --tint: #151c25;
    --text: #e7eaef;
    --muted: #a3adbb;
    --line: #2a3442;
    --brand: #9cb9e0;
    --brand-soft: #1f2b3b;
    --accent: #e8926b;
    --dark: #0b1017;
    --on-dark: #e7eaef;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; color: var(--text); }
h1 { font-size: clamp(2.4rem, 6vw, 3.8rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.wrap { width: min(1100px, 100% - 32px); margin-inline: auto; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 16px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- En-tête ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.brand { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; text-decoration: none; color: var(--text); }
.brand span { color: var(--accent); }
.top nav ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 0.92rem; font-weight: 500; }
.top nav a:hover { color: var(--text); }
@media (max-width: 860px) { .top nav { display: none; } }

/* ---------- Accueil ---------- */
.hero { padding: 72px 0 64px; }
.hero__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; font-weight: 600; color: var(--accent); margin-bottom: 14px; }
.lead { font-size: 1.18rem; color: var(--muted); max-width: 36em; margin-top: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 22px 0 28px; }
.chips li { background: var(--brand-soft); color: var(--brand); padding: 6px 12px; border-radius: 999px; font-size: 0.88rem; font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-block; padding: 12px 20px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.95rem;
}
.btn:hover { border-color: var(--brand); }
.btn--primary { background: var(--brand); border-color: var(--brand); color: var(--bg); }
.btn--primary:hover { filter: brightness(1.1); }
.portrait { margin: 0; }
.portrait img { border-radius: 22px; aspect-ratio: 4 / 5; object-fit: cover; width: 100%; box-shadow: 0 20px 50px -24px rgba(20, 33, 47, .45); }
@media (max-width: 760px) {
  .hero { padding: 40px 0 48px; }
  .hero__grid { grid-template-columns: 1fr; gap: 32px; }
  .portrait { max-width: 260px; order: -1; }
}

/* ---------- Sections ---------- */
.section { padding: 80px 0; border-top: 1px solid var(--line); }
.section--tint { background: var(--tint); }
.section__head { margin-bottom: 36px; }
.kicker { font-family: var(--serif); color: var(--accent); font-size: 1rem; margin-bottom: 6px; }
.sub { color: var(--muted); max-width: 46em; margin-top: 12px; }
.two { display: grid; grid-template-columns: 300px 1fr; gap: 48px; }
.two .section__head { margin: 0; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; gap: 20px; } .section { padding: 56px 0; } }
.prose { max-width: 44em; }

.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 28px 0 0; }
.facts div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.facts dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.facts dd { margin: 4px 0 0; font-weight: 500; }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } }

/* ---------- Cartes du stage ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card__tag { font-size: 0.78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); font-weight: 600; margin-bottom: 6px; }
.card h3 { margin-bottom: 12px; }
.card ul { margin: 0; padding-left: 1.1em; }
.card li { margin-bottom: 6px; }
.card--accent { background: var(--brand); border-color: var(--brand); }
.card--accent h3, .card--accent p { color: var(--bg); }
.card--accent .card__tag { color: var(--bg); opacity: .8; }
@media (max-width: 760px) { .cards { grid-template-columns: 1fr; } }

/* ---------- Ce que j'apporte ---------- */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 18px 48px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-weight: 600; font-size: .9rem;
}

/* ---------- Projets ---------- */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.project { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; }
.project--wide { grid-column: span 2; }
.project__meta { font-size: .8rem; color: var(--muted); margin-bottom: 6px; }
.project h3 { margin-bottom: 10px; }
.project ul { margin: 0 0 12px; padding-left: 1.1em; }
.tags { margin-top: auto; margin-bottom: 0; font-size: .85rem; color: var(--brand); font-weight: 500; }
@media (max-width: 900px) { .projects { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .projects { grid-template-columns: 1fr; } .project--wide { grid-column: auto; } }

/* ---------- IA ---------- */
.timeline { list-style: none; padding: 0; margin: 20px 0 24px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 18px 22px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.timeline span { display: block; font-weight: 600; color: var(--text); }
.note { background: var(--brand-soft); border-radius: var(--radius); padding: 16px 18px; }

/* ---------- Contact ---------- */
.section--dark { background: var(--dark); border-top: 0; }
.section--dark h2, .section--dark p { color: var(--on-dark); }
.section--dark .kicker { color: var(--accent); }
.contact { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.links a {
  display: block; padding: 12px 16px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.18); color: var(--on-dark); text-decoration: none; font-weight: 500;
}
.links a:hover { background: rgba(255,255,255,.08); }
@media (max-width: 760px) { .contact { grid-template-columns: 1fr; } }

.foot { padding: 24px 0; font-size: .85rem; color: var(--muted); }
