/* Velka : CSS de page, seulement ce qui vit à l'intérieur des visuels. Tout le reste vient du système
   (assets/system.css et ses voisins). Chaque visuel est une vraie capture de l'application (dossier img/, tiré de
   Velka-motion/captures). */

/* Le fond éclairé du cadre du héros : le sable du système, une lumière douce, un grain fin. */
.hero__art { background:
    radial-gradient(70% 60% at 18% 12%, color-mix(in oklab, var(--ground-surface) 80%, white), transparent 70%),
    radial-gradient(60% 50% at 90% 100%, color-mix(in oklab, var(--ground-bg) 80%, var(--ground-accent)), transparent 70%),
    var(--ground-bg); }
.hero__art::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .22; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .3 0 0 0 0 .3 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.hero__proof { font-size: var(--t-small); color: var(--muted); }

/* La petite carte : l'alerte « en direct », posée sur la fenêtre */
.hero__art > .ly-piece--note { left: calc(64px + var(--s-5)); bottom: var(--s-6); width: 300px; z-index: 2; }
@media (max-width: 1023px) { .hero__art > .ly-piece--note { left: calc(64px + var(--s-4)); bottom: var(--s-4); width: 260px; } }
.hero__art > .ly-piece { z-index: 1; }
.hero__art > .ly-piece--note { z-index: 2; }
.hero__art > .va-win { height: calc(100% - 64px); }

/* Le logo de Velka dans la barre et le pied de page ; le bouton de langue a l'allure d'un mot de la barre */
.nav__logo .velka-mark { flex: none; }
.lang-btn { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: inherit; min-height: 44px; }

/* Sécurité : quatre engagements en lignes simples, une pastille d'accent devant chacun */
.trust-list { list-style: none; margin: 0; padding: 0; }
.trust-list li { position: relative; padding-left: var(--s-6); }
.trust-list li::before { content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 8px; border-radius: 50%; background: var(--p-accent); }

/* Téléchargement : l'icône du système en tête de carte */
#download .os-ico { width: 40px; height: 40px; }
#download .os-req { color: var(--muted); }
#download code { font-family: var(--font-mono); font-size: 14px; }
.faq-gh { display: inline-flex; align-items: center; gap: var(--s-3); }

/* Téléchargement : une ligne par système (icône, texte, bouton), la liste du premier lancement à droite */
.os-rows { list-style: none; margin: 0; padding: 0; display: grid; align-content: start; }
.os-rows > .os { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: var(--s-5); align-items: start; padding: var(--s-5) 0; border-top: 1px solid var(--line); }
.os-rows > .os:last-child { border-bottom: 1px solid var(--line); }
.os-rows .os-name { margin: 0; font: 500 var(--t-card)/1.3 var(--font-display); }
.os-rows .os-text { display: grid; gap: var(--s-2); }
.os-rows .btn { align-self: center; }
@media (max-width: 639px) { .os-rows > .os { grid-template-columns: 48px minmax(0, 1fr); } .os-rows .btn { grid-column: 1 / -1; } }
@media (max-width: 639px) { #download { --hm: 2; } #download .frame--split.frame--split { --ratio: 185%; } }
#download .frame--split { --ratio: 64%; }

/* ------------------------------------------------------------------------------------------------------------
   Illustrations de l'application (.va) : l'interface de Velka redessinée en HTML d'après les captures, avec les
   couleurs, rayons et la police de l'app (src/ui/theme.rs, thème « Dark »). Toutes les tailles sont en em : une
   illustration grandit ou rétrécit en changeant seulement sa taille de police.
   ------------------------------------------------------------------------------------------------------------ */
.va-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.va {
  --va-bg: #09090b; --va-s1: #101012; --va-s2: #161618; --va-s3: #1d1d20;
  --va-line: rgb(255 255 255 / 6%); --va-line-2: rgb(255 255 255 / 12%);
  --va-text: #fafafa; --va-muted: #8b8b93; --va-acc: #ca4f24; --va-acc-t: #d16640; --va-pos: #34d399;
  font: 400 13px/1.35 "Inter", system-ui, sans-serif; color: var(--va-text); background: var(--va-bg);
  text-align: left; letter-spacing: 0; -webkit-font-smoothing: antialiased;
}
.va * { box-sizing: border-box; }
.va p { margin: 0; }
.va b { font-weight: 600; }
.va img { display: block; }
.va-i { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.va-logo { width: 1.6em; height: 1.6em; flex: none; }
.va-dot { display: inline-block; width: .55em; height: .55em; border-radius: 50%; background: var(--va-pos); flex: none; }
.va-game { color: var(--va-acc-t); }
.va-pos { color: var(--va-pos); }
.va-spacer { flex: 1; }
.va-seg { display: inline-flex; align-items: center; gap: .15em; padding: .25em; border-radius: .75em; background: var(--va-s2); border: 1px solid var(--va-line); white-space: nowrap; }
.va-seg > * { padding: .4em .8em; border-radius: .55em; color: #c9c9cf; font-weight: 400; }
.va-seg > b { background: var(--va-acc); color: #fff; font-weight: 400; }
.va-btn { display: inline-flex; align-items: center; gap: .5em; padding: .55em 1em; border-radius: .75em; background: var(--va-s2); border: 1px solid var(--va-line); white-space: nowrap; }
.va-switch { position: relative; width: 2.6em; height: 1.5em; border-radius: 99px; background: #2a2a2e; flex: none; }
.va-switch::after { content: ""; position: absolute; top: .2em; left: .2em; width: 1.1em; height: 1.1em; border-radius: 50%; background: #fff; }
.va-switch.is-on { background: var(--va-acc); }
.va-switch.is-on::after { left: auto; right: .2em; }

/* La barre latérale (accueil, favoris) */
.va-side { display: flex; flex-direction: column; gap: .3em; padding: 1.2em .9em; border-right: 1px solid var(--va-line); min-width: 0; }
.va-brand { display: flex; align-items: center; gap: .6em; padding: 0 .4em .6em; font-size: 1.15em; }
.va-brand__panel { margin-left: auto; color: #b9b9c0; }
.va-search { display: flex; align-items: center; gap: .6em; padding: .75em .8em; margin-bottom: .6em; border-radius: .75em; background: var(--va-s2); color: #c9c9cf; }
.va-search kbd { margin-left: auto; font: inherit; font-size: .8em; color: var(--va-muted); }
.va-nav { display: flex; align-items: center; gap: .7em; padding: .7em .8em; border-radius: .75em; color: #e4e4e7; }
.va-nav.is-on { background: var(--va-s2); }
.va-sec { display: flex; align-items: center; justify-content: space-between; padding: 1em .2em .5em; color: var(--va-muted); }
.va-caret { width: 1em; height: 1em; }
.va-fav { display: grid; grid-template-columns: 2.5em minmax(0, 1fr) auto; align-items: center; gap: .7em; padding: .4em .2em; }
.va-fav img { width: 2.5em; height: 2.5em; border-radius: 50%; object-fit: cover; }
.va-fav span { display: grid; min-width: 0; line-height: 1.25; }
.va-fav b, .va-fav small { white-space: nowrap; }
.va-fav small { font-size: .92em; color: var(--va-acc-t); }
.va-fav em { font-style: normal; font-size: .92em; color: #d4d4d8; display: inline-flex; align-items: center; gap: .45em; }
.va-fav em::before { content: ""; width: .5em; height: .5em; border-radius: 50%; background: var(--va-pos); }

/* L'accueil (héros) */
.va-win { overflow: hidden; border-radius: 12px; box-shadow: 0 0 0 1px rgb(255 255 255 / .1), 0 30px 70px -30px rgb(0 0 0 / .85); }
.va-home { display: grid; grid-template-columns: 16.5em minmax(0, 1fr); height: 100%; }
.va-main { padding: 1.5em calc(1.6em + var(--ly-cut-room, 28px)) 1.5em 1.6em; display: flex; flex-direction: column; gap: .7em; min-width: 0; }
.va-head { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 1.1em; row-gap: .2em; margin-bottom: .4em; white-space: nowrap; }
.va-head b { font-size: 1.75em; font-weight: 400; margin-right: .3em; }
.va-head span { font-size: 1.15em; color: var(--va-muted); }
.va-head i { font-style: normal; font-size: 1.3em; color: var(--va-acc); }
.va-label { color: var(--va-muted); }
.va-chips { display: flex; flex-wrap: wrap; gap: .5em; margin-bottom: .4em; }
.va-chips > span { display: inline-flex; align-items: center; gap: .5em; padding: .55em .9em; border-radius: 99px; border: 1px solid var(--va-line-2); white-space: nowrap; }
.va-chips i { font-style: normal; color: var(--va-acc-t); }
.va-chips--recent > span { background: var(--va-s1); font-weight: 600; }
.va-title { font-size: 1.15em; margin-top: .4em; }
.va-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9em; }
.va-card { border-radius: 1.1em; padding: .55em; background: var(--va-s1); border: 1px solid var(--va-line); }
.va-card > img { width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; border-radius: .7em; }
.va-card__meta { display: grid; grid-template-columns: 2.4em minmax(0, 1fr); gap: .6em; padding: .65em .2em .3em; }
.va-card__meta img { width: 2.4em; height: 2.4em; border-radius: 50%; outline: 2px solid var(--va-pos); outline-offset: 1px; }
.va-card__meta span { display: grid; min-width: 0; line-height: 1.3; }
.va-card__meta b { font-size: 1.05em; }
.va-card__meta small { font-size: .92em; color: #c4c4ca; }
.va-card__meta small.va-game { color: var(--va-muted); }

/* L'alerte « en direct » (notification du système, comme dans le film de présentation) */
.va-toast { width: 300px; padding: 1em 1.1em; border-radius: 14px; background: var(--va-s2); border: 1px solid var(--va-line-2);
  box-shadow: 0 18px 44px -16px rgb(0 0 0 / .8); }
.va-toast__app { display: flex; align-items: center; gap: .5em; font-size: .92em; color: var(--va-muted); margin-bottom: .7em; }
.va-toast__app .va-logo { width: 1.25em; height: 1.25em; }
.va-toast__app time { margin-left: auto; }
.va-toast__row { display: flex; align-items: center; gap: .8em; }
.va-toast__row img { width: 2.6em; height: 2.6em; border-radius: 50%; }
.va-toast__row span { display: grid; line-height: 1.3; }
.va-toast__row b { font-size: 1.08em; }
.va-toast__row small { color: var(--va-muted); }

/* La page de lecture */
.va-watch { display: grid; grid-template-columns: minmax(0, 1fr) 19em; gap: 1em; margin-top: var(--s-7); padding: 1em; align-items: stretch;
  border-radius: var(--r-lg); border: 1px solid var(--line); font-size: clamp(11px, 1vw, 13px); min-height: 0; }
.va-watch__stage { display: flex; flex-direction: column; gap: 1em; min-width: 0; min-height: 0; }
.va-video { position: relative; flex: none; aspect-ratio: 16 / 9; min-height: 0; border-radius: .6em; overflow: hidden; background: #000; }
.va-video > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.va-video__top { position: absolute; top: 1em; left: 1em; display: flex; gap: .6em; flex-wrap: wrap; }
.va-pill { display: inline-flex; align-items: center; gap: .5em; padding: .55em .9em; border-radius: .75em; background: rgb(16 16 18 / .82); border: 1px solid var(--va-line); }
.va-video__bar { position: absolute; left: 1em; right: 1em; bottom: 1em; display: flex; align-items: center; gap: .6em; }
.va-ctl { display: inline-grid; place-items: center; width: 2.6em; height: 2.6em; border-radius: .75em; background: rgb(16 16 18 / .82); border: 1px solid var(--va-line); }
.va-vol { position: relative; width: 6em; height: .3em; border-radius: 99px; background: rgb(255 255 255 / .25); }
.va-vol i { position: absolute; inset: 0 60% 0 0; border-radius: inherit; background: var(--va-acc); }
.va-vol i::after { content: ""; position: absolute; right: -.5em; top: -.35em; width: 1em; height: 1em; border-radius: 50%; background: #fff; }
.va-pct { padding: .45em .7em; border-radius: .75em; background: rgb(16 16 18 / .82); color: #e4e4e7; }
.va-video .va-seg { background: rgb(16 16 18 / .82); }
.va-info { display: grid; grid-template-columns: 3.2em minmax(0, 1fr) auto; align-items: center; gap: 1em; padding: 1em 1.2em; border-radius: 1em; background: var(--va-s1); border: 1px solid var(--va-line); flex: none; }
.va-info > img { width: 3.2em; height: 3.2em; border-radius: 50%; }
.va-info__text { display: grid; gap: .2em; min-width: 0; }
.va-info__text p { overflow-wrap: anywhere; }
.va-info__name { display: flex; align-items: center; gap: .7em; }
.va-info__name b { font-size: 1.4em; }
.va-live { display: inline-flex; align-items: center; gap: .4em; padding: .2em .6em; border-radius: 99px; background: var(--va-s2); font-size: .85em; }
.va-info__meta { color: var(--va-muted); }
.va-chat { display: flex; flex-direction: column; min-height: 0; padding: 1.1em; border-radius: 1em; background: var(--va-s1); border: 1px solid var(--va-line); }
.va-chat__head { display: flex; align-items: center; gap: .8em; font-size: 1.1em; }
.va-chat__fold { display: inline-grid; place-items: center; width: 2.2em; height: 2.2em; border-radius: .6em; background: var(--va-s2); }
.va-chat__state { color: var(--va-muted); padding: .8em 0; border-bottom: 1px solid var(--va-line); }
.va-chat__list { list-style: none; margin: 0; padding: .8em 0 0; display: grid; gap: .9em; align-content: start; flex: 1 1 auto; min-height: 0; overflow: hidden; line-height: 1.45;
  -webkit-mask-image: linear-gradient(#000 80%, transparent); mask-image: linear-gradient(#000 80%, transparent); }
.va-chat__list b { font-weight: 400; }
.va-chat__input { margin-top: .8em; padding: .8em 1em; border-radius: .75em; border: 1px solid var(--va-line); color: #6f6f78; }
@media (max-width: 1023px) {
  .va-watch { height: auto; grid-template-columns: minmax(0, 1fr); }
  .va-video { flex: none; aspect-ratio: 16 / 9; }
  .va-chat { height: 17em; }
  .va-info .va-btn { display: none; } .va-info { grid-template-columns: 3.2em minmax(0, 1fr); }
}
@media (max-width: 639px) {
  .va-watch { grid-template-columns: minmax(0, 1fr); padding: .6em; font-size: 10px; }
  .va-chat { height: 26em; }
  .va-video__top .va-pill:nth-child(n+3), .va-video .va-seg > :nth-child(n+3), .va-vol, .va-pct, .va-video__bar .va-ctl:nth-last-child(-n+2) { display: none; }
}

/* Le film de présentation */
.film { margin-top: var(--s-6); aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: #000; }
.film video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }

/* Les cartes de fonctions : le panneau prend toute la hauteur que la carte laisse, l'illustration y est posée en
   haut à gauche, coupée par le bas avec un fondu : aucun vide sous une illustration, à aucune largeur. */
#features .card { display: flex; flex-direction: column; }
#features .card > .va-panel { position: relative; flex: 1 1 auto; min-height: 240px; height: auto; overflow: hidden; background: var(--va-bg, #09090b); }
#features .va-panel > .va { position: absolute; inset: 0; padding: 1.4em 1.5em; font-size: clamp(11px, .95vw, 13px); background: #09090b; }
#features .va-panel::after { content: ""; position: absolute; inset: auto 0 0 0; height: 56px; background: linear-gradient(transparent, #09090b); pointer-events: none; z-index: 1; }
.va-favs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2.2em; row-gap: .15em; align-content: start; }
.va-favs > .va-sec { grid-column: 1 / -1; }
.va-favs .va-sec { padding-top: 0; }
.va-favs .va-fav { padding: .5em .3em; }
.va-settings { display: flex; flex-direction: column; gap: .8em; }
.va-settings__title { font-size: 1.6em; }
.va-settings__sub { color: var(--va-muted); margin-top: -.5em; }
.va-group { padding: 1em 1.1em; border-radius: 1em; background: var(--va-s1); border: 1px solid var(--va-line); display: grid; gap: .2em; }
.va-group__label { color: var(--va-muted); padding-bottom: .4em; }
.va-row { display: flex; align-items: center; justify-content: space-between; gap: 1em; padding: .55em 0; min-height: 3em; }
.va-row > span:first-child { display: grid; line-height: 1.3; }
.va-row small { color: var(--va-muted); font-size: .9em; }
.va-accent { display: flex; align-items: center; gap: .8em; padding: .7em .9em; border-radius: .75em; border: 1px solid var(--va-line); background: var(--va-s2); margin-top: .35em; }
.va-accent i { width: 1.1em; height: 1.1em; border-radius: 50%; border: 2px solid #8b8b93; flex: none; }
.va-accent em { margin-left: auto; font-style: normal; color: #c9c9cf; font-size: .92em; }
.va-accent.is-on { border-color: var(--va-acc); }
.va-accent.is-on i { border-color: var(--va-acc); background: radial-gradient(circle, var(--va-acc) 45%, transparent 50%); }
.va-multi { display: flex; flex-direction: column; gap: .9em; padding-bottom: 1.5em !important; }
.va-multi__head { display: flex; align-items: baseline; gap: .9em; white-space: nowrap; }
.va-multi__head b { font-size: 1.5em; font-weight: 400; }
.va-multi__head span { color: #c9c9cf; }
.va-multi__bar { display: flex; align-items: center; gap: .6em; white-space: nowrap; }
.va-input { display: inline-flex; align-items: center; gap: .5em; padding: .6em .9em; border-radius: .75em; background: var(--va-s2); color: var(--va-muted); min-width: 11em; }
.va-add { padding: .6em .9em; border-radius: .75em; background: var(--va-s2); color: var(--va-acc-t); }
.va-q { padding: .6em .9em; border-radius: .75em; background: var(--va-s2); }
.va-multi__grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: .5em; flex: 1 1 auto; min-height: 0; }
.va-multi__grid img { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
@media (max-width: 639px) { #features .card > .va-panel { min-height: 220px; } #features .va-panel > .va { font-size: 10.5px; padding: 1em; } .va-multi__bar .va-btn { display: none; } }
#features .va-panel:has(.va-multi)::after { display: none; }
/* Une seule hauteur de panneau pour les quatre cartes : les deux rangées ont la même taille et la carte s'arrête
   sous son illustration (aucun fond vide en bas d'une carte). */
#features .wrap > .group > .grid, #features .wrap > .grid { align-items: stretch; }
#features .card > .va-panel { margin-top: auto; }
#features .card > .va-panel { flex: none; min-height: 0; height: 300px; }
@media (max-width: 1279px) { #features .card > .va-panel { height: 280px; } }
@media (max-width: 639px) { #features .card > .va-panel { height: 250px; } }
/* Le film, second écran de la section du lecteur : son titre à la taille d'un titre de section */
.film-head { margin-top: var(--s-8); }
.film-title { margin: 0; font: 500 var(--t-card)/1.3 var(--font-display); }

@media (min-width: 1024px) and (max-width: 1279px) { #features .card > .va-panel { height: 250px; } }
@media (max-width: 639px) { #features .card > .va-panel { height: 200px; } }

@media (max-width: 1023px) { .va-home { grid-template-columns: minmax(0, 1fr); } .va-home > .va-side, .va-main > .va-label, .va-main > .va-chips { display: none; } .va-main { padding: 1.2em 1.2em; } .va-cards { gap: .7em; } .hero__art > .ly-piece--note { display: none; } }
/* Héros : la 2e rangée de cartes est coupée par le cadre dans son image, jamais dans son texte */
.va-cards > .va-card:nth-child(n+3) > .va-card__meta { display: none; }
@media (max-width: 639px) {
  .va-cards > .va-card:nth-child(n+3) { display: none; }
  .va-card__meta { display: none; }
  .va-chat { height: 36em; }
}
@media (max-width: 639px) { .va-chat { height: 17em; } }

/* Lecteur et fonctions : sections à la hauteur de leur contenu (plus d'écran plein imposé), cartes serrées */
main > section#player, main > section#features { height: auto; min-height: 0; }
main > section#player { padding-bottom: var(--s-7); }
main > section#features { padding-top: var(--s-8); }
#features .grid { align-items: stretch; grid-auto-rows: 1fr; row-gap: var(--s-5); }

/* Premier lancement : l'écran entier dans son cadre, jamais coupé (le fond du cadre est celui de l'app) */
#download .frame--photo { background: #09090b; }
#download .frame--photo > .frame__img.frame__img { object-fit: contain; object-position: 50% 50%; }

/* Tablette : une carte de fonction par ligne, ses illustrations ont toute la largeur */
@media (min-width: 640px) and (max-width: 1023px) { #features .grid > .card { grid-column: 1 / -1; } }
/* Tablette et téléphone : la fenêtre du héros ne montre que les deux premières vignettes, sans texte coupé */
@media (max-width: 1023px) { .va-cards > .va-card:nth-child(n+3) { display: none; } .va-card__meta { display: none; } }
@media (max-width: 639px) { .va-favs { grid-template-columns: minmax(0, 1fr); } }
