/* The Autonomous Stack — charte « vallée pixel » (refonte 2026-10-10, site de test).
 * Partagée par l'accueil, les pages /packs/<id>, le hub /packs et /docs.
 * Décor : assets/tas-scene.js (canvas pixel-art, calques fixes derrière la page). */

/* ─── Polices auto-hébergées (CSP font-src 'self') ─── */
@font-face { font-family: "Libre Baskerville"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/assets/fonts/libre-baskerville-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Libre Baskerville"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/assets/fonts/libre-baskerville-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Libre Baskerville"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/libre-baskerville-latin-400-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Libre Baskerville"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/libre-baskerville-latin-ext-400-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/assets/fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ─── Jetons ─── */
:root {
  --ink: #1f2d52; --ink2: #2f4177; --ink3: #3a4e8a;
  --cream: #fbf3e4; --cream2: #f8e8d6; --cream3: #f6ece4; --card: rgba(251, 243, 228, .95);
  --peach: #f0b49a; --peach2: #f4cdb7; --terra: #d9825f; --ring: #d9cfc6;
  --hl: #f0d1b6; --hl2: #b6875e; --as: rgba(43, 41, 75, .5);
  --tc: #fbf3e4; --t1: #f0b49a; --t2: #1f2d52;
  --f1: #00363a; --f2: #004a4e; --sky: #a9c7f2;
  --mute: #5b6b70; --mute2: #7d8a8e;
  --ok: #8fd9b6; --warn: #f4a989; --term-fg: #e6ece8; --term-mute: #8fa3a8;
  --tf: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --ui: "Trebuchet MS", Verdana, Tahoma, sans-serif;
  --body: Verdana, Tahoma, "DejaVu Sans", sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, Consolas, monospace;
  --shadow-card: 0 0 0 2px var(--ink), 0 6px 0 2px rgba(31, 45, 82, .28);
  --shadow-card-hover: 0 0 0 2px var(--ink), 0 9px 0 2px rgba(31, 45, 82, .28);
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  color-scheme: light;
}

/* ─── Base ─── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--sky); color: var(--ink); font-family: var(--body);
  font-size: 14.5px; line-height: 1.65; font-synthesis: none; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
code, pre, kbd { font-family: var(--mono); }
a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

/* ─── Décor pixel-art (calques fixes, derrière tout) ─── */
.tas-scene { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.tas-scene canvas { position: fixed; left: 0; width: 100vw; image-rendering: pixelated; image-rendering: crisp-edges; }
.tas-scene .sky { top: 0; height: 100vh; }
.tas-scene .far, .tas-scene .glint, .tas-scene .fall, .tas-scene .smoke { bottom: 0; height: 60vh; will-change: transform; }
.tas-scene .mid, .tas-scene .deer { bottom: 0; height: 51vh; will-change: transform; }
.tas-scene .near, .tas-scene .glitter { bottom: 0; height: 32vh; will-change: transform; }
.tas-page { position: relative; z-index: 1; }

/* ─── Conteneur ─── */
.tas-wrap { max-width: 1040px; margin: 0 auto; padding: 16px 16px 0; display: flex; flex-direction: column; gap: 22px; }

/* ─── Surfaces ─── */
.tas-card { background: var(--card); border: 3px solid var(--peach); border-radius: 22px; box-shadow: var(--shadow-card);
  padding: 20px 24px; min-width: 0; }
.tas-card-soft { background: var(--card); border-radius: 18px; padding: 8px 18px; box-shadow: 0 0 0 2px var(--ring); }
.tas-term { background: var(--ink); border: 3px solid var(--peach); border-radius: 22px; box-shadow: var(--shadow-card);
  padding: 16px 20px; min-width: 0; color: var(--term-fg); font-family: var(--mono); font-size: 12.5px; line-height: 1.7; }
.tas-term .m { color: var(--term-mute); }
.tas-term .ok { color: var(--ok); }
.tas-term .warn { color: var(--warn); }
.tas-term .hl { color: var(--hl); }
.tas-term .acc2 { color: #c9c3ff; }
.tas-term pre { margin: 0; font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; }
.tas-tile { background: var(--cream2); border-radius: 14px; padding: 8px 14px; min-width: 0; }

/* ─── Texte ─── */
.tas-h1 { margin: 0; font-family: var(--tf); font-weight: 700; font-size: clamp(36px, 6vw, 54px); line-height: 1.08;
  letter-spacing: 1px; color: var(--tc); text-shadow: 3px 3px 0 var(--t1), 5px 5px 0 var(--t2); text-wrap: balance; }
.tas-h2 { margin: 0; font-family: var(--tf); font-weight: 700; font-size: clamp(26px, 3.4vw, 32px); line-height: 1.2; color: var(--hl);
  text-shadow: 2px 2px 0 var(--ink), 4px 4px 0 var(--as); text-wrap: balance; }
.tas-h3 { margin: 0; font-family: var(--tf); font-weight: 700; font-size: 22px; line-height: 1.25; color: var(--ink); }
.tas-ui { font-family: var(--ui); }
.tas-mute { color: var(--mute); }
.tas-dia { color: var(--terra); }

/* ─── Pastilles & boutons ─── */
.tas-badge { display: inline-flex; align-items: center; gap: 8px; font-family: var(--ui); font-size: 13px; padding: 3px 14px; border-radius: 999px;
  background: var(--peach); color: var(--ink); border: 2px solid var(--peach); box-shadow: 0 0 0 2px var(--terra); white-space: nowrap; }
.tas-tag { display: inline-block; font-family: var(--ui); font-size: 12px; letter-spacing: 1px; padding: 2px 12px; border-radius: 999px;
  background: var(--cream2); color: var(--ink); }
.tas-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--ui); font-size: 14px; padding: 5px 16px;
  border-radius: 999px; color: var(--ink); white-space: nowrap; cursor: pointer; text-decoration: none;
  transition: transform 160ms var(--ease-out), background .15s, color .15s, box-shadow .15s; }
.tas-btn:hover { text-decoration: none; }
.tas-btn-ink { font-weight: 700; color: var(--cream); background: linear-gradient(180deg, var(--ink2), var(--ink)); border: 2px solid var(--peach);
  box-shadow: 0 0 0 2px var(--ink); }
.tas-btn-ink:hover { background: linear-gradient(180deg, var(--ink3), var(--ink2)); color: var(--hl); }
.tas-btn-cream { background: linear-gradient(180deg, #fff, var(--cream2)); border: 2px solid var(--peach); box-shadow: 0 0 0 2px var(--ring); }
.tas-btn-cream:hover { background: linear-gradient(180deg, #fff, var(--peach2)); color: var(--ink); }
.tas-btn-peach { font-weight: 700; background: linear-gradient(180deg, #f8c9a9, var(--hl)); border: 2px solid var(--peach); box-shadow: 0 0 0 2px var(--terra); }
.tas-btn-peach:hover { background: linear-gradient(180deg, #fbd6bb, #f5dcc6); }
.tas-btn-line { background: #fff; border: 2px solid var(--ink); }
.tas-btn-line:hover { background: var(--peach2); }
.tas-btn-lg { font-size: 15px; padding: 8px 22px; box-shadow: 0 0 0 2px var(--ink), 0 4px 0 2px rgba(31, 45, 82, .3); }
.tas-btn-lg.tas-btn-cream { box-shadow: 0 0 0 2px var(--ring), 0 4px 0 2px rgba(31, 45, 82, .3); }
.tas-btn:active { transform: translateY(1px) scale(.98); }
.tas-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.tas-pill-mono { display: inline-block; font-family: var(--mono); font-size: 12px; padding: 3px 12px; border-radius: 999px; background: var(--cream2);
  border: 2px solid var(--ink); color: var(--ink); }
.tas-pill-mono:hover { background: var(--peach2); text-decoration: none; }
.tas-num { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--hl); font-family: var(--ui); font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--peach); box-shadow: 0 0 0 2px var(--ink); font-size: 13px; }

/* ─── En-tête (pilule) ─── */
.tas-header { background: var(--card); border: 3px solid var(--peach); border-radius: 999px; box-shadow: var(--shadow-card);
  padding: 8px 14px 8px 18px; display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; justify-content: space-between; }
.tas-brand { display: flex; align-items: center; gap: 10px; font-family: var(--tf); font-weight: 700; font-size: 16px; color: var(--ink); white-space: nowrap; }
.tas-brand:hover { text-decoration: none; }
.tas-brand-mark { width: 28px; height: 28px; border-radius: 8px; background: repeating-linear-gradient(135deg, var(--cream2) 0 4px, #faf9f5 4px 8px);
  border: 2px solid var(--terra); display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--ink); overflow: hidden; flex: none; }
.tas-brand-mark img { width: 22px; height: 22px; border-radius: 5px; display: block; }
.tas-nav { order: 3; flex: 1 1 100%; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: center;
  border-top: 2px dotted var(--peach); padding-top: 6px; }
.tas-nav a { font-family: var(--ui); font-weight: 500; font-size: 14px; padding: 4px 14px; border-radius: 999px; color: var(--ink); transition: background .15s; }
.tas-nav a:hover, .tas-nav a[aria-current="page"] { background: var(--cream2); text-decoration: none; }
.tas-header-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
@media (min-width: 900px) {
  .tas-nav { order: 0; flex: 1 1 auto; border-top: 0; padding-top: 0; }
}

/* ─── Fil d'Ariane ─── */
.tas-crumbs { font-family: var(--ui); font-size: 13px; color: var(--ink); display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center;
  background: var(--card); border-radius: 999px; padding: 4px 14px; box-shadow: 0 0 0 2px var(--ring); align-self: flex-start; }
.tas-crumbs a { color: var(--ink); }
.tas-crumbs span { color: var(--mute); }

/* ─── Pied de page ─── */
.tas-grass { position: relative; z-index: 1; margin-top: 120px; height: 28px;
  background: repeating-linear-gradient(90deg, #9fd3a9 0 16px, #92c89e 16px 32px); border-top: 4px solid #bfe6c4; box-shadow: inset 0 -4px 0 #7bb68a; }
.tas-footer { position: relative; z-index: 1; background: repeating-conic-gradient(var(--f1) 0 25%, var(--f2) 0 50%) 0 0 / 32px 32px;
  border-top: 4px solid var(--ink); padding: 22px 16px 28px; text-align: center; font-size: 12.5px; color: #e6dfc9;
  display: flex; flex-direction: column; gap: 8px; align-items: center; }
.tas-footer strong { color: #fff; }
.tas-footer-links { font-family: var(--tf); font-weight: 600; display: flex; gap: 6px 12px; flex-wrap: wrap; justify-content: center; align-items: center; }
.tas-footer-links a, .tas-footer-links button { color: var(--hl); font: inherit; padding: 0; }
.tas-footer-links a:hover, .tas-footer-links button:hover { color: #fff; text-decoration: underline; }

/* ─── Bannière cookies (cream) ─── */
.tas-cookie { position: fixed; left: 50%; bottom: 16px; z-index: 90; transform: translateX(-50%); width: min(720px, calc(100% - 32px));
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 18px;
  background: var(--card); border: 3px solid var(--peach); border-radius: 22px; box-shadow: var(--shadow-card); font-size: 13px; color: var(--ink);
  transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out); }
@starting-style { .tas-cookie { opacity: 0; transform: translate(-50%, 8px); } }
.tas-cookie-actions { display: flex; gap: 8px; }

/* ─── Lien d'évitement ─── */
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 8px 14px; border-radius: 999px; background: var(--ink); color: var(--cream);
  font-family: var(--ui); font-weight: 700; border: 2px solid var(--peach); transition: top 160ms var(--ease-out); }
.skip-link:focus { top: 12px; }

/* ─── Animations discrètes ─── */
/* Apparition au défilement : seulement quand le script a posé html.js (sans JS, tout est visible). */
html.js .tas-reveal { opacity: 0; transform: translateY(12px); transition: opacity 560ms var(--ease-out), transform 560ms var(--ease-out); }
html.js .tas-reveal.in { opacity: 1; transform: none; }
.tas-lift { transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .tas-lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }
  .tas-btn-lg:hover { transform: translateY(-1px); }
}
@keyframes tas-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.tas-pulse { animation: tas-pulse 2.4s ease-in-out infinite; }
@keyframes tas-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.tas-bob { animation: tas-bob 3.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .tas-reveal { opacity: 1; transform: none; transition: none; }
  .tas-pulse, .tas-bob { animation: none; }
  *, *::before, *::after { transition: none !important; }
}

/* ─── Petits écrans ─── */
@media (max-width: 640px) {
  .tas-wrap { padding-left: 12px; padding-right: 12px; gap: 18px; }
  .tas-card { padding: 16px 18px; }
  .tas-term { padding: 14px 16px; font-size: 12px; }
  .tas-header { padding: 8px 12px; }
  .tas-grass { margin-top: 72px; }
}
