@import url('../bloc/bloc-shared.css');

#top12Page {
  max-width: 100%;
  overflow-x: clip;
}

.top12-page {
  --top12-navy: #192653;
  --top12-accent: #ffc107;
  --top12-panel-shadow: 0 8px 28px rgba(25, 38, 83, 0.06);
  --top12-share-radius: 22px;
}

/* —— Filtres extension (hors capture) —— */

.top12-expansion-panel {
  border: none;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--top12-panel-shadow);
  padding: 1rem 1.15rem 1.15rem;
  margin-bottom: 1.25rem;
}

.top12-expansion-panel__label {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #5c6670;
  margin-bottom: 0.75rem;
}

.top12-expansion-rail {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(25, 38, 83, 0.25) transparent;
}

.top12-expansion-rail::-webkit-scrollbar {
  height: 6px;
}

.top12-expansion-rail::-webkit-scrollbar-thumb {
  background: rgba(25, 38, 83, 0.2);
  border-radius: 999px;
}

.top12-expansion-tile {
  flex: 0 0 auto;
  width: 9.5rem;
  scroll-snap-align: start;
  text-decoration: none;
  color: inherit;
  border-radius: 14px;
  border: 1px solid #e9ecef;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}

.top12-expansion-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(25, 38, 83, 0.1);
  color: inherit;
}

.top12-expansion-tile--active {
  border-color: var(--top12-navy);
  box-shadow: 0 0 0 2px rgba(25, 38, 83, 0.12);
  background: linear-gradient(180deg, rgba(25, 38, 83, 0.04) 0%, #fff 100%);
}

.top12-expansion-tile--all {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 8.5rem;
  padding: 0.75rem;
  text-align: center;
}

.top12-expansion-tile--all i {
  font-size: 1.75rem;
  color: var(--top12-navy);
  margin-bottom: 0.35rem;
}

.top12-expansion-tile--all span {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--top12-navy);
  line-height: 1.25;
}

.top12-expansion-tile__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 4.5rem;
  padding: 0.5rem 0.35rem 0;
}

.top12-expansion-tile__logo img {
  max-height: 3.5rem;
  max-width: 100%;
  object-fit: contain;
}

.top12-expansion-tile__name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--top12-navy);
  text-align: center;
  line-height: 1.25;
  padding: 0.35rem 0.5rem 0.65rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#top12Page .top12-mobile-select .select2-container--bootstrap4 .select2-selection {
  border-radius: 12px;
  border-color: #e9ecef;
  min-height: 2.75rem;
  padding-top: 0.2rem;
}

/* —— Actions capture —— */

.top12-capture-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  margin: 0 0 0.85rem;
}

@media (min-width: 768px) {
  .top12-capture-actions {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }
}

.top12-capture-hint {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #5c6670;
}

.top12-capture-hint i {
  color: var(--top12-navy);
  flex-shrink: 0;
}

.top12-capture-btn {
  font-weight: 700;
  border-radius: 12px;
  padding: 0.55rem 1.1rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.top12-capture-btn .spinner-border {
  vertical-align: -0.15em;
  margin-right: 0.35rem;
}

/* —— Planche partage (zone screenshot) —— */

.top12-share-board {
  max-width: min(100%, 1180px);
  margin: 0 auto 1.5rem;
  padding: 0;
  border-radius: var(--top12-share-radius);
  background: #fff;
  border: 1px solid rgba(25, 38, 83, 0.1);
  box-shadow:
    0 24px 64px rgba(25, 38, 83, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.top12-share-board__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding: 1.35rem 1.25rem 1.15rem;
  background: linear-gradient(135deg, #192653 0%, #243a73 52%, #2d4a8a 100%);
  color: #fff;
  position: relative;
  isolation: isolate;
}

.top12-share-board__header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 193, 7, 0.22) 0%, transparent 42%),
    radial-gradient(circle at 8% 100%, rgba(255, 255, 255, 0.08) 0%, transparent 45%);
  pointer-events: none;
  z-index: 0;
}

.top12-share-board__header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--top12-accent) 0%, #ffe082 50%, var(--top12-accent) 100%);
  z-index: 1;
}

.top12-share-board__header-main,
.top12-share-board__header-logos {
  position: relative;
  z-index: 2;
}

.top12-share-board__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

.top12-share-board__kicker i {
  color: var(--top12-accent);
}

.top12-share-board__title {
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.top12-share-board__scope {
  margin: 0.45rem 0 0;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.25;
}

.top12-share-board__expansion-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  min-height: 5.5rem;
}

.top12-share-board__expansion-logo img {
  max-height: 4.75rem;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.22));
}

.top12-share-board__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  padding: 1rem 0.85rem 0.85rem;
  background: linear-gradient(180deg, #f4f6fb 0%, #ffffff 28%);
}

.top12-share-board__footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem 1rem;
  background: #f8f9fc;
  border-top: 1px solid #e9ecef;
  text-align: center;
}

.top12-share-board__footer-note {
  font-size: 0.78rem;
  font-weight: 600;
  color: #5c6670;
  letter-spacing: 0.01em;
}

.top12-share-board__footer-brand img {
  display: block;
  max-height: 1.35rem;
  width: auto;
  margin: 0 auto;
  opacity: 0.92;
}

/* —— Emplacement carte —— */

.top12-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e6eaf2;
  box-shadow: 0 4px 14px rgba(25, 38, 83, 0.05);
  overflow: hidden;
}

.top12-slot--podium-1 {
  border-color: rgba(232, 163, 23, 0.65);
  box-shadow:
    0 8px 22px rgba(232, 163, 23, 0.18),
    inset 0 3px 0 #f5c518;
}

.top12-slot--podium-2 {
  border-color: rgba(184, 192, 200, 0.9);
  box-shadow:
    0 6px 18px rgba(120, 130, 145, 0.14),
    inset 0 3px 0 #d4dae0;
}

.top12-slot--podium-3 {
  border-color: rgba(196, 114, 42, 0.55);
  box-shadow:
    0 6px 18px rgba(196, 114, 42, 0.14),
    inset 0 3px 0 #e8a86b;
}

.top12-slot__rank {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  z-index: 6;
  min-width: 1.85rem;
  height: 1.85rem;
  padding: 0 0.4rem;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.88rem;
  color: #fff;
  background: var(--top12-navy);
  box-shadow: 0 3px 10px rgba(25, 38, 83, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.85);
}

.top12-slot__rank--1 {
  background: linear-gradient(145deg, #ffe566 0%, #e8a317 100%);
  color: #3d2e00;
}

.top12-slot__rank--2 {
  background: linear-gradient(145deg, #f0f3f6 0%, #b8c0c8 100%);
  color: #2a3238;
}

.top12-slot__rank--3 {
  background: linear-gradient(145deg, #f0b878 0%, #c4722a 100%);
  color: #3d2208;
}

#top12Page .top12-slot > .card-tcg-modern {
  flex: 1 1 auto;
  width: 100%;
  min-height: 100%;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

#top12Page .top12-slot > .card-tcg-modern:hover {
  transform: none;
  box-shadow: none;
}

#top12Page .top12-slot .card-tcg-modern .card-modern-wrapper {
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  min-height: auto;
  gap: 0.45rem;
  padding: 0.65rem 0.55rem 0.7rem;
  height: 100%;
}

#top12Page .top12-slot .card-modern-media {
  flex: none;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  min-height: 0;
  aspect-ratio: 63 / 88;
  border-radius: 10px;
  background: linear-gradient(165deg, #f8f9fb 0%, #eef1f6 100%);
}

#top12Page .top12-slot .card-modern-media > a img,
#top12Page .top12-slot .card-modern-media > a .card-img-top {
  object-fit: contain;
  transform: none;
}

#top12Page .top12-slot .card-tcg-modern:hover .card-modern-media > a img {
  transform: none;
}

#top12Page .top12-slot .card-modern-content {
  align-items: center;
  width: 100%;
  flex: 1 1 auto;
}

#top12Page .top12-slot .card-modern-header h6 {
  font-size: 0.8rem;
  line-height: 1.3;
  -webkit-line-clamp: 2;
}

#top12Page .top12-slot .card-set {
  font-size: 0.7rem;
  color: #6c757d;
}

#top12Page .top12-slot .card-modern-price {
  font-size: clamp(1rem, 2.4vw, 1.28rem);
  font-weight: 800;
  margin: 0.15rem 0 0;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

#top12Page .top12-slot .card-modern-evolution {
  font-size: clamp(0.82rem, 1.75vw, 1rem);
  font-weight: 700;
  margin-bottom: 0 !important;
  line-height: 1.3;
  max-width: 100%;
}

#top12Page .top12-slot .card-modern-evolution span {
  display: block;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  max-width: 100%;
  padding: 0.2rem 0.35rem;
}

#top12Page .top12-slot .card-modern-media .badge-rarity {
  top: 6px;
  right: 6px;
  left: auto;
  transform: scale(0.92);
}

#top12Page .top12-slot .card-modern-media .badge-top,
#top12Page .top12-slot .card-modern-media .badge-message {
  font-size: 0.62rem;
}

.top12-empty {
  border-radius: 16px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: #fff;
  border: 2px dashed #dee2e6;
  color: #5c6670;
}

.top12-empty i {
  font-size: 2rem;
  color: var(--top12-navy);
  opacity: 0.5;
  display: block;
  margin-bottom: 0.75rem;
}

/* —— Top des produits (images boîtes / displays) —— */

.top12-page--products .top12-slot .card-modern-media--product,
.top12-page--products .top12-slot .card-modern-media {
  aspect-ratio: 1;
  max-width: none;
}

.top12-page--products .top12-slot .card-modern-media > a img {
  object-fit: contain;
  padding: 0.35rem;
}

/* —— Écran moyen : 4 colonnes —— */

@media (min-width: 768px) {
  .top12-share-board__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
    padding: 1.1rem 1.1rem 0.95rem;
  }
}

/* —— Grand écran : 6 colonnes —— */

@media (min-width: 992px) {
  .top12-share-board__header {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
    padding: 1.35rem 1.75rem 1.2rem;
    gap: 1.5rem;
  }

  .top12-share-board {
    max-width: min(100%, 1520px);
  }

  .top12-share-board__grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.9rem;
    padding: 1.15rem 1.35rem 1rem;
  }

  #top12Page .top12-slot .card-tcg-modern .card-modern-wrapper {
    padding: 0.55rem 0.5rem 0.6rem;
    gap: 0.35rem;
  }

  .top12-share-board__footer {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
    padding: 0.75rem 1.35rem 0.85rem;
  }

  .top12-share-board__footer-brand img {
    margin: 0;
  }
}

@media (min-width: 1200px) {
  .top12-share-board__grid {
    gap: 1rem;
    padding: 1.25rem 1.5rem 1.05rem;
  }
}

/* Export PNG (html2canvas) : prix / variation encore plus lisibles */
.top12-share-board.is-capture-export .top12-slot .card-modern-price {
  font-size: 1.32rem !important;
}

.top12-share-board.is-capture-export .top12-slot .card-modern-evolution {
  font-size: 1.05rem !important;
}

.top12-share-board.is-capture-export .top12-slot .card-modern-evolution span {
  padding: 0.25rem 0.4rem;
}

/* Capture / impression : pas d’effets parasites */
@media print {
  .top12-capture-hint,
  .top12-expansion-panel,
  #top12Page .breadcrumb {
    display: none !important;
  }

  .top12-share-board {
    box-shadow: none;
    border: 1px solid #ccc;
    max-width: 100%;
  }
}
