/* ==========================================================================
   IADICI UI-KIT — components.css
   Sections : 1 Boutons · 2 Badges · 3 Cartes · 4 Formulaires · 5 Navigation
   6 Feedback (toast, dialog, tooltip, skeleton, progress, spinner, empty)
   7 Data (table, stats, timeline, steps) · 8 Marketing (hero, orbe, ticker, CTA,
   pricing, FAQ, témoignage, logos, footer) · 9 Médias (compare, dropzone)
   10 IA (chat, thinking, streaming, approval, tool chips, prompt bar, citations,
   tasks, code, diff, loaders) · 11 Command palette
   Sources d'inspiration : voir SOURCES.md
   ========================================================================== */

/* 1 · BOUTONS ============================================================== */
.ui-btn {
  --_bg: var(--ac); --_fg: var(--ac-ink); --_bd: var(--ac);
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 44px; padding: 0 1.4em; border: 1px solid var(--_bd); border-radius: var(--r);
  background: var(--_bg); color: var(--_fg); cursor: pointer; position: relative; overflow: hidden; isolation: isolate;
  font: 600 var(--t-sm)/1 var(--f-body); letter-spacing: .02em; text-decoration: none; white-space: nowrap;
  transition: transform var(--d1) var(--ease-out), background var(--d2) var(--ease), color var(--d2) var(--ease), border-color var(--d2), box-shadow var(--d2);
}
.ui-btn:hover { box-shadow: var(--glow); }
.ui-btn:active { transform: scale(.97); }
.ui-btn[disabled], .ui-btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.ui-btn--ghost   { --_bg: transparent; --_fg: var(--fg); --_bd: var(--line-2); }
.ui-btn--ghost:hover { --_bd: var(--ac); --_fg: var(--ac); box-shadow: none; }
.ui-btn--quiet   { --_bg: transparent; --_fg: var(--fg-2); --_bd: transparent; }
.ui-btn--quiet:hover { --_fg: var(--fg); box-shadow: none; background: var(--bg-3); }
.ui-btn--danger  { --_bg: var(--err); --_fg: #fff; --_bd: var(--err); }
.ui-btn--sm { min-height: 34px; padding: 0 1em; font-size: var(--t-xs); }
.ui-btn--lg { min-height: 56px; padding: 0 2em; font-size: var(--t-md); }
.ui-btn--icon { padding: 0; width: 44px; }
/* Flèche qui file au survol */
.ui-btn .ui-arrow { transition: transform var(--d2) var(--ease); }
.ui-btn:hover .ui-arrow { transform: translateX(5px); }
/* Remplissage qui glisse (inspi Annnimate / Hyperiux) */
.ui-btn--slide { --_bg: transparent; --_fg: var(--fg); --_bd: var(--fg); }
.ui-btn--slide::before { content: ""; position: absolute; inset: 0; background: var(--fg); transform: scaleX(0); transform-origin: right; transition: transform var(--d2) var(--ease); z-index: -1; }
.ui-btn--slide:hover { --_fg: var(--bg); box-shadow: none; }
.ui-btn--slide:hover::before { transform: scaleX(1); transform-origin: left; }
/* Reflet qui balaye (shine) */
.ui-btn--shine::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%); transform: translateX(-120%); }
.ui-btn--shine:hover::after { transform: translateX(120%); transition: transform 700ms var(--ease); }
/* Bouton avec état de chargement (data-loading) */
.ui-btn[data-loading="true"] { color: transparent; pointer-events: none; }
.ui-btn[data-loading="true"]::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid var(--_fg); border-right-color: transparent; border-radius: 50%; animation: ui-spin .7s linear infinite; }
/* Lien soulignement qui glisse */
.ui-link { color: var(--fg); background: linear-gradient(currentColor 0 0) 100% 100% / 0 1px no-repeat; transition: background-size var(--d2) var(--ease), color var(--d2); padding-bottom: 2px; }
.ui-link:hover { background-size: 100% 1px; background-position: 0 100%; color: var(--ac); }
/* Groupe segmenté */
.ui-segment { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r); padding: 3px; gap: 3px; background: var(--bg-2); }
.ui-segment button { border: 0; background: transparent; padding: 7px 14px; border-radius: var(--r); cursor: pointer; color: var(--fg-3); font-size: var(--t-sm); transition: background var(--d2), color var(--d2); }
.ui-segment button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }

/* 2 · BADGES, CHIPS, KBD, AVATAR =========================================== */
.ui-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line-2); border-radius: var(--r); font: 500 var(--t-xs)/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2); }
.ui-badge--ac  { border-color: color-mix(in srgb, var(--ac) 45%, transparent); color: var(--ac); background: color-mix(in srgb, var(--ac) 10%, transparent); }
.ui-badge--ok  { border-color: color-mix(in srgb, var(--ok) 45%, transparent); color: var(--ok); }
.ui-badge--warn{ border-color: color-mix(in srgb, var(--warn) 45%, transparent); color: var(--warn); }
.ui-badge--err { border-color: color-mix(in srgb, var(--err) 45%, transparent); color: var(--err); }
.ui-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.ui-dot--live { box-shadow: 0 0 0 0 currentColor; animation: ui-pulse 1.8s var(--ease-out) infinite; }
.ui-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--bg-2); font-size: var(--t-sm); cursor: pointer; transition: border-color var(--d2), background var(--d2); }
.ui-chip[aria-pressed="true"] { border-color: var(--ac); background: color-mix(in srgb, var(--ac) 14%, transparent); color: var(--fg); }
.ui-kbd { display: inline-block; min-width: 1.6em; padding: 2px 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; font: 500 var(--t-xs)/1.4 var(--f-mono); text-align: center; color: var(--fg-2); background: var(--bg-2); }
.ui-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-3); border: 1px solid var(--line-2); font: 600 var(--t-sm) var(--f-mono); color: var(--fg-2); overflow: hidden; flex: none; }
.ui-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ui-avatars { display: flex; } .ui-avatars > * + * { margin-left: -10px; box-shadow: 0 0 0 2px var(--bg); }

/* 3 · CARTES =============================================================== */
.ui-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-2); padding: var(--s6); position: relative; transition: border-color var(--d2), transform var(--d2) var(--ease-out), background var(--d2); }
.ui-card--link { cursor: pointer; color: inherit; display: block; }
.ui-card--link:hover { border-color: var(--ac); transform: translateY(-3px); }
.ui-card__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s4); margin-bottom: var(--s4); }
.ui-card--wire { background: transparent; border-radius: 0; }  /* filaire éditorial */
/* Spotlight : halo qui suit la souris (JS met --mx/--my) — inspi Aceternity / Magic UI */
.ui-card--spot { overflow: hidden; }
.ui-card--spot::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity var(--d2); background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--ac) 16%, transparent), transparent 60%); }
.ui-card--spot:hover::before { opacity: 1; }
/* Tilt 3D (JS met --rx/--ry) */
.ui-tilt { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform var(--d2) var(--ease-out); transform-style: preserve-3d; will-change: transform; }
/* Bordure lumineuse qui tourne (border beam) — inspi libraries.dev / Magic UI */
.ui-beam { position: relative; isolation: isolate; }
.ui-beam::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; z-index: -1;
  background: conic-gradient(from var(--beam-a, 0deg), transparent 0 70%, var(--ac) 85%, var(--ac-hi) 90%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: ui-beam 4s linear infinite; }
@property --beam-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes ui-beam { to { --beam-a: 360deg; } }
/* Panneau translucide DROIT (pas de bulle) */
.ui-glass { background: color-mix(in srgb, var(--bg-2) 62%, transparent); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border: 1px solid var(--line-2); }
/* Carte « bento » */
.ui-bento { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); grid-auto-rows: minmax(180px, auto); }
@media (min-width: 900px) { .ui-bento { grid-template-columns: repeat(4, 1fr); } .ui-bento .is-wide { grid-column: span 2; } .ui-bento .is-tall { grid-row: span 2; } }

/* 4 · FORMULAIRES ========================================================== */
.ui-field { display: grid; gap: 6px; }
.ui-field > label, .ui-field > .ui-field__label { font: 500 var(--t-xs)/1.2 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); }
.ui-hint  { font-size: var(--t-xs); color: var(--fg-3); }
.ui-error { font-size: var(--t-xs); color: var(--err); }
.ui-input, .ui-select, .ui-textarea {
  width: 100%; min-height: 44px; padding: 10px 14px; background: var(--bg-3); border: 1px solid var(--line-2); border-radius: var(--r);
  transition: border-color var(--d2), box-shadow var(--d2); }
.ui-textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.ui-input::placeholder, .ui-textarea::placeholder { color: var(--fg-3); }
.ui-input:focus, .ui-select:focus, .ui-textarea:focus { outline: none; border-color: var(--ac); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ac) 22%, transparent); }
.ui-input[aria-invalid="true"] { border-color: var(--err); }
.ui-select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--fg-3) 50%), linear-gradient(135deg, var(--fg-3) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
/* Champ avec icône / préfixe */
.ui-affix { display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg-3); }
.ui-affix:focus-within { border-color: var(--ac); }
.ui-affix > span { display: grid; place-items: center; padding: 0 12px; color: var(--fg-3); font-family: var(--f-mono); font-size: var(--t-sm); border-right: 1px solid var(--line); }
.ui-affix .ui-input { border: 0; background: transparent; box-shadow: none; }
/* Label flottant */
.ui-float { position: relative; }
.ui-float .ui-input { padding-top: 20px; }
.ui-float label { position: absolute; left: 14px; top: 13px; color: var(--fg-3); pointer-events: none; transition: all var(--d2) var(--ease); font-size: var(--t-md); }
.ui-float .ui-input:focus + label, .ui-float .ui-input:not(:placeholder-shown) + label { top: 5px; font: 500 10px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ac); }
/* Checkbox / radio / switch natifs stylés */
.ui-check { display: inline-flex; gap: 10px; align-items: center; cursor: pointer; }
.ui-check input { appearance: none; width: 20px; height: 20px; margin: 0; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg-3); display: grid; place-items: center; cursor: pointer; transition: background var(--d1), border-color var(--d1); }
.ui-check input[type="radio"] { border-radius: 50%; }
.ui-check input::after { content: ""; width: 10px; height: 10px; transform: scale(0); transition: transform var(--d2) var(--spring); background: var(--ac-ink); clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0, 43% 62%); }
.ui-check input[type="radio"]::after { clip-path: circle(50%); width: 8px; height: 8px; }
.ui-check input:checked { background: var(--ac); border-color: var(--ac); }
.ui-check input:checked::after { transform: scale(1); }
.ui-switch { appearance: none; width: 44px; height: 24px; border-radius: 999px; background: var(--bg-3); border: 1px solid var(--line-2); position: relative; cursor: pointer; transition: background var(--d2); margin: 0; flex: none; }
.ui-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--fg-2); transition: transform var(--d2) var(--spring), background var(--d2); }
.ui-switch:checked { background: var(--ac); border-color: var(--ac); }
.ui-switch:checked::after { transform: translateX(20px); background: var(--ac-ink); }
/* Range */
.ui-range { width: 100%; accent-color: var(--ac); }
/* OTP / code à N chiffres — inspi Kobra Input OTP */
.ui-otp { display: flex; gap: 8px; }
.ui-otp input { width: 48px; height: 58px; text-align: center; font: 600 1.4rem var(--f-mono); background: var(--bg-3); border: 1px solid var(--line-2); border-radius: var(--r); caret-color: var(--ac); transition: border-color var(--d1), transform var(--d1); }
.ui-otp input:focus { outline: none; border-color: var(--ac); transform: translateY(-2px); }
.ui-otp.is-error input { border-color: var(--err); animation: ui-shake .35s; }
.ui-otp.is-ok input { border-color: var(--ok); }
/* Étoiles de notation */
.ui-rating { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.ui-rating input { display: none; }
.ui-rating label { cursor: pointer; font-size: 1.6rem; color: var(--line-2); transition: color var(--d1), transform var(--d1); }
.ui-rating label:hover, .ui-rating label:hover ~ label, .ui-rating input:checked ~ label { color: var(--warn); }
.ui-rating label:active { transform: scale(1.3); }

/* 5 · NAVIGATION =========================================================== */
.ui-nav { position: sticky; top: 0; z-index: var(--z-nav); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: transform var(--d2) var(--ease); }
.ui-nav.is-hidden { transform: translateY(-100%); }  /* masquée en descendant (JS) */
.ui-nav__in { display: flex; align-items: center; justify-content: space-between; gap: var(--s5); min-height: 64px; }
.ui-nav__brand { font: 600 1.2rem var(--f-display); color: var(--fg); }
.ui-nav__links { display: flex; gap: var(--s5); list-style: none; margin: 0; padding: 0; }
.ui-nav__links a { color: var(--fg-2); font-size: var(--t-sm); }
.ui-nav__links a:hover, .ui-nav__links a[aria-current="page"] { color: var(--fg); }
.ui-nav__burger { display: none; }
@media (max-width: 820px) {
  .ui-nav__burger { display: inline-flex; }
  .ui-nav__links { position: fixed; inset: 64px 0 auto; flex-direction: column; padding: var(--s5) 16px; background: var(--bg); border-bottom: 1px solid var(--line); gap: 0; clip-path: inset(0 0 100% 0); transition: clip-path var(--d2) var(--ease); }
  .ui-nav__links li a { display: block; padding: 14px 0; font-size: var(--t-xl); font-family: var(--f-display); color: var(--fg); border-bottom: 1px solid var(--line); }
  .ui-nav.is-open .ui-nav__links { clip-path: inset(0 0 0 0); }
}
/* Burger animé → croix */
.ui-burger { width: 44px; height: 44px; border: 1px solid var(--line-2); background: transparent; border-radius: var(--r); cursor: pointer; position: relative; }
.ui-burger span, .ui-burger::before, .ui-burger::after { content: ""; position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--fg); transition: transform var(--d2) var(--ease), opacity var(--d1); }
.ui-burger::before { top: 15px; } .ui-burger span { top: 21px; } .ui-burger::after { top: 27px; }
[aria-expanded="true"].ui-burger::before { transform: translateY(6px) rotate(45deg); }
[aria-expanded="true"].ui-burger span { opacity: 0; }
[aria-expanded="true"].ui-burger::after { transform: translateY(-6px) rotate(-45deg); }
/* Onglets avec indicateur glissant (JS positionne --x/--w) */
.ui-tabs__list { display: flex; gap: 0; border-bottom: 1px solid var(--line); position: relative; overflow-x: auto; scrollbar-width: none; }
.ui-tabs__list button { border: 0; background: none; padding: 12px 18px; cursor: pointer; color: var(--fg-3); font-size: var(--t-sm); white-space: nowrap; transition: color var(--d2); }
.ui-tabs__list button[aria-selected="true"] { color: var(--fg); }
.ui-tabs__ink { position: absolute; bottom: -1px; left: 0; height: 2px; width: var(--w, 0); transform: translateX(var(--x, 0)); background: var(--ac); transition: transform var(--d2) var(--ease), width var(--d2) var(--ease); }
.ui-tabs__panel { padding-top: var(--s5); }
.ui-tabs__panel[hidden] { display: none; }
/* Fil d'Ariane */
.ui-crumbs { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; font: 500 var(--t-xs) var(--f-mono); letter-spacing: .1em; text-transform: uppercase; }
.ui-crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--fg-3); }
.ui-crumbs a { color: var(--fg-3); } .ui-crumbs [aria-current] { color: var(--fg); }
/* Pagination */
.ui-pager { display: flex; gap: 4px; }
.ui-pager a, .ui-pager span { min-width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--r); color: var(--fg-2); font-family: var(--f-mono); font-size: var(--t-sm); }
.ui-pager [aria-current] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
/* Accordéon (sur <details>, zéro JS ; JS optionnel pour l'animation de hauteur) */
.ui-accordion { border-top: 1px solid var(--line); }
.ui-accordion details { border-bottom: 1px solid var(--line); }
.ui-accordion summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--s4); padding: var(--s5) 0; font: 500 var(--t-lg) var(--f-display); }
.ui-accordion summary::-webkit-details-marker { display: none; }
.ui-accordion summary::after { content: "+"; font: 300 1.6rem/1 var(--f-mono); color: var(--ac); transition: transform var(--d2) var(--ease); }
.ui-accordion details[open] summary::after { transform: rotate(45deg); }
.ui-accordion .ui-accordion__body { padding: 0 0 var(--s5); color: var(--fg-2); max-width: 70ch; }
/* Sommaire flottant (TOC) avec élément actif (JS) */
.ui-toc { position: sticky; top: 90px; display: grid; gap: 2px; border-left: 1px solid var(--line); font-size: var(--t-sm); }
.ui-toc a { color: var(--fg-3); padding: 4px 0 4px 14px; border-left: 2px solid transparent; margin-left: -1px; transition: color var(--d2), border-color var(--d2); }
.ui-toc a.is-active { color: var(--fg); border-left-color: var(--ac); }
/* Barre de progression de lecture */
.ui-readbar { position: fixed; top: 0; left: 0; right: 0; height: 2px; background: var(--ac); transform-origin: left; transform: scaleX(var(--p, 0)); z-index: calc(var(--z-nav) + 1); }
/* Dock / barre d'actions flottante */
.ui-dock { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; padding: 6px; z-index: var(--z-nav); }
.ui-dock a, .ui-dock button { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-2); color: var(--fg-2); background: none; border: 0; cursor: pointer; transition: transform var(--d2) var(--spring), background var(--d2); }
.ui-dock a:hover, .ui-dock button:hover { transform: translateY(-6px) scale(1.15); background: var(--bg-3); color: var(--fg); }

/* 6 · FEEDBACK ============================================================= */
.ui-alert { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: var(--s4) var(--s5); border: 1px solid var(--line-2); border-left: 3px solid var(--ac); background: var(--bg-2); border-radius: var(--r); }
.ui-alert--ok { border-left-color: var(--ok); } .ui-alert--warn { border-left-color: var(--warn); } .ui-alert--err { border-left-color: var(--err); }
.ui-alert strong { display: block; margin-bottom: 2px; }
/* Toasts — pile en bas à droite, JS : UI.toast() */
.ui-toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: var(--z-toast); width: min(380px, calc(100vw - 32px)); }
.ui-toast { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-2); box-shadow: var(--shadow); animation: ui-toast-in var(--d2) var(--ease-out); }
.ui-toast.is-leaving { animation: ui-toast-out var(--d2) var(--ease) forwards; }
.ui-toast__msg { flex: 1; font-size: var(--t-sm); }
.ui-toast__x { background: none; border: 0; color: var(--fg-3); cursor: pointer; font-size: 1.1rem; line-height: 1; }
@keyframes ui-toast-in { from { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes ui-toast-out { to { opacity: 0; transform: translateX(30px); } }
/* Dialog natif <dialog> */
.ui-dialog { border: 1px solid var(--line-2); border-radius: var(--r-2); background: var(--bg-2); color: var(--fg); padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: var(--shadow); }
.ui-dialog[open] { animation: ui-pop var(--d2) var(--ease-out); }
.ui-dialog::backdrop { background: rgba(0,0,0,.55); backdrop-filter: blur(4px); }
.ui-dialog__head, .ui-dialog__foot { padding: var(--s5); display: flex; justify-content: space-between; align-items: center; gap: var(--s4); }
.ui-dialog__head { border-bottom: 1px solid var(--line); } .ui-dialog__foot { border-top: 1px solid var(--line); justify-content: flex-end; }
.ui-dialog__body { padding: var(--s5); }
/* Tiroir latéral (dialog + modifier) */
.ui-drawer { margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(440px, 100vw); border-radius: 0; border-width: 0 0 0 1px; }
.ui-drawer[open] { animation: ui-drawer-in var(--d2) var(--ease-out); }
@keyframes ui-drawer-in { from { transform: translateX(100%); } }
/* Tooltip CSS pur : data-tip="texte" */
[data-tip] { position: relative; }
[data-tip]::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translate(-50%, 4px); padding: 6px 10px; white-space: nowrap; background: var(--fg); color: var(--bg); font: 500 var(--t-xs) var(--f-body); border-radius: var(--r); opacity: 0; pointer-events: none; transition: opacity var(--d1), transform var(--d1) var(--ease-out); z-index: 10; }
[data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
/* Popover natif (attribut popover) */
.ui-popover { margin: 0; border: 1px solid var(--line-2); border-radius: var(--r-2); background: var(--bg-2); color: var(--fg); padding: var(--s4); box-shadow: var(--shadow); }
/* Skeleton */
.ui-skel { background: linear-gradient(90deg, var(--bg-3) 0 40%, color-mix(in srgb, var(--fg) 8%, var(--bg-3)) 50%, var(--bg-3) 60% 100%) 0 0 / 300% 100%; border-radius: var(--r); animation: ui-shimmer 1.4s linear infinite; min-height: 14px; }
/* Progress */
.ui-progress { height: 6px; background: var(--bg-3); border-radius: 999px; overflow: hidden; }
.ui-progress > i { display: block; height: 100%; width: var(--v, 0%); background: var(--ac); transition: width var(--d3) var(--ease); }
.ui-progress--indet > i { width: 35%; animation: ui-indet 1.2s var(--ease) infinite; }
.ui-ring { --v: 0; width: 72px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--ac) calc(var(--v) * 1%), var(--bg-3) 0); font: 600 var(--t-sm) var(--f-mono); position: relative; }
.ui-ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--bg-2); }
.ui-ring > span { position: relative; }
/* Spinners */
.ui-spinner { width: 20px; height: 20px; border: 2px solid var(--line-2); border-top-color: var(--ac); border-radius: 50%; animation: ui-spin .8s linear infinite; }
.ui-dots { display: inline-flex; gap: 4px; } .ui-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ac); animation: ui-bounce 1s infinite; } .ui-dots i:nth-child(2) { animation-delay: .15s; } .ui-dots i:nth-child(3) { animation-delay: .3s; }
/* État vide */
.ui-empty { text-align: center; padding: var(--s8) var(--s5); border: 1px dashed var(--line-2); border-radius: var(--r-2); color: var(--fg-3); }
.ui-empty__icon { font-size: 2rem; margin-bottom: var(--s3); opacity: .7; }

/* 7 · DATA ================================================================= */
.ui-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-2); }
.ui-table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.ui-table th { text-align: left; font: 500 var(--t-xs)/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); padding: 14px 16px; border-bottom: 1px solid var(--line-2); background: var(--bg-2); position: sticky; top: 0; white-space: nowrap; }
.ui-table th[aria-sort] { cursor: pointer; } .ui-table th[aria-sort="ascending"]::after { content: " ↑"; color: var(--ac); } .ui-table th[aria-sort="descending"]::after { content: " ↓"; color: var(--ac); }
.ui-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.ui-table tbody tr { transition: background var(--d1); } .ui-table tbody tr:hover { background: var(--bg-2); }
.ui-table tr:last-child td { border-bottom: 0; }
.ui-table .is-num { text-align: right; font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
/* Chiffres clés / compteurs (JS : data-count) */
.ui-stat__value { font: 500 var(--t-3xl)/1 var(--f-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ui-stat__value small { font-size: .4em; color: var(--ac); margin-left: 4px; }
.ui-stat__label { margin-top: var(--s3); }
.ui-delta { font: 500 var(--t-xs) var(--f-mono); } .ui-delta--up { color: var(--ok); } .ui-delta--down { color: var(--err); }
/* Sparkline / mini-barres CSS (style="--h:62%") */
.ui-bars { display: flex; align-items: flex-end; gap: 3px; height: 48px; }
.ui-bars i { flex: 1; height: var(--h); background: color-mix(in srgb, var(--ac) 55%, transparent); transition: background var(--d1); } .ui-bars i:hover { background: var(--ac); }
/* Liste de données (clé/valeur) */
.ui-dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px var(--s5); margin: 0; }
.ui-dl dt { font: 500 var(--t-xs) var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); padding-top: 3px; } .ui-dl dd { margin: 0; }
/* Frise / timeline */
.ui-timeline { list-style: none; margin: 0; padding: 0 0 0 28px; position: relative; }
.ui-timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 1px; background: var(--line-2); }
.ui-timeline li { position: relative; padding-bottom: var(--s6); }
.ui-timeline li::before { content: ""; position: absolute; left: -26px; top: 6px; width: 11px; height: 11px; border: 1px solid var(--ac); background: var(--bg); border-radius: 50%; }
.ui-timeline li.is-done::before { background: var(--ac); }
.ui-timeline time { display: block; font: 500 var(--t-xs) var(--f-mono); letter-spacing: .12em; color: var(--ac); margin-bottom: 4px; text-transform: uppercase; }
/* Étapes numérotées horizontales (méthode, process) */
.ui-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); counter-reset: s; border-top: 1px solid var(--line); }
.ui-steps > * { counter-increment: s; padding: var(--s5) var(--s5) var(--s5) 0; border-top: 2px solid transparent; margin-top: -1px; transition: border-color var(--d2); }
.ui-steps > *::before { content: "/" counter(s, decimal-leading-zero); display: block; font: 500 var(--t-sm) var(--f-mono); color: var(--fg-3); margin-bottom: var(--s3); }
.ui-steps > .is-current { border-top-color: var(--ac); } .ui-steps > .is-current::before { color: var(--ac); }

/* 8 · MARKETING ============================================================ */
.ui-hero { min-height: min(92vh, 900px); display: grid; align-items: center; padding-block: var(--s8); position: relative; overflow: hidden; }
.ui-hero__title { font: 400 var(--t-mega)/.92 var(--f-display); letter-spacing: -.035em; margin: var(--s4) 0 var(--s5); }
.ui-hero__actions { display: flex; gap: var(--s3); flex-wrap: wrap; margin-top: var(--s6); }
/* Orbe 3D CSS — l'objet spectaculaire unique (charte v2 §5) */
.ui-orb { --size: min(46vw, 460px); width: var(--size); aspect-ratio: 1; border-radius: 50%; position: relative;
  background: radial-gradient(circle at 32% 28%, var(--ac-hi), transparent 30%), radial-gradient(circle at 70% 75%, var(--ac-2), transparent 55%), radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--ac) 70%, var(--bg)), var(--bg) 72%);
  box-shadow: inset -30px -40px 80px rgba(0,0,0,.55), inset 20px 20px 60px rgba(255,255,255,.08), 0 0 120px -20px var(--ac);
  animation: ui-float 9s var(--ease) infinite alternate; }
.ui-orb::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from var(--orb-a, 0deg), transparent 0 60%, rgba(255,255,255,.22) 72%, transparent 84%); mix-blend-mode: screen; animation: ui-orb-spin 12s linear infinite; }
@property --orb-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes ui-orb-spin { to { --orb-a: 360deg; } }
/* Ticker / marquee infini (dupliquer le contenu une fois, aria-hidden sur la copie) */
.ui-marquee { overflow: hidden; border-block: 1px solid var(--line); padding-block: var(--s4); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ui-marquee__track { display: flex; gap: var(--s7); width: max-content; animation: ui-marquee var(--speed, 40s) linear infinite; }
.ui-marquee:hover .ui-marquee__track { animation-play-state: paused; }
.ui-marquee--rev .ui-marquee__track { animation-direction: reverse; }
.ui-marquee__track > * { font: 400 var(--t-xl) var(--f-display); white-space: nowrap; color: var(--fg-2); display: inline-flex; align-items: center; gap: var(--s7); }
.ui-marquee__track > *::after { content: "✦"; color: var(--ac); font-size: .6em; }
/* Bande CTA */
.ui-cta { display: grid; gap: var(--s5); align-items: center; padding: var(--s8) var(--s6); border: 1px solid var(--line-2); position: relative; overflow: hidden; background: radial-gradient(600px 300px at 90% 0%, color-mix(in srgb, var(--ac) 16%, transparent), transparent 70%), var(--bg-2); }
@media (min-width: 820px) { .ui-cta { grid-template-columns: 1fr auto; } }
/* Carte tarif — prix JAMAIS en dur : {{prix}} depuis A_OFFRES-CATALOGUE/articles.yml */
.ui-price { display: flex; flex-direction: column; gap: var(--s4); }
.ui-price.is-featured { border-color: var(--ac); box-shadow: var(--glow); }
.ui-price__amount { font: 500 var(--t-2xl)/1 var(--f-mono); letter-spacing: -.02em; }
.ui-price__amount small { font-size: var(--t-sm); color: var(--fg-3); font-family: var(--f-body); }
.ui-price ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: var(--t-sm); }
.ui-price li::before { content: "✓"; color: var(--ok); margin-right: 10px; font-weight: 700; }
.ui-price .ui-btn { margin-top: auto; }
/* Témoignage */
.ui-quote { margin: 0; }
.ui-quote blockquote { margin: 0 0 var(--s5); font: 400 var(--t-xl)/1.35 var(--f-display); text-wrap: balance; }
.ui-quote blockquote::before { content: "«\00a0"; color: var(--ac); } .ui-quote blockquote::after { content: "\00a0»"; color: var(--ac); }
.ui-quote figcaption { display: flex; align-items: center; gap: 12px; font-size: var(--t-sm); color: var(--fg-3); }
.ui-quote figcaption strong { color: var(--fg); display: block; }
/* Mur de logos */
.ui-logos { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s7); align-items: center; opacity: .7; filter: grayscale(1); }
.ui-logos > * { transition: opacity var(--d2), filter var(--d2); } .ui-logos > *:hover { opacity: 1; filter: none; }
/* Fonctionnalité avec icône */
.ui-feature__icon { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--ac); margin-bottom: var(--s4); border-radius: var(--r); font-size: 1.2rem; }
/* Footer */
.ui-footer { border-top: 1px solid var(--line); padding-block: var(--s8) var(--s5); font-size: var(--t-sm); color: var(--fg-3); }
.ui-footer__grid { display: grid; gap: var(--s6); grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.ui-footer h4 { font: 500 var(--t-xs) var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--fg); margin-bottom: var(--s4); }
.ui-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; } .ui-footer a { color: var(--fg-3); } .ui-footer a:hover { color: var(--fg); }
.ui-footer__bottom { margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s4); }
.ui-footer__wordmark { font: 400 clamp(4rem, 18vw, 16rem)/.8 var(--f-display); letter-spacing: -.05em; color: transparent; -webkit-text-stroke: 1px var(--line-2); margin-top: var(--s7); user-select: none; }
/* Bannière cookies (RGPD) */
.ui-cookie { position: fixed; left: 16px; bottom: 16px; z-index: var(--z-toast); max-width: 420px; padding: var(--s5); }

/* 9 · MÉDIAS =============================================================== */
/* Comparateur avant/après (JS : --pos) — inspi Bencho image compare */
.ui-compare { position: relative; overflow: hidden; aspect-ratio: 16/10; border: 1px solid var(--line); user-select: none; touch-action: pan-y; --pos: 50%; }
.ui-compare > img, .ui-compare > .ui-compare__a, .ui-compare > .ui-compare__b { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ui-compare__b { clip-path: inset(0 0 0 var(--pos)); }
.ui-compare__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; background: var(--ac); transform: translateX(-1px); }
.ui-compare__handle::after { content: "⇆"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; display: grid; place-items: center; background: var(--ac); color: var(--ac-ink); border-radius: 50%; font-weight: 700; }
.ui-compare input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
/* Zone de dépôt de fichiers (JS : data-dropzone) */
.ui-drop { border: 1px dashed var(--line-2); border-radius: var(--r-2); padding: var(--s7) var(--s5); text-align: center; cursor: pointer; transition: border-color var(--d2), background var(--d2); position: relative; }
.ui-drop:hover, .ui-drop.is-over { border-color: var(--ac); background: color-mix(in srgb, var(--ac) 6%, transparent); }
.ui-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ui-filelist { list-style: none; padding: 0; margin: var(--s4) 0 0; display: grid; gap: 6px; font: var(--t-sm) var(--f-mono); }
.ui-filelist li { display: flex; justify-content: space-between; padding: 8px 12px; background: var(--bg-3); border-radius: var(--r); }
/* Ratio média */
.ui-media { aspect-ratio: var(--ratio, 16/9); background: var(--bg-3); overflow: hidden; border: 1px solid var(--line); }
.ui-media > * { width: 100%; height: 100%; object-fit: cover; }
/* Pile de photos type polaroid — inspi useLayouts */
.ui-polaroids { display: grid; place-items: center; height: 260px; }
.ui-polaroids > * { grid-area: 1/1; width: 170px; padding: 8px 8px 30px; background: #fff; box-shadow: var(--shadow); transition: transform var(--d2) var(--spring); }
.ui-polaroids > *:nth-child(1) { transform: rotate(-6deg); } .ui-polaroids > *:nth-child(2) { transform: rotate(4deg); } .ui-polaroids > *:nth-child(3) { transform: rotate(-1deg); }
.ui-polaroids:hover > *:nth-child(1) { transform: rotate(-14deg) translateX(-110px); } .ui-polaroids:hover > *:nth-child(2) { transform: rotate(12deg) translateX(110px); } .ui-polaroids:hover > *:nth-child(3) { transform: translateY(-10px); }

/* 10 · INTERFACES IA — inspi BeautifulUI, Kobra AI, libraries.dev ========= */
.ui-chat { display: flex; flex-direction: column; gap: var(--s4); }
.ui-msg { display: flex; gap: 12px; max-width: 78ch; animation: ui-rise var(--d2) var(--ease-out); }
.ui-msg__body { padding: 12px 16px; border-radius: var(--r-2); background: var(--bg-2); border: 1px solid var(--line); line-height: 1.6; }
.ui-msg--user { align-self: flex-end; flex-direction: row-reverse; }
.ui-msg--user .ui-msg__body { background: color-mix(in srgb, var(--ac) 14%, var(--bg-2)); border-color: color-mix(in srgb, var(--ac) 30%, transparent); }
.ui-msg__meta { font: 500 10px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 4px; }
/* Barre de prompt */
.ui-prompt { border: 1px solid var(--line-2); border-radius: var(--r-2); background: var(--bg-2); padding: 10px; transition: border-color var(--d2), box-shadow var(--d2); }
.ui-prompt:focus-within { border-color: var(--ac); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ac) 18%, transparent); }
.ui-prompt textarea { width: 100%; border: 0; background: none; resize: none; min-height: 48px; max-height: 220px; padding: 6px; outline: none; line-height: 1.5; field-sizing: content; }
.ui-prompt__bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ui-prompt__send { width: 36px; height: 36px; border-radius: var(--r); border: 0; background: var(--ac); color: var(--ac-ink); cursor: pointer; display: grid; place-items: center; font-weight: 700; transition: transform var(--d1); }
.ui-prompt__send:disabled { background: var(--bg-3); color: var(--fg-3); cursor: default; }
/* Trace de réflexion dépliable */
.ui-thinking { border: 1px solid var(--line); border-radius: var(--r-2); background: var(--bg-2); font-size: var(--t-sm); }
.ui-thinking > summary { list-style: none; cursor: pointer; padding: 10px 14px; display: flex; gap: 10px; align-items: center; color: var(--fg-2); }
.ui-thinking > summary::-webkit-details-marker { display: none; }
.ui-thinking > summary::after { content: "›"; margin-left: auto; transition: transform var(--d2) var(--ease); }
.ui-thinking[open] > summary::after { transform: rotate(90deg); }
.ui-thinking ol { margin: 0; padding: 4px 14px 14px 38px; color: var(--fg-3); display: grid; gap: 6px; }
.ui-thinking li.is-active { color: var(--fg); } .ui-thinking li.is-done { text-decoration: line-through; text-decoration-color: var(--line-2); }
.ui-shimmer-text { background: linear-gradient(90deg, var(--fg-3) 0 40%, var(--fg) 50%, var(--fg-3) 60% 100%) 0 0 / 300% 100% text; -webkit-background-clip: text; color: transparent; animation: ui-shimmer 2s linear infinite; }
/* Texte en streaming : curseur clignotant */
.ui-stream.is-streaming::after { content: "▍"; color: var(--ac); animation: ui-blink 1s steps(1) infinite; margin-left: 1px; }
/* Carte d'approbation (humain dans la boucle) */
.ui-approve { border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 6%, var(--bg-2)); border-radius: var(--r-2); padding: var(--s5); }
.ui-approve__head { display: flex; align-items: center; gap: 10px; margin-bottom: var(--s3); font-weight: 600; }
.ui-approve pre { margin: var(--s3) 0 var(--s4); }
.ui-approve.is-approved { border-color: color-mix(in srgb, var(--ok) 50%, transparent); background: color-mix(in srgb, var(--ok) 6%, var(--bg-2)); }
.ui-approve.is-rejected { opacity: .55; }
/* Puces d'outils appelés */
.ui-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.ui-tool { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line-2); border-radius: 999px; font: 500 var(--t-xs) var(--f-mono); color: var(--fg-2); background: var(--bg-2); }
.ui-tool.is-running .ui-dot { color: var(--ac); animation: ui-pulse 1.2s infinite; } .ui-tool.is-done .ui-dot { color: var(--ok); } .ui-tool.is-error .ui-dot { color: var(--err); }
/* Citation inline [1] + carte source */
.ui-cite { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; margin: 0 2px; border-radius: 4px; background: var(--bg-3); color: var(--ac); font: 600 10px var(--f-mono); vertical-align: super; text-decoration: none; }
.ui-cite:hover { background: var(--ac); color: var(--ac-ink); }
.ui-sources { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.ui-source { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); font-size: var(--t-xs); color: var(--fg-3); display: block; }
.ui-source strong { display: block; color: var(--fg); font-size: var(--t-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Liste de tâches d'agent */
.ui-tasks { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; font-size: var(--t-sm); }
.ui-tasks li { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-radius: var(--r); }
.ui-tasks li::before { content: ""; width: 14px; height: 14px; flex: none; border: 1.5px solid var(--line-2); border-radius: 50%; }
.ui-tasks li.is-running { background: var(--bg-2); } .ui-tasks li.is-running::before { border-color: var(--ac); border-right-color: transparent; animation: ui-spin .8s linear infinite; }
.ui-tasks li.is-done { color: var(--fg-3); } .ui-tasks li.is-done::before { background: var(--ok); border-color: var(--ok); }
.ui-tasks li.is-error::before { background: var(--err); border-color: var(--err); }
/* Bloc de code avec bouton copier (JS : data-copy) */
.ui-code { position: relative; border: 1px solid var(--line); border-radius: var(--r-2); background: color-mix(in srgb, var(--bg) 70%, #000); overflow: hidden; }
.ui-code__head { display: flex; justify-content: space-between; align-items: center; padding: 6px 6px 6px 14px; border-bottom: 1px solid var(--line); font: 500 var(--t-xs) var(--f-mono); color: var(--fg-3); }
.ui-code pre, pre.ui-pre { margin: 0; padding: 14px 16px; overflow-x: auto; font: 13px/1.6 var(--f-mono); color: var(--fg-2); tab-size: 2; }
/* Diff */
.ui-diff { font: 13px/1.6 var(--f-mono); border: 1px solid var(--line); border-radius: var(--r-2); overflow: hidden; }
.ui-diff div { padding: 0 14px; white-space: pre-wrap; }
.ui-diff .add { background: color-mix(in srgb, var(--ok) 12%, transparent); } .ui-diff .add::before { content: "+ "; color: var(--ok); }
.ui-diff .del { background: color-mix(in srgb, var(--err) 12%, transparent); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--err) 50%, transparent); } .ui-diff .del::before { content: "− "; color: var(--err); }
/* Loaders IA */
.ui-pixel-loader { display: grid; grid-template-columns: repeat(4, 6px); gap: 3px; }
.ui-pixel-loader i { width: 6px; height: 6px; background: var(--ac); animation: ui-pixel 1.2s infinite; }
.ui-pixel-loader i:nth-child(3n) { animation-delay: .2s; } .ui-pixel-loader i:nth-child(4n+1) { animation-delay: .4s; } .ui-pixel-loader i:nth-child(5n) { animation-delay: .6s; } .ui-pixel-loader i:nth-child(7n) { animation-delay: .8s; }
.ui-think-orb { width: 40px; aspect-ratio: 1; border-radius: 50%; background: conic-gradient(from var(--orb-a, 0deg), var(--ac), var(--ac-2), var(--ac-hi), var(--ac)); filter: blur(1px); animation: ui-orb-spin 2s linear infinite, ui-breathe 2.4s var(--ease) infinite; box-shadow: 0 0 24px -4px var(--ac); }
/* Onde vocale */
.ui-voice { display: flex; align-items: center; gap: 3px; height: 32px; }
.ui-voice i { width: 3px; height: 100%; background: var(--ac); border-radius: 2px; transform: scaleY(.2); animation: ui-wave 1s var(--ease) infinite; }
.ui-voice i:nth-child(2n) { animation-delay: .15s; } .ui-voice i:nth-child(3n) { animation-delay: .3s; } .ui-voice i:nth-child(5n) { animation-delay: .45s; }
/* Carte de suggestion / recommandation */
.ui-suggest { display: flex; gap: 12px; align-items: flex-start; padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-2); cursor: pointer; text-align: left; background: var(--bg-2); color: var(--fg); transition: border-color var(--d2), transform var(--d2) var(--ease-out); width: 100%; }
.ui-suggest:hover { border-color: var(--ac); transform: translateY(-2px); }

/* 11 · COMMAND PALETTE (⌘K / Ctrl+K) ======================================= */
.ui-cmd { padding: 0; width: min(620px, calc(100vw - 32px)); margin-top: 12vh; }
.ui-cmd input { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 18px 20px; font-size: var(--t-lg); outline: none; }
.ui-cmd ul { list-style: none; margin: 0; padding: 8px; max-height: 50vh; overflow-y: auto; }
.ui-cmd li { padding: 10px 12px; border-radius: var(--r); display: flex; justify-content: space-between; gap: 12px; cursor: pointer; font-size: var(--t-sm); }
.ui-cmd li[aria-selected="true"] { background: var(--bg-3); color: var(--fg); }
.ui-cmd li small { color: var(--fg-3); font-family: var(--f-mono); }
.ui-cmd .is-empty { color: var(--fg-3); justify-content: center; cursor: default; }

/* KEYFRAMES partagées ====================================================== */
@keyframes ui-spin { to { transform: rotate(360deg); } }
@keyframes ui-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 60%, transparent); } 100% { box-shadow: 0 0 0 8px transparent; } }
@keyframes ui-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes ui-indet { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
@keyframes ui-bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .4; } 40% { transform: translateY(-5px); opacity: 1; } }
@keyframes ui-pop { from { opacity: 0; transform: translateY(8px) scale(.97); } }
@keyframes ui-rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes ui-shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@keyframes ui-blink { 50% { opacity: 0; } }
@keyframes ui-float { from { transform: translateY(-10px) rotate(-2deg); } to { transform: translateY(12px) rotate(3deg); } }
@keyframes ui-breathe { 50% { transform: scale(.88); } }
@keyframes ui-marquee { to { transform: translateX(calc(-50% - var(--s7) / 2)); } }
@keyframes ui-pixel { 0%, 100% { opacity: .15; } 50% { opacity: 1; } }
@keyframes ui-wave { 50% { transform: scaleY(1); } }
