/* ==========================================================================
   BOOPETS V10.0 — EncycloBoopets
   Une galerie de musée : chaque Boopet repose sur un socle circulaire,
   sous son propre faisceau lumineux. Verre, bleu nuit, or fin.
   ========================================================================== */

.encyclo{
  --enc-void:#04070f;
  --enc-night:#0a1226;
  --enc-glass:rgba(16,26,50,.62);
  --enc-line:rgba(255,255,255,.09);
  --enc-gold:#e5c173;
  --enc-gold-soft:#fff1cb;
  --enc-violet:#8a6ce0;
  --enc-text:#e4ebfa;
  --enc-muted:#8c9ab8;

  --el-rgb:226,190,102;
  --cell-min:150px;

  position:relative;
  margin:0 0 2rem;
  color:var(--enc-text);
}

/* Couleur d'affinité, héritée par toute la cellule. */
.encyclo .element-feu{--el-rgb:255,110,52}
.encyclo .element-aqua{--el-rgb:64,178,255}
.encyclo .element-terre{--el-rgb:126,214,96}
.encyclo .element-air{--el-rgb:120,231,244}
.encyclo .element-lumiere{--el-rgb:255,216,102}
.encyclo .element-tenebre{--el-rgb:168,110,255}

/* ---------- En-tête ---------- */
.encyclo-head{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-end;
  justify-content:space-between;
  gap:1.2rem 1.6rem;
  padding:clamp(1.1rem,2.6vw,1.7rem);
  border:1px solid var(--enc-line);
  border-radius:22px 22px 0 0;
  border-bottom:0;
  background:
    radial-gradient(120% 130% at 18% -30%,rgba(138,108,224,.18),transparent 60%),
    linear-gradient(180deg,rgba(16,26,50,.9),rgba(7,12,26,.92));
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}
.encyclo-kicker{
  display:block;
  color:var(--enc-gold);
  font-size:.66rem;
  font-weight:800;
  letter-spacing:.28em;
  text-transform:uppercase;
}
.encyclo-title h1{
  margin:.35rem 0 .2rem;
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(1.7rem,1.2rem + 2.2vw,2.6rem);
  line-height:1.05;
  letter-spacing:-.015em;
  color:#fff8e8;
}
.encyclo-title p{margin:0;color:var(--enc-muted);font-size:.9rem}

.encyclo-tools{display:flex;align-items:center;gap:.8rem;flex-wrap:wrap}

.encyclo-search{
  position:relative;
  display:flex;
  align-items:center;
  min-width:min(280px,72vw);
}
.encyclo-search svg{
  position:absolute;left:13px;width:17px;height:17px;
  fill:none;stroke:var(--enc-muted);stroke-width:1.8;stroke-linecap:round;
  pointer-events:none;
}
.encyclo-search input{
  width:100%;
  padding:.66rem .9rem .66rem 2.4rem;
  border:1px solid var(--enc-line);
  border-radius:999px;
  background:rgba(6,11,24,.72);
  color:#fff;
  font:inherit;
  font-size:.9rem;
  transition:border-color .18s ease,box-shadow .18s ease;
}
.encyclo-search input:focus{outline:none;border-color:rgba(229,193,115,.6);box-shadow:0 0 0 3px rgba(229,193,115,.14)}
.encyclo-search input::-webkit-search-cancel-button{filter:invert(.7)}

.encyclo-progress{min-width:170px}
.encyclo-progress-figures{display:flex;align-items:baseline;gap:.35rem;margin-bottom:.35rem}
.encyclo-progress-figures strong{font-size:1.2rem;color:var(--enc-gold-soft)}
.encyclo-progress-figures span{font-size:.76rem;color:var(--enc-muted)}
.encyclo-progress-bar{height:5px;border-radius:999px;background:rgba(255,255,255,.09);overflow:hidden}
.encyclo-progress-bar i{
  display:block;height:100%;border-radius:999px;
  background:linear-gradient(90deg,var(--enc-violet),var(--enc-gold));
  box-shadow:0 0 12px rgba(229,193,115,.5);
  transition:width .5s ease;
}

.encyclo-filter-toggle{
  display:none;
  align-items:center;gap:.45rem;
  padding:.6rem 1rem;
  border:1px solid var(--enc-line);
  border-radius:999px;
  background:rgba(6,11,24,.72);
  color:var(--enc-text);
  font:inherit;font-size:.85rem;cursor:pointer;
}
.encyclo-filter-toggle svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}

/* ---------- Corps : filtres | galerie | fiche ---------- */
.encyclo-body{
  display:grid;
  grid-template-columns:200px minmax(0,1fr) 340px;
  gap:0;
  border:1px solid var(--enc-line);
  border-radius:0 0 22px 22px;
  background:linear-gradient(180deg,rgba(9,15,32,.86),rgba(4,7,15,.94));
  overflow:hidden;
}

/* ---------- Filtres ---------- */
.encyclo-filters{
  padding:1.1rem .85rem;
  border-right:1px solid var(--enc-line);
  background:rgba(5,9,20,.5);
}
.encyclo-filter-block + .encyclo-filter-block{margin-top:1.3rem}
.encyclo-filter-block h2{
  margin:0 0 .55rem .4rem;
  color:var(--enc-muted);
  font-size:.64rem;font-weight:800;letter-spacing:.2em;text-transform:uppercase;
}
.encyclo-chip{
  display:flex;align-items:center;gap:.55rem;
  width:100%;
  padding:.5rem .65rem;
  margin-bottom:.18rem;
  border:1px solid transparent;
  border-radius:11px;
  background:transparent;
  color:var(--enc-text);
  font:inherit;font-size:.83rem;text-align:left;cursor:pointer;
  transition:background .16s ease,border-color .16s ease,color .16s ease;
}
.encyclo-chip:hover{background:rgba(255,255,255,.05)}
.encyclo-chip.is-active{
  border-color:rgba(229,193,115,.36);
  background:linear-gradient(100deg,rgba(229,193,115,.16),rgba(229,193,115,.04));
  color:#fff6de;
}
.encyclo-chip img{width:20px;height:20px;object-fit:contain;flex:0 0 20px}
.encyclo-chip b{margin-left:auto;color:var(--enc-muted);font-size:.72rem;font-weight:700}
.encyclo-chip.is-active b{color:var(--enc-gold)}
.encyclo-chip-dot{width:9px;height:9px;border-radius:50%;flex:0 0 9px;background:currentColor;opacity:.75}
.encyclo-chip-dot.all{background:linear-gradient(135deg,var(--enc-gold),var(--enc-violet))}
/* C Commun · P Peu commun · R Rare · S Super rare · E Exotique */
.encyclo-chip.rarity-commun{color:#a9b6cd}
.encyclo-chip.rarity-peu-commun{color:#7fd6a4}
.encyclo-chip.rarity-rare{color:#6fb6ff}
.encyclo-chip.rarity-super-rare{color:#ffc861}
.encyclo-chip.rarity-exotique{color:#ff87c4}

/* ---------- Galerie ---------- */
.encyclo-gallery-wrap{
  padding:1.1rem;
  max-height:min(76vh,860px);
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:rgba(229,193,115,.4) transparent;
}
.encyclo-gallery-wrap::-webkit-scrollbar{width:8px}
.encyclo-gallery-wrap::-webkit-scrollbar-thumb{background:rgba(229,193,115,.35);border-radius:99px}

.encyclo-gallery{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(var(--cell-min),1fr));
  gap:.85rem;
  margin:0;padding:0;list-style:none;
}
.encyclo-gallery li{margin:0}

/* ---------- La vitrine d'un Boopet ---------- */
.boopet-cell{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  width:100%;
  padding:.55rem .5rem .7rem;
  border:1px solid var(--enc-line);
  border-radius:16px;
  background:
    radial-gradient(90% 60% at 50% 100%,rgba(var(--el-rgb),.14),transparent 70%),
    linear-gradient(180deg,rgba(14,22,44,.75),rgba(6,10,22,.9));
  color:var(--enc-text);
  font:inherit;
  cursor:pointer;
  overflow:hidden;
  isolation:isolate;
  transition:transform .28s cubic-bezier(.2,.8,.3,1),border-color .28s ease,box-shadow .28s ease;
}
.boopet-cell::after{               /* liseré doré animé au survol */
  content:"";
  position:absolute;inset:0;
  border-radius:inherit;
  padding:1px;
  background:conic-gradient(from var(--ang,0deg),transparent 0 62%,rgba(229,193,115,.9) 78%,transparent 92%);
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  mask-composite:exclude;
  opacity:0;
  transition:opacity .3s ease;
  pointer-events:none;
}
.boopet-cell:hover,.boopet-cell:focus-visible{
  transform:translateY(-4px);
  border-color:rgba(var(--el-rgb),.45);
  box-shadow:0 18px 40px rgba(0,0,0,.5),0 0 26px rgba(var(--el-rgb),.2);
  outline:none;
}
.boopet-cell:hover::after,.boopet-cell:focus-visible::after{opacity:1;animation:encSweep 3.4s linear infinite}
.boopet-cell.is-selected{
  border-color:rgba(229,193,115,.7);
  box-shadow:0 0 0 1px rgba(229,193,115,.45),0 18px 44px rgba(0,0,0,.55),0 0 34px rgba(var(--el-rgb),.28);
}

.cell-number{
  align-self:flex-start;
  font-size:.66rem;font-weight:800;letter-spacing:.12em;
  color:var(--enc-muted);
}
.cell-affinity{
  position:absolute;top:.45rem;right:.5rem;
  width:22px;height:22px;object-fit:contain;
  filter:drop-shadow(0 2px 6px rgba(0,0,0,.7));
  z-index:4;
}

/* La scène : faisceau, brume, socle. */
.cell-stage{
  position:relative;
  display:block;
  width:100%;
  aspect-ratio:1/1;
  margin:.1rem 0 .35rem;
}
/* Faisceau individuel, descendant du haut de la vitrine. */
.cell-beam{
  position:absolute;
  left:50%;top:-14%;
  width:78%;height:104%;
  transform:translateX(-50%);
  clip-path:polygon(34% 0,66% 0,100% 100%,0 100%);
  background:linear-gradient(180deg,rgba(255,247,222,.30),rgba(255,240,200,.10) 45%,transparent 82%);
  opacity:.62;
  transition:opacity .3s ease;
  pointer-events:none;
}
/* Brume volumétrique au sol. */
.cell-fog{
  position:absolute;
  left:50%;bottom:6%;
  width:92%;height:46%;
  transform:translateX(-50%);
  background:radial-gradient(60% 100% at 50% 100%,rgba(var(--el-rgb),.34),transparent 72%);
  filter:blur(9px);
  opacity:.75;
  transition:opacity .3s ease;
  pointer-events:none;
}
/* Poussière lumineuse. */
.cell-motes{position:absolute;inset:0;pointer-events:none}
.cell-motes i{
  position:absolute;
  width:3px;height:3px;border-radius:50%;
  background:rgba(255,246,214,.9);
  box-shadow:0 0 6px rgba(255,240,190,.9);
  opacity:0;
}
.cell-motes i:nth-child(1){left:26%;bottom:22%;animation:encMote 5.2s ease-in-out infinite}
.cell-motes i:nth-child(2){left:64%;bottom:16%;animation:encMote 6.4s ease-in-out .9s infinite}
.cell-motes i:nth-child(3){left:44%;bottom:30%;animation:encMote 7.1s ease-in-out 1.8s infinite}
.cell-motes i:nth-child(4){left:76%;bottom:26%;animation:encMote 5.8s ease-in-out 2.6s infinite}

.cell-art{
  position:absolute;
  left:50%;bottom:12%;
  width:84%;height:84%;
  transform:translateX(-50%);
  object-fit:contain;
  object-position:center bottom;
  z-index:3;
  filter:drop-shadow(0 10px 14px rgba(0,0,0,.55));
  transition:transform .45s cubic-bezier(.2,.8,.3,1),filter .3s ease;
  will-change:transform;
}
/* Socle circulaire et son reflet. */
.cell-plinth{
  position:absolute;
  left:50%;bottom:4%;
  width:66%;height:16%;
  transform:translateX(-50%);
  border-radius:50%;
  background:radial-gradient(closest-side,rgba(var(--el-rgb),.5),rgba(var(--el-rgb),.12) 62%,transparent 78%);
  z-index:2;
}
.cell-plinth-ring{
  position:absolute;inset:0;
  border-radius:50%;
  border:1px solid rgba(229,193,115,.55);
  box-shadow:0 0 14px rgba(var(--el-rgb),.4),inset 0 0 12px rgba(255,255,255,.12);
  transition:box-shadow .3s ease;
}

.cell-name{
  font-size:.86rem;
  font-weight:700;
  color:#f2f6ff;
  text-align:center;
  line-height:1.2;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* Survol : respiration lente, légère rotation, faisceau plus vif. */
.boopet-cell:hover .cell-art,
.boopet-cell:focus-visible .cell-art{animation:encBreathe 4.6s ease-in-out infinite}
.boopet-cell:hover .cell-beam,
.boopet-cell:focus-visible .cell-beam{opacity:.92}
.boopet-cell:hover .cell-fog,
.boopet-cell:focus-visible .cell-fog{opacity:1}
.boopet-cell:hover .cell-plinth-ring,
.boopet-cell:focus-visible .cell-plinth-ring{box-shadow:0 0 22px rgba(var(--el-rgb),.7),inset 0 0 16px rgba(255,255,255,.2)}
.boopet-cell:hover .cell-motes i,
.boopet-cell:focus-visible .cell-motes i{animation-duration:3.4s}

/* ---------- Boopet non découvert ---------- */
.boopet-cell.is-locked{cursor:default}
.boopet-cell.is-locked .cell-art{filter:brightness(0) saturate(0);opacity:.5}
.boopet-cell.is-locked .cell-beam{opacity:.12}
.boopet-cell.is-locked .cell-fog{opacity:.16;background:radial-gradient(60% 100% at 50% 100%,rgba(140,154,184,.3),transparent 72%)}
.boopet-cell.is-locked .cell-plinth{background:radial-gradient(closest-side,rgba(140,154,184,.26),transparent 76%)}
.boopet-cell.is-locked .cell-plinth-ring{border-color:rgba(255,255,255,.14);box-shadow:none}
.boopet-cell.is-locked .cell-motes{display:none}
.boopet-cell.is-locked .cell-name{color:var(--enc-muted);letter-spacing:.16em}
.boopet-cell.is-locked:hover{transform:none;border-color:var(--enc-line);box-shadow:none}
.boopet-cell.is-locked:hover::after{opacity:0;animation:none}
.cell-lock{
  position:absolute;top:.45rem;right:.5rem;
  width:20px;height:20px;
  opacity:.5;z-index:4;
}
.cell-lock svg{width:100%;height:100%;fill:none;stroke:#c4cee2;stroke-width:1.6;stroke-linecap:round}

.encyclo-noresult{margin:2.4rem auto;color:var(--enc-muted);text-align:center}

/* ---------- Fiche détaillée ---------- */
.encyclo-sheet{
  position:relative;
  border-left:1px solid var(--enc-line);
  background:linear-gradient(180deg,rgba(13,21,44,.7),rgba(5,9,19,.92));
  max-height:min(76vh,860px);
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:rgba(229,193,115,.4) transparent;
}
.encyclo-sheet::-webkit-scrollbar{width:8px}
.encyclo-sheet::-webkit-scrollbar-thumb{background:rgba(229,193,115,.35);border-radius:99px}
.encyclo-sheet-close{display:none}
.encyclo-sheet-inner{padding:1.25rem}

.encyclo-sheet-idle{
  display:grid;gap:.5rem;justify-items:center;
  padding:3.5rem 1rem;text-align:center;
}
.encyclo-sheet-idle span{
  width:54px;height:54px;display:grid;place-items:center;
  border:1px solid rgba(229,193,115,.3);border-radius:50%;
  color:var(--enc-gold);font-size:1.4rem;
}
.encyclo-sheet-idle h2{margin:.4rem 0 0;font-family:Georgia,serif;font-size:1.2rem;color:#fff8e8}
.encyclo-sheet-idle p{margin:0;max-width:30ch;color:var(--enc-muted);font-size:.86rem;line-height:1.6}

/* Vitrine de la fiche */
.sheet-hero{position:relative;text-align:center;padding-bottom:.6rem;margin-bottom:1rem;border-bottom:1px solid var(--enc-line)}
.sheet-hero .cell-stage{width:min(230px,72%);margin:0 auto .6rem}
.sheet-hero .cell-art{animation:encBreathe 5.4s ease-in-out infinite}
.sheet-number{color:var(--enc-muted);font-size:.72rem;font-weight:800;letter-spacing:.18em}
.sheet-name{
  margin:.1rem 0 .45rem;
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(1.5rem,1.2rem + 1.2vw,2rem);
  line-height:1.1;color:#fff8e8;
}
.sheet-tags{display:flex;justify-content:center;gap:.4rem;flex-wrap:wrap}
.sheet-tag{
  display:inline-flex;align-items:center;gap:.35rem;
  padding:.24rem .62rem;
  border:1px solid rgba(var(--el-rgb),.42);
  border-radius:999px;
  background:rgba(var(--el-rgb),.12);
  font-size:.74rem;font-weight:700;
}
.sheet-tag img{width:16px;height:16px;object-fit:contain}
.sheet-tag.rarity{border-color:rgba(229,193,115,.4);background:rgba(229,193,115,.1);color:var(--enc-gold-soft)}

.sheet-desc{margin:0 0 1rem;color:var(--enc-text);font-size:.92rem;line-height:1.7}

.sheet-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem;margin-bottom:1.1rem}
.sheet-fact{
  padding:.55rem .7rem;
  border:1px solid var(--enc-line);border-radius:12px;
  background:rgba(255,255,255,.03);
}
.sheet-fact span{display:block;color:var(--enc-muted);font-size:.66rem;letter-spacing:.14em;text-transform:uppercase}
.sheet-fact strong{font-size:.92rem;color:#f2f6ff}
.sheet-fact.wide{grid-column:1 / -1}

.sheet-section-title{
  margin:0 0 .6rem;
  color:var(--enc-gold);
  font-size:.66rem;font-weight:800;letter-spacing:.22em;text-transform:uppercase;
}

/* Statistiques */
.sheet-stats{display:grid;gap:.42rem;margin-bottom:1rem}
.sheet-stat{display:grid;grid-template-columns:88px 1fr 30px;align-items:center;gap:.55rem}
.sheet-stat span{color:var(--enc-muted);font-size:.74rem}
.sheet-stat b{font-size:.8rem;color:#f2f6ff;text-align:right;font-variant-numeric:tabular-nums}
.sheet-stat-bar{height:6px;border-radius:99px;background:rgba(255,255,255,.08);overflow:hidden}
.sheet-stat-bar i{
  display:block;height:100%;width:0;border-radius:99px;
  background:linear-gradient(90deg,rgba(var(--el-rgb),.65),rgba(var(--el-rgb),1));
  box-shadow:0 0 10px rgba(var(--el-rgb),.5);
  transition:width .9s cubic-bezier(.2,.8,.3,1);
}
.sheet-radar{display:block;width:100%;max-width:250px;margin:0 auto 1.1rem}
.sheet-radar .radar-grid{fill:none;stroke:rgba(255,255,255,.12);stroke-width:1}
.sheet-radar .radar-axis{stroke:rgba(255,255,255,.1);stroke-width:1}
.sheet-radar .radar-shape{
  fill:rgba(var(--el-rgb),.28);
  stroke:rgba(var(--el-rgb),1);
  stroke-width:1.6;
  stroke-linejoin:round;
  transition:d .9s ease;
}
.sheet-radar text{fill:var(--enc-muted);font-size:7px;font-weight:700;letter-spacing:.06em}

/* Carrousel de cartes */
.sheet-cards{position:relative;margin-bottom:.4rem}
.sheet-cards-track{
  display:flex;gap:.6rem;
  overflow-x:auto;
  padding:.2rem .1rem .7rem;
  scroll-snap-type:x mandatory;
  scrollbar-width:thin;
  scrollbar-color:rgba(229,193,115,.4) transparent;
}
.sheet-cards-track::-webkit-scrollbar{height:6px}
.sheet-cards-track::-webkit-scrollbar-thumb{background:rgba(229,193,115,.3);border-radius:99px}
.sheet-card{
  position:relative;
  flex:0 0 118px;
  scroll-snap-align:start;
  border-radius:10px;
  overflow:hidden;
  border:1px solid rgba(229,193,115,.26);
  background:#070c18;
  box-shadow:0 8px 20px rgba(0,0,0,.5);
  transition:transform .28s cubic-bezier(.2,.8,.3,1),box-shadow .28s ease;
}
.sheet-card img{display:block;width:100%;height:auto}
.sheet-card::after{           /* reflet brillant qui balaie la carte */
  content:"";
  position:absolute;inset:0;
  background:linear-gradient(115deg,transparent 34%,rgba(255,255,255,.34) 48%,transparent 62%);
  background-size:240% 240%;
  background-position:-40% 0;
  opacity:0;
  transition:opacity .3s ease;
  pointer-events:none;
}
.sheet-card:hover{transform:translateY(-5px) scale(1.04);box-shadow:0 16px 34px rgba(0,0,0,.6),0 0 20px rgba(229,193,115,.25)}
.sheet-card:hover::after{opacity:1;animation:encGloss 1.1s ease}
.sheet-card figcaption{padding:.35rem .45rem .5rem;font-size:.68rem;line-height:1.3}
.sheet-card figcaption b{display:block;color:#f4f8ff}
.sheet-card figcaption em{color:var(--enc-muted);font-style:normal;font-size:.64rem}

/* Fiche verrouillée */
.sheet-locked{display:grid;gap:.6rem;justify-items:center;padding:2.4rem 1rem;text-align:center}
.sheet-locked .cell-stage{width:170px}
.sheet-locked .cell-art{filter:brightness(0);opacity:.55}
.sheet-locked h2{margin:0;font-family:Georgia,serif;color:#dfe6f5}
.sheet-locked p{margin:0;max-width:32ch;color:var(--enc-muted);font-size:.86rem;line-height:1.6}

/* ---------- Animations ---------- */
@keyframes encBreathe{
  0%,100%{transform:translateX(-50%) scale(1) rotate(-1.6deg)}
  50%{transform:translateX(-50%) scale(1.045) rotate(1.6deg)}
}
@keyframes encMote{
  0%{opacity:0;transform:translateY(0)}
  22%{opacity:.9}
  100%{opacity:0;transform:translateY(-34px)}
}
@keyframes encSweep{to{--ang:360deg}}
@keyframes encGloss{from{background-position:-40% 0}to{background-position:160% 0}}
@property --ang{syntax:'<angle>';initial-value:0deg;inherits:false}

/* ---------- Tablette ---------- */
@media(max-width:1180px){
  .encyclo-body{grid-template-columns:180px minmax(0,1fr)}
  .encyclo-sheet{
    position:fixed;
    right:0;top:0;bottom:0;
    z-index:2147483000;
    width:min(420px,92vw);
    max-height:100dvh;
    border-left:1px solid rgba(229,193,115,.24);
    box-shadow:-20px 0 60px rgba(0,0,0,.6);
    transform:translateX(100%);
    transition:transform .32s cubic-bezier(.22,.9,.3,1);
  }
  .encyclo-sheet.is-open{transform:none}
  .encyclo-sheet-close{
    display:grid;place-items:center;
    position:absolute;top:.6rem;right:.6rem;z-index:3;
    width:38px;height:38px;
    border:1px solid rgba(229,193,115,.3);border-radius:50%;
    background:rgba(6,12,24,.8);color:var(--enc-gold);
    font-size:1.2rem;cursor:pointer;
  }
}

/* ---------- Mobile ---------- */
@media(max-width:760px){
  .encyclo{--cell-min:104px}
  .encyclo-head{border-radius:18px 18px 0 0;padding:1rem}
  .encyclo-tools{width:100%}
  .encyclo-search{flex:1 1 100%}
  .encyclo-filter-toggle{display:inline-flex}
  .encyclo-body{grid-template-columns:minmax(0,1fr);border-radius:0 0 18px 18px}
  .encyclo-filters{
    display:none;
    border-right:0;
    border-bottom:1px solid var(--enc-line);
  }
  .encyclo-filters.is-open{display:block}
  .encyclo-gallery-wrap{max-height:none;padding:.75rem}
  .encyclo-gallery{gap:.6rem}
  .boopet-cell{padding:.45rem .35rem .55rem;border-radius:13px}
  .cell-name{font-size:.74rem}
  .cell-affinity{width:18px;height:18px}
  /* La fiche s'ouvre en plein écran. */
  .encyclo-sheet{width:100vw;max-width:100vw;border-left:0;border-radius:0}
  .encyclo-sheet-inner{padding:1rem 1rem calc(1.6rem + env(safe-area-inset-bottom,0px))}
  .sheet-facts{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* ---------- Préférence de réduction des animations ---------- */
@media(prefers-reduced-motion:reduce){
  .boopet-cell,
  .cell-art,
  .cell-beam,
  .cell-fog,
  .sheet-card,
  .sheet-stat-bar i,
  .encyclo-sheet{transition:none!important;animation:none!important}
  .cell-motes{display:none}
  .boopet-cell:hover::after{animation:none}
}

/* ==========================================================================
   V10.1 — Version publique (racine du site) et cartes spéciales
   ========================================================================== */

.encyclo-public-section{padding-block:clamp(1.4rem,4vw,3rem)}
.encyclo-public-section .container{max-width:1420px}

/* Sur la page publique, la fiche vit dans le flux : pas de barre de compte
   au-dessus, donc on peut lui laisser un peu plus de hauteur. */
.encyclo.is-public .encyclo-gallery-wrap,
.encyclo.is-public .encyclo-sheet{max-height:min(80vh,940px)}

.encyclo-member-note{
  display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;
  margin:0 0 .8rem;
  color:#8c9ab8;font-size:.86rem;line-height:1.55;
}
.encyclo-member-note a{color:#e5c173;text-decoration:none;border-bottom:1px solid rgba(229,193,115,.4)}
.encyclo-member-note a:hover{color:#fff1cb}

/* ---------- Cartes spéciales ---------- */
.encyclo-extras{margin-top:1.6rem;padding-top:1.3rem;border-top:1px solid var(--enc-line)}
.encyclo-extras-lead{margin:-.3rem 0 .9rem;color:var(--enc-muted);font-size:.84rem;line-height:1.55;max-width:62ch}
.encyclo-extras-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(126px,1fr));
  gap:.7rem;
}
.encyclo-extras-grid .sheet-card{flex:none;width:100%}

.encyclo-empty-public{padding:4rem 1rem;text-align:center;color:#8c9ab8}
.encyclo-empty-public h1{font-family:Georgia,serif;color:#fff8e8}

@media(max-width:760px){
  .encyclo-extras-grid{grid-template-columns:repeat(auto-fill,minmax(98px,1fr));gap:.5rem}
}

/* ==========================================================================
   V11.0 — Fiche fondée sur les cartes officielles
   ========================================================================== */

.cell-number{font-variant-numeric:tabular-nums}
.cell-stars{margin-top:.15rem;font-size:.66rem;letter-spacing:.08em;color:#e5c173;opacity:.85}
.boopet-cell.is-locked .cell-stars{display:none}

/* Onglets de forme (Base / Éveil / Divin) */
.sheet-form-tabs{
  display:flex;gap:.35rem;flex-wrap:wrap;
  margin:0 0 .9rem;
  padding-bottom:.6rem;
  border-bottom:1px solid var(--enc-line);
}
.sheet-form-tab{
  padding:.34rem .75rem;
  border:1px solid var(--enc-line);
  border-radius:999px;
  background:rgba(255,255,255,.04);
  color:var(--enc-muted);
  font:inherit;font-size:.76rem;font-weight:700;cursor:pointer;
  transition:.16s;
}
.sheet-form-tab:hover{color:#fff}
.sheet-form-tab.is-active{border-color:rgba(229,193,115,.5);background:rgba(229,193,115,.14);color:#fff6de}
.sheet-form-panel{display:none}
.sheet-form-panel.is-active{display:block;animation:encFormIn .28s ease both}
@keyframes encFormIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

.sheet-form .cell-stage{width:min(210px,64%);margin:0 auto .5rem}
.sheet-form-head{text-align:center;margin-bottom:.9rem}
.sheet-form-label{
  display:block;margin-bottom:.45rem;
  color:var(--enc-gold);font-size:.68rem;font-weight:800;letter-spacing:.2em;text-transform:uppercase;
}
.sheet-tag.pv{border-color:rgba(255,255,255,.24);background:rgba(255,255,255,.07);color:#fff}
.sheet-stars{font-style:normal;letter-spacing:.06em;opacity:.9}

/* Blocs Talent / Attaque / Stratégie */
.sheet-block{
  position:relative;
  margin:0 0 .7rem;
  padding:.8rem .9rem .85rem;
  border:1px solid var(--enc-line);
  border-left:3px solid rgba(var(--el-rgb),.85);
  border-radius:4px 14px 14px 4px;
  background:linear-gradient(100deg,rgba(var(--el-rgb),.10),rgba(255,255,255,.02));
}
.sheet-block-kind{
  display:block;margin-bottom:.25rem;
  color:var(--enc-muted);font-size:.6rem;font-weight:800;letter-spacing:.2em;text-transform:uppercase;
}
.sheet-block b{display:block;color:#ffe9ae;font-size:.95rem;line-height:1.3}
.sheet-block p{margin:.25rem 0 0;color:var(--enc-text);font-size:.87rem;line-height:1.6}
.sheet-block.strategy{border-left-color:var(--enc-violet);background:linear-gradient(100deg,rgba(138,108,224,.14),rgba(255,255,255,.02))}

.sheet-attack-line{display:flex;align-items:center;gap:.55rem}
.sheet-attack-line b{flex:1 1 auto}
.sheet-cost{
  flex:0 0 auto;
  min-width:26px;height:26px;
  display:grid;place-items:center;
  border:1px solid rgba(255,255,255,.3);border-radius:7px;
  background:rgba(255,255,255,.08);
  font-size:.8rem;font-weight:800;color:#fff;
}
.sheet-damage{
  flex:0 0 auto;
  padding:.14rem .5rem;
  border-radius:999px;
  background:rgba(var(--el-rgb),.24);
  border:1px solid rgba(var(--el-rgb),.5);
  font-size:.82rem;font-weight:800;color:#fff;white-space:nowrap;
}
.sheet-quote{
  margin:.2rem 0 .9rem;padding:.7rem .9rem;
  border:0;border-left:2px solid rgba(229,193,115,.5);
  border-radius:0;
  background:none;
  color:#cfd9ee;font-family:Georgia,serif;font-style:italic;font-size:.87rem;line-height:1.65;
}

.encyclo-extras-family{
  margin:1.1rem 0 .55rem;
  display:flex;align-items:center;gap:.5rem;
  color:#e2eaf8;font-size:.86rem;font-weight:700;
}
.encyclo-extras-family b{
  padding:.05rem .45rem;border-radius:999px;
  background:rgba(255,255,255,.08);color:var(--enc-muted);font-size:.68rem;
}

/* ==========================================================================
   V11.2 — Repère « Éveil » sur les vignettes
   Rien n'indiquait qu'un second visuel attendait derrière la vignette.
   ========================================================================== */

.cell-meta{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:.4rem;
  flex-wrap:wrap;
  margin-top:.18rem;
}
.cell-meta .cell-stars{margin-top:0}
.cell-eveil{
  display:inline-flex;
  align-items:center;
  gap:.22rem;
  padding:.06rem .42rem;
  border:1px solid rgba(var(--el-rgb),.5);
  border-radius:999px;
  background:rgba(var(--el-rgb),.16);
  color:#fff;
  font-size:.6rem;
  font-weight:800;
  letter-spacing:.04em;
  white-space:nowrap;
  line-height:1.5;
}
.cell-eveil::before{
  content:"✦";
  font-size:.62rem;
  color:rgba(var(--el-rgb),1);
  line-height:1;
}
.boopet-cell:hover .cell-eveil,
.boopet-cell:focus-visible .cell-eveil{
  border-color:rgba(var(--el-rgb),.85);
  background:rgba(var(--el-rgb),.28);
}
.boopet-cell.is-locked .cell-meta{display:none}

@media(max-width:760px){
  .cell-eveil{font-size:.55rem;padding:.04rem .34rem}
  .cell-eveil::before{display:none}
}

/* ==========================================================================
   V11.3 — Défilement de la galerie
   La galerie avait sa propre zone de défilement interne, imbriquée dans
   celle de la page. Dans l'espace membre, la mise en page du compte
   empêchait cette zone de recevoir le geste : la liste devenait bloquée.
   On supprime le défilement imbriqué : la page défile normalement, et
   seules les colonnes latérales restent collées à l'écran.
   ========================================================================== */

.encyclo-body{
  overflow:visible!important;   /* indispensable au position:sticky */
  align-items:start;
}

.encyclo-gallery-wrap{
  max-height:none!important;
  overflow:visible!important;
  overscroll-behavior:auto!important;
}

@media(min-width:761px){
  /* Les filtres suivent la lecture sans jamais capturer le défilement. */
  .encyclo-filters{
    position:sticky;
    top:1rem;
    max-height:calc(100vh - 2rem);
    overflow-y:auto;
    overscroll-behavior:contain;
    scrollbar-width:thin;
    scrollbar-color:rgba(229,193,115,.4) transparent;
  }
  .encyclo-filters::-webkit-scrollbar{width:7px}
  .encyclo-filters::-webkit-scrollbar-thumb{background:rgba(229,193,115,.32);border-radius:99px}
}

@media(min-width:1181px){
  /* Sur grand écran, la fiche reste visible en regard de la galerie. */
  .encyclo-sheet{
    position:sticky;
    top:1rem;
    max-height:calc(100vh - 2rem)!important;
    overflow-y:auto;
    overscroll-behavior:contain;
  }
}

/* Les coins arrondis étaient assurés par overflow:hidden sur le corps :
   on les rétablit sur les colonnes elles-mêmes. */
.encyclo-body > .encyclo-filters{border-bottom-left-radius:22px}
.encyclo-body > .encyclo-sheet{border-bottom-right-radius:22px}
@media(max-width:1180px){.encyclo-body > .encyclo-sheet{border-radius:0}}
@media(max-width:760px){
  .encyclo-body > .encyclo-filters{border-radius:0}
  .encyclo-gallery-wrap{border-bottom-left-radius:18px;border-bottom-right-radius:18px}
}

/* ==========================================================================
   V11.3 — Bouton « Voir compétence » et fenêtre vidéo
   ========================================================================== */

.skill-video-btn{
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  margin-top:.6rem;
  padding:.36rem .8rem .36rem .6rem;
  border:1px solid rgba(var(--el-rgb),.5);
  border-radius:999px;
  background:rgba(var(--el-rgb),.14);
  color:#fff;
  font:inherit;
  font-size:.76rem;
  font-weight:700;
  cursor:pointer;
  transition:.16s;
}
.skill-video-btn svg{
  width:16px;height:16px;flex:0 0 16px;
  fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round;
}
.skill-video-btn svg path{fill:currentColor;stroke:none}
.skill-video-btn:hover{border-color:rgba(var(--el-rgb),.9);background:rgba(var(--el-rgb),.28)}
.skill-video-btn:focus-visible{outline:2px solid var(--enc-gold-soft);outline-offset:2px}
/* Compétence sans vidéo enregistrée : le bouton reste, en retrait. */
.skill-video-btn.is-empty{
  border-color:rgba(255,255,255,.16);
  background:rgba(255,255,255,.05);
  color:var(--enc-muted);
}
.skill-video-btn.is-empty:hover{border-color:rgba(255,255,255,.3);background:rgba(255,255,255,.09);color:#e4ebfa}

/* ---------- La fenêtre ---------- */
body.encyclo-video-open{overflow:hidden}

.skill-video-modal{
  position:fixed;
  inset:0;
  z-index:2147483600;
  display:grid;
  place-items:center;
  padding:clamp(1rem,4vw,2.5rem);
}
.skill-video-scrim{
  position:absolute;inset:0;
  background:rgba(3,6,14,.86);
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
  animation:skillScrimIn .2s ease both;
}
.skill-video-box{
  position:relative;
  width:min(940px,100%);
  border:1px solid rgba(229,193,115,.28);
  border-radius:20px;
  background:linear-gradient(168deg,rgba(14,26,50,.98),rgba(5,10,22,.99));
  box-shadow:0 34px 90px rgba(0,0,0,.7);
  overflow:hidden;
  animation:skillBoxIn .28s cubic-bezier(.22,.9,.3,1) both;
}
.skill-video-box::before{
  content:"";
  position:absolute;left:0;right:0;top:0;height:2px;
  background:linear-gradient(90deg,transparent,#e5c173 22%,#fff1cb 50%,#e5c173 78%,transparent);
}
.skill-video-head{
  display:flex;align-items:center;gap:.8rem;
  padding:.95rem 1.1rem .8rem;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.skill-video-kind{
  color:#e5c173;font-size:.6rem;font-weight:800;letter-spacing:.22em;text-transform:uppercase;
}
.skill-video-head h3{
  flex:1 1 auto;margin:0;
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(1.05rem,.95rem + .5vw,1.35rem);
  color:#fff8e8;line-height:1.2;
}
.skill-video-close{
  flex:0 0 auto;
  width:38px;height:38px;
  display:grid;place-items:center;
  border:1px solid rgba(229,193,115,.28);border-radius:50%;
  background:rgba(6,12,24,.72);color:#e5c173;
  font-size:1.2rem;line-height:1;cursor:pointer;transition:.16s;
}
.skill-video-close:hover{background:rgba(229,193,115,.16);border-color:#e5c173}

.skill-video-stage{position:relative;aspect-ratio:16/9;background:#04070f}
.skill-video-frame{position:absolute;inset:0;width:100%;height:100%;border:0;display:block}

.skill-video-empty{
  position:absolute;inset:0;
  display:grid;place-content:center;justify-items:center;gap:.7rem;
  padding:1.5rem;text-align:center;
}
.skill-video-empty span{
  width:52px;height:52px;display:grid;place-items:center;
  border:1px solid rgba(229,193,115,.3);border-radius:50%;
  color:#e5c173;font-size:1.3rem;
}
.skill-video-empty p{margin:0;max-width:34ch;color:#94a6c6;font-size:.9rem;line-height:1.6}

@keyframes skillScrimIn{from{opacity:0}to{opacity:1}}
@keyframes skillBoxIn{from{opacity:0;transform:translateY(16px) scale(.98)}to{opacity:1;transform:none}}

@media(max-width:600px){
  .skill-video-modal{padding:0;place-items:end center}
  .skill-video-box{width:100%;border-radius:20px 20px 0 0;border-bottom:0}
  .skill-video-head{padding:.8rem .9rem .65rem}
}

@media(prefers-reduced-motion:reduce){
  .skill-video-scrim,.skill-video-box{animation:none!important}
  .skill-video-btn{transition:none}
}

/* ==========================================================================
   V11.4 — Défilement mobile : on neutralise toutes les causes possibles
   ========================================================================== */

@media(max-width:900px){
  /* Aucune zone de défilement imbriquée : seule la page défile. */
  .encyclo,
  .encyclo-body,
  .encyclo-gallery-wrap,
  .encyclo-filters{
    max-height:none!important;
    height:auto!important;
    overflow:visible!important;
    overscroll-behavior:auto!important;
    position:static!important;   /* annule un éventuel sticky hérité */
    touch-action:auto!important;
  }
  /* La fiche reste le seul élément fixe, et uniquement quand elle est ouverte. */
  .encyclo-sheet{
    position:fixed!important;
    max-height:100dvh!important;
    overflow-y:auto!important;
    visibility:hidden;
    pointer-events:none;
  }
  .encyclo-sheet.is-open{visibility:visible;pointer-events:auto}
  /* La vignette ne doit pas intercepter le geste vertical. */
  .boopet-cell{touch-action:manipulation}
}

/* Le verrou du défilement n'existe que pendant la lecture d'une vidéo. */
body:not(.encyclo-video-open){overflow-y:visible}

/* ==========================================================================
   V12.0 — Fenêtre flottante, cartes de Soutien, symboles d'état
   La fiche n'occupe plus une colonne : elle se pose au-dessus de la page,
   comme sur mobile, et libère toute la largeur pour la galerie.
   ========================================================================== */

/* ---------- La galerie reprend toute la place ---------- */
.encyclo-body{grid-template-columns:200px minmax(0,1fr)!important}
@media(max-width:900px){.encyclo-body{grid-template-columns:minmax(0,1fr)!important}}

/* ---------- Voile ---------- */
.encyclo-sheet-scrim{
  position:fixed;
  inset:0;
  z-index:2147482900;
  background:rgba(3,6,14,.72);
  backdrop-filter:blur(5px);
  -webkit-backdrop-filter:blur(5px);
  opacity:0;
  visibility:hidden;
  transition:opacity .24s ease,visibility .24s;
}
body.encyclo-sheet-open .encyclo-sheet-scrim{opacity:1;visibility:visible}
body.encyclo-sheet-open{overflow:hidden}

/* ---------- La fenêtre ---------- */
.encyclo-sheet{
  position:fixed!important;
  z-index:2147483000;
  left:50%;
  top:50%;
  right:auto!important;
  bottom:auto!important;
  transform:translate(-50%,-46%) scale(.97)!important;
  width:min(520px,94vw)!important;
  max-width:520px!important;
  max-height:min(86dvh,900px)!important;
  overflow-y:auto;
  overscroll-behavior:contain;
  border:1px solid rgba(229,193,115,.3)!important;
  border-radius:24px!important;
  background:
    radial-gradient(120% 70% at 50% -8%,rgba(138,108,224,.20),transparent 60%),
    linear-gradient(168deg,rgba(15,26,52,.94),rgba(5,10,22,.96))!important;
  backdrop-filter:blur(18px) saturate(1.3);
  -webkit-backdrop-filter:blur(18px) saturate(1.3);
  box-shadow:0 40px 110px rgba(0,0,0,.72),0 0 0 1px rgba(255,255,255,.05) inset!important;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .26s ease,transform .26s cubic-bezier(.22,.9,.3,1),visibility .26s;
}
.encyclo-sheet.is-open{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform:translate(-50%,-50%) scale(1)!important;
}
.encyclo-sheet::before{
  content:"";
  position:absolute;left:0;right:0;top:0;height:2px;
  border-radius:24px 24px 0 0;
  background:linear-gradient(90deg,transparent,#e5c173 22%,#fff1cb 50%,#e5c173 78%,transparent);
}
.encyclo-sheet-close{
  display:grid!important;
  place-items:center;
  position:sticky!important;
  top:.6rem;
  left:calc(100% - 3rem);
  z-index:5;
  width:38px;height:38px;
  margin-bottom:-38px;
  border:1px solid rgba(229,193,115,.3);border-radius:50%;
  background:rgba(6,12,24,.86);color:#e5c173;
  font-size:1.2rem;cursor:pointer;
}
.encyclo-sheet-close:hover{background:rgba(229,193,115,.18);border-color:#e5c173}

@media(max-width:640px){
  .encyclo-sheet{
    left:0;top:auto;bottom:0;
    width:100vw!important;max-width:100vw!important;
    transform:translateY(100%)!important;
    border-radius:24px 24px 0 0!important;
    max-height:88dvh!important;
  }
  .encyclo-sheet.is-open{transform:none!important}
}

/* ---------- Section Soutien ---------- */
.encyclo-supports{margin-top:2rem;padding-top:1.4rem;border-top:1px solid var(--enc-line)}
.encyclo-supports-head h2{
  margin:0 0 .3rem;
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(1.3rem,1.1rem + .9vw,1.8rem);
  color:#fff8e8;
}
.encyclo-supports-head p{margin:0 0 1rem;max-width:64ch;color:var(--enc-muted);font-size:.87rem;line-height:1.6}
.encyclo-supports-family{
  display:flex;align-items:center;gap:.5rem;
  margin:1.4rem 0 .6rem;
  color:#e2eaf8;font-size:.9rem;font-weight:700;
}
.encyclo-supports-family b{
  padding:.05rem .45rem;border-radius:999px;
  background:rgba(255,255,255,.08);color:var(--enc-muted);font-size:.68rem;
}
.support-gallery{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
@media(max-width:760px){.support-gallery{grid-template-columns:repeat(auto-fill,minmax(104px,1fr))}}

/* Les cartes de Soutien prennent la couleur de leur rareté. */
.support-cell{--el-rgb:147,163,189}
.support-cell.rarity-peu-commun{--el-rgb:127,214,164}
.support-cell.rarity-rare{--el-rgb:111,182,255}
.support-cell.rarity-super-rare{--el-rgb:255,200,97}
.support-cell.rarity-exotique{--el-rgb:255,135,196}

.support-stage{aspect-ratio:3/4}
.cell-card{
  position:absolute;
  left:50%;bottom:9%;
  width:74%;
  transform:translateX(-50%);
  z-index:3;
  border-radius:6px;
  box-shadow:0 10px 22px rgba(0,0,0,.6);
  transition:transform .4s cubic-bezier(.2,.8,.3,1);
}
.boopet-cell:hover .cell-card{transform:translateX(-50%) translateY(-4px) scale(1.04)}

.support-hero .support-card-art{margin:0 auto .7rem;width:min(210px,62%)}
.support-hero .support-card-art img{width:100%;height:auto;display:block;border-radius:10px;box-shadow:0 16px 40px rgba(0,0,0,.6)}
.support-note{
  margin:0 0 .8rem;padding:.6rem .8rem;
  border-left:2px solid rgba(229,193,115,.5);
  background:rgba(229,193,115,.07);
  color:#e6d5ae;font-size:.83rem;font-style:italic;line-height:1.55;
}

/* ---------- Puces d'état altéré ---------- */
.status-chips{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:.6rem}
.status-chip{
  display:inline-flex;align-items:center;gap:.35rem;
  padding:.24rem .6rem .24rem .34rem;
  border:1px solid rgba(255,255,255,.18);
  border-radius:999px;
  background:rgba(255,255,255,.06);
  color:#e4ebfa;
  font:inherit;font-size:.72rem;font-weight:700;cursor:pointer;
  transition:.16s;
}
.status-chip img{width:19px;height:19px;object-fit:contain}
.status-chip i{font-style:normal;color:var(--enc-gold)}
.status-chip:hover{border-color:rgba(229,193,115,.6);background:rgba(229,193,115,.14);color:#fff6de}
.status-chip:focus-visible{outline:2px solid var(--enc-gold-soft);outline-offset:2px}

.status-sheet-head{display:flex;align-items:center;gap:.9rem;margin-bottom:.8rem}
.status-sheet-head img{width:56px;height:56px;object-fit:contain;flex:0 0 56px}
.status-sheet-head span[aria-hidden]{
  width:56px;height:56px;flex:0 0 56px;display:grid;place-items:center;
  border:1px solid rgba(229,193,115,.3);border-radius:50%;color:var(--enc-gold);font-size:1.4rem;
}
.status-rules{margin:0;padding-left:1.1rem;display:grid;gap:.4rem}
.status-rules li{color:var(--enc-text);font-size:.9rem;line-height:1.6}
.status-general{
  margin-top:1rem;padding-top:.8rem;border-top:1px solid var(--enc-line);
}
.status-general b{display:block;margin-bottom:.4rem;color:var(--enc-gold);font-size:.66rem;letter-spacing:.2em;text-transform:uppercase}
.status-general ul{margin:0;padding-left:1.1rem;display:grid;gap:.35rem}
.status-general li{color:var(--enc-muted);font-size:.83rem;line-height:1.55}

@media(prefers-reduced-motion:reduce){
  .encyclo-sheet,.encyclo-sheet-scrim,.cell-card{transition:none!important}
}

/* ==========================================================================
   V12.1 — Rareté : couleurs officielles et halo progressif
   Les couleurs sont relevées au pixel sur le symbole imprimé au pied des
   cartes, pas choisies arbitrairement :
       C blanc #ffffff · P vert #1aa236 · R bleu #1aa9f2
       S jaune #feed1a · E rouge #f31c1e
   Les étoiles indiquent le niveau global et le taux d'obtention ; la
   lettre indique la rareté. Les deux sont désormais distingués.
   ========================================================================== */

.encyclo{
  --rar-commun:255,255,255;
  --rar-peu-commun:26,162,54;
  --rar-rare:26,169,242;
  --rar-super-rare:254,237,26;
  --rar-exotique:243,28,30;
}

/* Chaque vignette porte la couleur de sa rareté. */
.boopet-cell{--rar-rgb:255,255,255;--rar-glow:.20;--rar-ring:.45}
.boopet-cell.rarity-commun{--rar-rgb:var(--rar-commun);--rar-glow:.16;--rar-ring:.38}
.boopet-cell.rarity-peu-commun{--rar-rgb:var(--rar-peu-commun);--rar-glow:.24;--rar-ring:.5}
.boopet-cell.rarity-rare{--rar-rgb:var(--rar-rare);--rar-glow:.32;--rar-ring:.62}
.boopet-cell.rarity-super-rare{--rar-rgb:var(--rar-super-rare);--rar-glow:.42;--rar-ring:.78}
.boopet-cell.rarity-exotique{--rar-rgb:var(--rar-exotique);--rar-glow:.52;--rar-ring:.9}

/* ---------- Le halo prend la couleur de la rareté ---------- */
.boopet-cell{
  background:
    radial-gradient(90% 62% at 50% 100%,rgba(var(--rar-rgb),var(--rar-glow)),transparent 72%),
    linear-gradient(180deg,rgba(14,22,44,.75),rgba(6,10,22,.9))!important;
}
.boopet-cell .cell-fog{
  background:radial-gradient(60% 100% at 50% 100%,rgba(var(--rar-rgb),calc(var(--rar-glow) + .18)),transparent 72%)!important;
}
.boopet-cell .cell-plinth{
  background:radial-gradient(closest-side,rgba(var(--rar-rgb),var(--rar-ring)),rgba(var(--rar-rgb),.12) 62%,transparent 78%)!important;
}
.boopet-cell .cell-plinth-ring{
  border-color:rgba(var(--rar-rgb),calc(var(--rar-ring) + .1))!important;
  box-shadow:0 0 14px rgba(var(--rar-rgb),var(--rar-glow)),inset 0 0 12px rgba(255,255,255,.12)!important;
}
.boopet-cell:hover,.boopet-cell:focus-visible{
  border-color:rgba(var(--rar-rgb),calc(var(--rar-ring) + .05))!important;
  box-shadow:0 18px 40px rgba(0,0,0,.5),0 0 30px rgba(var(--rar-rgb),var(--rar-glow))!important;
}
.boopet-cell:hover .cell-plinth-ring,
.boopet-cell:focus-visible .cell-plinth-ring{
  box-shadow:0 0 24px rgba(var(--rar-rgb),calc(var(--rar-glow) + .3)),inset 0 0 16px rgba(255,255,255,.2)!important;
}
.boopet-cell.is-locked{--rar-rgb:140,154,184;--rar-glow:.1;--rar-ring:.2}

/* ---------- Plus la rareté monte, plus la finition est riche ---------- */

/* Rare : anneau extérieur discret autour du socle. */
.boopet-cell.rarity-rare .cell-plinth::after,
.boopet-cell.rarity-super-rare .cell-plinth::after,
.boopet-cell.rarity-exotique .cell-plinth::after{
  content:"";
  position:absolute;
  inset:-22% -9%;
  border-radius:50%;
  border:1px solid rgba(var(--rar-rgb),.4);
  opacity:.75;
  pointer-events:none;
}

/* Super rare : reflet qui balaie lentement la vitrine. */
.boopet-cell.rarity-super-rare::before,
.boopet-cell.rarity-exotique::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  background:linear-gradient(115deg,transparent 36%,rgba(255,255,255,.16) 48%,transparent 60%);
  background-size:260% 260%;
  animation:rarSheen 7s ease-in-out infinite;
  pointer-events:none;
  z-index:1;
}

/* Exotique : couronne holographique et pulsation. */
.boopet-cell.rarity-exotique .cell-plinth-ring{
  animation:rarPulse 3.2s ease-in-out infinite;
}
.boopet-cell.rarity-exotique .cell-stage::after{
  content:"";
  position:absolute;
  left:50%;bottom:2%;
  width:74%;height:22%;
  transform:translateX(-50%);
  border-radius:50%;
  background:conic-gradient(from 0deg,
    rgba(243,28,30,.55),rgba(254,237,26,.5),rgba(26,169,242,.5),
    rgba(26,162,54,.5),rgba(243,28,30,.55));
  filter:blur(9px);
  opacity:.6;
  animation:rarOrbit 9s linear infinite;
  pointer-events:none;
}

@keyframes rarSheen{0%{background-position:-40% 0}55%,100%{background-position:170% 0}}
@keyframes rarPulse{0%,100%{opacity:.85;transform:scale(1)}50%{opacity:1;transform:scale(1.05)}}
@keyframes rarOrbit{to{transform:translateX(-50%) rotate(360deg)}}

/* ---------- Les libellés de rareté prennent leur couleur ---------- */
.encyclo-chip.rarity-commun{color:#ffffff}
.encyclo-chip.rarity-peu-commun{color:#3fd06a}
.encyclo-chip.rarity-rare{color:#4fc0ff}
.encyclo-chip.rarity-super-rare{color:#feed1a}
.encyclo-chip.rarity-exotique{color:#ff5b5d}
.encyclo-chip .encyclo-chip-dot{background:currentColor;opacity:1;box-shadow:0 0 8px currentColor}

/* Pastille de rareté dans la fiche. */
.sheet-tag.rarity{
  border-color:rgba(var(--rar-rgb,255,255,255),.55)!important;
  background:rgba(var(--rar-rgb,255,255,255),.14)!important;
  color:#fff!important;
}
.sheet-tag.rarity .rarity-letter{
  display:inline-grid;place-items:center;
  width:19px;height:19px;
  border-radius:5px;
  background:rgb(var(--rar-rgb,255,255,255));
  color:#0a1020;
  font-size:.7rem;font-weight:900;line-height:1;
}
.sheet-hero{--rar-rgb:255,255,255}
.sheet-hero.rarity-commun{--rar-rgb:var(--rar-commun,255,255,255)}
.sheet-hero.rarity-peu-commun{--rar-rgb:var(--rar-peu-commun,26,162,54)}
.sheet-hero.rarity-rare{--rar-rgb:var(--rar-rare,26,169,242)}
.sheet-hero.rarity-super-rare{--rar-rgb:var(--rar-super-rare,254,237,26)}
.sheet-hero.rarity-exotique{--rar-rgb:var(--rar-exotique,243,28,30)}

/* Les étoiles ne sont plus la rareté : elles marquent le niveau. */
.cell-stars{color:#e5c173}
.cell-level-label{display:none}

/* Pastille « Niveau » distincte de la rareté. */
.sheet-tag.level{border-color:rgba(229,193,115,.4);background:rgba(229,193,115,.1);color:#ffeab0}
.sheet-tag.level .sheet-stars{color:#e5c173;letter-spacing:.04em}
.sheet-fact .rarity-letter{
  display:inline-grid;place-items:center;
  width:19px;height:19px;border-radius:5px;
  background:rgb(var(--rar-rgb,255,255,255));color:#0a1020;
  font-size:.7rem;font-weight:900;font-style:normal;line-height:1;
  vertical-align:-3px;
}
.sheet-form.rarity-commun,.sheet-fact{--rar-rgb:255,255,255}
.sheet-form.rarity-peu-commun{--rar-rgb:26,162,54}
.sheet-form.rarity-rare{--rar-rgb:26,169,242}
.sheet-form.rarity-super-rare{--rar-rgb:254,237,26}
.sheet-form.rarity-exotique{--rar-rgb:243,28,30}

/* ==========================================================================
   V12.2 — Cadre à la couleur de l'affinité · formes distinctes
   Le halo dit la rareté, le cadre dit l'affinité : deux informations
   lisibles d'un coup d'œil sans se gêner.
   ========================================================================== */

/* ---------- Le cadre des vignettes reprend l'affinité ---------- */
.boopet-cell[data-boopet]{
  border-color:rgba(var(--el-rgb),.34)!important;
}
.boopet-cell[data-boopet]:hover,
.boopet-cell[data-boopet]:focus-visible{
  border-color:rgba(var(--el-rgb),.85)!important;
  box-shadow:0 18px 40px rgba(0,0,0,.5),
             0 0 30px rgba(var(--rar-rgb),var(--rar-glow)),
             0 0 0 1px rgba(var(--el-rgb),.5)!important;
}
.boopet-cell[data-boopet].is-selected{
  border-color:rgb(var(--el-rgb))!important;
  box-shadow:0 0 0 1px rgba(var(--el-rgb),.6),
             0 18px 44px rgba(0,0,0,.55),
             0 0 36px rgba(var(--rar-rgb),calc(var(--rar-glow) + .15))!important;
}
.boopet-cell[data-boopet].is-locked{border-color:rgba(255,255,255,.09)!important}

/* Les Soutiens n'ont pas d'affinité : leur cadre suit la rareté. */
.support-cell{border-color:rgba(var(--rar-rgb),.34)!important}
.support-cell:hover,.support-cell:focus-visible{border-color:rgba(var(--rar-rgb),.8)!important}

/* ---------- Le cadre de la fenêtre suit l'affinité de la forme ---------- */
.encyclo-sheet{--el-rgb:226,190,102}
.encyclo-sheet.element-feu{--el-rgb:255,110,52}
.encyclo-sheet.element-aqua{--el-rgb:64,178,255}
.encyclo-sheet.element-terre{--el-rgb:126,214,96}
.encyclo-sheet.element-air{--el-rgb:120,231,244}
.encyclo-sheet.element-lumiere{--el-rgb:255,216,102}
.encyclo-sheet.element-tenebre{--el-rgb:168,110,255}
.encyclo-sheet.is-open{
  border-color:rgba(var(--el-rgb),.5)!important;
  box-shadow:0 40px 110px rgba(0,0,0,.72),
             0 0 0 1px rgba(255,255,255,.05) inset,
             0 0 60px rgba(var(--el-rgb),.18)!important;
  transition:opacity .26s ease,transform .26s cubic-bezier(.22,.9,.3,1),
             visibility .26s,border-color .3s ease,box-shadow .3s ease;
}
/* Le filet supérieur prend la couleur de la rareté de la forme. */
.encyclo-sheet{--rar-rgb:255,255,255}
.encyclo-sheet.rarity-commun{--rar-rgb:255,255,255}
.encyclo-sheet.rarity-peu-commun{--rar-rgb:26,162,54}
.encyclo-sheet.rarity-rare{--rar-rgb:26,169,242}
.encyclo-sheet.rarity-super-rare{--rar-rgb:254,237,26}
.encyclo-sheet.rarity-exotique{--rar-rgb:243,28,30}
.encyclo-sheet::before{
  background:linear-gradient(90deg,transparent,rgb(var(--rar-rgb)) 26%,#fff 50%,rgb(var(--rar-rgb)) 74%,transparent)!important;
  transition:background .3s ease;
}

/* La vitrine de la fiche reprend la rareté de la forme affichée. */
.sheet-form{--rar-rgb:255,255,255}
.sheet-form .cell-fog{
  background:radial-gradient(60% 100% at 50% 100%,rgba(var(--rar-rgb),.4),transparent 72%)!important;
}
.sheet-form .cell-plinth{
  background:radial-gradient(closest-side,rgba(var(--rar-rgb),.55),rgba(var(--rar-rgb),.12) 62%,transparent 78%)!important;
}
.sheet-form .cell-plinth-ring{
  border-color:rgba(var(--rar-rgb),.7)!important;
  box-shadow:0 0 18px rgba(var(--rar-rgb),.4),inset 0 0 12px rgba(255,255,255,.14)!important;
}

/* ---------- Une Base paraît plus petite qu'un Éveil ---------- */
.sheet-form .cell-stage{position:relative}
.sheet-form.form-base .cell-art{
  width:64%;
  height:64%;
  bottom:15%;
}
.sheet-form.form-eveil .cell-art{
  width:92%;
  height:92%;
  bottom:11%;
}
/* Le socle, lui, ne bouge pas : c'est la créature qui grandit. */
.sheet-form .cell-plinth{width:62%}

/* Même échelle dans la galerie : la vignette montre la forme de base. */
.boopet-cell[data-boopet] .cell-art{width:74%;height:74%;bottom:14%}
.boopet-cell[data-boopet][data-stage="eveil"] .cell-art{width:80%;height:80%;bottom:13%}

/* ==========================================================================
   V12.3 — Centrage de la fenêtre sur tous les écrans
   L'ancien centrage reposait sur « top:50% + translate(-50%,-50%) », avec
   une variante « feuille basse » sous 640 px. Sur téléphone la fenêtre se
   retrouvait collée en bas de page, hors de portée.
   On passe à « inset:0 + margin:auto », qui centre sans transformation et
   sans dépendre des unités dvh : la transformation ne sert plus qu'à
   l'animation d'ouverture, elle ne porte plus le positionnement.
   ========================================================================== */

.encyclo-sheet{
  position:fixed!important;
  inset:0!important;
  margin:auto!important;
  width:min(520px,94vw)!important;
  max-width:520px!important;
  height:fit-content!important;      /* indispensable au centrage vertical */
  max-height:min(86vh,900px)!important;
  transform:translateY(14px) scale(.98)!important;
  transition:opacity .26s ease,transform .26s cubic-bezier(.22,.9,.3,1),
             visibility .26s,border-color .3s ease,box-shadow .3s ease;
}
.encyclo-sheet.is-open{
  transform:none!important;
}

@supports (height: 100dvh){
  .encyclo-sheet{max-height:min(86dvh,900px)!important}
}

/* Sur les petits écrans, la fenêtre reste centrée : elle occupe simplement
   plus de largeur et laisse une marge respirable en haut et en bas. */
@media(max-width:640px){
  .encyclo-sheet{
    width:calc(100vw - 1.6rem)!important;
    max-width:calc(100vw - 1.6rem)!important;
    max-height:calc(100vh - 2.4rem)!important;
    border-radius:22px!important;
    transform:translateY(16px) scale(.98)!important;
  }
  @supports (height: 100dvh){
    .encyclo-sheet{max-height:calc(100dvh - 2.4rem)!important}
  }
  .encyclo-sheet.is-open{transform:none!important}
  .encyclo-sheet-inner{padding:1rem 1rem 1.3rem}
}

/* Le bouton de fermeture reste accessible en haut à droite de la fenêtre. */
.encyclo-sheet-close{
  position:sticky!important;
  top:.55rem;
  left:auto!important;
  right:.55rem!important;
  margin-left:auto!important;
  margin-bottom:-38px!important;
}


/* ==========================================================================
   V12.9 — La fenêtre vidéo s’adapte à l’orientation
   Les captures de jeu filmées au téléphone sont en portrait : un cadre
   16/9 fixe les aurait réduites à une bande centrale entre deux bandes
   noires. La scène épouse désormais le format réel de la vidéo.
   ========================================================================== */

.skill-video-stage{
  aspect-ratio:auto!important;
  display:grid;
  place-items:center;
  min-height:220px;
  background:#04070f;
}
/* Vidéo hébergée : elle garde ses proportions, portrait comme paysage. */
.skill-video-stage video.skill-video-frame{
  position:static!important;
  width:auto!important;
  height:auto!important;
  max-width:100%;
  max-height:min(74vh,760px);
  border-radius:0 0 20px 20px;
}
/* Lecteur embarqué (YouTube, Vimeo) : format 16/9 conservé. */
.skill-video-stage iframe.skill-video-frame{
  position:static!important;
  width:100%!important;
  height:auto!important;
  aspect-ratio:16/9;
}
.skill-video-stage .skill-video-empty{position:static!important;padding:3rem 1.5rem}

@media(max-width:600px){
  .skill-video-stage video.skill-video-frame{max-height:64vh}
}


/* ============================================================
   BOOPETS V11.2 — Profil tactique premium (FICHES-BOOPETS)
   Les teintes héritent de l'affinité de la forme affichée.
   ============================================================ */
.tactical-profile{
  position:relative;margin:1rem 0 1.05rem;padding:1px;border-radius:18px;overflow:hidden;
  background:linear-gradient(135deg,rgba(var(--el-rgb),.78),rgba(229,193,115,.28) 42%,rgba(var(--el-rgb),.22));
  box-shadow:0 18px 42px rgba(0,0,0,.28),0 0 28px rgba(var(--el-rgb),.08);
}
.tactical-profile::before{content:"";position:absolute;inset:1px;border-radius:17px;background:
  radial-gradient(120% 85% at 0 0,rgba(var(--el-rgb),.13),transparent 52%),
  linear-gradient(155deg,rgba(13,21,42,.97),rgba(5,9,19,.98));z-index:0}
.tactical-profile>*{position:relative;z-index:1}
.tactical-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.9rem 1rem .7rem;border-bottom:1px solid rgba(var(--el-rgb),.2)}
.tactical-head h3{margin:.1rem 0 0;font-family:Georgia,"Times New Roman",serif;font-size:1.08rem;color:#fff7e7;letter-spacing:.01em}
.tactical-head .sheet-block-kind{color:rgb(var(--el-rgb));font-size:.61rem;letter-spacing:.13em}
.tactical-score{min-width:82px;padding:.45rem .62rem;border:1px solid rgba(var(--el-rgb),.34);border-radius:12px;text-align:center;background:rgba(var(--el-rgb),.08);box-shadow:inset 0 0 18px rgba(var(--el-rgb),.05)}
.tactical-score small{display:block;color:var(--enc-muted);font-size:.55rem;text-transform:uppercase;letter-spacing:.1em}
.tactical-score strong{display:block;margin-top:.08rem;color:#fff6dc;font-size:1.22rem;line-height:1}
.tactical-score em{font-style:normal;font-size:.58rem;color:var(--enc-muted);margin-left:.08rem}
.tactical-body{display:grid;grid-template-columns:minmax(142px,.82fr) minmax(190px,1.18fr);gap:.55rem;align-items:center;padding:.6rem .8rem .75rem}
.tactical-radar{width:100%;height:auto;max-height:180px;overflow:visible;filter:drop-shadow(0 8px 18px rgba(0,0,0,.22))}
.radar-grid polygon,.radar-grid line{fill:none;stroke:rgba(163,178,207,.18);stroke-width:1}
.radar-data{fill:rgba(var(--el-rgb),.30);stroke:rgb(var(--el-rgb));stroke-width:1.6;filter:drop-shadow(0 0 7px rgba(var(--el-rgb),.35))}
.radar-dots circle{fill:#fff6dc;stroke:rgb(var(--el-rgb));stroke-width:1.2}
.radar-labels text{fill:#8f9db8;font:700 8px system-ui,-apple-system,"Segoe UI",sans-serif;letter-spacing:.07em;text-anchor:middle}
.tactical-list{display:grid;gap:.34rem}
.tactical-stat{display:grid;grid-template-columns:minmax(70px,1fr) auto 31px;align-items:center;gap:.35rem;padding:.34rem .42rem;border-radius:9px;background:rgba(255,255,255,.025);border:1px solid rgba(255,255,255,.045)}
.tactical-label{font-size:.68rem;color:#d9e1f1;font-weight:650}
.tactical-stat strong{font-size:.64rem;color:#f3f6ff;text-align:right;font-variant-numeric:tabular-nums}
.tactical-stars{display:flex;gap:1px;white-space:nowrap}
.tactical-stars i{font-style:normal;font-size:.62rem;color:#29344c;text-shadow:none}
.tactical-stars i.is-on{color:rgb(var(--el-rgb));text-shadow:0 0 7px rgba(var(--el-rgb),.5)}
.tactical-legend{display:flex;justify-content:center;flex-wrap:wrap;gap:.28rem .62rem;padding:.48rem .7rem;border-top:1px solid rgba(255,255,255,.055);color:#697791;font-size:.52rem}
@media (max-width:520px){
  .tactical-body{grid-template-columns:1fr;padding:.55rem .7rem .75rem}
  .tactical-radar{max-width:220px;margin:0 auto}
  .tactical-head{padding:.8rem .8rem .65rem}
  .tactical-stat{grid-template-columns:minmax(78px,1fr) auto 31px}
}
@media (prefers-reduced-motion:reduce){.tactical-profile{box-shadow:none}}
