/* Simulateur de deck (index.html, js/simulator.js) : trois vues sur une page, le deck, le rapport et la recherche de
   la meilleure carte. Chargé après style.css (cartes au format du jeu, bulles) et glass.css (habillage). */

/* ---------- squelette ---------- */
.sim-top { position: sticky; }
.sim-top-gap { flex: 1; }
.sim { max-width: 1100px; margin: 0 auto; padding: 32px 24px 56px; }
.view { display: flex; flex-direction: column; gap: 30px; }
.view.hidden { display: none; }
.sim h2, .sim h3 { font-family: var(--gfont); font-weight: 400; letter-spacing: .4px; margin: 0; }
.gold { color: var(--accent); }
.good { color: #7dff8a; }
.bad { color: #ff9a9a; }
.linkish { background: none; border: 0; padding: 6px 4px; color: var(--accent); font: 700 13px Raleway, sans-serif; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkish:hover { background: none; color: #ffe68a; }
.btn-gold, button.primary.btn-gold, a.btn.btn-gold { background: linear-gradient(180deg, #ffd54a, #f0a91c); color: #2a1a00; border-color: #fff3c4; box-shadow: 0 12px 34px -12px rgba(255, 213, 74, .7); }
a.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; font-family: var(--gfont); letter-spacing: .4px; font-size: 15px; color: var(--text); background: rgba(8, 0, 41, .55); border: 2px solid rgba(255, 255, 255, .85); border-radius: 12px; padding: 9px 18px; min-height: 44px; }
a.btn:hover { background: rgba(23, 16, 74, .8); color: var(--text); }
a.btn.btn-gold:hover { background: linear-gradient(180deg, #ffd54a, #f0a91c); filter: brightness(1.08); color: #2a1a00; }
button, a.btn { min-height: 40px; }
button.ghost, a.btn.ghost { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .28); }

.sim-hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.sim-hero h1 { margin: 0; font-size: clamp(36px, 6vw, 58px); line-height: 1.02; font-weight: 400; }
.sim-hero h1 em { font-style: normal; color: var(--accent); }
.sim-hero p { margin: 0; font-size: 17px; max-width: 640px; }

.step { border-radius: 26px; padding: 26px; display: flex; flex-direction: column; gap: 20px; }
.step-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.step-head h2 { font-size: 26px; flex: 1; }
.btn-random { display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; border-color: rgba(255, 213, 74, .55); color: var(--accent); font-weight: 700; }
.btn-random:hover { border-color: var(--accent); color: #ffe68a; }
.btn-random:hover svg { transform: rotate(90deg); }
.btn-random svg { transition: transform .25s; flex: none; }
.num { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 213, 74, .15); border: 1.5px solid var(--accent); color: var(--accent); display: grid; place-items: center; font-size: 17px; flex: none; }

/* ---------- lien de deck ---------- */
.paste { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.paste input { flex: 1 1 300px; background: rgba(8, 0, 41, .6); border: 1px solid rgba(255, 255, 255, .25); border-radius: 12px; padding: 10px 12px; min-height: 44px; }
.paste-msg { color: #ff9a9a; }

/* ---------- les 4 cases ---------- */
/* Les cartes au format du jeu débordent de leur boîte (médaillon d'élément, Spamton, talents, rareté) : marges en
   conséquence, rien n'est rogné. */
.deck-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 44px; padding: 20px 26px 6px; }
.slot-wrap { display: flex; flex-direction: column; gap: 22px; align-items: stretch; min-width: 0; position: relative; }
.slot-card { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 6%; }
.slot-card:hover { background: none; transform: translateY(-3px); }
.slot-wrap.active .gcard { filter: drop-shadow(0 0 2px #ffd54a) drop-shadow(0 0 14px rgba(255, 213, 74, .8)); }
.tp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.slot-x { min-height: 30px; padding: 2px 8px; font: 700 12px Raleway, sans-serif; letter-spacing: 0; color: #ffb3b3; background: transparent; border: 1px solid rgba(255, 106, 106, .4); border-radius: 999px; }
.slot-x:hover { background: rgba(255, 106, 106, .12); }
.slot-empty {
  width: 100%; aspect-ratio: 286 / 400; border-radius: 16px; border: 2.5px dashed rgba(255, 213, 74, .55); background: rgba(255, 213, 74, .05);
  display: grid; place-items: center; text-align: center; color: var(--accent); padding: 12px; cursor: pointer; font: 700 14px/1.35 Raleway, sans-serif;
}
.slot-empty:hover { background: rgba(255, 213, 74, .1); }
.slot-empty .plus { font-family: var(--gfont); font-size: 46px; display: block; line-height: 1; }
.slot-wrap.active .slot-empty { border-color: var(--accent); border-style: solid; box-shadow: 0 0 40px -10px rgba(255, 213, 74, .7); }
.talent-pick { display: flex; flex-direction: column; gap: 4px; }
/* Même hauteur sous une case vide que sous une carte (titre + sélecteur de talent) : la page ne saute plus quand une
   carte arrive. */
.slot-wrap > .talent-pick { min-height: 74px; }
.link-note { margin: -6px 0 0; padding: 8px 14px; border-radius: 12px; font-size: 14px; background: rgba(176, 107, 255, .12); border: 1px solid rgba(176, 107, 255, .4); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.link-note.hidden { display: none; }
.link-note .linkish { padding: 2px 0; min-height: 0; }
.talent-pick label { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }
.talent-pick select {
  appearance: none; -webkit-appearance: none; width: 100%; min-height: 40px; padding: 8px 30px 8px 12px; border-radius: 999px; cursor: pointer;
  font: 700 13px Raleway, sans-serif; color: #e6e2ff; background: rgba(176, 107, 255, .16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10'%3E%3Cpath d='M2 3.5 5 6.5 8 3.5' fill='none' stroke='%23e6e2ff' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid rgba(176, 107, 255, .5);
}
.talent-pick select option { background: #1d1a40; color: var(--text); }
.talent-pick .tp-label { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }
.tsel { position: relative; }
/* Le flou du cadre en fait une couche à part : sans ça, le cadre suivant passerait par-dessus la liste ouverte. */
.step:has(.tsel-list:not(.hidden)) { position: relative; z-index: 20; }
.tsel-btn {
  width: 100%; min-height: 40px; padding: 8px 30px 8px 12px; border-radius: 999px; cursor: pointer; text-align: left; letter-spacing: 0;
  font: 700 13px Raleway, sans-serif; color: #e6e2ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: rgba(176, 107, 255, .16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10'%3E%3Cpath d='M2 3.5 5 6.5 8 3.5' fill='none' stroke='%23e6e2ff' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid rgba(176, 107, 255, .5);
}
.tsel-btn:hover, .tsel-btn[aria-expanded="true"] { background-color: rgba(176, 107, 255, .26); }
.tsel-list {
  position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; right: 0; margin: 0; padding: 4px; list-style: none;
  background: #1d1a40; border: 1px solid rgba(176, 107, 255, .5); border-radius: 14px; box-shadow: 0 14px 34px -10px rgba(0, 0, 0, .7);
}
.tsel-opt {
  display: block; width: 100%; min-height: 36px; padding: 6px 10px; text-align: left; border: none; border-radius: 10px; cursor: pointer;
  font: 700 13px Raleway, sans-serif; letter-spacing: 0; color: #e6e2ff; background: transparent;
}
.tsel-opt:hover, .tsel-opt:focus-visible { background: rgba(176, 107, 255, .22); outline: none; }
.tsel-opt.on { color: var(--accent); }
.tal-name { cursor: help; text-decoration: underline dotted rgba(201, 162, 255, .7); text-underline-offset: 3px; }

/* ---------- sélecteur de cartes ---------- */
/* Défilement jusqu'au choix de carte ou au titre de la comparaison : sous la barre du haut, pas derrière. */
#pickerBox, #cvTitle { scroll-margin-top: 72px; }
.picker-box { border-radius: 22px; padding: 18px; background: rgba(8, 0, 41, .45); border: 1.5px solid rgba(255, 213, 74, .45); display: flex; flex-direction: column; gap: 14px; }
.picker-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.picker-tools .search { flex: 1 1 280px; display: flex; align-items: center; gap: 10px; background: rgba(8, 0, 41, .65); border: 1.5px solid rgba(255, 255, 255, .25); border-radius: 14px; padding: 0 14px; color: var(--accent); }
.picker-tools .search:focus-within { border-color: var(--accent); }
.picker-tools input[type=search] { flex: 1; min-height: 46px; background: transparent; border: 0; outline: none; font-size: 15px; padding: 0; }
.el-filter { display: flex; gap: 6px; flex-wrap: wrap; }
.elb { width: 44px; height: 44px; min-height: 0; padding: 0; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .16); }
.elb img { width: 26px; height: 26px; }
.elb.on { background: rgba(255, 213, 74, .18); border-color: var(--accent); }
.close-pick { height: 44px; padding: 0 16px; font: 700 14px Raleway, sans-serif; letter-spacing: 0; border-radius: 12px; }
.picker-main { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
/* Hauteur de la liste prise sur celle de l'écran (l'ouverture du choix fait défiler la page jusqu'à son haut) : la
   liste entière est visible, sans zone coincée en bas de l'écran. */
.pick-grid {
  flex: 999 1 520px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 44px 40px;
  padding: 18px 26px 22px 30px; max-height: max(420px, min(760px, calc(100vh - 210px))); overflow-y: auto; overflow-x: hidden;
}
@media (hover: none) { .pd-tip { display: none; } }
.pick-item { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; transition: transform .15s; }
.pick-item:hover { background: none; transform: translateY(-4px); }
.pick-item.on .gcard { filter: drop-shadow(0 0 2px #ffd54a) drop-shadow(0 0 12px rgba(255, 213, 74, .8)); }
.pick-detail { flex: 1 1 300px; border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 12px; border-color: rgba(255, 213, 74, .5); position: sticky; top: 90px; }
.pick-detail .pd-head { display: flex; gap: 10px; align-items: center; }
.pick-detail .pd-head img { width: 32px; height: 32px; }
.pick-detail .pd-name { font-family: var(--gfont); font-size: 24px; line-height: 1.05; }
.pick-detail .bubble { font-size: 13px; padding: 12px 13px; }
.pick-detail .bubble::before { background: rgba(14, 10, 40, .9); }
.pick-detail .bb-col { width: auto; }
.pick-detail .pd-talents { font-size: 12.5px; }
.pick-detail .pd-talents b { font-weight: 700; }
.pick-empty { color: var(--muted); font-size: 14px; }

/* ---------- comment tu joues ---------- */
.carry-box { display: flex; flex-direction: column; gap: 10px; }
.carry-title { font-size: 15px; }
.carry-row { display: flex; gap: 10px; flex-wrap: wrap; }
.carry {
  font: 700 14px Raleway, sans-serif; color: var(--text); background: rgba(255, 255, 255, .05); border: 1.5px solid rgba(255, 255, 255, .18);
  border-radius: 14px; padding: 5px 14px 5px 5px; min-height: 52px; display: inline-flex; align-items: center; gap: 10px; letter-spacing: 0;
}
.carry:hover { border-color: var(--accent); background: rgba(255, 255, 255, .08); }
.carry.on { background: rgba(255, 213, 74, .16); border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 213, 74, .15); }
.carry.none { padding-left: 14px; }
.carry img { width: 30px; height: 42px; object-fit: cover; object-position: top; border-radius: 6px; }
/* Tox prioritaire : menu des Tox (même sélecteur que les talents) puis la carte qui le reçoit. */
.tox-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tox-sel { width: 240px; max-width: 100%; }
.tox-sel .tsel-btn, .tox-sel .tsel-opt { display: flex; align-items: center; gap: 8px; }
.tox-sel img { width: 22px; height: 22px; object-fit: contain; flex: none; }
.tox-sel .tsel-list { max-height: 320px; overflow-y: auto; }
.carry.small { min-height: 40px; font-size: 13px; padding: 4px 12px 4px 4px; border-radius: 12px; gap: 8px; }
.carry.small img { width: 22px; height: 31px; }
.carry.small.none { padding-left: 12px; }
.plan-label { font-size: 14px; line-height: 1.5; }
#planText {
  background: rgba(8, 0, 41, .6); border: 1.5px solid rgba(176, 107, 255, .6); border-radius: 16px; padding: 14px 16px; resize: vertical;
  font-size: 16px; line-height: 1.5; min-height: 110px;
}
#planText:focus { outline: 2px solid var(--accent2); outline-offset: 1px; }
.starters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.starter { font: 700 13px Raleway, sans-serif; letter-spacing: 0; background: rgba(255, 255, 255, .05); border: 1.5px solid rgba(255, 255, 255, .18); border-radius: 999px; padding: 8px 14px; }
.starter:hover { border-color: var(--accent2); background: rgba(176, 107, 255, .12); }
.plan-out { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 16px; background: rgba(176, 107, 255, .12); border: 1px solid rgba(176, 107, 255, .35); }
.plan-out:empty { display: none; }
.plan-out .po-title { font-weight: 800; font-size: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.plan-out ul { margin: 0; padding: 0 0 0 18px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.plan-out .po-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.plan-out button { font-size: 13px; padding: 6px 14px; }
.plan-out.err { background: rgba(255, 138, 138, .1); border-color: rgba(255, 138, 138, .5); }
.plan-out.err .po-title { color: #ffb3b3; }

/* ---------- lancement ---------- */
.launch { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.settings-line { font-size: 13px; color: var(--muted); text-align: center; }
.settings-line b { color: var(--text); }
.settings { display: flex; flex-wrap: wrap; gap: 14px 22px; justify-content: center; align-items: flex-end; padding: 16px 18px; border-radius: 18px; }
.settings .set { display: flex; flex-direction: column; gap: 6px; }
.settings .set > span { font-size: 12px; font-weight: 700; color: var(--muted); }
.settings .set > small { font-size: 12px; color: var(--muted); max-width: 230px; line-height: 1.35; }
.settings-line .linkish { font-size: 13px; }
.seg2 { display: inline-flex; flex-wrap: wrap; padding: 4px; gap: 4px; border-radius: 999px; background: rgba(8, 0, 41, .5); border: 1px solid rgba(255, 255, 255, .14); }
.seg2 button { font: 600 13px Raleway, sans-serif; letter-spacing: 0; color: #c9c4ee; background: transparent; border: 0; border-radius: 999px; padding: 7px 14px; min-height: 36px; }
.seg2 button:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.seg2 button.on { background: var(--accent2); color: #fff; }
.big-cta { display: inline-flex; align-items: center; justify-content: center; gap: 12px; font-size: 24px; padding: 14px 44px; min-height: 62px; border-radius: 14px; }
.big-cta .num { width: 30px; height: 30px; font-size: 15px; background: rgba(42, 26, 0, .12); border-color: #2a1a00; color: #2a1a00; }
.big-cta:disabled { opacity: 1; background: rgba(255, 255, 255, .06); color: #9a95c8; border-color: rgba(255, 255, 255, .2); box-shadow: none; }

/* ---------- rapport ---------- */
.back-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; }
.rep-hero { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.mini-deck { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.mini-deck img { width: 52px; height: 72px; object-fit: cover; object-position: top; border-radius: 9px; border: 2px solid rgba(255, 213, 74, .6); }
.mini-deck .hole { width: 52px; height: 72px; border-radius: 9px; border: 2px dashed var(--accent); display: grid; place-items: center; color: var(--accent); font-family: var(--gfont); font-size: 26px; }
.mini-deck .hole.testing { position: relative; overflow: hidden; box-shadow: 0 0 18px -4px rgba(255, 213, 74, .7); }
.mini-deck .hole.testing img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; border: 0; border-radius: 0; opacity: .45; }
.mini-deck .hole.testing b { position: relative; font-weight: 400; text-shadow: 0 0 6px #000, 0 0 2px #000; }
.testing-name { margin: -2px 0 0; font-size: 13px; color: var(--muted); }
.testing-name b { color: var(--text); }
.ring { --p: 0; width: 230px; height: 230px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--accent) calc(var(--p) * 1%), rgba(255, 255, 255, .1) 0); box-shadow: 0 0 80px -20px rgba(255, 213, 74, .6); }
.ring.run { background: conic-gradient(var(--accent2) calc(var(--p) * 1%), rgba(255, 255, 255, .1) 0); box-shadow: 0 0 80px -20px rgba(176, 107, 255, .6); }
.ring > div { width: 82%; height: 82%; border-radius: 50%; background: #17143a; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring .big { font-family: var(--gfont); font-size: 54px; line-height: 1; color: var(--accent); }
.ring .sub { font-size: 13px; color: var(--muted); }
.ring.small { width: 120px; height: 120px; }
/* Les deux taux de victoire : contre les meilleurs decks et contre des decks moyens. */
.duo { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.duo > div { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 170px; padding: 10px 16px; border-radius: 14px; border: 1px solid var(--glass-line); background: var(--glass); }
.duo > div.on { border-color: rgba(255, 213, 74, .55); }
.duo b { font-family: var(--gfont); font-weight: 400; font-size: 30px; line-height: 1.1; color: #f1effc; min-height: 33px; display: flex; align-items: center; }
.duo .on b { color: var(--accent); }
.duo span { font-size: 13px; color: var(--muted); }
.duo small { font-size: 11px; color: var(--muted); opacity: .8; }
@media (max-width: 480px) { .duo > div { min-width: 0; flex: 1 1 0; padding: 8px 10px; } .duo b { font-size: 24px; } }
.ring.small .big { font-size: 26px; }
.rank { font-family: var(--gfont); font-size: 22px; background: var(--accent); color: #2a1a00; border-radius: 12px; padding: 3px 16px; }
.rank.r-B { background: #b8e986; }
.rank.r-C, .rank.r-D { background: #ff9a9a; color: #2a0000; }
.rep-hero h1 { margin: 0; font-family: var(--gfont); font-weight: 400; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; max-width: 780px; }
.rank-scale { margin: -4px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.rank-scale .on { color: var(--text); font-weight: 800; }
.gain-note { margin: 0; font-family: var(--gfont); font-size: 20px; }
.plan-skip { margin: 0; padding: 8px 14px; border-radius: 12px; font-size: 14px; color: #ffd0d0; background: rgba(255, 138, 138, .1); border: 1px solid rgba(255, 138, 138, .45); max-width: 640px; }
.tie-note { margin: 0; font-size: 14px; color: var(--muted); max-width: 640px; }
.tie-note b { color: var(--text); }
.fw-sub { margin: -8px 0 0; }
.own-legend { margin: -8px 0 0; }
.alt .m { font-size: 11px; font-weight: 600; color: var(--muted); }
.rep-hero .stats { margin: 0; font-size: 15px; color: var(--muted); }
.rep-hero .stats b { color: var(--text); }
.actions-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.progress { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; width: min(520px, 100%); }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, #b06bff, #ffd54a); transition: width .3s; }
.status-line { font-size: 13px; color: var(--muted); text-align: center; }

.fw { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.fw > div { border-radius: 24px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.fw .good-box { border-color: rgba(125, 255, 138, .35); }
.fw .bad-box { border-color: rgba(255, 138, 138, .4); }
.fw h2 { font-size: 26px; }
.fw-row { display: flex; gap: 12px; align-items: center; }
.fw-row img { width: 42px; height: 58px; object-fit: cover; object-position: top; border-radius: 8px; flex: none; }
.fw-row .t { flex: 1; font-size: 14px; line-height: 1.35; }
.fw-row .d { font-family: var(--gfont); font-size: 20px; }

.sec-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sec-head h2 { font-size: 26px; flex: 1; }
.tiles { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; }
.tile { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 3 / 4; display: flex; flex-direction: column; justify-content: flex-end; padding: 8px; border: 2px solid rgba(255, 213, 74, .75); }
.tile.loss { border-color: rgba(255, 106, 106, .85); }
.tile.unsure { border-color: rgba(255, 255, 255, .25); }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 10, 29, 0) 35%, rgba(11, 10, 29, .94) 100%); }
.tile span { position: relative; z-index: 1; }
.tile .wr { font-family: var(--gfont); font-size: 20px; color: var(--accent); line-height: 1; }
.tile.loss .wr { color: #ff9a9a; }
.tile.unsure .wr { color: var(--text); }
.tile .nm { font-size: 11.5px; font-weight: 700; line-height: 1.2; }
.all-cards { border-radius: 18px; padding: 4px 18px; }
.all-cards summary { cursor: pointer; padding: 12px 0; font-weight: 700; }
.vs-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 26px; }
.vs-list li { display: grid; grid-template-columns: 30px minmax(0, 1fr) 54px 48px; gap: 10px; align-items: center; font-size: 13px; }
.vs-list img { width: 30px; height: 40px; object-fit: cover; object-position: top; border-radius: 5px; }
.vs-list .w { font-family: var(--gfont); text-align: right; }
.vs-list .dl { text-align: right; font-weight: 700; }
.vs-list .unsure { opacity: .55; }

.plan-card { border-radius: 24px; padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.plan-card ul { margin: 0; padding: 0 0 0 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; font-size: 14px; }

.replace { border-radius: 28px; padding: 28px; display: flex; flex-direction: column; gap: 22px; border-color: rgba(255, 213, 74, .55); background: linear-gradient(150deg, rgba(255, 213, 74, .14), rgba(176, 107, 255, .10) 50%, rgba(255, 255, 255, .03)); }
.replace .kicker { font-family: var(--gfont); font-size: 14px; color: var(--accent); letter-spacing: 2px; }
.replace h2 { font-size: clamp(30px, 4vw, 42px); line-height: 1.05; }
.replace p { margin: 0; font-size: 16px; max-width: 780px; }
.fill-opt { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.steps3 { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.steps3 li { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 16px; background: rgba(8, 0, 41, .45); font-size: 14px; }
.steps3 .n { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #2a1a00; display: grid; place-items: center; font-family: var(--gfont); font-size: 18px; flex: none; }
.own-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.own { display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 14px; border-radius: 20px; background: rgba(8, 0, 41, .3); border: 1.5px solid rgba(255, 255, 255, .1); min-width: 0; }
.own.weak { background: rgba(255, 138, 138, .08); border-color: rgba(255, 138, 138, .55); }
.own .card-box { position: relative; padding: 14px 16px 12px 20px; }
.own .weak-tag { position: absolute; top: 46%; left: 50%; transform: translateX(-50%); z-index: 3; font-family: var(--gfont); font-size: 13px; background: #ff8a8a; color: #2a0000; border-radius: 999px; padding: 4px 12px; white-space: nowrap; box-shadow: 0 4px 14px rgba(0, 0, 0, .5); }
.own .nm { font-weight: 800; font-size: 15px; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .lbl { display: flex; justify-content: space-between; font-size: 12px; }
.stat .lbl span { color: var(--muted); }
.bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; position: relative; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; }
.bar i.dmg { background: linear-gradient(90deg, #ff7a3d, #ffd54a); }
.bar i.alive { background: linear-gradient(90deg, #7b5cff, #b06bff); }
.bar .mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: #fff; }
.own .find { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 0; line-height: 1.15; padding: 8px 10px; font-size: 14px; }
.own .find small { font-family: Raleway, sans-serif; font-size: 11px; font-weight: 600; opacity: .8; letter-spacing: 0; }
.tox-line { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 14px; }
.tox-line img { width: 30px; height: 30px; vertical-align: middle; }
.note { font-size: 12.5px; color: var(--muted); text-align: center; margin: 0; }

/* ---------- meilleure carte ---------- */
.cv-head { display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; }
.cv-head h1 { margin: 0; font-family: var(--gfont); font-weight: 400; font-size: clamp(30px, 4.5vw, 50px); line-height: 1.05; }
.cv-run { display: flex; gap: 28px; align-items: center; justify-content: center; flex-wrap: wrap; }
.phases { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; max-width: 420px; }
.phases li { display: flex; gap: 10px; align-items: flex-start; }
.phases li.later { opacity: .55; }
.phases .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-family: var(--gfont); font-size: 13px; flex: none; border: 2px solid rgba(255, 255, 255, .4); }
.phases li.now .n { background: var(--accent2); border-color: var(--accent2); }
.phases li.done .n { background: var(--accent); border-color: var(--accent); color: #2a1a00; }
.lead-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lead-list li { display: grid; grid-template-columns: 32px 44px minmax(0, 1fr) minmax(0, 220px) 70px 46px auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 14px; background: rgba(255, 255, 255, .03); }
.lead-list li.cur { background: rgba(176, 107, 255, .18); }
.lead-list li.top { background: rgba(255, 213, 74, .1); }
.lead-list .rk { font-family: var(--gfont); font-size: 17px; text-align: center; color: var(--muted); }
.lead-list li.top .rk { color: var(--accent); }
.lead-list img { width: 44px; height: 60px; object-fit: cover; object-position: top; border-radius: 8px; }
.lead-list .nm { display: flex; flex-direction: column; font-size: 14px; font-weight: 700; min-width: 0; }
.lead-list .nm small { color: var(--muted); font-weight: 500; font-size: 12px; }
.lead-list .w { font-family: var(--gfont); font-size: 18px; text-align: right; }
.lead-list .m { font-size: 12px; color: var(--muted); }
.lead-list button { font-size: 13px; padding: 5px 12px; min-height: 36px; }
.ba { display: grid; grid-template-columns: minmax(0, 1fr) 96px minmax(0, 1fr); gap: 10px; align-items: center; }
.ba-panel { border-radius: 26px; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.ba-panel.after { border-color: rgba(255, 213, 74, .6); background: linear-gradient(140deg, rgba(255, 213, 74, .16), rgba(176, 107, 255, .12)); }
.ba-panel .top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ba-panel .top .gfont { font-size: 20px; }
.ba-panel .top .w { font-family: var(--gfont); font-size: 40px; }
.ba-panel .ba-vs { margin-top: -10px; text-align: right; }
.ba-panel.after .top .w, .ba-panel.after .top .gfont { color: var(--accent); }
.ba-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding: 12px 14px 12px 16px; }
.ba-cards .old .gcard { filter: grayscale(.6) drop-shadow(0 0 3px #ff8a8a); }
.ba-cards .new .gcard { filter: drop-shadow(0 0 2px #ffd54a) drop-shadow(0 0 12px rgba(255, 213, 74, .8)); }
.ba-arrow { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ba-arrow .d { font-family: var(--gfont); font-size: 24px; }
.diff { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 32px; }
.diff-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 54px 18px 54px; gap: 10px; align-items: center; font-size: 14px; }
.diff-row img { width: 40px; height: 54px; object-fit: cover; object-position: top; border-radius: 7px; }
.diff-row .a { font-family: var(--gfont); text-align: right; color: var(--muted); font-size: 17px; }
.diff-row .b { font-family: var(--gfont); font-size: 17px; }
.alts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.alt { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 10px; border-radius: 18px; background: rgba(8, 0, 41, .3); border: 1.5px solid rgba(255, 255, 255, .14); font: 700 13px Raleway, sans-serif; letter-spacing: 0; }
.alt:hover { border-color: var(--accent); background: rgba(255, 213, 74, .06); }
.alt.on { border-color: var(--accent); background: rgba(255, 213, 74, .12); }
.alt img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; border-radius: 10px; }
.alt .w { font-family: var(--gfont); font-size: 20px; font-weight: 400; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; align-items: center; }
.cta-row .btn-gold { font-size: 20px; padding: 12px 28px; min-height: 56px; }

/* ---------- petits écrans ---------- */
@media (max-width: 980px) {
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .alts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lead-list li { grid-template-columns: 26px 38px minmax(0, 1fr) 62px auto; }
  .lead-list li .bar, .lead-list li .m { display: none; }
}
@media (max-width: 820px) {
  .sim { padding: 22px 14px 48px; }
  .step { padding: 18px; border-radius: 22px; }
  .deck-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 34px; padding: 18px 18px 4px; }
  .fw, .plan-card ul, .diff, .vs-list { grid-template-columns: 1fr; }
  .own-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps3 { grid-template-columns: 1fr; }
  .ba { grid-template-columns: 1fr; }
  .ba-arrow { flex-direction: row; justify-content: center; }
  .ba-arrow svg { transform: rotate(90deg); }
  .pick-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 36px 30px; max-height: 62vh; }
  .pick-detail { position: static; }
  .ring { width: 190px; height: 190px; }
  .ring .big { font-size: 44px; }
}
@media (max-width: 560px) {
  /* Deux cartes par ligne dans la liste : une seule par ligne faisait 40 000 px à faire défiler. */
  .pick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 20px; padding: 14px 10px 18px 16px; }
  .picker-box { padding: 12px; }
  .el-filter { flex-wrap: nowrap; }
  .elb { width: 38px; height: 38px; }
  .elb img { width: 22px; height: 22px; }
  .tsel-btn { padding-right: 24px; background-position: right 9px center; font-size: 12px; }
}
@media (max-width: 480px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .alts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .own-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .big-cta { font-size: 20px; padding: 12px 24px; width: 100%; }
  .ba-cards { gap: 16px; padding: 10px 10px 10px 14px; }
}
.spin { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: -2px; border: 2px solid rgba(176, 107, 255, .35); border-top-color: var(--accent2); animation: botspin .8s linear infinite; }
/* Animations réduites (réglage du système) : pas de rotation, une pulsation douce garde l'attente visible. */
@keyframes simPulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .spin { animation: simPulse 1.4s ease-in-out infinite; border-color: var(--accent2); } }
.shared-note { margin: 0; padding: 8px 14px; border-radius: 12px; font-weight: 700; color: #ffe9a3; background: rgba(255, 213, 74, .1); border: 1px solid rgba(255, 213, 74, .45); }

/* Messages en haut de l'écran : en bas, ils recouvraient le bouton « Lancer la simulation ». */
.sim-page .toast { top: 76px; bottom: auto; }
