/* ==========================================================================
   gafaiti.vip — feuille de style
   Monde visuel : la feuille de dessin technique (cartouche, cotes, filets).
   Papier chaud, encre tiède, un seul accent : le crayon rouge de relecture.
   ========================================================================== */

/* ---------- Polices (auto-hébergées, latin) ---------- */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/bricolage-grotesque-normal-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/source-serif-4-normal-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/source-serif-4-italic-latin.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-normal-latin.woff2") format("woff2");
}

/* ---------- Jetons ---------- */
:root {
  color-scheme: light dark;

  --paper: oklch(97.5% 0.010 85);
  --paper-2: oklch(94.5% 0.013 85);
  --paper-3: oklch(90.5% 0.016 82);
  --ink: oklch(21% 0.018 60);
  --ink-2: oklch(43% 0.020 60);
  --ink-3: oklch(52% 0.018 60);
  --rule: oklch(85% 0.014 75);
  --rule-strong: oklch(62% 0.020 60);
  --accent: oklch(50% 0.185 32);
  --accent-2: oklch(44% 0.180 32);
  --on-accent: oklch(98% 0.010 85);
  --accent-soft: oklch(92% 0.045 40);
  --shadow: 0 1px 2px oklch(20% 0.02 60 / 0.06), 0 12px 28px -16px oklch(20% 0.02 60 / 0.35);

  --font-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(1rem, 4vw, 3rem);
  --measure: 68ch;
  --radius: 6px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 180ms;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: oklch(17% 0.010 60);
    --paper-2: oklch(21% 0.012 60);
    --paper-3: oklch(26% 0.014 60);
    --ink: oklch(93% 0.012 85);
    --ink-2: oklch(74% 0.015 80);
    --ink-3: oklch(64% 0.015 80);
    --rule: oklch(30% 0.012 60);
    --rule-strong: oklch(55% 0.015 70);
    --accent: oklch(72% 0.170 40);
    --accent-2: oklch(78% 0.160 45);
    --on-accent: oklch(15% 0.020 40);
    --accent-soft: oklch(31% 0.060 35);
    --shadow: 0 1px 2px oklch(0% 0 0 / 0.3), 0 12px 28px -16px oklch(0% 0 0 / 0.7);
  }
}
:root[data-theme="dark"] {
  --paper: oklch(17% 0.010 60);
  --paper-2: oklch(21% 0.012 60);
  --paper-3: oklch(26% 0.014 60);
  --ink: oklch(93% 0.012 85);
  --ink-2: oklch(74% 0.015 80);
  --ink-3: oklch(64% 0.015 80);
  --rule: oklch(30% 0.012 60);
  --rule-strong: oklch(55% 0.015 70);
  --accent: oklch(72% 0.170 40);
  --accent-2: oklch(78% 0.160 45);
  --on-accent: oklch(15% 0.020 40);
  --accent-soft: oklch(31% 0.060 35);
  --shadow: 0 1px 2px oklch(0% 0 0 / 0.3), 0 12px 28px -16px oklch(0% 0 0 / 0.7);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--rule-strong) var(--paper);
}
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  caret-color: var(--accent);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; transition: color var(--t-fast) ease; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
}
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
.mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.005em;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}
.icon { width: 1.1em; height: 1.1em; vertical-align: -0.2em; flex: none; }
.icon-ext { width: 0.9em; height: 0.9em; vertical-align: -0.05em; }
.icon-back { transform: rotate(180deg); }
.wrap { width: 100%; max-width: 74rem; margin-inline: auto; padding-inline: var(--gutter); }
.skip {
  position: absolute; left: var(--gutter); top: -3rem;
  background: var(--accent); color: var(--on-accent);
  padding: 0.5rem 0.875rem; border-radius: var(--radius);
  font-family: var(--font-display); text-decoration: none; z-index: 10;
}
.skip:focus { top: 0.75rem; }

/* ---------- En-tête ---------- */
.site-head {
  display: flex; align-items: center; gap: 1.5rem;
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-display);
}
.brand {
  font-weight: 650; font-size: 1.125rem; letter-spacing: -0.015em;
  text-decoration: none; margin-right: auto; white-space: nowrap;
}
.site-nav { display: flex; gap: clamp(0.75rem, 3vw, 1.75rem); }
.site-nav a {
  text-decoration: none; font-weight: 500; font-size: 0.9375rem; color: var(--ink-2);
  padding-block: 0.25rem; border-bottom: 1.5px solid transparent;
  transition: color var(--t-fast) ease, border-color var(--t-fast) ease;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.theme-toggle {
  inline-size: 2.25rem; block-size: 2.25rem; display: grid; place-items: center;
  border: 1px solid var(--rule); border-radius: var(--radius); background: transparent; color: var(--ink-2);
  cursor: pointer; transition: color var(--t-fast) ease, border-color var(--t-fast) ease, background var(--t-fast) ease;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--rule-strong); background: var(--paper-2); }
.theme-toggle .icon { width: 1.125rem; height: 1.125rem; }
.theme-toggle .icon-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

main { flex: 1; }

/* ---------- Accueil : héros ---------- */
.hero {
  display: grid; grid-template-columns: 1fr; gap: 2rem;
  padding-block: clamp(2.5rem, 7vw, 5.5rem) 0;
}
.hero h1 {
  font-size: clamp(2.75rem, 8vw, 5.75rem);
  font-weight: 700; letter-spacing: -0.03em; line-height: 0.98;
  font-variation-settings: "opsz" 96;
}
.hero-role {
  margin-top: 1rem;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.25rem, 2.4vw, 1.625rem); letter-spacing: -0.01em; color: var(--accent);
}
.hero-lead { margin-top: 1.5rem; max-width: 40ch; font-size: 1.1875rem; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }
.hero-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: center; }
.hero-photo { margin: 0; justify-self: start; }
.hero-photo img {
  width: clamp(9rem, 22vw, 16rem); aspect-ratio: 1; object-fit: cover;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.hero-photo figcaption { margin-top: 0.625rem; display: flex; align-items: center; gap: 0.35rem; }
@media (min-width: 52rem) {
  .hero { grid-template-columns: 1fr auto; align-items: end; column-gap: 3rem; }
  .hero-photo { justify-self: end; }
}

/* Cote : la ligne de cotation, seul moment animé de la page. */
.cote {
  grid-column: 1 / -1; position: relative; height: 2.25rem; margin-top: 1.5rem;
  display: flex; align-items: center;
}
.cote::before, .cote::after {
  content: ""; position: absolute; top: 0.25rem; bottom: 0.25rem; width: 1px; background: var(--rule-strong);
}
.cote::before { left: 0; }
.cote::after { right: 0; }
.cote-line {
  position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--accent);
  transform-origin: left center;
  animation: cote-draw 1.1s var(--ease-out) 0.15s both;
}
.cote-line::before, .cote-line::after {
  content: ""; position: absolute; top: -4px; width: 0; height: 0;
  border-block: 4px solid transparent;
}
.cote-line::before { left: 0; border-right: 9px solid var(--accent); }
.cote-line::after { right: 0; border-left: 9px solid var(--accent); }
.cote-label {
  position: relative; margin-inline: auto; padding-inline: 0.75rem;
  background: var(--paper); color: var(--accent);
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
  animation: cote-fade 0.6s ease-out 0.85s both;
}
@keyframes cote-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes cote-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.125rem; border-radius: var(--radius);
  background: var(--accent); color: var(--on-accent);
  font-family: var(--font-display); font-weight: 550; font-size: 0.9375rem; letter-spacing: -0.005em;
  text-decoration: none; border: 1px solid transparent;
  transition: background var(--t-fast) ease, color var(--t-fast) ease, transform var(--t-fast) var(--ease-out);
}
.btn:hover { background: var(--accent-2); color: var(--on-accent); }
.btn:active { transform: translateY(1px); }
.btn .icon { transition: transform var(--t-fast) var(--ease-out); }
.btn:hover .icon { transform: translateX(3px); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn-quiet:hover { background: var(--paper-2); color: var(--ink); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(3rem, 7vw, 5.5rem) 0; }
.section:last-child { padding-bottom: clamp(3rem, 7vw, 5.5rem); }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding-bottom: 1rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--rule-strong);
}
.section-head h2 { font-size: clamp(1.625rem, 3vw, 2.25rem); }
.more {
  font-family: var(--font-display); font-weight: 500; font-size: 0.9375rem; text-decoration: none; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap;
}
.more:hover { color: var(--accent); }
.more .icon { transition: transform var(--t-fast) var(--ease-out); }
.more:hover .icon { transform: translateX(3px); }
.more:hover .icon-back { transform: rotate(180deg) translateX(3px); }

.domains { display: grid; grid-template-columns: 1fr; gap: 1.75rem 3rem; }
.domains > div { border-top: 1px solid var(--rule); padding-top: 1rem; }
.domains > div:first-child { border-top: 0; padding-top: 0; }
.domains dt { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; letter-spacing: -0.015em; }
.domains dd { margin: 0.5rem 0 0; color: var(--ink-2); font-size: 1rem; line-height: 1.55; text-wrap: pretty; }
@media (min-width: 46rem) {
  .domains { grid-template-columns: 1fr 1fr; }
  .domains > div:nth-child(2) { border-top: 0; padding-top: 0; }
}

/* ---------- Parcours : logos des organisations ---------- */
.orgs { list-style: none; display: grid; grid-template-columns: 1fr; gap: 0; }
.orgs > li { border-bottom: 1px solid var(--rule); }
.org {
  display: grid; grid-template-columns: 7.5rem 1fr; grid-template-rows: auto auto; column-gap: 1.25rem; row-gap: 0.1rem;
  align-items: center; padding-block: 1rem; text-decoration: none; color: inherit;
}
.org-logo { grid-row: 1 / 3; display: flex; align-items: center; justify-content: flex-start; height: 2.5rem; }
.org-logo img {
  max-height: 2.25rem; max-width: 7.5rem; width: auto; height: auto; object-fit: contain;
  filter: grayscale(1); opacity: 0.78; transition: filter var(--t-fast) ease, opacity var(--t-fast) ease;
}
.org:hover .org-logo img { filter: none; opacity: 1; }
.org-name { font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.01em; }
.org-role { color: var(--ink-2); font-size: 0.9375rem; }
.org-period { grid-column: 2; }
.org:hover .org-name { color: var(--accent); }
@media (min-width: 46rem) {
  .orgs { grid-template-columns: 1fr 1fr; column-gap: 3rem; }
  .org { grid-template-columns: 8rem 1fr auto; grid-template-rows: auto auto; }
  .org-period { grid-column: 3; grid-row: 1 / 3; text-align: right; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .org-logo img, :root:not([data-theme="light"]) .entry-logo { filter: grayscale(1) invert(1); }
  :root:not([data-theme="light"]) .org:hover .org-logo img { filter: grayscale(1) invert(1); opacity: 1; }
}
:root[data-theme="dark"] .org-logo img, :root[data-theme="dark"] .entry-logo { filter: grayscale(1) invert(1); }
:root[data-theme="dark"] .org:hover .org-logo img { filter: grayscale(1) invert(1); opacity: 1; }
.entry-logo {
  display: inline-block; height: 1.1rem; width: auto; max-width: 5rem; vertical-align: -0.2em; margin-right: 0.45rem;
  filter: grayscale(1); opacity: 0.85;
}

/* ---------- Listes en lignes (projets, articles) ---------- */
.rows { list-style: none; }
.rows > li { border-bottom: 1px solid var(--rule); }
.rows > li:first-child { border-top: 1px solid var(--rule); }
.section .rows > li:first-child { border-top: 0; }
.row {
  display: grid; grid-template-columns: 1fr; gap: 0.5rem 1.5rem; align-items: start;
  padding-block: 1.375rem; text-decoration: none; color: inherit;
}
.row-main h3 { font-size: 1.375rem; display: flex; align-items: center; gap: 0.6rem; transition: color var(--t-fast) ease; }
.row-main p { margin-top: 0.4rem; color: var(--ink-2); font-size: 1rem; line-height: 1.5; max-width: 62ch; text-wrap: pretty; }
.row-logo { width: 1.75rem; height: 1.75rem; border-radius: 6px; }
.row-meta { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.row-arrow { display: none; color: var(--ink-3); transition: transform var(--t-fast) var(--ease-out), color var(--t-fast) ease; }
.row:hover .row-main h3, .row:hover { color: var(--accent); }
.row:hover .row-main p { color: var(--ink-2); }
.row:hover .row-arrow { transform: translateX(4px); color: var(--accent); }
.draft {
  font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); border: 1px solid currentColor; border-radius: 999px; padding: 0.1rem 0.5rem; vertical-align: middle;
}
.empty { color: var(--ink-2); padding-block: 1rem; }
@media (min-width: 46rem) {
  .row { grid-template-columns: 1fr 12rem 1.5rem; }
  .row-meta { flex-direction: column; gap: 0.2rem; text-align: right; padding-top: 0.35rem; }
  .row-arrow { display: block; padding-top: 0.35rem; }
}

/* ---------- Contact ---------- */
.contact-lead { font-size: clamp(1.25rem, 2.2vw, 1.5rem); max-width: 36ch; line-height: 1.4; text-wrap: pretty; }
.contact-links { list-style: none; margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; }
.contact-links a, .contact-links span { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--font-display); font-weight: 500; text-decoration: none; }
.contact-links a:hover { color: var(--accent); }
.contact-links.compact { flex-direction: column; gap: 0.6rem; margin-top: 0; }

/* ---------- Pages intérieures ---------- */
.page-head { padding-block: clamp(2.5rem, 6vw, 4.5rem) 0; }
.page-head h1 { font-size: clamp(2.25rem, 5.5vw, 3.75rem); letter-spacing: -0.03em; display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; font-variation-settings: "opsz" 96; }
.title-logo { width: 2.5rem; height: 2.5rem; border-radius: 8px; }
.page-sub { margin-top: 1rem; max-width: 60ch; font-size: 1.1875rem; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.page-meta { margin-top: 1rem; }
.page-head + .rows { margin-top: 2.5rem; }
.page-head .tags { margin-top: 1rem; }
.page-foot { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.page { padding-bottom: clamp(3rem, 7vw, 5.5rem); }
.page-404 .contact-links { margin-top: 2rem; }
.byline { color: var(--ink-2); font-size: 0.9375rem; }
.pager { margin-top: 1.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pager a { display: grid; gap: 0.2rem; text-decoration: none; font-family: var(--font-display); font-weight: 550; }
.pager a .mono { font-weight: 400; }
.pager-next { text-align: right; }

.spec {
  margin: 2rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1rem 2rem;
  padding-block: 1.25rem; border-block: 1px solid var(--rule-strong);
}
.spec dt, .cartouche dt {
  font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3);
}
.spec dd { margin: 0.3rem 0 0; font-family: var(--font-display); font-weight: 500; font-size: 0.9375rem; }
.spec dd a { text-decoration: none; }
.spec dd a:hover { color: var(--accent); }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.375rem; }
.tags li {
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-2);
  border: 1px solid var(--rule-strong); border-radius: 999px; padding: 0.15rem 0.6rem; line-height: 1.5;
}

/* ---------- Prose (articles, projets) ---------- */
.prose { margin-top: 2.5rem; max-width: var(--measure); font-size: 1.125rem; line-height: 1.65; }
.prose > * + * { margin-top: 1.25em; }
.prose h2 { font-size: 1.75rem; margin-top: 2.25em; }
.prose h3 { font-size: 1.3125rem; margin-top: 1.8em; }
.prose h4 { font-size: 1.0625rem; margin-top: 1.6em; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: 0.6em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: var(--accent); }
.prose strong { font-weight: 650; }
.prose em { font-style: italic; }
.prose a { text-decoration: underline; }
.prose code {
  font-family: var(--font-mono); font-size: 0.85em; background: var(--paper-2);
  padding: 0.12em 0.4em; border-radius: 4px;
}
.prose pre {
  background: var(--paper-2); border-radius: 8px; padding: 1.125rem 1.25rem;
  overflow-x: auto; font-size: 0.875rem; line-height: 1.55; margin-top: 1.25em;
}
.prose pre code { background: none; padding: 0; font-size: inherit; }
.prose blockquote {
  margin: 1.5em 0; padding-left: 1.25rem; border-left: 1px solid var(--rule-strong);
  color: var(--ink-2); font-style: italic;
}
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5em 0; }
.prose img { border-radius: var(--radius); }
.table-wrap { overflow-x: auto; }
.prose table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; }
.prose th, .prose td { text-align: left; padding: 0.55em 0.9em; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose th { font-family: var(--font-display); font-weight: 600; border-bottom-color: var(--rule-strong); }
.prose td { font-variant-numeric: tabular-nums; }

/* ---------- CV ---------- */
.cv-actions { margin-top: 1.75rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.25rem; }
.cv-grid { margin-top: 3rem; display: grid; grid-template-columns: 1fr; gap: 3rem; }
.cv h2 { font-size: 1.5rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--rule-strong); }
.cv-main section + section, .cv-side section + section { margin-top: 3rem; }
.entry { display: grid; grid-template-columns: 1fr; gap: 0.35rem 2rem; padding-block: 1.5rem; border-bottom: 1px solid var(--rule); }
.entry:last-child { border-bottom: 0; }
.entry-when { padding-top: 0.3rem; }
.entry h3 { font-size: 1.25rem; }
.entry-org { margin-top: 0.3rem; color: var(--ink-2); font-size: 1rem; }
.entry ul { margin-top: 0.875rem; padding-left: 1.2em; font-size: 1rem; line-height: 1.55; }
.entry li + li { margin-top: 0.45em; }
.entry li::marker { color: var(--accent); }
.entry-body > p:not(.entry-org) { margin-top: 0.75rem; font-size: 1rem; line-height: 1.55; }
.tracks { margin-top: 1rem; display: grid; grid-template-columns: 1fr; gap: 1rem 2rem; }
.tracks h4 { font-size: 0.9375rem; font-weight: 600; }
.tracks ul { margin-top: 0.5rem; font-size: 0.9375rem; }
.skill-group + .skill-group { margin-top: 1.25rem; }
.skill-group h3 { font-size: 0.9375rem; font-weight: 600; margin-bottom: 0.5rem; }
.cv-side section > .skill-group:first-of-type { margin-top: 1.25rem; }
.langs { list-style: none; margin-top: 1rem; }
.langs li { display: flex; justify-content: space-between; gap: 1rem; padding-block: 0.5rem; border-bottom: 1px solid var(--rule); font-family: var(--font-display); font-weight: 500; }
.cv-side .contact-links { margin-top: 1.25rem; }
@media (min-width: 40rem) {
  .entry { grid-template-columns: 9rem 1fr; }
  .tracks { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 60rem) {
  .cv-grid { grid-template-columns: minmax(0, 1fr) 18rem; gap: 4.5rem; }
}

/* ---------- Pied de page : le cartouche ---------- */
.site-foot { padding-block: 0 2rem; margin-top: auto; }
.cartouche {
  margin: 0; display: grid; grid-template-columns: 1fr 1fr;
  border: 1px solid var(--rule-strong); border-radius: 2px;
  font-family: var(--font-display);
}
.cartouche > div { padding: 0.75rem 1rem; border-top: 1px solid var(--rule); min-width: 0; }
.cartouche > div:nth-child(-n + 2) { border-top: 0; }
.cartouche > div:nth-child(2n) { border-left: 1px solid var(--rule); }
.cartouche dd { margin: 0.2rem 0 0; font-weight: 500; font-size: 0.9375rem; overflow-wrap: anywhere; }
.cartouche dd.mono { font-weight: 400; color: var(--ink); }
.cartouche-links { grid-column: 1 / -1; border-left: 0 !important; }
.cartouche-links dd { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.cartouche-links a { text-decoration: none; }
.cartouche-links a:hover { color: var(--accent); }
@media (min-width: 46rem) {
  .cartouche { grid-template-columns: 1.4fr 1.4fr 0.8fr 1fr 1.6fr; }
  .cartouche > div { border-top: 0; border-left: 1px solid var(--rule); }
  .cartouche > div:first-child { border-left: 0; }
  .cartouche-links { grid-column: auto; border-left: 1px solid var(--rule) !important; }
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- Impression (CV) ---------- */
@media print {
  :root { --paper: #fff; --ink: #111; --ink-2: #333; --ink-3: #555; --rule: #bbb; --rule-strong: #777; --accent: #b4381a; }
  .site-head, .site-foot, .cv-actions, .skip, .theme-toggle { display: none !important; }
  body { font-size: 11pt; }
  .page-head { padding-top: 0; }
  .cv-grid { grid-template-columns: 1fr 15rem; gap: 2rem; }
  a { text-decoration: none; }
}
