/* Page d'accueil de ve2cuy.com : tableau d'instruments, sombre par défaut, mode clair. */

@font-face { font-family: "Sora"; font-weight: 600; font-display: swap; src: url("fonts/sora-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-weight: 700; font-display: swap; src: url("fonts/sora-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-weight: 800; font-display: swap; src: url("fonts/sora-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --bg: #0b0f14; --panel: #121922; --panel-2: #18212c; --line: #243140; --line-2: #2f3f51;
  --fg: #e7edf3; --muted: #95a3b2;
  --amber: #f2a93b; --on-amber: #0b0f14; --cyan: #38bdf8; --green: #4ade80; --violet: #b79cff; --red: #ff7a85;
  --glow: rgba(242, 169, 59, .20); --screen: #070a0e;
  --display: "Sora", "Inter", system-ui, sans-serif;
  --body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f3f5f8; --panel: #ffffff; --panel-2: #eaeef3; --line: #d5dce5; --line-2: #c2ccd8;
    --fg: #101820; --muted: #4f5d6c;
    --amber: #9a5b06; --on-amber: #ffffff; --cyan: #0369a1; --green: #15803d; --violet: #6d28d9; --red: #b91c1c;
    --glow: rgba(154, 91, 6, .16);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f3f5f8; --panel: #ffffff; --panel-2: #eaeef3; --line: #d5dce5; --line-2: #c2ccd8;
  --fg: #101820; --muted: #4f5d6c;
  --amber: #9a5b06; --on-amber: #ffffff; --cyan: #0369a1; --green: #15803d; --violet: #6d28d9; --red: #b91c1c;
  --glow: rgba(154, 91, 6, .16);
  color-scheme: light;
}

* { box-sizing: border-box; }
/* Pas d'arrêt automatique sur les sections : la page ne bouge que lorsqu'on la fait défiler
   (points de navigation et menu pour sauter d'une section à l'autre). */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--body); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }
h1, h2 { font-family: var(--display); letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
p { margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 1160px; margin: 0 auto; padding-left: 20px; padding-right: 64px; width: 100%; }
@media (max-width: 640px) { .wrap { padding-right: 20px; } }
.kicker { font-family: var(--mono); font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* Écrans : une section par hauteur de fenêtre */
.screen { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.screen:first-of-type { border-top: 0; }
.screen > .wrap { flex: 1 0 auto; display: flex; flex-direction: column; justify-content: center; gap: 32px; padding-top: 72px; padding-bottom: 72px; }
.screen > .wrap.top { justify-content: flex-start; padding-top: 0; padding-bottom: 0; gap: 0; }
.screen.alt { background: var(--panel); }
.band-head { display: flex; flex-direction: column; gap: 10px; }
.band-head h2 { font-weight: 700; font-size: clamp(24px, 3.4vw, 40px); }
.band-head p { color: var(--muted); font-size: 17.5px; }
.c-cyan { color: var(--cyan); } .c-green { color: var(--green); } .c-amber { color: var(--amber); }
.c-violet { color: var(--violet); } .c-red { color: var(--red); }

/* Points de navigation */
.dots { position: fixed; right: 12px; top: 50%; transform: translateY(-50%); z-index: 5; display: flex; flex-direction: column; gap: 2px; }
.dots a { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
.dots a span { width: 8px; height: 8px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line-2); transition: all .2s ease; }
.dots a[aria-current="true"] span { width: 12px; height: 12px; background: var(--amber); border-color: var(--amber); }
@media (max-width: 640px) { .dots { display: none; } }

/* En-tête */
.nav { padding: 18px 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.lockup { display: flex; align-items: center; gap: 12px; }
.lockup:hover { text-decoration: none; }
.lockup .name { display: flex; flex-direction: column; font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: .02em; }
.lockup .name small { font-family: var(--mono); font-weight: 400; font-size: 11.5px; letter-spacing: .18em; color: var(--green); line-height: 1; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; font-size: 14.5px; color: var(--muted); }
.nav-links a { padding: 12px 11px; }
.nav-links a:hover { color: var(--fg); }
.theme-toggle {
  height: 44px; padding: 0 14px; margin-left: 8px; display: inline-flex; align-items: center; gap: 8px;
  border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); color: var(--fg);
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .1em; cursor: pointer;
}
.theme-toggle .sun, :root[data-theme="light"] .theme-toggle .moon { display: inline; }
.theme-toggle .moon, :root[data-theme="light"] .theme-toggle .sun { display: none; }

/* Accueil */
.hero { flex: 1 0 auto; padding: 24px 0 48px; display: flex; flex-direction: column; justify-content: center; gap: 32px; }
.hero h1 { max-width: 20ch; font-weight: 600; font-size: clamp(34px, 5vw, 60px); line-height: 1.05; overflow-wrap: break-word; hyphens: auto; }
.hero-row { display: flex; flex-wrap: wrap; align-items: center; gap: 40px; }
.hero-text { flex: 4 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.author { display: flex; align-items: center; gap: 16px; }
.author img { width: 112px; height: 112px; flex: none; border-radius: 50%; object-fit: cover; border: 2px solid var(--line-2); box-shadow: 0 0 0 4px var(--panel); }
.author div { display: flex; flex-direction: column; gap: 2px; }
.author-name { font-family: var(--display); font-weight: 700; font-size: 18px; }
.author-role { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.lede { max-width: 38ch; font-size: 19px; color: var(--muted); }
.lede strong { color: var(--fg); font-weight: 500; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.btn {
  padding: 13px 20px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel);
  font-family: var(--display); font-weight: 600; font-size: 15px; transition: transform .15s ease, border-color .15s ease, filter .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); border-color: var(--amber); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.primary { background: var(--amber); border-color: var(--amber); color: var(--on-amber); }

/* Tableau de bord */
.meter {
  flex: 6 1 460px; min-width: 0; padding: 20px; border-radius: 18px; border: 1px solid var(--line); background: var(--panel);
  box-shadow: 0 40px 80px -40px var(--glow); display: flex; flex-direction: column; gap: 18px;
}
.meter-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 10px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.meter-head .title { letter-spacing: .12em; text-transform: uppercase; }
.readouts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.readout { padding: 16px; border-radius: 12px; background: var(--panel-2); display: flex; flex-direction: column; gap: 6px; }
.readout .label { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.readout .value { font-family: var(--display); font-weight: 700; font-size: clamp(28px, 3.4vw, 42px); line-height: 1.05; font-variant-numeric: tabular-nums; }
.readout .value small { font-size: .5em; color: var(--muted); }
.readout .value.year { font-size: clamp(20px, 2.1vw, 26px); line-height: 1.2; white-space: nowrap; }
.readout .sub { font-family: var(--mono); font-size: 12px; color: var(--muted); }
@media (max-width: 480px) { .readouts { grid-template-columns: 1fr; } }
.bar { display: flex; gap: 4px; height: 22px; }
.bar span { flex: 1 1 0; border-radius: 4px; background: var(--panel-2); border: 1px solid var(--line-2); }
.bar span.done { background: var(--green); border-color: var(--green); }
.bar span.now { background: var(--amber); border-color: var(--amber); }
.bar span.break { flex: .5 1 0; background: transparent; border-color: var(--violet); }
.bar span.break.now { background: var(--violet); }
.bar-legend { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.meter-note { padding-top: 14px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--muted); }

/* Cartes */
.grid { display: grid; gap: 14px; }
.grid.courses { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid.wide { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid.featured { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.grid.featured .card { flex-direction: row; flex-wrap: wrap; }
.grid.featured .photo { flex: 1 1 200px; min-width: 0; width: 0; height: auto; min-height: 190px; border-bottom: 0; border-right: 1px solid var(--line); }
.grid.featured .body { flex: 1 1 220px; justify-content: center; padding: 22px; }
@media (max-width: 640px) {
  .grid.featured .photo { flex-basis: 100%; height: 220px; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
}
.screen > .wrap:has(.featured) { gap: 20px; }
.card { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; transition: border-color .2s ease, transform .2s ease; }
.card:hover { text-decoration: none; border-color: var(--line-2); transform: translateY(-2px); }
.screen.alt .card { background: var(--bg); }
.card .art { height: 120px; background: var(--panel-2); display: flex; align-items: center; justify-content: center; }
.card .art svg { width: 200px; height: 100px; }
.card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; }
.card .code { font-family: var(--mono); font-weight: 500; font-size: 20px; }
.card .title { font-size: 15px; }
.card .topic { font-size: 13.5px; color: var(--muted); }
.card .tag { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.card .heading { font-family: var(--display); font-weight: 700; font-size: 20px; }
.card .desc { font-size: 15px; color: var(--muted); }
.card .photo { display: block; width: 100%; height: 170px; object-fit: cover; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.card.plain .body { padding: 26px; gap: 10px; }
.card.plain .heading { font-size: 22px; }
/* Cartes des émulateurs : le titre lance l'émulateur (lien étendu à toute la carte),
   le bouton « Dépôt GitHub » mène au dépôt. */
.card.emu { position: relative; }
.card .stretch { color: inherit; }
.card .stretch:hover { text-decoration: none; }
.card .stretch::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
.card .stretch:focus-visible { outline: none; }
.card.emu:has(.stretch:focus-visible) { outline: 2px solid var(--amber); outline-offset: 3px; }
.card .links { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; font-family: var(--mono); font-size: 13px; }
.card .repo {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px;
  border-radius: 8px; border: 1px solid var(--line-2); color: var(--muted); background: var(--panel);
}
.card .repo:hover { text-decoration: none; color: var(--fg); border-color: var(--fg); }
.card .screenshot {
  height: 150px; padding: 18px; background: var(--screen); font-family: var(--mono); font-size: 13.5px; line-height: 1.6;
  white-space: pre-line; overflow: hidden;
}

/* Pied de page */
.foot { border-top: 1px solid var(--line); }
.foot .wrap { padding-top: 24px; padding-bottom: 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badges span { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line-2); font-family: var(--mono); font-size: 12px; color: var(--muted); }
.foot .copy { font-family: var(--mono); font-size: 13px; color: var(--muted); }
