/* ASAP kit : jetons, boutons, en-tête / pied de page, aide. UNE source pour asaplay.app, assets.asaplay.app, Mon espace et le tableau admin.
 * Chargé depuis /assets/kit/asap.css (ce préfixe est servi par les deux hôtes). Direction : docs/identite-visuelle.md
 * IDENTITÉ = celle de la boutique (public/shop/shop.css) : fond clair, texte quasi noir, bleu #2457ff, Rubik, cartes douces.
 * Les valeurs des jetons communs sont IDENTIQUES à celles de shop.css (un test le vérifie) : charger ce fichier sur la boutique ne change rien à son apparence.
 * Les NOMS des jetons sont stables : on les nomme par rôle (--ink, --paper, --accent), jamais par couleur.
 * Thème : par défaut clair ; [data-theme="night"] sur <html> ou <body> = sombre neutre, utile au tableau admin. */

@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 300 900; font-display: swap; src: url(/fonts/rubik-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: 'Rubik'; font-style: normal; font-weight: 300 900; font-display: swap; src: url(/fonts/rubik-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* identiques à shop.css (--bg, --alt, --stage, --line, --line2, --text, --muted, --accent, --accent-d, --ok) */
  --ink: #12151c;          /* texte, titres */
  --paper: #ffffff;        /* fond de page */
  --paper-2: #f5f6f8;      /* bandeaux, champs */
  --stage: #eceff4;        /* fond des scènes 3D / aperçus */
  --card: #ffffff;
  --line: #e2e5ec;
  --line-2: #cfd4de;
  --muted: #5d6475;
  --accent: #2457ff;       /* l'action : bleu de la boutique */
  --accent-d: #1a43d1;
  --accent-ink: #ffffff;   /* texte posé sur --accent */
  --ok: #0a7d4f;
  /* marque ASAP : la manette (logo, favicon, mascotte Yuzu) ; ne sert pas de fond d'interface */
  --yuzu: #ffcf3f;
  --signal: #ff5436;       /* « Nouveau », alertes ; un seul point chaud par écran */
  --signal-ink: #12151c;   /* encre sur rouge : lisible (le blanc ne faisait que 3,3:1) */
  --focus: #2457ff;
  /* formes */
  --r: 12px; --r-s: 10px;
  --shadow: 0 18px 50px rgba(18, 21, 28, 0.14);
  --hard: 0 1px 2px rgba(18, 21, 28, 0.08);      /* (nom historique) ombre de repos des boutons */
  --hard-s: 0 1px 2px rgba(18, 21, 28, 0.08);
  --bar: 64px;
  --pad: clamp(16px, 3vw, 56px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --font: Rubik, system-ui, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  color-scheme: light;
}
[data-theme='night'] {
  --ink: #eef0f4; --paper: #131417; --paper-2: #1b1d22; --stage: #22252b; --card: #1b1d22; --line: #2e3138; --line-2: #3d414a; --muted: #a9aeb9;
  --accent: #7f9cff; --accent-d: #9db2ff; --accent-ink: #0b1020; --ok: #5fd39a; --signal-ink: #12151c; --focus: #9db2ff;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.5); --hard: 0 1px 2px rgba(0, 0, 0, 0.4); --hard-s: 0 1px 2px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}
@media (prefers-reduced-motion: reduce) { :root { --ease: linear; } }

.k-page { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
.k-page :focus-visible, .k-bar :focus-visible, .k-foot :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.k-eyebrow { font: 600 14px/1.2 var(--font); color: var(--accent); }
.k-h { font-family: var(--font); font-weight: 800; letter-spacing: -0.03em; line-height: 1.04; margin: 0; text-wrap: balance; }
.k-lead { color: var(--muted); max-width: 58ch; text-wrap: pretty; }
.k-rule { border: 0; border-top: 1px solid var(--line); margin: 0; }
.k-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.k-skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.k-skip:focus { top: 12px; }

/* boutons : comme .btn de la boutique. Bleu = l'action principale, contour = le reste. */
.k-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 20px; border: 1px solid var(--line-2); border-radius: var(--r-s);
  background: var(--card); color: var(--ink); font: 600 15px/1 var(--font); text-decoration: none; cursor: pointer; text-align: center; transition: background 0.12s, border-color 0.12s; }
.k-btn:hover { background: var(--paper-2); border-color: var(--ink); }
.k-btn--main { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.k-btn--main:hover { background: var(--accent-d); border-color: var(--accent-d); }
.k-btn--ghost { background: transparent; }
.k-btn--sm { min-height: 34px; padding: 0 14px; font-size: 14px; }
.k-btn--big { min-height: 52px; padding: 0 28px; font-size: 17px; }
.k-btn[disabled], .k-btn[aria-disabled='true'] { opacity: 0.5; pointer-events: none; }
/* action destructive (suppression de compte…) : à confirmer par une étape de plus côté page */
.k-btn--danger { color: #b3261e; border-color: var(--signal); }
.k-btn--danger:hover { background: var(--signal); border-color: var(--signal); color: var(--signal-ink); }
[data-theme='night'] .k-btn--danger { color: #ff8a78; }

.k-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 999px; font: 500 14px/1 var(--font); background: var(--card); color: var(--ink); text-decoration: none; }
a.k-chip:hover { border-color: var(--ink); }
.k-chip--signal { background: var(--signal); color: var(--signal-ink); border-color: var(--signal); font-weight: 600; }
.k-kbd { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border: 1px solid var(--line-2); border-radius: 6px; font: 500 12px/1 var(--mono); background: var(--paper-2); color: var(--muted); }

/* en-tête commun (rendu par kit/asap.js : même HTML côté serveur boutique et côté portail) */
.k-bar { position: sticky; top: 0; z-index: 40; background: var(--paper); border-bottom: 1px solid var(--line); }
.k-bar-in { display: flex; align-items: center; gap: 22px; min-height: var(--bar); padding: 0 var(--pad); max-width: 1500px; margin: 0 auto; }
.k-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 800 19px/1 var(--font); white-space: nowrap; flex: none; }
.k-brand img { width: 36px; height: 36px; display: block; transform: rotate(-4deg); transition: transform 0.25s var(--ease); }
.k-brand:hover img { transform: rotate(3deg) translateY(-2px); }
.k-brand small { font: 800 19px/1 var(--font); color: var(--accent); }
.k-nav { display: flex; gap: 4px; margin-right: auto; }
.k-nav a { padding: 8px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; font: 500 15px/1 var(--font); }
.k-nav a:hover { color: var(--ink); background: var(--paper-2); }
.k-nav a[aria-current] { color: var(--ink); font-weight: 600; }
.k-search { display: flex; align-items: center; gap: 8px; min-width: 220px; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--paper-2); color: var(--muted); font: 400 14px/1 var(--font); cursor: text; text-decoration: none; }
.k-search:focus-within { background: var(--card); border-color: var(--accent); box-shadow: 0 0 0 3px rgba(36, 87, 255, 0.15); }
.k-search .k-kbd { margin-left: auto; }
.k-search .s-short { display: none; }
@media (max-width: 560px) { .k-search .s-long { display: none; } .k-search .s-short { display: inline; } .k-search { min-width: 0; } }
.k-lang { height: 40px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--card); color: var(--ink); font: 500 14px/1 var(--font); }
@media (max-width: 860px) { .k-nav { display: none; } .k-search { min-width: 0; flex: 1; } }

/* fil d'Ariane (comme celui des fiches de la boutique) */
.k-crumbs { display: flex; flex-wrap: wrap; gap: 4px 8px; padding: 14px var(--pad); max-width: 1500px; margin: 0 auto; font: 400 14px/1.3 var(--font); color: var(--muted); list-style: none; }
.k-crumbs li { display: inline-flex; gap: 8px; align-items: center; margin: 0; }
.k-crumbs li + li::before { content: '/'; color: var(--line-2); }
.k-crumbs a { color: var(--muted); }
.k-crumbs a:hover { color: var(--ink); text-decoration: underline; }
.k-crumbs [aria-current] { color: var(--ink); }

/* pied de page commun */
.k-foot { margin-top: 80px; border-top: 1px solid var(--line); background: var(--paper-2); color: var(--ink); }
.k-foot-in { max-width: 1500px; margin: 0 auto; padding: 40px var(--pad) 28px; display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.k-foot h2 { font: 600 13px/1 var(--font); color: var(--muted); margin: 0 0 14px; }
.k-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.k-foot a { color: var(--ink); text-decoration: none; }
.k-foot a:hover { color: var(--accent); text-decoration: underline; }
.k-foot p { margin: 8px 0 0; color: var(--muted); font-size: 14px; max-width: 34ch; }
.k-foot-base { max-width: 1500px; margin: 0 auto; padding: 14px var(--pad) 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font: 400 13px/1.4 var(--font); color: var(--muted); }
@media (max-width: 760px) { .k-foot-in { grid-template-columns: 1fr 1fr; } .k-foot-in > :first-child { grid-column: 1 / -1; } }

/* états vides et 404 : toujours une issue (un conseil + des liens) */
.k-empty { max-width: 720px; margin: 0 auto; padding: 72px var(--pad) 24px; display: grid; gap: 18px; justify-items: start; }
.k-empty .k-big { font: 800 clamp(72px, 16vw, 168px)/0.85 var(--font); letter-spacing: -0.05em; }
.k-empty-links { display: flex; flex-wrap: wrap; gap: 10px; }
.k-empty img { width: 80px; height: 80px; }

/* info-bulle : [data-tip] ; aussi au clavier (focus) ; jamais seule porteuse du sens */
[data-tip] { position: relative; }
[data-tip]::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translate(-50%, 4px); padding: 6px 9px; border-radius: 6px; background: var(--ink); color: var(--paper); font: 500 12px/1.3 var(--font); white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 0.12s, transform 0.12s var(--ease); z-index: 60; }
[data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
@media (hover: none) { [data-tip]::after { display: none; } }

/* « par où commencer » : bandeau d'accueil refermable */
.k-start { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 14px 18px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--r); background: var(--paper-2); color: var(--ink); }
.k-start ol { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0; list-style: none; counter-reset: s; font-weight: 500; }
.k-start li::before { counter-increment: s; content: counter(s); display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 8px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: 600 12px/1 var(--font); }
.k-start button { border: 0; background: transparent; color: var(--muted); font: 500 22px/1 var(--font); cursor: pointer; width: 36px; height: 36px; }
@media (max-width: 700px) { .k-start { grid-template-columns: 1fr auto; } .k-start img { display: none; } }

/* cartes d'image (rendus 3D) et boîte d'aide : cartes douces de la boutique */
.k-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.k-card { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); color: var(--ink); text-decoration: none; transition: box-shadow 0.15s var(--ease), border-color 0.15s, transform 0.15s var(--ease); }
.k-card:hover { box-shadow: var(--shadow); border-color: var(--line-2); transform: translateY(-2px); }
.k-card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: var(--stage); }
.k-card-t { display: grid; gap: 2px; padding: 12px 14px 14px; }
.k-card-t b { font: 700 16px/1.2 var(--font); }
.k-card-t small { font: 400 13px/1.3 var(--font); color: var(--muted); }
.k-dlg { border: 1px solid var(--line); border-radius: var(--r); background: var(--card); color: var(--ink); padding: 22px 26px; max-width: min(420px, 92vw); box-shadow: var(--shadow); font-family: var(--font); }
.k-dlg::backdrop { background: rgba(18, 21, 28, 0.45); }
.k-dlg dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; align-items: center; margin: 16px 0 0; }
.k-dlg dt, .k-dlg dd { margin: 0; }

/* mouvement : sobre et utile, éteint si l'utilisateur le demande */
@media (prefers-reduced-motion: reduce) {
  .k-btn, .k-brand img, .k-card, [data-tip]::after { transition: none !important; }
  .k-brand:hover img, .k-card:hover { transform: none !important; }
}

/* survol 3D (kit/hover3d.js) et zoom discret des images de cartes */
.k-3d-stage { position: relative; aspect-ratio: 16 / 10; background: var(--stage); overflow: hidden; }
.k-3d-stage img { height: 100%; aspect-ratio: auto; transition: transform 0.4s var(--ease), opacity 0.2s; }
.k-card:hover .k-3d-stage img, .k-card:focus-visible .k-3d-stage img { transform: scale(1.04); }
.k-3d { position: absolute; inset: 0; opacity: 0; transition: opacity 0.2s; background: var(--stage); }
.k-3d.on { opacity: 1; }
.k-3d canvas { display: block; width: 100% !important; height: 100% !important; }
@media (prefers-reduced-motion: reduce) { .k-3d-stage img, .k-3d { transition: none !important; } .k-card:hover .k-3d-stage img { transform: none !important; } }

.k-search span:not(.k-kbd) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 520px) { .k-search .k-kbd { display: none; } }
