/* Compteur de points de vie — ProxyLayers
   Page = en-tête du site + plateau (joueurs empilés, hauteurs égales) + bandeau du bas. */

.lc-app {
  --hh: 76px;
  display: flex; flex-direction: column; height: calc(100dvh - var(--hh)); min-height: 440px;
  background: linear-gradient(rgba(6, 8, 14, .82), rgba(6, 8, 14, .9)), url(../images/compteur/terrain-3.jpg) center / cover no-repeat;
}

/* ---------- Plateau ---------- */
.lc-board { flex: 1 1 auto; min-height: 0; display: grid; grid-auto-rows: 1fr; grid-template-columns: 1fr; gap: 6px; padding: 8px 10px; background: transparent; }

.lc-tile {
  position: relative; container-type: size; overflow: hidden; border-radius: 4px 22px 4px 22px; color: #fff;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, .50), rgba(0, 0, 0, 0) 62%),
    linear-gradient(100deg, hsl(var(--h) 55% 12% / .72), hsl(var(--h) 55% 14% / .18) 55%, hsl(var(--h) 55% 10% / .55)),
    var(--art, none) center / cover no-repeat,
    hsl(var(--h) 55% 18%);
  box-shadow: inset 0 0 0 1px hsl(var(--h) 60% 62% / .45);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.lc-tile.is-low { box-shadow: inset 0 0 0 2px hsl(8 85% 58% / .85); }

/* deux zones tactiles : haut = +1, bas = −1 */
.lc-zone {
  position: absolute; left: 0; right: 0; width: 100%; height: 50%; border: 0; background: transparent; cursor: pointer;
  color: #fff; font: 400 clamp(2.6rem, 24cqh, 5.2rem) Manrope, sans-serif;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.lc-up { top: 0; padding-top: 0; display: flex; align-items: flex-start; justify-content: center; }
.lc-down { bottom: 0; padding-bottom: 0; display: flex; align-items: flex-end; justify-content: center; }
/* gros symboles + / − : très visibles, puis fondu (voir showGlyph dans compteur.js) */
.lc-gl { display: block; line-height: .8; opacity: .92; transition: opacity .25s; text-shadow: 0 2px 8px #000c, 0 0 18px #0008; pointer-events: none; }
.lc-tile.gl-off .lc-gl { opacity: 0; transition: opacity 5s linear; }
.lc-zone:active { background: rgba(255, 255, 255, .08); color: #fff; }

.lc-life {
  --fs: clamp(2.4rem, min(62cqh, 26cqw), 14rem);   /* taille du nombre de PV : le rappel du total (+3, −2…) s'y accroche et s'y adapte */
  position: absolute; z-index: 4; inset: 0; padding-top: 0; display: flex; align-items: center; justify-content: center; pointer-events: none;
}
.lc-lw { position: relative; display: inline-block; line-height: 1; }
.lc-life b {
  font: 700 var(--fs)/1 Cinzel, serif; font-variant-numeric: tabular-nums; text-shadow: 0 2px 4px #000c, 0 4px 22px #000a;
}
/* rappel du total gagné / perdu : collé au coin haut droit du nombre, proportionnel à sa taille */
.lc-delta {
  position: absolute; left: 100%; top: 4%; transform: translateX(-14%); z-index: 6; opacity: 0; transition: opacity .25s; pointer-events: none; white-space: nowrap;
  font: 700 max(10px, calc(var(--fs) * .34))/1 Cinzel, serif; background: #000a; padding: .14em .5em; border-radius: 999px; text-shadow: 0 2px 4px #000;
}
.lc-delta.show { opacity: 1; }

/* nom du joueur : grand, derrière le nombre, en haut entre le « + » et les PV */
.lc-nm {
  position: absolute; left: 4%; right: 4%; top: auto; bottom: 10%; z-index: 1; text-align: center; pointer-events: none; opacity: .75;
  font: 700 clamp(.85rem, min(17cqh, 13cqw), 4.2rem)/1.05 Cinzel, serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 2px 6px #000b, 0 0 22px #0008; letter-spacing: .02em;
}

/* bouton « + » (ajouter un marqueur), en haut à gauche, bleu comme le bandeau du bas */
.lc-addmk {
  position: absolute; left: 8px; top: 8px; z-index: 4; width: clamp(38px, 17cqh, 50px); height: clamp(38px, 17cqh, 50px); padding: 0;
  display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 4px 14px; font: 600 1.7rem/1 Manrope, sans-serif; color: var(--on-surface);
  border: 1px solid var(--outline-subtle); background: linear-gradient(105deg, color-mix(in srgb, var(--primary) 30%, var(--surface-high)), color-mix(in srgb, var(--surface) 90%, transparent) 75%);
  box-shadow: 0 2px 10px #0008; transition: border-color .2s, box-shadow .2s;
}
.lc-addmk:hover { border-color: var(--primary); box-shadow: 0 0 16px -4px var(--glow); }

/* ================= Marqueurs (v4) =================
   Toujours en rangée « − icône + ». Chaque bloc fait 44 % de la hauteur du cadre du joueur.
   1 marqueur : à gauche, centré en hauteur. 2e : à droite, centré. 3e : à droite aussi (2 blocs = 88 %, espaces égaux en haut, entre et en bas).
   4e : à gauche, même disposition ; le bouton « + » bleu disparaît alors. */
.lc-addmk { width: clamp(30px, 17cqh, 50px); height: clamp(30px, 17cqh, 50px); }
.lc-tile.is-full .lc-addmk { display: none; }
.lc-mkzone {
  --abw: clamp(30px, 17cqh, 50px);                 /* largeur du bouton « + » bleu */
  position: absolute; top: 0; bottom: 0; width: min(calc(30% - 8px), 230px);   /* 30 % à gauche / 40 % au centre (nom + PV) / 30 % à droite */ z-index: 3; pointer-events: none;
  display: flex; flex-direction: column; justify-content: space-evenly; align-items: stretch;
}
.lc-mkzone.l { left: 6px; }
.lc-mkzone.r { right: 6px; }

.lc-mw {
  pointer-events: auto; position: relative; container-type: size; flex: 0 0 44%; height: 44%; padding: 2px; border-radius: 4px 14px; overflow: hidden;
  background: linear-gradient(to top, rgba(0, 0, 0, .7), rgba(0, 0, 0, .3) 45%, transparent 75%), linear-gradient(105deg, color-mix(in srgb, var(--primary) 30%, rgba(0, 0, 0, .42)), rgba(0, 0, 0, .42) 75%);
  border: 1px solid color-mix(in srgb, var(--primary) 55%, transparent);
  box-shadow: 0 0 14px -4px var(--glow), 0 2px 10px #0006;
}
.lc-mwi { width: 100%; height: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: minmax(0, 1fr); gap: 2px; }
.lc-mw button {
  height: auto; width: clamp(12px, 22cqw, 34px); border: 0; border-radius: 3px 9px; cursor: pointer; background: color-mix(in srgb, var(--primary) 22%, transparent); color: #fff;
  font: 700 clamp(9px, 30cqh, 20px)/1 Manrope, sans-serif; display: flex; align-items: center; justify-content: center; padding: 0;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.lc-mw button:hover { background: color-mix(in srgb, var(--primary) 45%, transparent); }
.lc-mw button[data-d="-1"] { order: -1; }          /* − à gauche */
.lc-mwi .lc-mi { order: 0; }
.lc-mw button[data-d="1"] { order: 1; }            /* + à droite */
.lc-mi { position: relative; pointer-events: none; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }
.lc-ico {
  display: inline-block; flex: none; width: 1em; height: 1em; background-color: var(--ic, #fff);
  -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat;
}
.lc-mi .lc-ico { font-size: min(52cqh, 34cqw); opacity: .9; flex: none; }
.lc-mi b {
  position: relative; flex: none; margin-top: -.28em; z-index: 3; padding: .08em .5em 0; display: flex; align-items: flex-end; justify-content: center;
  font: 700 min(34cqh, 22cqw)/1 Cinzel, serif; color: #fff; text-shadow: 0 1px 3px #000, 0 0 10px #000; font-variant-numeric: lining-nums;
  background: radial-gradient(ellipse 80% 70% at 50% 60%, rgba(0, 0, 0, .7), transparent 100%);
}
/* cadre bas : le bouton « + » bleu rétrécit et se colle au coin (les blocs gardent exactement la même taille partout) */
@container (max-height: 140px) {
  .lc-addmk { width: 22px; height: 22px; left: 3px; top: 3px; font-size: 1.1rem; border-radius: 3px 9px; }
}
@container (max-height: 80px) {
  .lc-addmk { width: 18px; height: 18px; left: 1px; top: 1px; font-size: .95rem; }
}
@container (max-height: 56px) {
  .lc-addmk { width: 16px; height: 16px; font-size: .85rem; border-radius: 3px 6px; }
}

/* choix du type de marqueur */
.lc-mopts { display: grid; gap: 8px; }
.lc-mopt { display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px 12px; border-radius: 10px; cursor: pointer; border: 1px solid var(--outline-subtle); background: var(--surface-high); color: var(--on-surface); font: 600 1rem Manrope, sans-serif; }
.lc-mopt:hover { border-color: var(--primary); }
.lc-mopt[disabled] { opacity: .4; cursor: default; }
.lc-mopt .lc-ico { font-size: 2rem; }
.lc-mopt small { display: block; font-weight: 500; color: var(--on-surface-var); font-size: .8rem; line-height: 1.3; }
.lc-dead {
  position: absolute; inset: 0; z-index: 4; display: none; align-items: center; justify-content: center; gap: 10px; text-align: center;
  background: rgba(0, 0, 0, .6); pointer-events: none; font: 700 clamp(.9rem, 12cqh, 1.5rem) Manrope, sans-serif;
}
.lc-dead i { font-style: normal; font-size: clamp(1.6rem, 24cqh, 3.4rem); }
.lc-tile.is-dead .lc-dead { display: flex; }

/* ---------- Bandeau du bas (même style que l'en-tête) ---------- */
.lc-bar {
  flex: none; display: flex; align-items: stretch; justify-content: center; gap: 6px; min-height: 60px; padding: 6px 8px;
  background: color-mix(in srgb, var(--surface-lowest) 95%, transparent);
  border-top: 1px solid var(--outline-subtle); box-shadow: 0 -4px 24px rgba(0, 0, 0, .45);
}
.lc-bar .lc-bbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; padding: 8px 10px; border-radius: 4px 14px;
  border: 1px solid var(--outline-subtle); background: linear-gradient(105deg, color-mix(in srgb, var(--primary) 18%, var(--surface-high)), color-mix(in srgb, var(--surface) 90%, transparent) 70%);
  color: var(--on-surface); font: 600 .9rem Manrope, sans-serif; transition: border-color .2s, box-shadow .2s;
}
.lc-bar .lc-bbtn { flex: 1 1 0; min-width: 0; flex-direction: column; gap: 2px; line-height: 1.15; text-align: center; }
.lc-bar .lc-bbtn i { font-style: normal; font-size: 1.25rem; line-height: 1; }
.lc-bar .lc-bbtn span { font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
@media (min-width: 560px) { .lc-bar .lc-bbtn { flex-direction: row; gap: 8px; } .lc-bar .lc-bbtn span { font-size: .9rem; } }
@media (max-width: 359px) { .lc-bar { gap: 4px; padding: 6px 4px; } .lc-bar .lc-bbtn { padding: 6px 2px; } .lc-bar .lc-bbtn span { font-size: .66rem; } }
.lc-bbtn:hover { border-color: var(--primary); box-shadow: 0 0 16px -4px var(--glow); }
.lc-bbtn[disabled] { opacity: .4; cursor: default; }

/* ---------- Petites fenêtres ---------- */
.lc-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 14px; background: rgba(0, 0, 0, .6); }
.lc-modal[hidden], .lc-toast[hidden] { display: none; }
.lc-box { width: min(440px, 100%); max-height: 100%; overflow: auto; background: var(--surface); color: var(--on-surface); border: 1px solid var(--outline); border-radius: 16px; padding: 18px 20px; box-shadow: 0 12px 40px #000a; }
.lc-box h3 { margin: 0 0 14px; font: 700 1.1rem Manrope, sans-serif; display: flex; justify-content: space-between; align-items: center; }
.lc-box .lc-x { background: var(--surface-highest); color: var(--on-surface); }
.lc-addbtn { width: 100%; justify-content: center; margin-bottom: 14px; }
.lc-plist { display: grid; gap: 8px; }
.lc-pl { display: flex; align-items: center; gap: 10px; background: var(--surface-low); border: 1px solid var(--outline-subtle); border-radius: 10px; padding: 6px 8px 6px 12px; }
.lc-pl i { width: 14px; height: 14px; border-radius: 50%; flex: none; background: hsl(var(--h) 65% 50%); }
.lc-pl input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--on-surface); font: 600 1rem Manrope, sans-serif; padding: 6px 0; }
.lc-pl button { border: 0; background: transparent; color: var(--on-surface-var); cursor: pointer; font-size: 1.1rem; padding: 4px 8px; }
.lc-hint { color: var(--on-surface-var); font-size: .85rem; margin: 12px 0 0; line-height: 1.45; }
.lc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.lc-chip {
  appearance: none; cursor: pointer; padding: 9px 16px; border-radius: 999px; background: var(--surface-high); color: var(--on-surface);
  border: 1px solid var(--outline-subtle); font: 600 .95rem Manrope, sans-serif;
}
.lc-chip.is-on { background: var(--primary); color: var(--on-primary); border-color: transparent; }
.lc-field { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.lc-field input { width: 84px; height: 38px; text-align: center; border-radius: 10px; border: 1px solid var(--outline-subtle); background: var(--surface-lowest); color: var(--on-surface); font: 700 1.05rem Manrope, sans-serif; }
.lc-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.lc-log li { display: flex; gap: 10px; font-size: .92rem; padding: 6px 8px; border-radius: 8px; background: var(--surface-low); }
.lc-log time { color: var(--on-surface-var); font-variant-numeric: tabular-nums; flex: none; }

.lc-toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 110; max-width: 90%; background: #000d; color: #fff; padding: 10px 20px; border-radius: 999px; font: 700 .95rem Manrope, sans-serif; text-align: center; }


.lc-pl .lc-art { width: 46px; height: 30px; border-radius: 6px; padding: 0; border: 1px solid var(--outline); background: var(--art) center / cover; cursor: pointer; flex: none; }

/* ---------- En-tête de la page de jeu : logo au centre, ☰ à gauche (navigation) et à droite (compte, gemmes, langue, thème) ---------- */
body.lc-page .fb-footer, body.lc-page .quests-fab, body.lc-page #quests-fab, body.lc-page .seltab { display: none !important; }
body.lc-page .topbar { position: relative; height: auto; display: grid; grid-template-columns: 1fr auto 1fr; grid-template-rows: auto; padding: 4px 12px 6px; gap: 0; }
body.lc-page .topbar__left { display: contents; }
body.lc-page .brand { grid-column: 2; grid-row: 1; justify-self: center; }
body.lc-page .brand__logo { top: 0; height: 60px; }
body.lc-page #nav-burger, body.lc-page #nav-left {
  display: inline-flex !important; grid-row: 1; align-items: center; justify-content: center; width: 46px; height: 46px; padding: 0; font-size: 26px; line-height: 1; align-self: center;
}
body.lc-page #nav-burger { grid-column: 3; justify-self: end; }
body.lc-page #nav-left { grid-column: 1; justify-self: start; }
body.lc-page .mainnav { display: none; }
body.lc-page .mainnav__link { width: 92px; }
body.lc-page .topbar.nav-open .mainnav {
  display: flex; position: absolute; top: calc(100% - 2px); left: 12px; z-index: 400; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 6px; padding: 12px;
  width: min(420px, calc(100vw - 24px)); border-radius: 4px 18px; background: var(--surface-low); border: 1px solid var(--outline-subtle); box-shadow: 0 30px 70px -20px #000;
}
body.lc-page .mainnav .lc-home { flex: 1 1 100%; text-align: center; padding: 10px; border-radius: 10px; background: var(--primary); color: var(--on-primary); font: 700 .95rem Manrope, sans-serif; text-decoration: none; }
body.lc-page .topbar__right {
  display: none; position: absolute; top: calc(100% - 2px); right: 12px; z-index: 400; width: min(360px, calc(100vw - 24px));
  flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 10px; padding: 14px; border-radius: 4px 18px;
  background: var(--surface-low); border: 1px solid var(--outline-subtle); box-shadow: 0 30px 70px -20px #000;
}
body.lc-page .topbar.menu-open .topbar__right { display: flex; }
body.lc-page .topbar__right .vsep-w { display: none; }
body.lc-page .topbar__right .usercard { order: -1; flex: 1 1 100%; top: 0; justify-content: flex-start; }
body.lc-page .usercard .avwrap, body.lc-page .usercard .lvl { display: inline-block; }
body.lc-page .hdr-more, body.lc-page .hdr-more__panel { display: contents; }
body.lc-page .hdr-more__credits { display: none; }
body.lc-page .hdr-more .hdr-more__panel .theme-picker__menu { top: calc(100% + 8px); right: auto; left: 50%; transform: translateX(-50%); }

/* boutons + / − des marqueurs : même cycle que les PV (3 s visibles, fondu sur 5 s, retour à chaque changement de marqueur) */
.lc-mw button { opacity: 1; transition: opacity .25s, background .2s; }
.lc-mw.mk-off button { opacity: 0; transition: opacity 5s linear; }

/* +1 vert qui monte / −1 rouge qui descend à chaque changement de PV */
.lc-fly {
  position: absolute; z-index: 6; pointer-events: none; transform: translateX(-50%); opacity: 0;
  font: 700 clamp(2.4rem, 24cqh, 5rem) Cinzel, serif; -webkit-text-stroke: 2px rgba(0, 0, 0, .55); paint-order: stroke fill; text-shadow: 0 3px 6px #000, 0 0 18px #000c;
}
.lc-fly.up { top: 40%; color: #5dff7e; animation: lc-fly-up .95s ease-out forwards; }
.lc-fly.down { top: 52%; color: #ff5a5a; animation: lc-fly-down .95s ease-out forwards; }
@keyframes lc-fly-up { 0% { opacity: 0; transform: translate(-50%, 6px) scale(.7); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -30cqh) scale(1); } }
@keyframes lc-fly-down { 0% { opacity: 0; transform: translate(-50%, -6px) scale(.7); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, 30cqh) scale(1); } }

/* ================= Fenêtres : même style que les panneaux et boutons du reste du site ================= */
.lc-modal { background: rgba(4, 6, 14, .72); backdrop-filter: blur(3px); }
.lc-box {
  width: min(460px, 100%); padding: 20px 22px 22px; border-radius: 4px 22px;
  background: var(--gradient-card); color: var(--on-surface);
  border: 1px solid var(--outline-subtle);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 30%, transparent), 0 0 26px -6px var(--glow), 0 24px 60px -16px #000;
}
.lc-box h3 {
  margin: 0 0 16px; padding-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font: 700 1.2rem Cinzel, Georgia, serif; letter-spacing: .03em; color: var(--primary-light);
  border-bottom: 1px solid var(--outline-subtle);
}
.lc-box p { margin: 0; line-height: 1.5; }
.lc-box .iconbtn.lc-x { flex: none; width: 38px; height: 38px; font-size: 1.05rem; display: inline-flex; align-items: center; justify-content: center; padding: 0; color: var(--on-surface); cursor: pointer; }
.lc-box .fb-btn { cursor: pointer; border: 1px solid transparent; justify-content: center; padding: 12px 22px; }
.lc-box .fb-btn[disabled] { opacity: .4; cursor: default; transform: none; }
.lc-box .lc-addbtn { width: 100%; margin-bottom: 14px; }
.lc-box .lc-ghost {
  background: color-mix(in srgb, var(--surface-high) 80%, transparent); color: var(--on-surface); border-color: var(--outline-subtle);
}
.lc-box .lc-ghost:hover { border-color: var(--primary); box-shadow: 0 0 14px var(--glow); }
.lc-yn { gap: 10px; margin-top: 20px; }

/* liste des joueurs */
.lc-pl { border-radius: 4px 14px; background: color-mix(in srgb, var(--surface-low) 85%, transparent); padding: 6px 8px 6px 8px; gap: 10px; }
.lc-pl input, .lc-field input {
  background: color-mix(in srgb, var(--surface-lowest) 85%, transparent); border: 1px solid var(--outline-subtle); border-radius: 4px 10px;
  color: var(--on-surface); padding: 8px 10px; font: 600 1rem Manrope, sans-serif;
}
.lc-pl input { height: 40px; }
.lc-pl input:focus, .lc-field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 12px -2px var(--glow); }
.lc-pl .lc-art { width: 52px; height: 36px; border-radius: 4px 10px; border: 1px solid var(--outline); }
.lc-pl .lc-art:hover { border-color: var(--primary); }
.lc-pl button[data-del] { font-size: 1rem; width: 36px; height: 36px; border-radius: 4px 10px; border: 1px solid var(--outline-subtle); color: var(--on-surface-var); background: transparent; cursor: pointer; }
.lc-pl button[data-del]:hover:not([disabled]) { border-color: #ff7a7a; color: #ff9a9a; }
.lc-pl button[disabled] { opacity: .35; cursor: default; }

/* puces de PV de départ */
.lc-chip {
  border-radius: 4px 14px; padding: 10px 18px; background: color-mix(in srgb, var(--surface-high) 80%, transparent); border: 1px solid var(--outline-subtle);
  font: 600 .98rem Manrope, sans-serif; color: var(--on-surface); cursor: pointer; transition: border-color .2s, box-shadow .2s;
}
.lc-chip:hover { border-color: var(--primary); box-shadow: 0 0 12px -3px var(--glow); }
.lc-chip.is-on { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: var(--on-primary); border-color: transparent; }
.lc-field label { color: var(--on-surface-var); }
.lc-hint { color: var(--on-surface-var); font-size: .84rem; margin-top: 14px; }

/* choix du marqueur */
.lc-mopt {
  border-radius: 4px 16px; padding: 10px 14px; border: 1px solid var(--outline-subtle);
  background: linear-gradient(105deg, color-mix(in srgb, var(--primary) 16%, var(--surface-high)), color-mix(in srgb, var(--surface) 90%, transparent) 75%);
}
.lc-mopt:hover:not([disabled]) { border-color: var(--primary); box-shadow: 0 0 16px -4px var(--glow); }
.lc-mopt > span { font: 700 1.02rem Cinzel, Georgia, serif; letter-spacing: .02em; }
.lc-mopt small { font: 500 .8rem Manrope, sans-serif; margin-top: 2px; }
.lc-mopt .lc-ico { background-color: #fff; }

/* historique */
.lc-log li { border-radius: 4px 10px; background: color-mix(in srgb, var(--surface-low) 85%, transparent); border: 1px solid var(--outline-subtle); }

/* types de partie */
.lc-modes { display: grid; gap: 8px; margin-bottom: 16px; max-height: min(40dvh, 340px); overflow-y: auto; padding-right: 4px; overscroll-behavior: contain; }
.lc-mode {
  display: block; text-align: left; padding: 10px 14px; border-radius: 4px 16px; cursor: pointer; color: var(--on-surface);
  border: 1px solid var(--outline-subtle); background: color-mix(in srgb, var(--surface-high) 75%, transparent); transition: border-color .2s, box-shadow .2s;
}
.lc-mode b { display: block; font: 700 1.02rem Cinzel, Georgia, serif; letter-spacing: .02em; }
.lc-mode small { display: block; margin-top: 3px; font: 500 .8rem/1.35 Manrope, sans-serif; color: var(--on-surface-var); }
.lc-mode:hover { border-color: var(--primary); box-shadow: 0 0 14px -4px var(--glow); }
.lc-mode.is-on { border-color: var(--primary); background: linear-gradient(105deg, color-mix(in srgb, var(--primary) 30%, var(--surface-high)), color-mix(in srgb, var(--surface) 90%, transparent) 80%); box-shadow: 0 0 16px -4px var(--glow); }
.lc-num { display: inline-flex; align-items: center; gap: 8px; }
.lc-num b { min-width: 2ch; text-align: center; font: 700 1.2rem Cinzel, serif; }
.lc-num button { width: 38px; height: 38px; border-radius: 4px 10px; border: 1px solid var(--outline-subtle); background: color-mix(in srgb, var(--surface-high) 80%, transparent); color: var(--on-surface); font-size: 1.25rem; cursor: pointer; }
.lc-num button:hover:not([disabled]) { border-color: var(--primary); }
.lc-num button[disabled] { opacity: .35; cursor: default; }
.lc-box .lc-ghost.lc-addbtn { margin-top: -4px; }

/* ligne des PV : « PV : 20 25 30 40 [   ] » sur une seule ligne */
.lc-lifeline { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; flex-wrap: nowrap; }
.lc-lifelab { font: 700 1rem Cinzel, serif; color: var(--primary-light); margin-right: 2px; flex: none; }
.lc-lifeline .lc-chip { padding: 9px 0; min-width: 0; flex: 1 1 0; text-align: center; }
.lc-lifeline input { flex: 1.3 1 0; min-width: 0; width: 100%; height: 40px; text-align: center; border-radius: 4px 10px; border: 1px solid var(--outline-subtle); background: color-mix(in srgb, var(--surface-lowest) 85%, transparent); color: var(--on-surface); font: 700 1rem Manrope, sans-serif; }
.lc-lifeline input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 12px -2px var(--glow); }

/* « Nouvelle partie » : la fenêtre occupe toute la hauteur disponible ; la liste des formats s'étend (plus de défilement si la page est assez grande) */
.lc-box.lc-game-box { display: flex; flex-direction: column; overflow: hidden; max-height: calc(100dvh - 28px); }
.lc-game-box > * { flex: none; }
.lc-game-box > .lc-modes, .lc-game-box > .lc-plist { flex: 1 1 auto; min-height: 120px; max-height: none; overflow-y: auto; }

/* bouton « Lancer la partie » (fenêtre Joueurs) */
.lc-box .lc-small { display: flex; margin: 16px auto 0; padding: 10px 30px; }

/* fenêtre Joueurs, « Équipes contre équipes » : un bloc par équipe avec ses joueurs */
.lc-plist { gap: 14px; }
.lc-pteam {
  position: relative; display: grid; gap: 8px; padding: 18px 8px 8px; border-radius: 4px 18px 4px 18px;
  border: 1px solid hsl(var(--th) 65% 55% / .7); background: hsl(var(--th) 55% 18% / .35); box-shadow: 0 0 16px -6px hsl(var(--th) 80% 55% / .6);
}
.lc-ptag {
  position: absolute; left: 14px; top: 0; transform: translateY(-50%); padding: 1px 12px; border-radius: 999px;
  font: 700 .72rem Cinzel, serif; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
  background: hsl(var(--th) 60% 22%); color: #fff; border: 1px solid hsl(var(--th) 65% 55% / .8);
}
.lc-game-box > .lc-plist { padding: 12px 4px 4px; }

/* ligne « PV partagés » + nombre d'équipes */
.lc-teamrow { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lc-share { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font: 700 .95rem Manrope, sans-serif; color: var(--on-surface); white-space: nowrap; }
.lc-share input { width: 20px; height: 20px; accent-color: var(--primary); cursor: pointer; margin: 0; }
.lc-teamgrp { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; }
.lc-teamlab { color: var(--on-surface-var); }

/* bandeau du bas : grosses icônes du site, texte devant */
.lc-bar { min-height: 74px; }
.lc-bar .lc-bbtn.lc-icobtn { position: relative; overflow: hidden; flex-direction: column; justify-content: center; align-items: center; padding: 4px 2px; min-height: 62px; }
.lc-bar .lc-bbtn.lc-icobtn .lc-bi {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: auto; height: 76%; max-width: 90%; object-fit: contain;
  filter: drop-shadow(0 2px 4px #0008); pointer-events: none;
}
.lc-bar .lc-bbtn.lc-icobtn span {
  position: relative; z-index: 2; margin-top: auto; padding-bottom: 3px; font: 800 .72rem/1.1 Manrope, sans-serif; letter-spacing: .02em; color: #fff;
  text-shadow: 0 1px 2px #000, 0 0 6px #000, 0 0 10px #000b; -webkit-text-stroke: .4px rgba(0, 0, 0, .55); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (min-width: 560px) { .lc-bar .lc-bbtn.lc-icobtn { flex-direction: column; } .lc-bar .lc-bbtn.lc-icobtn span { font-size: .85rem; } }
@media (max-width: 359px) { .lc-bar .lc-bbtn.lc-icobtn span { font-size: .62rem; } }
@media (max-width: 420px) { .lc-bar .lc-bbtn.lc-icobtn span { white-space: normal; text-align: center; overflow: visible; } }

/* ================= Mode paysage (téléphone couché, fenêtre basse) ================= */
@media (max-height: 560px) and (min-aspect-ratio: 1/1) {
  .lc-app { min-height: 0; }
  body.lc-page .topbar { padding: 2px 10px; }
  body.lc-page .brand__logo { height: 38px; }
  body.lc-page #nav-burger, body.lc-page #nav-left { width: 38px; height: 38px; font-size: 22px; }
  /* les joueurs passent côte à côte au lieu d'être empilés */
  .lc-board { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(var(--rows, 1), minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); padding: 6px 8px; }
  .lc-board > .lc-tile { grid-column: var(--gc, auto); grid-row: var(--gr, auto) / span var(--gs, 1); }
  /* bandeau du bas plus bas */
  .lc-bar { min-height: 50px; padding: 4px 8px; }
  .lc-bar .lc-bbtn.lc-icobtn { min-height: 42px; }
  .lc-bar .lc-bbtn.lc-icobtn .lc-bi { height: 70%; top: 40%; }
  .lc-bar .lc-bbtn.lc-icobtn span { font-size: .66rem; padding-bottom: 1px; }
  .lc-box { padding: 14px 16px 16px; }
}

/* petits écrans : fenêtres plus compactes pour laisser la place à la liste */
@media (max-height: 700px) {
  .lc-game-box .lc-hint { display: none; }
  .lc-box { padding: 14px 16px 16px; }
  .lc-box h3 { margin-bottom: 10px; padding-bottom: 8px; }
  .lc-game-box .lc-field { margin-bottom: 8px; }
  .lc-game-box .lc-lifeline { margin-bottom: 10px; }
  .lc-game-box .lc-modes { margin-bottom: 10px; }
  .lc-box .lc-small { margin-top: 10px; }
}

.lc-steprow { display: flex; flex-wrap: wrap; column-gap: 22px; }
/* paysage : fenêtres plus larges, listes de joueurs sur deux colonnes */
@media (max-height: 560px) and (min-aspect-ratio: 1/1) {
  .lc-box { width: min(640px, 100%); }
  .lc-game-box > .lc-plist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 14px 10px; }
  .lc-game-box .lc-lifeline { max-width: 420px; }
}

/* paysage bas : les formats deviennent des puces sur une ligne, le format choisi s'ouvre en dessous avec son texte */
@media (max-height: 460px) and (min-aspect-ratio: 1/1) {
  .lc-game-box > .lc-modes { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; }
  .lc-game-box .lc-mode { flex: 0 0 auto; padding: 7px 12px; }
  .lc-game-box .lc-mode.is-on { flex: 1 1 100%; order: 99; }
  .lc-game-box .lc-mode small { font-size: .74rem; }
}

/* cadres minuscules (8 joueurs sur un petit écran) : le nom passe en petit au-dessus du nombre, qui reste lisible */
@container (max-height: 80px) {
  .lc-nm { top: auto; bottom: 4%; font-size: .62rem; line-height: 1.1; letter-spacing: 0; }
  .lc-life { --fs: clamp(1.3rem, 52cqh, 3rem); }
  .lc-zone { font-size: 1.1rem; }
}

/* avec des marqueurs, le nom se range dans l'espace central (entre les deux colonnes de blocs) */
.lc-tile.has-mk .lc-nm { left: 30%; right: 30%; font-size: clamp(.6rem, min(17cqh, 5cqw), 4.2rem); }

/* nombre de PV à 3 caractères (100, −10…) : plus petit pour rester dans les 40 % du centre */
.lc-life.d3 { --fs: clamp(1.6rem, min(62cqh, 19cqw), 14rem); }
@container (max-height: 80px) { .lc-life.d3 { --fs: clamp(1.3rem, min(52cqh, 19cqw), 3rem); } }

/* fenêtre Joueurs sur téléphone : les lignes ne dépassent plus (le champ de nom se réduit, la corbeille reste visible) */
.lc-plist, .lc-pteam { grid-template-columns: minmax(0, 1fr); }
.lc-game-box > .lc-plist { overflow-x: hidden; }
.lc-pl { min-width: 0; }
.lc-pl input { width: 0; flex: 1 1 0; min-width: 0; }
.lc-pl .lc-art, .lc-pl button[data-del] { flex: none; }
@media (max-width: 400px) {
  .lc-pl { gap: 6px; padding: 5px 6px; }
  .lc-pl .lc-art { width: 42px; height: 32px; }
  .lc-pl input { height: 36px; padding: 6px 8px; font-size: .95rem; }
  .lc-pl button[data-del] { width: 32px; height: 32px; padding: 0; }
  .lc-box { padding: 12px 12px 14px; }
}

/* ================= Titre de partie, Historique, Terminer, Stats ================= */
.lc-titlefield { margin-bottom: 12px; }
.lc-titlefield input, .lc-gmeta input, .lc-field select {
  width: 100%; height: 40px; padding: 8px 12px; border-radius: 4px 10px; border: 1px solid var(--outline-subtle);
  background: color-mix(in srgb, var(--surface-lowest) 85%, transparent); color: var(--on-surface); font: 600 1rem Manrope, sans-serif;
}
.lc-titlefield input:focus, .lc-gmeta input:focus, .lc-field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 12px -2px var(--glow); }
.lc-field select { width: auto; flex: 1; min-width: 0; }
.lc-gmeta { margin-bottom: 10px; }
.lc-gmeta time { display: block; margin-top: 4px; font-size: .82rem; color: var(--on-surface-var); }
.lc-game-box > .lc-log, .lc-game-box > .lc-scroll, .lc-game-box > .lc-picks { flex: 1 1 auto; min-height: 70px; overflow: auto; }
.lc-hbtns { display: grid; gap: 8px; margin-top: 12px; }
.lc-hbtns .fb-btn { width: 100%; }
.lc-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.lc-tabs .lc-chip { padding: 8px 14px; }

/* Terminer : choix du gagnant */
.lc-picks { display: grid; gap: 8px; padding: 2px; }
.lc-pickp {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 4px 14px; cursor: pointer; text-align: left;
  border: 1px solid var(--outline-subtle); background: color-mix(in srgb, var(--surface-high) 80%, transparent); color: var(--on-surface); font: 700 1rem Manrope, sans-serif;
}
.lc-pickp i { width: 14px; height: 14px; border-radius: 50%; flex: none; background: hsl(var(--h) 65% 50%); }
.lc-pickp span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-pickp small { color: var(--on-surface-var); font-weight: 500; }
.lc-pickp.is-on { border-color: #ffd24d; background: linear-gradient(105deg, rgba(255, 210, 77, .28), rgba(255, 210, 77, .08)); box-shadow: 0 0 14px -4px #ffd24d; }
.lc-pickp.is-on::after { content: "🏆"; }

/* tableaux de stats */
.lc-statsbody { padding-right: 2px; }
.lc-tbl { width: 100%; border-collapse: separate; border-spacing: 3px; font: 600 .9rem Manrope, sans-serif; }
.lc-tbl th, .lc-tbl td { padding: 7px 8px; text-align: center; border-radius: 4px 8px; background: color-mix(in srgb, var(--surface-low) 85%, transparent); border: 1px solid var(--outline-subtle); white-space: nowrap; }
.lc-tbl thead th { background: color-mix(in srgb, var(--primary) 22%, var(--surface-high)); font: 700 .8rem Cinzel, serif; }
.lc-tbl th.lc-tn { text-align: left; position: sticky; left: 0; z-index: 1; background: var(--surface-high); max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.lc-tbl td.w { background: linear-gradient(135deg, rgba(255, 210, 77, .55), rgba(255, 210, 77, .22)); border-color: #ffd24d; color: #fff; font-weight: 800; }
.lc-tbl td.l { color: var(--on-surface-var); }
.lc-tbl td.a { opacity: .4; }
.lc-tbl td.lose { background: rgba(255, 90, 90, .2); border-color: #ff7a7a; }
.lc-tbl .lc-tt { font-weight: 800; color: var(--primary-light); }
.lc-h4 { margin: 16px 0 6px; font: 700 .85rem Cinzel, serif; color: var(--primary-light); letter-spacing: .04em; }
.lc-glist { margin: 12px 0 0; padding-left: 22px; font-size: .85rem; line-height: 1.5; color: var(--on-surface); }
.lc-glist b { font-weight: 700; }
.lc-glistfull { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lc-glistfull li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 4px 10px; background: color-mix(in srgb, var(--surface-low) 85%, transparent); border: 1px solid var(--outline-subtle); }
.lc-glistfull li > div { flex: 1; min-width: 0; }
.lc-glistfull b { display: block; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-glistfull small { display: block; color: var(--on-surface-var); font-size: .78rem; }
.lc-delg { flex: none; width: 30px; height: 30px; border-radius: 4px 9px; border: 1px solid var(--outline-subtle); background: transparent; color: var(--on-surface-var); cursor: pointer; }
.lc-delg:hover { border-color: #ff7a7a; color: #ff9a9a; }

/* classement */
.lc-rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lc-rank li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 4px 14px; background: color-mix(in srgb, var(--surface-low) 85%, transparent); border: 1px solid var(--outline-subtle); }
.lc-rank li:first-child { border-color: #ffd24d; box-shadow: 0 0 16px -6px #ffd24d; }
.lc-rk { flex: none; width: 34px; text-align: center; font: 700 1.3rem Cinzel, serif; }
.lc-rkt { flex: 1; min-width: 0; font-size: .95rem; line-height: 1.35; }
.lc-rkt b { font-weight: 800; }
.lc-rkt small { display: block; color: var(--on-surface-var); font-size: .78rem; }
.lc-rkb { display: block; height: 6px; margin-top: 6px; border-radius: 999px; background: #fff1; overflow: hidden; }
.lc-rkb u { display: block; height: 100%; text-decoration: none; border-radius: 999px; background: linear-gradient(90deg, var(--primary), #ffd24d); }

/* bouton « Installer l'application » (menu ☰ de gauche) + mode d'emploi */
body.lc-page .mainnav .lc-install { flex: 1 1 100%; cursor: pointer; border: 1px solid var(--outline-subtle); background: color-mix(in srgb, var(--surface-high) 85%, transparent); color: var(--on-surface); }
body.lc-page .mainnav .lc-install:hover { border-color: var(--primary); }
.lc-steps { margin: 0 0 12px; padding-left: 22px; line-height: 1.7; }

/* ---------- Confirmation de défaite : message fixe, « Oui, éliminé » / « Non » ---------- */
.lc-ask {
  position: absolute; inset: 0; z-index: 6; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 8px;
  background: rgba(0, 0, 0, .78); color: #fff; border: 2px solid #ff5a5a; text-align: center; font: 700 clamp(.9rem, 11cqh, 1.5rem) Manrope, sans-serif;
}
.lc-askbtns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.lc-askbtns button { cursor: pointer; font: 700 clamp(.8rem, 9cqh, 1.2rem) Manrope, sans-serif; padding: .5em 1em; border-radius: 10px; border: 2px solid #fff3; color: #fff; background: #ffffff1a; }
.lc-askbtns .lc-askyes { background: #c93a3a; border-color: #ff8a8a; }
.lc-tile.is-ask .lc-ask { display: flex; }
/* tête de mort (haut à droite) : réapparaît quand on a répondu « Non » ; un clic repose la question */
.lc-skull { position: absolute; top: 6px; right: 6px; z-index: 5; display: none; width: clamp(34px, 18cqh, 54px); height: clamp(34px, 18cqh, 54px); padding: 0; border-radius: 50%; cursor: pointer; font-size: clamp(1.1rem, 10cqh, 1.8rem); line-height: 1;
  background: rgba(0, 0, 0, .6); border: 2px solid #ff5a5a; box-shadow: 0 0 14px -2px #ff5a5a; }
.lc-tile.has-skull .lc-skull { display: flex; align-items: center; justify-content: center; }
/* choix du compte lié à une place */
.lc-pl select { flex: 0 1 38%; min-width: 0; height: 36px; background: var(--surface-low); color: var(--on-surface); border: 1px solid var(--outline-subtle); border-radius: 4px 10px; font: 600 .8rem Manrope, sans-serif; padding: 0 6px; }
.lc-pl select:focus { outline: none; border-color: var(--primary); }
.lc-frstats p { margin: 4px 0 10px; }

/* Boutons « ami » / « joueur » + sélecteur d'amis */
.lc-addrow { display: flex; gap: 10px; margin-bottom: 14px; }
.lc-addrow .fb-btn { flex: 1 1 0; justify-content: center; }
.lc-fpick { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lc-fpick button { width: 100%; display: flex; align-items: baseline; gap: 6px; text-align: left; padding: 12px 14px; border-radius: 4px 14px; cursor: pointer;
  border: 1px solid var(--outline-subtle); background: color-mix(in srgb, var(--surface-low) 85%, transparent); color: var(--on-surface); font: 600 1rem Manrope, sans-serif; }
.lc-fpick button:hover:not([disabled]) { border-color: var(--primary); box-shadow: 0 0 12px -2px var(--glow); }
.lc-fpick button[disabled] { opacity: .45; cursor: default; }
.lc-fpick i { font-style: normal; opacity: .6; font-weight: 500; }
.lc-fpick small { margin-left: auto; font-weight: 500; opacity: .7; }
.lc-fpick small.on { color: #3ddc84; opacity: 1; }

/* avatar du joueur (compte lié) : grand cercle derrière le nom et les PV */
.lc-av { display: none; position: absolute; z-index: 0; left: 50%; top: 7%; transform: translateX(-50%); width: min(68.8cqh, 49.3cqw); aspect-ratio: 1; border-radius: 50%;
  background: center / cover no-repeat; opacity: 1; pointer-events: none; box-shadow: 0 0 0 2px hsl(var(--h) 60% 70% / .55), 0 6px 26px #000a; }
.lc-tile.has-av .lc-av { display: block; }

/* 4 joueurs : nom 2 % plus bas. 3 à 8 joueurs : l’avatar fait 85 % de sa taille à 2 joueurs (portrait ou paysage), centré en hauteur (coupé en haut et en bas s'il dépasse le bloc) */
.lc-board[data-n="4"] .lc-nm { bottom: 8%; }
.lc-board:not([data-n="2"]) .lc-av { top: 50%; transform: translate(-50%, -50%); width: calc(var(--avs, 0px) * .85); }

/* paysage (téléphone couché), 2 joueurs : avatar 15 % plus grand */
@media (max-height: 560px) and (min-aspect-ratio: 1/1) {
  .lc-board[data-n="2"] .lc-av { width: min(79.1cqh, 56.7cqw); }
}

/* paysage, 3 joueurs : le grand bloc du joueur 1 reçoit un avatar plus grand (comme en vertical) */
@media (max-height: 560px) and (min-aspect-ratio: 1/1) {
  .lc-board[data-n="3"] .lc-tile:first-child .lc-av { width: calc(var(--avs, 0px) * 1.15); }
}
/* petits blocs (6 joueurs et plus ; 3e, 4e, 5e joueur à 5 joueurs en paysage) : le pseudo se range à droite du bouton « + », sur sa ligne.
   Le bouton rétrécit avec le bloc (22 px, 18 px puis 16 px) : le pseudo suit sa taille réelle. */
@container (max-height: 105px) {
  .lc-tile:not(.has-mk) .lc-nm { top: 3px; bottom: auto; left: 31px; right: 4%; text-align: left; height: 22px; line-height: 22px; font-size: clamp(.7rem, 20cqh, .95rem); }
}
@container (max-height: 80px) {
  .lc-tile:not(.has-mk) .lc-nm { top: 1px; left: 25px; height: 18px; line-height: 18px; font-size: .68rem; }
}
@container (max-height: 56px) {
  .lc-tile:not(.has-mk) .lc-nm { left: 23px; height: 16px; line-height: 16px; font-size: .62rem; }
}

/* ---------- Layers, la mascotte : apparaît dans un coin, bulle AU-DESSUS de lui, puis repart ---------- */
.lc-ly {
  position: fixed; right: 4px; bottom: var(--ly-bottom, 70px); z-index: 60; display: flex; flex-direction: column; align-items: flex-end; pointer-events: none;
  max-width: calc(100vw - 8px);
  transform: translateX(115%); opacity: 0; transition: transform .5s cubic-bezier(.2, 1.35, .4, 1), opacity .3s;
}
.lc-ly.is-in { transform: none; opacity: 1; }
.lc-ly.is-out { transform: translateX(115%); opacity: 0; transition: transform .45s ease-in, opacity .4s; }
/* Layers en gros plan : seul le haut du corps (chapeau, visage) est visible, le bas se fond doucement */
.lc-ly__ph { position: relative; flex: none; width: min(74vw, clamp(230px, 42vh, 380px)); aspect-ratio: 703 / 618; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 78%, transparent 100%); mask-image: linear-gradient(#000 78%, transparent 100%); }
.lc-ly__img { display: block; width: 100%; height: auto; filter: drop-shadow(0 6px 12px #000a); }
/* bulle dans le style du site : verre sombre, liseré lumineux, texte blanc ; posée au-dessus de la tête */
.lc-ly__bubble {
  position: relative; z-index: 1; align-self: flex-end; margin: 0 14px -14px 0; max-width: min(88vw, 340px); padding: 12px 16px; border-radius: 4px 18px;
  background: linear-gradient(105deg, color-mix(in srgb, var(--primary) 22%, var(--surface-high)) 0%, color-mix(in srgb, var(--surface) 94%, transparent) 70%);
  border: 1px solid color-mix(in srgb, var(--primary-light, var(--primary)) 55%, transparent);
  color: #fff; font: 600 1rem/1.35 Manrope, system-ui, sans-serif; text-align: left; text-shadow: 0 1px 2px #000a;
  box-shadow: 0 8px 26px #000b, 0 0 18px -4px var(--glow, rgba(90, 160, 255, .5)), inset 0 0 0 1px rgba(255, 255, 255, .05);
  backdrop-filter: blur(4px);
  transform: scale(.6); transform-origin: bottom right; opacity: 0; transition: transform .35s cubic-bezier(.2, 1.6, .4, 1) .3s, opacity .2s .3s;
}
.lc-ly__bubble::after { content: ""; position: absolute; right: 52px; bottom: -8px; width: 14px; height: 14px; transform: rotate(45deg); border-radius: 2px;
  background: color-mix(in srgb, var(--surface) 96%, var(--primary) 4%); border-right: 1px solid color-mix(in srgb, var(--primary-light, var(--primary)) 55%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--primary-light, var(--primary)) 55%, transparent); }
.lc-ly.is-in .lc-ly__bubble { transform: none; opacity: 1; }
@media (max-height: 560px) and (min-aspect-ratio: 1/1) {
  .lc-ly__ph { width: clamp(170px, 56vh, 250px); }
  .lc-ly__bubble { font-size: .85rem; padding: 8px 12px; max-width: min(60vw, 320px); margin-bottom: -10px; }
}
@media (prefers-reduced-motion: reduce) { .lc-ly, .lc-ly.is-out, .lc-ly__bubble { transition: opacity .2s; transform: none; } }

/* ---------- Layers : bloc du joueur concerné illuminé, larmes des autres blocs, réglages ---------- */
.lc-tile.is-ly { animation: lyGlow 1.1s ease-in-out 3; }
@keyframes lyGlow { 0%, 100% { box-shadow: inset 0 0 0 1px hsl(var(--h) 60% 62% / .45); } 50% { box-shadow: inset 0 0 0 4px #9fd0ff, inset 0 0 40px 6px rgba(120, 190, 255, .45); } }
.lc-tile.is-ly-tear::before, .lc-tile.is-ly-tear::after {
  content: ""; position: absolute; z-index: 5; top: 34%; width: 9px; height: 14px; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; pointer-events: none;
  background: radial-gradient(circle at 35% 30%, #fff 0, #bfe6ff 35%, #4aa8ff 100%); opacity: 0; animation: lyTear 1.9s ease-in infinite;
}
.lc-tile.is-ly-tear::before { left: 30%; }
.lc-tile.is-ly-tear::after { right: 30%; animation-delay: .7s; }
@keyframes lyTear { 0% { opacity: 0; transform: translateY(0) scale(.6); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateY(46px) scale(1); } }
.lc-lyrow { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 4px; border-bottom: 1px solid var(--outline-subtle); }
.lc-lyrow__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lc-lyrow__txt small { opacity: .7; font-weight: 500; line-height: 1.3; }
.lc-lyrow--freq { flex-wrap: wrap; }
.lc-lyfreq { display: flex; align-items: center; gap: 8px; font-size: .8rem; opacity: .9; }
.lc-lyfreq span { opacity: .55; } .lc-lyfreq span.is-on { opacity: 1; font-weight: 700; color: var(--primary); }
.lc-lyfreq { flex-wrap: wrap; justify-content: flex-end; }
.lc-lyslide { order: 5; flex: 1 0 100%; width: 100%; margin: 4px 0 0; accent-color: var(--primary); }
.lc-sw { flex: none; position: relative; width: 52px; height: 30px; border-radius: 999px; border: 1px solid var(--outline); background: color-mix(in srgb, var(--surface-high) 80%, transparent); cursor: pointer; transition: background .2s; padding: 0; }
.lc-sw i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #cfd6ff; transition: transform .2s; }
.lc-sw.is-on { background: var(--primary); border-color: transparent; }
.lc-sw.is-on i { transform: translateX(22px); background: #fff; }
@media (prefers-reduced-motion: reduce) { .lc-tile.is-ly, .lc-tile.is-ly-tear::before, .lc-tile.is-ly-tear::after { animation: none; } }

/* écran de fin de partie */
.lc-endwho { margin: 0 0 6px; font: 600 1.15rem Manrope, sans-serif; text-align: center; }
.lc-endwho b { color: var(--primary); }

/* ---------- Sur PC seulement : le compteur reste un « écran de tablette » centré (souris + grand écran ; tablettes et téléphones inchangés) ---------- */
@media (hover: hover) and (pointer: fine) and (min-width: 900px) {
  body.lc-page { background: #05070d; }
  .lc-app {
    width: min(780px, calc((100dvh - var(--hh)) * 0.75)); min-width: 340px; margin: 0 auto;
    border-left: 1px solid var(--outline-subtle); border-right: 1px solid var(--outline-subtle);
    box-shadow: 0 0 60px rgba(0, 0, 0, .7), 0 0 0 1px #0008; overflow: hidden;
  }
}

/* ---------- Accueil non bloquant + grandes fenêtres (Joueurs, Ajouter un ami) ---------- */
/* accueil : ne couvre que l'espace entre l'en-tête et la barre du bas (top/bottom posés par js/compteur.js, placeGate) : les deux barres restent cliquables */
.lc-modal.lc-modal--gate { inset: auto; left: 0; right: 0; }
/* grande fenêtre : presque tout l'écran du téléphone, la liste d'amis prend toute la place disponible */
.lc-modal.lc-modal--big { padding: 8px; }
.lc-modal--big .lc-box.lc-big { width: min(560px, 100%); height: calc(100dvh - 16px); max-height: none; }
.lc-box.lc-big > .lc-scroll, .lc-box.lc-big > .lc-plist { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; }
.lc-box.lc-big .lc-fpick { gap: 10px; }
.lc-box.lc-big .lc-fpick button { padding: 16px 16px; font-size: 1.05rem; }
.lc-box.lc-big > .lc-plist { align-content: start; }

/* ma place dans « Joueurs » (créateur de la partie) : verrouillée */
.lc-pl.is-me { border-color: color-mix(in srgb, var(--primary) 55%, var(--outline-subtle)); }
.lc-pl.is-me input { opacity: .9; pointer-events: none; }
.lc-melock { flex: none; font: 700 .78rem Manrope, sans-serif; color: var(--primary-light); padding: 0 6px; white-space: nowrap; }

/* ---------- Draft : choix de l'édition, préparation (capacités), soirées, tableau de victoires ---------- */
.lc-modal.lc-modal--dr { padding: 8px; }
.lc-box.lc-dr { width: min(560px, 100%); height: 100%; max-height: none; display: flex; flex-direction: column; overflow: hidden; padding: 14px 12px 12px; }
.lc-dr > h3 { flex: none; margin-bottom: 10px; }
.dr-q { flex: none; width: 100%; margin: 0 0 10px; height: 40px; padding: 0 12px; border-radius: 4px 10px; border: 1px solid var(--outline-subtle); background: color-mix(in srgb, var(--surface-lowest) 85%, transparent); color: var(--on-surface); font: 600 .95rem Manrope, sans-serif; }
.dr-q:focus, .dr-nm input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 12px -2px var(--glow); }
.dr-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-right: 2px; }
.dr-foot { flex: none; display: grid; gap: 8px; padding-top: 10px; margin-top: 8px; border-top: 1px solid var(--outline-subtle); }
.dr-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.dr-btns .fb-btn { flex: 1 1 140px; justify-content: center; }
.dr-info { margin: 0; font: 600 .85rem/1.4 Manrope, sans-serif; color: var(--on-surface); }
.dr-sub { flex: none; margin: -4px 0 10px; font: 600 .9rem Manrope, sans-serif; color: var(--on-surface-var); }
.dr-year { margin: 14px 2px 8px; font: 700 .95rem Cinzel, serif; color: var(--primary-light); letter-spacing: .04em; }
.dr-year:first-child { margin-top: 2px; }
/* grille de logos : 3 par ligne sur un téléphone d'environ 300 px, jusqu'à 5 sur les écrans plus larges */
.dr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 430px) { .dr-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 520px) { .dr-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.dr-ed { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 8px; min-width: 0; border-radius: 4px 12px; border: 1px solid var(--outline-subtle); cursor: pointer;
  background: color-mix(in srgb, var(--surface-low) 85%, transparent); color: var(--on-surface); }
.dr-ed:hover { border-color: var(--primary); }
.dr-ed.is-on { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 24%, transparent); box-shadow: 0 0 14px -2px var(--glow); }
.dr-ico { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: #fff; }
.dr-ico svg { width: 100%; height: 100%; }
.dr-ico svg, .dr-ico svg path { fill: currentColor !important; }
.dr-code { font: 700 .85rem Manrope, sans-serif; opacity: .75; }
.dr-name { max-width: 100%; font: 600 .68rem/1.2 Manrope, sans-serif; text-align: center; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dr-nm { flex: none; display: grid; gap: 4px; margin-bottom: 10px; font: 600 .78rem Manrope, sans-serif; color: var(--on-surface-var); }
.dr-nm input { height: 40px; padding: 0 12px; border-radius: 4px 10px; border: 1px solid var(--outline-subtle); background: color-mix(in srgb, var(--surface-lowest) 85%, transparent); color: var(--on-surface); font: 600 .95rem Manrope, sans-serif; }
.dr-sec { margin: 14px 2px 8px; font: 700 .95rem Cinzel, serif; color: var(--primary-light); }
.dr-sec:first-child { margin-top: 2px; }
.dr-sec small { font: 500 .72rem Manrope, sans-serif; opacity: .7; }
.dr-cap { margin-bottom: 8px; padding: 12px 12px 10px; border-radius: 4px 12px; border: 1px solid var(--outline-subtle); background: color-mix(in srgb, var(--surface-low) 85%, transparent); }
.dr-cap.is-new { border-color: var(--primary); box-shadow: 0 0 14px -6px var(--glow); }
.dr-cap-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.dr-cap-h b { font: 700 1.02rem Manrope, sans-serif; }
.dr-en { opacity: .65; font-size: .8rem; }
.dr-new { font: 700 .66rem Manrope, sans-serif; font-style: normal; text-transform: uppercase; letter-spacing: .05em; padding: 2px 7px; border-radius: 6px; background: var(--primary); color: var(--on-primary); }
.dr-tag { margin-left: auto; font: 600 .64rem Manrope, sans-serif; text-transform: uppercase; letter-spacing: .04em; opacity: .75; padding: 2px 6px; border: 1px solid var(--outline-subtle); border-radius: 6px; }
.dr-cap p { margin: 6px 0; font-size: .9rem; line-height: 1.5; }
.dr-cap small { opacity: .65; font-size: .74rem; }
.dr-mana { display: inline-block; min-width: 1.4em; padding: 0 .3em; margin: 0 1px; border-radius: 999px; background: var(--surface-highest); border: 1px solid var(--outline-subtle); font: 700 .78em Manrope, sans-serif; text-align: center; }
.dr-soi { margin-bottom: 10px; padding: 12px; border-radius: 4px 12px; border: 1px solid var(--outline-subtle); background: color-mix(in srgb, var(--surface-low) 85%, transparent); }
.dr-soi h5 { margin: 0 0 4px; font: 700 .95rem Manrope, sans-serif; }
.dr-soi-who { margin: 0 0 8px; font-size: .82rem; opacity: .8; }
.dr-rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.dr-rank li { display: flex; gap: 8px; align-items: baseline; font-size: .9rem; }
.dr-rank li span { flex: 1; min-width: 0; }
.dr-rank em { opacity: .6; font-style: normal; font-size: .78rem; }
.dr-parts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dr-parts li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border: 1px solid var(--outline-subtle); border-radius: 8px; font-size: .9rem; }
.dr-hub { margin-top: 12px; padding: 12px; border: 1px solid var(--primary); border-radius: 4px 14px; background: color-mix(in srgb, var(--primary) 12%, transparent); }
.dr-hub-t { margin: 0 0 2px; font: 700 .7rem Manrope, sans-serif; text-transform: uppercase; letter-spacing: .06em; color: var(--primary-light); }
.dr-hub-n { margin: 0 0 10px; font: 700 .95rem Manrope, sans-serif; }
.dr-past { margin: 0 0 8px; }
.dr-past:empty { display: none; }
.dr-past .fb-btn { width: 100%; margin-top: 8px; }

/* ---------- Bouton « i » : capacités de l'extension (en haut à droite, ancien et nouveau modèle) ---------- */
.lc-app { position: relative; }
.lc-info { position: absolute; top: 8px; right: 8px; z-index: 70; width: 44px; height: 44px; padding: 0; display: flex; align-items: center; justify-content: center; cursor: pointer;
  border: 0; border-radius: 50%; background: url(../images/compteur/cadre/fond.png) center / 112% no-repeat; box-shadow: none; -webkit-tap-highlight-color: transparent; }
.lc-info span { font: italic 700 1.35rem/1 Georgia, "Times New Roman", serif; color: #fff; text-shadow: 0 0 6px #6af, 0 0 12px rgba(110, 170, 255, .7); pointer-events: none; }
.lc-info:hover { filter: brightness(1.25); }
.lc-info:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.lc-app:has(.lc-modal--gate:not([hidden]):not(.lc-modal--dr)) .lc-info { display: none; }   /* pas sur l'accueil : la partie n'est pas lancée */

body.lc-page .topbar { z-index: 100; }   /* les menus de l'en-tête (navigation, compte) s'ouvrent PAR-DESSUS l'écran du compteur (couche 60) et restent cliquables */
