/* ============================================================
   neo — les Exploits
   Chargé après neo.css, sous html.neo comme lui. Un fichier par
   chantier pour que les refontes parallèles ne se marchent pas dessus.
   ============================================================
   Le mur (game.js, `exploitsMur`) : une plaque qui compte, ce qui est à
   portée, puis une famille à la fois en onglets. Trois plans : le fond,
   la carte posée dessus, l'illustration qui en sort. La rareté se lit à
   la couleur du filet sous l'image et de la pastille ; le sceau rouge 済
   dit « obtenu ». Une carte verrouillée montre une silhouette.
   Aucun dégradé décoratif : le seul fond le panorama de la famille dans
   l'aplat du texte, pour la lecture. prefers-reduced-motion coupe tout.
   ============================================================ */

html.neo .ex-mur {
  --rc-commun: #a3a8b6;
  --rc-rare: var(--n-chakra);
  --rc-epique: var(--n-rouge);
  --rc-legendaire: var(--n-or);
  --ex-sceau: #e2372b;
  grid-column: 1 / -1;
  /* Élément de grille : sans min-width 0, le rail de cartes impose sa largeur
     de contenu à la colonne et le mur sort de l'écran sur grand écran. */
  min-width: 0;
  font-family: var(--n-titre);
  color: var(--n-encre);
}
html.neo #meta-content > .ex-mur,
html.neo #meta-content > .secret-block { grid-column: 1 / -1; }
html.neo .ex-mur .r-commun { --rc: var(--rc-commun); }
html.neo .ex-mur .r-rare { --rc: var(--rc-rare); }
html.neo .ex-mur .r-epique { --rc: var(--rc-epique); }
html.neo .ex-mur .r-legendaire { --rc: var(--rc-legendaire); }

/* ---------- la plaque ---------- */
html.neo .ex-plaque {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "total rars" "label rars" "bar bar" "reste reste";
  align-items: end;
  gap: 2px 16px;
  margin: -6px 0 18px;
  padding: 16px 16px 14px;
  background: var(--n-s1);
  border: 1px solid var(--n-filet);
  border-radius: var(--n-r);
  box-shadow: var(--n-ombre);
  animation: ex-monte 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
html.neo .ex-total { grid-area: total; display: flex; align-items: baseline; gap: 6px; line-height: 1; }
html.neo .ex-total b {
  font: 900 46px/0.9 var(--n-titre);
  letter-spacing: -0.03em;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
html.neo .ex-total span { font: 800 18px/1 var(--n-titre); color: var(--n-pale); font-variant-numeric: tabular-nums; }
html.neo .ex-total-l {
  grid-area: label;
  margin: 4px 0 0;
  font: 800 11px/1.2 var(--n-titre);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--n-orange);
}
html.neo .ex-rars {
  grid-area: rars;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  align-self: center;
}
html.neo .ex-rars li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 6px 8px 7px 10px;
  background: var(--n-s2);
  border-radius: 10px;
  border-left: 3px solid var(--rc);
  min-width: 0;
}
html.neo .ex-rars span {
  max-width: 100%;
  font: 700 10px/1.2 var(--n-titre);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--n-doux);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html.neo .ex-rars b { font: 800 14px/1 var(--n-titre); color: #fff; font-variant-numeric: tabular-nums; }
html.neo .ex-rars small { font-size: 11px; font-weight: 700; color: var(--n-pale); }
html.neo .ex-bar {
  height: 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
html.neo .ex-bar i {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: var(--n-orange);
  transform: scaleX(var(--p, 0));
  transform-origin: left center;
  animation: ex-barre 0.9s 0.15s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
html.neo .ex-bar-grand { grid-area: bar; margin-top: 12px; height: 8px; }
html.neo .ex-reste {
  grid-area: reste;
  margin: 10px 0 0;
  font: 600 12.5px/1.4 var(--n-titre);
  color: var(--n-doux);
}

/* ---------- à portée ---------- */
html.neo .ex-portee { margin: 0 0 18px; }
html.neo .ex-portee h3,
html.neo .ex-filtres + .ex-grid::before {
  font: 800 11.5px/1.25 var(--n-titre);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--n-orange);
}
html.neo .ex-portee h3 { display: flex; gap: 8px; align-items: center; margin: 0 2px 10px; }
html.neo .ex-portee h3 span {
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--n-orange);
  color: #1a0d00;
  font-size: 11px;
  letter-spacing: 0;
  text-align: center;
}
html.neo .ex-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(176px, 46%);
  gap: 10px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  /* Le rail déborde jusqu'aux bords de l'écran ; la marge de défilement garde
     la première carte sur la gouttière au lieu de la coller au bord. */
  --ex-gout: max(16px, calc(50vw - 50%));
  margin: 0 calc(50% - 50vw);
  padding: 2px var(--ex-gout) 10px;
  scroll-padding-inline: var(--ex-gout);
  scrollbar-width: none;
}
html.neo .ex-rail::-webkit-scrollbar { display: none; }
html.neo .ex-rail .ex-card { scroll-snap-align: start; }
html.neo .ex-rail .ex-card.ouvert { grid-column: auto; }
html.neo .ex-vide {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--n-s1);
  border: 1px dashed var(--n-filet-fort);
  color: var(--n-doux);
  font: 600 13px/1.45 var(--n-titre);
}

/* ---------- les onglets ----------
   ⚠️ Pas de `position: sticky` : le conteneur de défilement du projet est
   `body { overflow: hidden auto }`, sticky n'y colle jamais (voir style.css,
   deux essais retirés). Le bouton « Famille suivante » en bas de chaque
   panneau ramène aux onglets à la place. */
html.neo .ex-nav {
  scroll-margin-top: calc(70px + env(safe-area-inset-top, 0px));
  margin: 0 calc(50% - 50vw) 12px;
  padding: 2px 0 10px;
}
html.neo .ex-nav-in {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 0 max(16px, calc(50vw - 50%));
  scrollbar-width: none;
}
html.neo .ex-nav-in::-webkit-scrollbar { display: none; }
html.neo .ex-tab {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  column-gap: 8px;
  align-items: center;
  min-height: 48px;
  padding: 6px 12px 6px 6px;
  border-radius: 12px;
  border: 1px solid var(--n-filet);
  background: var(--n-s1);
  color: var(--n-doux);
  font-family: var(--n-titre);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.18s, border-color 0.18s, transform 0.12s;
}
html.neo .ex-tab:active { transform: scale(0.96); }
html.neo .ex-tab-k {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--n-s3);
  font: 900 18px/1 var(--n-titre);
  color: var(--n-encre);
}
html.neo .ex-tab-n { font: 800 12.5px/1.15 var(--n-titre); white-space: nowrap; }
html.neo .ex-tab-c { font: 700 11px/1.2 var(--n-titre); color: var(--n-pale); font-variant-numeric: tabular-nums; }
html.neo .ex-tab.on {
  background: var(--n-s3);
  border-color: rgba(255, 138, 31, 0.6);
  color: #fff;
}
html.neo .ex-tab.on .ex-tab-k { background: var(--n-orange); color: #1a0d00; }
html.neo .ex-tab.on .ex-tab-c { color: var(--n-orange); }
html.neo .ex-tab:focus-visible,
html.neo .ex-filtre:focus-visible { outline: 2px solid var(--n-orange); outline-offset: 2px; }

/* ---------- une famille ---------- */
html.neo .ex-panel[hidden] { display: none !important; }
html.neo .ex-band {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 176px;
  margin: 0 0 12px;
  padding: 64px 16px 14px;
  border-radius: var(--n-r);
  border: 1px solid var(--n-filet);
  background: var(--n-s1);
  box-shadow: var(--n-ombre);
}
html.neo .ex-band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(10, 11, 15, 0.1) 0%, rgba(10, 11, 15, 0.55) 48%, rgba(10, 11, 15, 0.94) 100%);
}
html.neo .ex-band-d {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -3;
  animation: ex-decor 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
html.neo .ex-band-p {
  position: absolute;
  right: -4%;
  bottom: -62%;
  height: 205%;
  width: auto;
  z-index: -2;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.7));
  -webkit-mask-image: linear-gradient(180deg, #000 50%, transparent 74%);
  mask-image: linear-gradient(180deg, #000 50%, transparent 74%);
  animation: ex-perso 0.6s 0.08s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
html.neo .ex-band-txt { position: relative; max-width: 66%; }
html.neo .ex-band-k {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 8px;
  border-radius: 10px;
  background: var(--n-orange);
  color: #1a0d00;
  font: 900 22px/1 var(--n-titre);
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.8);
}
html.neo .ex-band h3 {
  margin: 0;
  font: 900 24px/1.05 var(--n-titre);
  letter-spacing: -0.015em;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
  text-transform: none;
}
html.neo .ex-band p {
  margin: 6px 0 0;
  font: 600 12.5px/1.4 var(--n-titre);
  color: #dfe1e8;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
}
html.neo .ex-band-c { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
html.neo .ex-band-c span { font: 700 13px/1 var(--n-titre); color: var(--n-doux); font-variant-numeric: tabular-nums; white-space: nowrap; }
html.neo .ex-band-c b { font-size: 18px; font-weight: 900; color: #fff; }
html.neo .ex-band-c .ex-bar { flex: 1; max-width: 160px; }

/* ---------- les filtres ---------- */
html.neo .ex-filtres {
  display: inline-flex;
  gap: 2px;
  margin: 0 0 12px;
  padding: 3px;
  border-radius: 12px;
  background: var(--n-s1);
  border: 1px solid var(--n-filet);
}
html.neo .ex-filtre {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--n-doux);
  font: 700 12.5px/1 var(--n-titre);
  cursor: pointer;
  touch-action: manipulation;
}
html.neo .ex-filtre.on { background: var(--n-s3); color: #fff; box-shadow: var(--n-ombre-choix); }
html.neo .ex-mur[data-filtre="got"] .ex-panels .ex-card:not(.got),
html.neo .ex-mur[data-filtre="faire"] .ex-panels .ex-card.got { display: none; }
html.neo .ex-grid-vide { display: none; margin: 4px 2px 0; color: var(--n-pale); font: 600 13px/1.4 var(--n-titre); }
html.neo .ex-panel.vide .ex-grid-vide { display: block; }
html.neo .ex-suite {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 14px 0 4px;
  padding: 10px 14px 10px 10px;
  min-height: 56px;
  border-radius: 14px;
  border: 1px solid var(--n-filet);
  background: var(--n-s1);
  color: var(--n-encre);
  font-family: var(--n-titre);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.12s, border-color 0.18s;
}
html.neo .ex-suite:active { transform: scale(0.98); }
html.neo .ex-suite:focus-visible { outline: 2px solid var(--n-orange); outline-offset: 2px; }
html.neo .ex-suite-k { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--n-s3); font: 900 19px/1 var(--n-titre); }
html.neo .ex-suite-t { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
html.neo .ex-suite-t small { font: 800 10.5px/1.2 var(--n-titre); letter-spacing: 0.12em; text-transform: uppercase; color: var(--n-orange); }
html.neo .ex-suite-t b { font: 800 14.5px/1.2 var(--n-titre); color: #fff; }
html.neo .ex-suite-f { font: 900 20px/1 var(--n-titre); color: var(--n-orange); transition: transform 0.18s; }
@media (hover: hover) {
  html.neo .ex-suite:hover { border-color: var(--n-filet-fort); }
  html.neo .ex-suite:hover .ex-suite-f { transform: translateX(4px); }
}

/* ---------- les cartes ---------- */
html.neo .ex-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
html.neo .ex-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: 16px;
  background: var(--n-s1);
  border: 1px solid var(--n-filet);
  box-shadow: var(--n-ombre-choix);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.14s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.2s, border-color 0.2s;
  animation: ex-carte 0.42s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: calc(min(var(--i, 0), 14) * 32ms);
}
html.neo .ex-card:active { transform: scale(0.97); }
@media (hover: hover) {
  html.neo .ex-card:hover { transform: translateY(-3px); box-shadow: var(--n-ombre); border-color: var(--n-filet-fort); }
  html.neo .ex-card:hover .ex-art-p { transform: translateY(-4px) scale(1.04); }
}
html.neo .ex-art {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--n-s2);
  border-bottom: 3px solid var(--rc);
}
html.neo .ex-art-d {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
html.neo .ex-art-p {
  position: absolute;
  left: 50%;
  bottom: -2px;
  height: 104%;
  width: auto;
  max-width: none;
  translate: -50% 0;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.65));
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.25s;
}
/* Verrouillé : le lieu s'éteint, le personnage n'est plus qu'une ombre. */
html.neo .ex-card:not(.got) .ex-art-d { filter: grayscale(1) brightness(0.66) contrast(0.8); }
html.neo .ex-card:not(.got) .ex-art-d.seul { filter: grayscale(0.9) brightness(0.62) contrast(0.85); }
html.neo .ex-card:not(.got) .ex-art-p { filter: brightness(0) drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5)); opacity: 0.9; }
html.neo .ex-rar {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px 3px 6px;
  border-radius: 7px;
  background: rgba(10, 11, 15, 0.82);
  color: var(--rc);
  font: 800 9.5px/1.2 var(--n-titre);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
html.neo .ex-rar::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--rc); transform: rotate(45deg); }
html.neo .ex-sceau {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: var(--ex-sceau);
  color: #fff;
  font: 900 17px/1 var(--n-titre);
  transform: rotate(-8deg);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85) inset, 0 6px 12px -4px rgba(0, 0, 0, 0.8);
  animation: ex-sceau 0.45s 0.25s cubic-bezier(0.3, 1.6, 0.5, 1) both;
}
html.neo .ex-txt { display: flex; flex-direction: column; gap: 4px; padding: 10px 11px 11px; flex: 1; }
html.neo .ex-txt h4 {
  margin: 0;
  font: 800 14px/1.2 var(--n-titre);
  color: #fff;
  letter-spacing: -0.005em;
  overflow-wrap: anywhere;
}
html.neo .ex-card:not(.got) .ex-txt h4 { color: var(--n-encre); }
html.neo .ex-cond { margin: 0; font: 500 12px/1.38 var(--n-titre); color: var(--n-doux); }
html.neo .ex-how { margin: 0; font: 700 11.5px/1.35 var(--n-titre); color: var(--n-or); }
html.neo .ex-gain {
  margin: auto 0 0;
  padding-top: 4px;
  font: 800 11.5px/1.2 var(--n-titre);
  color: var(--rc);
  font-variant-numeric: tabular-nums;
}
html.neo .ex-card.got .ex-gain { color: var(--n-vert); }
html.neo .ex-prog {
  height: 4px;
  margin-top: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
html.neo .ex-prog i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--rc);
  transform: scaleX(var(--p, 0));
  transform-origin: left center;
  animation: ex-barre 0.8s 0.2s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
html.neo .ex-prog-l { margin: 0; font: 600 11px/1.3 var(--n-titre); color: var(--n-pale); }
html.neo .ex-prog-l b { color: var(--n-encre); font-weight: 800; font-variant-numeric: tabular-nums; }
html.neo .ex-card.rempli { border-color: rgba(67, 209, 122, 0.55); }
html.neo .ex-card.rempli .ex-prog i { background: var(--n-vert); }
html.neo .ex-card.rempli .ex-prog-l { color: var(--n-vert); }
html.neo .ex-card.hors .ex-art { border-bottom-color: var(--n-or); }

/* Ouverte au doigt : la carte prend la rangée, l'image s'élargit, le détail paraît. */
html.neo .ex-plus { display: none; margin: 6px 0 0; padding-top: 8px; border-top: 1px solid var(--n-filet); font: 600 12px/1.45 var(--n-titre); color: var(--n-doux); }
html.neo .ex-card.ouvert { border-color: var(--rc); box-shadow: var(--n-ombre); }
html.neo .ex-card.ouvert .ex-plus { display: block; animation: ex-plus 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
html.neo .ex-grid .ex-card.ouvert { grid-column: 1 / -1; }
html.neo .ex-grid .ex-card.ouvert .ex-art { aspect-ratio: 21 / 9; }
html.neo .ex-grid .ex-card.ouvert .ex-txt h4 { font-size: 16px; }
html.neo .ex-grid .ex-card.ouvert .ex-cond { font-size: 13px; }

/* ---------- grand écran ---------- */
@media (min-width: 900px) {
  html.neo .ex-plaque {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "total bar rars" "label reste rars";
    align-items: center;
    gap: 4px 28px;
    padding: 20px 22px;
  }
  html.neo .ex-bar-grand { margin-top: 0; }
  html.neo .ex-reste { margin: 0; }
  html.neo .ex-rars { grid-template-columns: repeat(4, auto); }
  html.neo .ex-rars li { gap: 4px; padding: 8px 12px; min-width: 96px; }
  html.neo .ex-rars span { font-size: 10.5px; letter-spacing: 0.05em; }
  html.neo .ex-rail { grid-auto-columns: 200px; margin: 0; padding: 2px 0 10px; }
  html.neo .ex-nav { margin: 0 0 14px; padding: 0; }
  html.neo .ex-nav-in { flex-wrap: wrap; padding: 0; overflow: visible; }
  html.neo .ex-band { min-height: 210px; padding: 84px 26px 20px; }
  html.neo .ex-band-p { right: 2%; bottom: -78%; height: 230%; }
  html.neo .ex-band-txt { max-width: 58%; }
  html.neo .ex-band h3 { font-size: 30px; }
  html.neo .ex-grid { grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: 12px; }
}

/* ---------- le mouvement ---------- */
@keyframes ex-monte { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes ex-carte { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes ex-barre { from { transform: scaleX(0); } }
@keyframes ex-decor { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: none; } }
@keyframes ex-perso { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes ex-sceau { from { opacity: 0; transform: rotate(-8deg) scale(1.8); } to { opacity: 1; transform: rotate(-8deg) scale(1); } }
@keyframes ex-plus { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html.neo .ex-mur *,
  html.neo .ex-mur { animation: none !important; transition: none !important; }
}
