/* ============================================================
   STOKHOS — composants : chips, cartes, segmented, steppers,
   notation par impacts, CTA, tab bar, barillet
   ============================================================ */

/* ---- Cartes ---- */
.card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r);
}

/* ---- Chips (armes / méta) ---- */
.chip {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  color: var(--c-grey);
  border: 1px solid var(--c-border);
  border-radius: var(--r-chip);
  padding: 3px 7px;
  white-space: nowrap;
}
.chip--brass { color: var(--c-brass); border-color: var(--c-brass-border); }

/* ---- Chips filtres (Râtelier) / discipline ---- */
.fchip {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--c-grey);
  border: 1px solid var(--c-border);
  border-radius: var(--r-chip);
  padding: 9px 13px;
  cursor: pointer;
  user-select: none;
  background: transparent;
  transition: all var(--t-micro) var(--ease);
}
.fchip--on { color: var(--c-brass); border-color: var(--c-brass); background: var(--c-raised); }

.dchip {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--c-grey);
  border: 1px solid var(--c-border);
  background: transparent;
  border-radius: var(--r-chip);
  padding: 9px 14px;
  cursor: pointer;
  user-select: none;
  transition: all var(--t-micro) var(--ease);
}
.dchip--on { color: var(--c-brass); border-color: var(--c-brass); background: var(--c-raised); }
.dchip:active, .fchip:active { transform: scale(.96); }


/* Mini-steppers du score (sous le chiffre héros) */
.minibtn {
  width: 44px;
  height: 38px;
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  background: var(--c-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: var(--c-grey);
  cursor: pointer;
  user-select: none;
}
.minibtn--plus { color: var(--c-brass); }
.minibtn:active { background: var(--c-raised); }

/* ---- Notation par impacts ---- */
.dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1px solid var(--c-border-light);
}
.dot--filled {
  border: none;
  background: var(--c-impact);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dot--filled::after { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--c-bg); }

/* Notation « tir sur cible » (motion C) : point vide = cercle bordure,
   impact = disque ivoire à trou central. Le dernier impact « claque »
   (hitPunch) avec son onde Spotter (hitRipple). 5/5 = MOUCHE. */
.impact {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--c-border-light);
  cursor: pointer;
}
/* Point vide = mini-cible : anneau Spotter intérieur (le « claque » du tap
   est porté par hitPunch seul — pas de :active, sinon double effet) */
.impact::before {
  content: '';
  position: absolute; inset: 6px;
  border-radius: 50%;
  border: 1px solid rgba(232, 86, 42, .55);
}
.impact--hit::before { display: none; }
.impact--hit {
  border: none;
  background: var(--c-impact);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 5px rgba(18, 22, 29, .14);
}
.impact--hit::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c-bg);
}
.impact--in { animation: hitPunch .2s var(--ease); }
/* Note abaissée : l'impact retiré s'estompe au lieu de disparaître sec
   (classe transitoire — jamais rejouée passé la fenêtre lastHitArme) */
.impact--out { animation: hitFade .3s var(--ease); }
@keyframes hitFade {
  0% { background: var(--c-impact); border-color: transparent; box-shadow: inset 0 0 0 5px rgba(18, 22, 29, .14); }
  100% { background: transparent; border-color: var(--c-border-light); box-shadow: none; }
}
.impact__ripple {
  position: absolute; inset: -1px;
  border-radius: 50%;
  border: 1px solid var(--c-spotter);
  animation: hitRipple .5s var(--ease) both;
  pointer-events: none;
}
/* Impacts en LECTURE (fiches binôme, comparaisons) : 18 px — la taille
   tactile 32 est réservée à la notation ; proportions du handoff */
.impacts-ro .impact { width: 18px; height: 18px; }
.impacts-ro .impact::before { inset: 3px; }
.impacts-ro .impact--hit { box-shadow: inset 0 0 0 3px rgba(18, 22, 29, .14); }
.impacts-ro .impact--hit::after { width: 6px; height: 6px; }

.mouche {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .16em;
  color: var(--c-spotter);
  margin-left: 4px;
}
.mouche__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.mouche--in { animation: moucheGlow .5s var(--ease) both; }
@keyframes hitPunch { 0% { transform: scale(2.6); opacity: 0; } 55% { transform: scale(.85); opacity: 1; } 75% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes hitRipple { 0% { transform: scale(.4); opacity: .9; } 100% { transform: scale(2.1); opacity: 0; } }
@keyframes moucheGlow { 0% { opacity: 0; transform: scale(.6); } 30% { opacity: 1; transform: scale(1.05); } 100% { opacity: 1; transform: scale(1); } }

/* ---- CTA ---- */
.cta {
  height: 56px;
  width: 100%;
  background: var(--c-brass);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--c-bg);
  cursor: pointer;
  user-select: none;
  transition: transform var(--t-micro) var(--ease);
}
.cta:active { transform: scale(.97); }
.cta--sm { height: 50px; width: auto; padding: 0 28px; font-size: 14px; }
.cta--off { opacity: .35; pointer-events: none; }
.cta--fit { width: auto; padding: 0 18px; flex-shrink: 0; }

/* Bouton secondaire : se LIT comme un bouton (bordure) et rend un retour
   au tap — règle générale d'affordance (retour Pauline S-f). */
.btn-ghost {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--c-grey);
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  cursor: pointer;
  user-select: none;
  transition: transform var(--t-micro) var(--ease),
    border-color var(--t-micro) var(--ease), color var(--t-micro) var(--ease);
}
.btn-ghost:hover { color: var(--c-paper); border-color: var(--c-border-light); }
.btn-ghost:active { transform: scale(.97); }
.btn-ghost--danger { color: var(--c-alert); border-color: var(--c-alert-border); }
.btn-ghost--danger:hover { color: var(--c-alert); border-color: var(--c-alert); }

/* Interrupteur DS — l'état se VOIT (pilule + bille), jamais un simple
   texte d'état qui se lit comme une étiquette (audit 2026-07-20) */
.switch {
  position: relative;
  width: 44px; height: 26px; flex-shrink: 0;
  border-radius: 13px;
  border: 1px solid var(--c-border-light);
  background: var(--c-card);
  transition: background var(--t-ui) var(--ease), border-color var(--t-ui) var(--ease);
}
.switch::after {
  content: '';
  position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--c-grey);
  transition: transform var(--t-ui) var(--ease), background var(--t-ui) var(--ease);
}
.switch--on { background: var(--c-raised); border-color: var(--c-brass); }
.switch--on::after { transform: translateX(18px); background: var(--c-brass); }

/* Toast — l'information non bloquante (remplace les window.alert) */
.toast {
  position: absolute;
  top: calc(var(--safe-top) + 14px); left: 14px; right: 14px;
  z-index: 70;
  background: var(--c-card);
  border: 1px solid var(--c-border-light);
  border-left: 2px solid var(--c-brass);
  border-radius: var(--r);
  padding: 13px 16px;
  font-size: 13px; line-height: 1.45; color: var(--c-paper);
  box-shadow: 0 8px 24px rgba(6, 9, 14, .45);
  animation: toastIn .22s var(--ease) both;
  pointer-events: none;
}
.toast--out { animation: toastOut .25s var(--ease) both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-6px); } }

/* Bouton carré 36px (✕ / ‹ du wizard) */
.sqbtn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-grey);
  font-size: 16px;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}
.sqbtn:active { transform: scale(.9); }

/* ---- Table de specs (fiche arme / détail séance) ---- */
.specs { border-top: 1px solid var(--c-border); }
.spec-row {
  display: flex;
  justify-content: space-between;
  padding: 11px 2px;
  border-bottom: 1px solid var(--c-card);
}
.spec-row:last-child { border-bottom: 1px solid var(--c-border); }
.spec-row .k { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .14em; color: var(--c-grey); }
.spec-row .v { font-family: var(--f-mono); font-size: 12px; }

/* ---- Séparateur de mois / section ---- */
.msep { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.msep .lbl { letter-spacing: .22em; font-size: 11px; }
.msep .count { font-family: var(--f-mono); font-size: 10px; color: var(--c-grey); }

/* ---- Placeholder silhouette hachurée ---- */
.silh-placeholder {
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(45deg, transparent, transparent 5px,
    rgba(139, 147, 161, .09) 5px, rgba(139, 147, 161, .09) 6px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-mono);
  font-size: 7.5px;
  letter-spacing: .14em;
  color: var(--c-dim);
}
.silh-img {
  width: 100%;
  height: 100%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* ---- Statut de sync ---- */
.syncchip {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--c-grey);
  border: 1px solid var(--c-border);
  border-radius: var(--r-chip);
  padding: 4px 7px;
  white-space: nowrap;
}
.pdot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid var(--c-grey);
  vertical-align: 1px;
  margin-left: 4px;
}

/* ============================================================
   Tab bar + barillet (couche #chrome persistante)
   ============================================================ */
.scrim {
  position: absolute;
  inset: 0;
  /* Barillet ouvert : fond nettement assombri — les chambres ressortent */
  background: rgba(6, 9, 14, .78);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-ui) var(--ease);
}
.chrome--open .scrim { opacity: 1; pointer-events: auto; }

/* Nouvelle version du shell PRÊTE (push de refresh) — bande au-dessus de
   la tabbar ; le dot pulse : du nouveau attend une réponse. Le rechargement
   est PROPOSÉ, jamais imposé (une saisie en cours ne doit pas sauter). */
.maj-band {
  position: absolute;
  left: 12px; right: 12px;
  bottom: calc(var(--tabbar-h) + 10px);
  display: flex; align-items: center; gap: 10px;
  background: var(--c-card);
  border: 1px solid var(--c-brass-border-strong);
  border-radius: var(--r);
  padding: 10px 12px;
  pointer-events: auto;
}
.maj-band__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c-brass); animation: dotPulse 2s var(--ease) infinite; }
.maj-band__lbl { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .14em; color: var(--c-paper); }
.maj-band__cta {
  margin-left: auto;
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .1em; font-weight: 600;
  color: var(--c-bg); background: var(--c-brass);
  border-radius: 4px; padding: 8px 12px; cursor: pointer;
}
.maj-band__cta:active { transform: scale(.96); }

/* Le COACH des premiers pas : la voix du tutoriel, ANCRÉE près de la cible
   par guideFx (top runtime) — invisible tant qu'elle n'est pas placée,
   COMPRIS la congédie */
.coach {
  position: absolute;
  left: 12px; right: 12px;
  bottom: calc(var(--tabbar-h) + 10px);
  display: flex; align-items: center; gap: 12px;
  background: var(--c-navy);
  border: 1px solid var(--c-brass-border-strong);
  border-radius: var(--r-plus);
  padding: 12px 14px;
  pointer-events: auto;
  z-index: 6;
  opacity: 0;
}
.coach--place { opacity: 1; transition: opacity .25s var(--ease); }
.coach__txt { flex: 1; font-size: 12.5px; line-height: 1.55; color: var(--c-paper); }
.coach__ok {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em; font-weight: 600;
  color: var(--c-bg); background: var(--c-brass);
  border-radius: 4px; padding: 8px 11px; cursor: pointer;
  flex-shrink: 0;
}
.coach__ok:active { transform: scale(.96); }

.tabbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  border-top: 1px solid var(--c-border);
  background: var(--c-bg);
  padding: 10px 10px calc(var(--safe-bottom) + 14px);
  pointer-events: auto;
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.tab .lbl-sm { letter-spacing: .14em; white-space: nowrap; }
.tab--on .lbl-sm { color: var(--c-brass); }
/* Badge doré sur l'icône d'onglet (demandes + invitations à répondre) */
.tab__ico { position: relative; display: inline-flex; }
/* Onglet MOI : l'avatar miniature fait office d'icône */
.tab-av {
  width: 21px; height: 21px;
  border-radius: 50%;
  border: 1px solid var(--c-border-light);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mono); font-size: 7.5px; color: var(--c-grey);
}
.tab-av--on { border-color: var(--c-brass); color: var(--c-brass); }

.plus {
  width: 52px;
  height: 52px;
  border-radius: var(--r-plus);
  background: var(--c-brass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 300;
  color: var(--c-bg);
  margin: 0 26px;
  cursor: pointer;
  user-select: none;
  position: relative;
  z-index: 3;
  transform: rotate(0deg);
  transition: transform .22s var(--ease-stop);
}
.plus:active { transform: scale(.92); }
.chrome--open .plus { transform: rotate(45deg); }

/* Chambres du barillet : déploiement en arc, cran d'arrêt, stagger 40ms */
.chamber {
  position: absolute;
  left: 50%;
  bottom: calc(var(--safe-bottom) + 104px);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 0) rotate(-60deg) scale(.4);
  transform-origin: 50% 100%;
  cursor: pointer;
}
.chamber--1 { transition: transform .25s var(--ease-stop) 0s, opacity .18s ease 0s; }
.chamber--2 { transition: transform .25s var(--ease-stop) .04s, opacity .18s ease .04s; }
.chamber--3 { transition: transform .25s var(--ease-stop) .08s, opacity .18s ease .08s; }
.chamber--4 { transition: transform .25s var(--ease-stop) .12s, opacity .18s ease .12s; }
.chrome--open .chamber { pointer-events: auto; opacity: 1; }
/* Arc à QUATRE chambres — dérivé du cercle Motion Lab, extrêmes ABAISSÉS
   (retour Pauline : plus d'air entre les étiquettes des coins et du milieu) */
.chrome--open .chamber--1 { transform: translate(calc(-50% - 132px), -22px) rotate(0deg); }
.chrome--open .chamber--2 { transform: translate(calc(-50% - 58px), -90px) rotate(0deg); }
.chrome--open .chamber--3 { transform: translate(calc(-50% + 58px), -90px) rotate(0deg); }
.chrome--open .chamber--4 { transform: translate(calc(-50% + 132px), -22px) rotate(0deg); }

.chamber__disc {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--c-card);
  border: 1px solid var(--c-brass);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px;
}
.chamber__label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--c-paper);
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 3px;
  padding: 3px 6px;
  white-space: nowrap;
}

/* ============================================================
   Utilitaires de mise en page — remplacent les styles inline
   des fonctions de rendu (audit 2026-07-17). Seules exceptions
   inline restantes : géométrie runtime de l'overlay (app.js) et
   variables d'animation de l'odomètre (--odo-*).
   ============================================================ */
.row { display: flex; align-items: center; }
.row--base { align-items: baseline; }
.row--between { justify-content: space-between; }
.col { display: flex; flex-direction: column; }
.g-4 { gap: 4px; } .g-8 { gap: 8px; } .g-10 { gap: 10px; } .g-14 { gap: 14px; }
.flex-1 { flex: 1; }
.shrink-0 { flex-shrink: 0; }
.ml-auto { margin-left: auto; }
.ta-c { text-align: center; }
.ta-l { text-align: left; }
.pointer { cursor: pointer; }
.brass { color: var(--c-brass); }

.mt-2 { margin-top: 2px; } .mt-3 { margin-top: 3px; } .mt-6 { margin-top: 6px; }
.mt-7 { margin-top: 7px; } .mt-8 { margin-top: 8px; } .mt-9 { margin-top: 9px; }
.mt-10 { margin-top: 10px; } .mt-12 { margin-top: 12px; } .mt-14 { margin-top: 14px; }
.mt-18 { margin-top: 18px; } .mt-22 { margin-top: 22px; } .mt-26 { margin-top: 26px; }
.mb-6 { margin-bottom: 6px; } .mb-8 { margin-bottom: 8px; } .mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }

/* Méta mono (le « poinçon » en petit) */
.meta { font-family: var(--f-mono); color: var(--c-grey); }
.meta--brass { color: var(--c-brass); }
.meta--ls08 { letter-spacing: .08em; }
.meta-9 { font-size: 10px; } .meta-95 { font-size: 10.5px; } .meta-11 { font-size: 11px; }

/* Variantes de labels */
.lbl--16 { letter-spacing: .16em; } .lbl--18 { letter-spacing: .18em; }
.lbl--20 { letter-spacing: .2em; } .lbl--26 { letter-spacing: .26em; }
.lbl-sm--soft { opacity: .7; }
.lbl-sm--brass { color: var(--c-brass); letter-spacing: .16em; }
.lbl-sm--disclaimer { letter-spacing: .08em; line-height: 1.7; }

/* Corps de texte des cartes */
.copy-sm { font-size: 12.5px; line-height: 1.5; color: var(--c-text2); }
.copy-sm--relaxed { line-height: 1.6; }

/* Variantes de cartes */
.card--pad { padding: 14px 16px; } .card--pad-sm { padding: 13px 15px; }
.card--pad-xs { padding: 12px 14px; } .card--pad-lg { padding: 16px; }
.card--dashed { border-style: dashed; }

/* Variantes CTA / boutons carrés (page séance) */
.cta--40 { height: 40px; font-size: 12px; }
.cta--44 { height: 44px; font-size: 13px; }
.sqbtn--40 { height: 40px; } .sqbtn--44 { height: 44px; }

/* Specs et séparateurs des fiches */
.specs--pb { padding-bottom: 12px; }
.msep--fiche { margin: 28px 0 10px; }
.msep--customs { margin: 22px 0 10px; }
