/* css/layout.css — ecrans de jeu hors exploration/combat/tiroirs : ossature de l'app (#app, .topbar,
   .tabbar, .actbar, .scroll), Sanctuaire (hub entre les descentes : boutique, rayons, bestiaire, stats
   de heros), choix du donjon, ecran-titre, ecrans de fin de manche (recompense/sacrifice/resume) et
   pages de compte (connexion/inscription). Chargee uniquement par les pages de jeu.
   Issu du decoupage de l'ancien style.css (reorganisation pure, V13.12). */

/* V13 (audit) : pendant une transition asynchrone du moteur (busyGuard, main.js), les clics sont
   bloqués plutôt que de se perdre silencieusement sur l'écran encore affiché. */
#app.busy { pointer-events: none; cursor: wait; }
/* ================================================================ App shell */
.app-top { padding-top: var(--safe-t); }
.app-bottom { padding-bottom: var(--safe-b); }
.scroll { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; min-height: 0; height: 100%; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kv { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; font-size: var(--fs-md); }
.kv span:first-child { color: var(--muted); }
.kv b { font-variant-numeric: tabular-nums; }
/* ================================================================ Barre du haut */
.topbar { gap: 10px; }
.topbar h2 { font-size: var(--fs-lg); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.currency { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; color: var(--gold-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* ================================================================ Barre d'onglets (mobile) */
.tabbar {
  height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: flex; border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.tabbar button { background: none; border: 0; cursor: pointer; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: var(--fs-xl); }
.tabbar button span { font-size: var(--fs-xs); font-weight: 800; letter-spacing: .03em; }
.tabbar button.active { color: var(--accent-ink); }
.tabbar button.active::before { content: ""; position: absolute; }
.app-bottom:has(.tabbar) { padding-bottom: 0; }
/* Barre d'action contextuelle (au-dessus des onglets ou seule) */
.actbar { padding: 8px 12px; }
.actbar .grow { flex: 1; min-width: 0; }
.actbar .btn { min-width: 0; flex-shrink: 1; overflow: hidden; text-overflow: ellipsis; }
.actbar .hint { font-size: var(--fs-sm); color: var(--muted); line-height: 1.25; }
.actbar .hint b { color: var(--text); }
/* ================================================================ Écran-titre */
/* ================================================================ Choix du donjon */
/* ================================================================ Sanctuaire */
.sanct { padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.hero-card {
  display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center;
  background: radial-gradient(ellipse at 20% 80%, color-mix(in srgb, var(--accent) 25%, transparent), transparent 70%), var(--panel);
}
.hero-card img { width: clamp(72px, 14dvh, 160px); height: auto; aspect-ratio: 1; }
.hero-card h3 { font-size: var(--fs-xl); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.stepper button { width: 46px; height: 46px; border: 0; background: var(--panel-2); font-size: var(--fs-xl); cursor: pointer; }
.stepper button:disabled { opacity: .3; }
.stepper span { min-width: 120px; text-align: center; font-weight: 800; padding: 0 8px; font-size: var(--fs-md); }
.seg { display: flex; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex-shrink: 0; min-height: 40px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel-2); font-weight: 700; cursor: pointer; font-size: var(--fs-sm); }
.seg button.active { background: var(--accent); color: var(--ink-dark); border-color: var(--accent); }
.seg .badge { margin-left: 6px; background: var(--gold); color: var(--ink-dark); border-radius: 99px; padding: 0 6px; font-size: var(--fs-xs); }
.grid-list { display: grid; grid-template-columns: 1fr; gap: 8px; }
.shop-item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; width: 100%;
  padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; min-height: 60px;
}
.shop-item:hover { border-color: var(--accent); }
.shop-item.owned { border-color: color-mix(in srgb, var(--ok) 60%, transparent); cursor: default; }
.shop-item small { display: block; color: var(--muted); font-size: var(--fs-xs); margin-top: 2px; }
.stat-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.stat-row .name { font-weight: 800; }
.bestiary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.beast { text-align: center; font-size: var(--fs-xs); padding: 8px 4px; border-radius: 12px; background: var(--panel-2); border: 0; font: inherit; color: var(--text); width: 100%; cursor: pointer; }
.beast.unknown { cursor: default; }
.beast img { width: 56px; height: 56px; }
/* ================================================================ Récompense / sacrifice / résumé */
.choose { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 10px; padding: 12px; }
.choose-head { text-align: center; }
.choose-head h2 { font-size: clamp(1.3rem, 3.5dvh, 2rem); }
.choose-head.doom h2 { color: var(--danger); }
.choose-body { min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.choices { gap: 10px; }
.detail { width: min(460px, 100%); text-align: center; font-size: var(--fs-md); min-height: 3.6em; }
.detail b { display: block; font-size: var(--fs-lg); margin-bottom: 2px; }
.charge-line { font-size: var(--fs-sm); color: var(--muted); }
.charge-line b { color: var(--text); }
.charge-line .over { color: var(--danger); }
.choose-deck { display: none; }
.summary { grid-template-rows: auto minmax(0, 1fr); gap: 12px; padding: 16px 12px; }
.summary-head img { width: clamp(64px, 12dvh, 160px); height: auto; aspect-ratio: 1; }
.summary-head h2 { font-size: clamp(1.3rem, 3.4dvh, 2.2rem); }
.summary-grid { gap: 8px; }
.sum-note { margin: 0 0 8px; font-size: var(--fs-xs); font-weight: 700; text-align: center; color: color-mix(in srgb, var(--gold-ink) 70%, var(--text)); }
.stat-tile { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.stat-tile .v { font-size: clamp(1.15rem, 3dvh, 2rem); font-weight: 800; font-family: var(--font-title); }
.stat-tile .l { font-size: var(--fs-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.stat-tile .p { font-size: var(--fs-xs); color: var(--muted); }
/* ================================================================ Tablette portrait */
@media (min-width: 600px) and (orientation: portrait) {
  :root { --sprite: clamp(96px, 16dvh, 192px); --gap: 14px; }
  
  .grid-list { grid-template-columns: 1fr 1fr; }
  .summary-grid { grid-template-columns: repeat(4, 1fr); }
}
.tabbar img.pxi { width: 24px; height: 24px; }
.app-main { position: relative; min-width: 0; min-height: 0; padding: 10px var(--edge) var(--edge-b); overflow: hidden; }
@media (min-width: 1024px) and (orientation: landscape), (min-width: 1200px) { .app-main { padding-top: 22px; } }
.topbar { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); background: color-mix(in srgb, var(--bg) 90%, transparent); border-bottom: 1px solid var(--line); padding: var(--safe-t) 12px 0; align-items: center; display: flex; height: calc(var(--top-h) + var(--safe-t)); padding-left: var(--edge); padding-right: var(--edge); }
@media (min-width: 1024px) and (orientation: landscape), (min-width: 1200px) {
  .topbar { gap: var(--gap); padding-right: calc(var(--edge) + 560px); }
  .tabbar { padding-right: var(--edge); }
  .actbar { justify-content: flex-end; padding: 10px var(--gap); padding-bottom: calc(14px + var(--safe-b)); padding-top: 14px; }
}
.actbar { background: color-mix(in srgb, var(--bg) 94%, transparent); border-top: 1px solid var(--line); gap: 8px; align-items: center; display: flex; padding-left: var(--edge); padding-right: var(--edge); }
@media (min-width: 1024px) and (orientation: landscape), (min-width: 1200px) {
  .hero-card { gap: calc(var(--gap) * 2); grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); padding: calc(var(--gap) * 2); min-height: calc(100dvh - var(--top-h) - var(--safe-t) - 22px - var(--edge-b) - 2px); }
}
/* Le Sanctuaire suit désormais la marge globale (--edge) */
.sanct, .sanct.sanct { padding: 0; }
.beast.final { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 60%, transparent); }
/* ===== V10.1 : Codex sobre, menu à droite en descente, choix du donjon compact ===== */
.beast.unknown { opacity: .5; }
/* ===== V10.3 ===== */
@media (min-width: 1024px) and (orientation: landscape), (min-width: 1200px) {
  
  .lore-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* le bandeau d'onglets ne doit pas capter les clics destinés au bouton menu */
.tabbar { gap: 4px; backdrop-filter: none; background: transparent; border: 0; padding: 0 var(--gap); height: var(--top-h); z-index: 35; right: 0; top: var(--safe-t); position: fixed; pointer-events: none; }
  
}
.shop-item.locked { opacity: .55; cursor: not-allowed; }
.shop-item.locked:hover { border-color: var(--line); }
/* Accueil : tous les donjons visibles d'un coup, clic direct pour descendre */
/* Contrastes du thème clair (audit V10.3) */
.currency .cur-name { font-size: var(--fs-xs); font-weight: 700; opacity: .85; }
html:not(.dark) .currency { color: #8a5d0e; }
html:not(.dark) .tabbar button.active, html:not(.dark) .td-state.go { color: color-mix(in srgb, var(--accent-ink) 55%, var(--ink-dark)); }
@media (max-width: 599px) { .currency .cur-name { display: none; } }
/* ===== V10.4 : page du donjon, chemin des donjons, clés, Codex compact ===== */
.hero-card.v2 { gap: 14px; min-height: 0; }
/* Lueur du personnage : plus discrète, fondue jusqu'au bord (pas de coupure nette) */
.hero-card.v2 { align-items: stretch; flex-direction: column; display: flex; background: radial-gradient(ellipse at 28% 45%, color-mix(in srgb, var(--tc) 10%, transparent), transparent 60%), var(--panel); }
/* ===== V10.7 ===== */
/* Sous-menu du Sanctuaire : toutes les rubriques visibles, sans défilement caché */
.seg { scrollbar-width: none; padding-bottom: 2px; overflow-x: auto; gap: 6px; flex-wrap: wrap; overflow: visible; }
@media (max-width: 599px) {
  .seg { gap: 5px; }
  .seg button { min-height: 40px; padding: 0 10px; font-size: var(--fs-xs); }
}
@media (min-width: 1024px) and (orientation: landscape), (min-width: 1200px) {
  :root:not(:has(.tabbar)) .topbar:not(.topbar-run) { padding-right: var(--edge); }
}
/* --- Barre d'onglets mobile : indicateur en pilule derrière l'icône --- */
@media (max-width: 1023px), (max-width: 1199px) and (orientation: portrait) {
  .tabbar { background: color-mix(in srgb, var(--panel) 92%, transparent); }
  .tabbar button { gap: 4px; }
  .tabbar button img.pxi { box-sizing: content-box; width: 22px; height: 22px; padding: 4px 16px; border-radius: 99px; transition: background .2s; opacity: .7; }
  .tabbar button.active img.pxi { background: color-mix(in srgb, var(--accent) 24%, transparent); opacity: 1; }
  .tabbar button span { font-size: var(--fs-xs); }
  .tabbar button.active span { color: var(--text); }
}
/* --- En-tête ordinateur : nom du donjon à gauche, navigation, monnaie en pastille à droite --- */
@media (min-width: 1024px) and (orientation: landscape), (min-width: 1200px) {
  .topbar:not(.topbar-run) { padding-right: var(--edge); }
  
  .topbar:not(.topbar-run) > .currency { margin-left: auto; padding: 6px 12px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); }
  
  .tabbar button { align-self: center; pointer-events: auto; height: var(--top-h); border-radius: 0; padding: 0 16px; gap: 8px; background: none !important; position: relative; color: var(--muted); }
  .tabbar button img.pxi { width: 20px; height: 20px; opacity: .65; transition: opacity .15s; }
  .tabbar button span { font-size: var(--fs-sm); font-weight: 800; }
  .tabbar button:hover { color: var(--text); }
  .tabbar button:hover img.pxi, .tabbar button.active img.pxi { opacity: 1; }
  .tabbar button.active { color: var(--text); }
  .tabbar button::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); transform: scaleX(0); transition: transform .2s; }
  .tabbar button.active::after { transform: scaleX(1); }
  .tabbar button:hover:not(.active)::after { transform: scaleX(.4); opacity: .5; }
  /* Sanctuaire ouvert pendant une descente : la navigation reste à droite */
:root:has(.tabbar.in-run) .topbar:not(.topbar-run) { padding-right: calc(var(--edge) + 400px); }
  .tabbar.in-run { right: var(--edge); padding-right: 0; }
  :root:has(.topbar-run) .tabbar.in-run { right: calc(var(--edge) + 56px); }
}
.summary { display: grid; height: 100%; width: 100%; }
/* Fin de descente : une colonne lisible */
.summary, .summary.summary { display: flex; flex-direction: column; align-items: stretch; gap: 16px; width: min(960px, 100%); margin: 0 auto; height: auto; padding: 20px 0 28px; }
.summary-head { gap: 14px; align-items: center; display: flex; flex-direction: row !important; text-align: left !important; justify-content: center; }
.summary-grid { align-content: start; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 599px) { .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .summary-head { flex-direction: column !important; text-align: center !important; } }
.td-card:nth-child(3n) > img, .beast:nth-child(3n) > img { animation-duration: 5.7s; animation-delay: -1.2s; }
#app { padding-right: env(safe-area-inset-right, 0px); padding-left: env(safe-area-inset-left, 0px); grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; display: grid; height: 100dvh; position: relative; z-index: 1; }
@media (min-width: 1024px) and (orientation: landscape), (min-width: 1200px) {
  .tabbar:not(.in-run) { gap: 2px; padding: 0; right: calc(var(--edge) + 300px); }
  .topbar:not(.topbar-run) h2 { flex: 0 1 auto; max-width: calc(100vw - 2 * var(--edge) - 760px); }
}
@media (min-width: 1024px) and (max-width: 1599px) and (orientation: landscape), (min-width: 1200px) and (max-width: 1599px) {
  /* V13.14 : onglets un peu plus resserrés sur cette plage (avant que le titre du donjon n'ait plus de
     place à gauche) — mesuré en navigateur : les 5 libellés du Sanctuaire tiennent toujours, à 1024 px
     compris (556 px de contenu pour ~760 px de large disponible avant la pastille de monnaie). */
  .tabbar:not(.in-run) button { padding: 0 14px; }
  .topbar:not(.topbar-run) h2 { max-width: calc(100vw - 2 * var(--edge) - 560px); }
}
/* V12.35 : au-delà de 1600 px, onglets titrés mais resserrés pour ne jamais toucher le logo et « Bêta ». */
@media (min-width: 1600px) {
  .tabbar:not(.in-run) button { padding: 0 10px; gap: 6px; }
  .tabbar:not(.in-run) button::after { left: 8px; right: 8px; }
}
.topbar:not(.topbar-run) > .currency { margin-left: 0 !important; }
.topbar .currency { height: 36px; box-sizing: border-box; display: inline-flex; align-items: center; }
.tabbar button { flex: 1; position: relative; }
/* ================================================================ V12.8 : barre d'action mobile
   Deux boutons côte à côte (Partir / Choisir, potion / Partir...) : ils se partagent la largeur et
   leur texte passe à la ligne plutôt que d'être coupé.
   V13.13 (audit responsive) : palier ponctuel CONSERVÉ (560px, hors du système canonique de base.css) —
   changement réel de disposition (les boutons passent de "texte + icône alignés" à "empilés/centrés
   pleine largeur"), pas un simple réglage cosmétique, donc pas fusionnable sans risque visuel. */
@media (max-width: 560px) {
  .actbar:has(> .grow:not(.hint)) { gap: 8px; }
  .actbar:has(> .grow:not(.hint)) > .grow { display: none; }
  .actbar:has(> .grow:not(.hint)) > .btn {
    flex: 1 1 0; min-width: 0; white-space: normal; overflow: visible; text-overflow: clip;
    line-height: 1.15; text-align: center; padding: .45rem .6rem; font-size: var(--fs-md); letter-spacing: 0;
  }
  .actbar:has(> .grow:not(.hint)) > .btn-lg { flex-grow: 1.35; font-size: var(--fs-md); }
}
/* V13.13 (audit responsive, retour d'Alexandre : "je veux que ça prenne toute la largeur") : la colonne
   de contenu (carte, combat, Sanctuaire...) grandit désormais jusqu'à 1400 px avant que le surplus ne
   devienne de la marge (--edge) de part et d'autre, au lieu de se figer à 1040 px comme avant — ce qui
   laissait des bandes vides inutiles sur les grands écrans. On ne passe pas pour autant en pleine
   largeur "infinie" : au-delà de 1400 px de contenu utile, du texte et des cartes deviendraient
   inconfortables à lire/cliquer, d'où --bp-wide (1600px+, plus bas) qui reprend la main sur certains
   éléments ponctuels (titre de la barre du haut) plutôt que d'étirer tout le reste. */
@media (min-width: 1024px) and (orientation: landscape), (min-width: 1200px) {
  :root { --top-h: clamp(56px, 6.5vh, 78px); --gap: var(--u); --u: clamp(12px, min(.9vw, 1.6vh), 22px); --edge-b: 36px; --page-w: clamp(1400px, 78vw, 2000px); --edge: max(40px, calc((100vw - var(--page-w)) / 2)); }
  /* V12.18 : combat comme sur mobile, sur toute la largeur : l'arène en haut, la main et le bouton
     d'action dessous ; journal (bouton dans l'arène) et caractéristiques (bouton « i ») en panneau. */
/* V12.82 (corrige V12.81 : Alexandre voulait le bloc d'action sur la meme ligne que la zone de
     combat, pas a cote de la main) : choisir/passer/fuir a cote de l'arene, en haut ; la main occupe
     ensuite toute la largeur, sous l'arene ET sous le bloc d'action. */
.combat.combat { grid-template-columns: minmax(0, 1fr) 200px; grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "arena act" "hand hand"; }
  .combat.combat > .c-intel, .combat.combat > .c-log { display: none; }
  /* V12.83 : zone de combat un peu moins haute (retour d'Alexandre), et les boutons journal/pause un peu
     moins colles au coin (plus de marge autour). */
.combat.combat > .arena { grid-area: arena; margin-bottom: 22px; }
  .combat.combat .arena-log, .combat.combat .arena-pause { top: 10px; }
  .combat.combat .arena-log { right: 10px; }
  .combat.combat .arena-pause { right: 56px; }
  .combat .arena-log { display: grid; place-items: center; }
  /* V13 (retour d'Alexandre) : même système sur ordinateur et mobile — plus de colonnes héros/deck à côté
     de la carte (caractéristiques, deck, légende et pause sont dans le Sac partout) : la carte occupe
     toute la largeur disponible. */
.explore.explore { align-items: stretch; }
  .combat.combat > .act { grid-area: act; width: 100%; max-width: none; justify-content: flex-end; margin-bottom: 22px; }
}
@media (min-width: 1024px) and (orientation: landscape), (min-width: 1200px) {
  .choose.no-deck { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "body" "foot"; }
}
/* V12.24 : rien ne passe sous les titres. Sous-menus du Sanctuaire hors défilement ;
   marge intérieure pour que les cartes levées ou zoomées ne soient pas rognées sous l'en-tête. */
.sanct-frame { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.sanct-frame > .scroll { flex: 1; height: auto; min-height: 0; }
.choose > .scroll > .choose-body, .choose .scroll > .choose-body { padding: 14px 6px 16px; }
.choices { flex-wrap: wrap; justify-content: center; display: flex; padding: 8px 4px; }
@media (min-width: 1600px) { .topbar:not(.topbar-run) h2 { max-width: calc(100vw - 2 * var(--edge) - 900px); } }
.ico-tile { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: var(--r-md); background: var(--panel-2); border: 1px solid var(--line); }
.ico-tile img.pxi { width: 24px; height: 24px; }
.kv-list { display: flex; flex-direction: column; gap: 6px; }
/* Comptes */
.auth-page { height: 100%; }
.auth-wrap { min-height: 100%; max-width: 440px; margin: 0 auto; padding: var(--s-5) var(--s-4); display: flex; flex-direction: column; align-items: stretch; gap: var(--s-4); user-select: text; -webkit-user-select: text; }
.auth-card { display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-5); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; }
.auth-aside { display: flex; justify-content: space-between; gap: var(--s-3); font-size: var(--fs-sm); }
/* V12.35 (audit U3/u5) : glyphes remplacés par des icônes pixel ; tailles d'icônes selon le contexte. */
.stepper button img.pxi { width: 20px; height: 20px; }
.stepper button { display: grid; place-items: center; }
/* 360 px : les cinq onglets tiennent toujours dans la largeur */
.tabbar button { min-width: 0; }
.tabbar button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* V13.13 (audit responsive) : seuil fusionné dans --bp-xs (479px, voir base.css) — simple ajustement
   cosmétique de police, anciennement à 430px. */
@media (max-width: 479px) { .tabbar button { padding-left: 0; padding-right: 0; } .tabbar button span { font-size: 10.5px; letter-spacing: -.02em; overflow: visible; } }
.shop-group > .grid-list + small { display: block; margin-top: 8px; }
/* V13.14 (retour d'Alexandre, 30/09/2026) : ordinateur = menu toujours déplié, libellés visibles sans
   survol (avant : tiroir qui ne les montrait qu'au survol/focus, voir historique V12.38/V12.41). Plus
   besoin d'un repli automatique en icônes seules : mesuré en navigateur (1024, 1200, 1440, 1920 px),
   les 5 onglets du Sanctuaire déplié tiennent toujours largement avant la pastille de monnaie, y compris
   au palier le plus étroit (1024 px : ~556 px de contenu pour ~760 px disponibles). Le Sanctuaire affiche
   toujours exactement ces 5 onglets hors descente (voir js/view-sheet.js, fonction tabbar()), donc ce
   constat ne se désynchronise pas tout seul ; si une future évolution ajoute des onglets ou des libellés
   beaucoup plus longs, revérifier (au besoin un repli mesuré en JS, sur le modèle de fitHand()/fitArena()
   dans js/view-combat.js, serait plus robuste qu'un nouveau seuil CSS deviné). */
@media (min-width: 1024px) and (orientation: landscape), (min-width: 1200px) {
  .tabbar:not(.in-run) button { flex: 0 0 auto; }
}
@media (prefers-reduced-motion: reduce) { .tabbar button span { transition: none !important; } }
/* D14 : plancher de 11 px pour les petits libellés. V13.13 : seuil fusionné dans --bp-xs (479px),
   anciennement à 430px — cette règle prévaut sur celle du dessus (même sélecteur, même palier, ordre CSS). */
@media (max-width: 479px) { .tabbar button span { font-size: 11px; letter-spacing: -.01em; } }
.actbar:has(> .grow:not(.hint)) > .btn-lg { font-size: max(16px, var(--fs-md)); }
@media (min-width: 1024px) and (orientation: landscape), (min-width: 1200px) {
  .choose { grid-template-columns: minmax(0, 1fr) minmax(300px, 22vw); }
}
@media (max-width: 599px) { .choose > .scroll > .choose-body, .choose .scroll > .choose-body { padding-inline: 0; } .choose-body > .choices { padding-inline: 0; } }
.set-lang .seg { flex-wrap: wrap; }
.summary-head > img { width: max(48px, round(nearest, clamp(64px, 12dvh, 160px), 16px)); }
.summary-head > img[data-art="24"] { width: max(48px, round(nearest, clamp(64px, 12dvh, 160px), 24px)); }

/* V13.14 (jury ergonomie) : cibles tactiles d'au moins 44 px sur écran tactile (boutons secondaires, puces,
   curseur d'Ascension, bascule de langue), sans toucher à la présentation à la souris. */
@media (pointer: coarse) {
  .btn-sm, .seg button, button.chip, .lvl-chip, .snd-btn, .lang-switch button, .pause-run-btn, .ff-ok, .asc-row .stepper button { min-height: 44px; }
  .asc-row .stepper button { min-width: 44px; }
  .asc-nav-arrow { width: 44px; height: 44px; }
}
