/* Animation de tirage (draw.html) : ouverture du booster, pile de cartes, carte qui tremble,
   lueur qui monte en rareté (fakeout), flash, retournement de la carte, puis récapitulatif. */

/* Fond sombre par-dessus toute la page */
.pull-overlay {
  position: fixed;
  inset: 0;                       /* raccourci de top/right/bottom/left: 0 : couvre tout l'écran */
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at center, rgba(30, 34, 48, 0.96), rgba(5, 6, 10, 0.98) 70%);
}

.pull-overlay[hidden] {
  display: none;                  /* sinon "display: flex" ci-dessus empêcherait l'attribut hidden de cacher l'overlay */
}

.pull-stage {
  text-align: center;
  color: #e7eaf4;
  perspective: 1200px;            /* donne de la profondeur à toutes les animations 3D */
  user-select: none;              /* pas de sélection de texte quand on clique vite */
  -webkit-user-select: none;
  touch-action: manipulation;     /* sur mobile : pas de zoom au double tap */
}

/* Aucune image de l'animation ne peut être glissée */
.pull-stage img {
  -webkit-user-drag: none;
  pointer-events: none;           /* le clic passe à travers l'image et arrive sur son conteneur */
}

/* Retour visuel : la carte (ou le booster) s'enfonce légèrement tant que le clic est maintenu */
.pull-card-wrap,
.pull-booster {
  transition: scale 0.12s ease;
}

.pull-card-wrap.pressed,
.pull-booster.pressed {
  scale: 0.96;
}

.pull-counter {
  color: #9aa0ad;
  font-size: 0.9rem;
}

/* ---------- Ouverture du booster ---------- */

.pull-booster {
  width: min(32vh, 70vw, 340px);  /* s'adapte à l'écran : grand sur ordinateur, sans déborder sur mobile */
  margin: 24px auto;
  cursor: pointer;                /* on clique dessus pour l'ouvrir */
  transform-style: preserve-3d;
}

.pull-booster[hidden] {
  display: none;
}

.pull-booster img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.7));
}

/* 1. Le paquet arrive du fond, en tournant légèrement */
.pull-booster.arrive {
  animation: booster-arrive 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes booster-arrive {
  from { transform: translateZ(-600px) rotateY(-35deg) rotateX(15deg); opacity: 0; }
  to   { transform: translateZ(0) rotateY(0) rotateX(0); opacity: 1; }
}

/* 2. Il tremble de plus en plus fort */
.pull-booster.charge {
  animation: booster-charge 1.1s ease-in both;
}

@keyframes booster-charge {
  0%   { transform: rotate(0deg) scale(1); }
  20%  { transform: rotate(-2deg) scale(1.02); }
  40%  { transform: rotate(3deg) scale(1.03); }
  60%  { transform: rotate(-4deg) scale(1.05); }
  80%  { transform: rotate(5deg) scale(1.07); }
  100% { transform: rotate(0deg) scale(1.1); }
}

/* 3. Il s'ouvre : il s'envole vers l'avant et disparaît */
.pull-booster.ouvre {
  animation: booster-ouvre 0.6s ease-in both;
}

@keyframes booster-ouvre {
  from { transform: translateZ(0) scale(1.1); opacity: 1; }
  to   { transform: translateZ(400px) translateY(-60px) scale(1.4); opacity: 0; }
}

/* ---------- La carte et la pile ---------- */

/* Conteneur de la carte : repère pour la pile et l'onde de choc.
   Mêmes proportions qu'une vraie carte et que l'image du dos (538 x 742), pour qu'il n'y ait aucun contour autour
   et que les images TCGdex (600 x 825, presque le même rapport) ne soient quasiment pas rognées. */
.pull-card-wrap {
  position: relative;
  width: min(40vh, 80vw, 390px);  /* environ 57 % de la hauteur de l'écran, sans déborder sur mobile */
  aspect-ratio: 538 / 742;        /* la hauteur suit automatiquement la largeur */
  margin: 24px auto;
  transform-style: preserve-3d;
}

/* Pile de cartes restantes : des dos de cartes décalés vers l'arrière */
.pull-stack {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.pull-stack[hidden] {
  display: none;
}

.pull-stack span {
  position: absolute;
  inset: 0;
  background: url("../images/dos_carte.webp") center / 100% 100% no-repeat;
}

/* drop-shadow suit la forme de l'image (coins arrondis), contrairement à box-shadow qui suit le rectangle */
.pull-stack span:nth-child(1) { transform: translate3d(8px, 8px, -30px) rotate(2deg); filter: brightness(0.55) drop-shadow(0 10px 14px rgba(0, 0, 0, 0.6)); }
.pull-stack span:nth-child(2) { transform: translate3d(16px, 14px, -60px) rotate(4deg); filter: brightness(0.4) drop-shadow(0 10px 14px rgba(0, 0, 0, 0.6)); }
.pull-stack span:nth-child(3) { transform: translate3d(24px, 20px, -90px) rotate(6deg); filter: brightness(0.25) drop-shadow(0 10px 14px rgba(0, 0, 0, 0.6)); }

/* La carte : deux faces (dos et face avant) dans un même bloc 3D */
.pull-card {
  --glow: #8d93a3;                /* couleur de la lueur, changée par le JavaScript selon la rareté */
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
  transform-style: preserve-3d;   /* les deux faces restent en 3D quand la carte tourne */
  transition: transform 0.7s ease;
}

/* Dos de la carte : une image de fond (et non une balise <img>), pour qu'elle ne soit pas
   glissée ou sélectionnée comme une image quand on maintient le clic.
   Au repos : juste une ombre, pas de lueur. */
.card-back {
  background: url("../images/dos_carte.webp") center / 100% 100% no-repeat;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.7));
  transition: filter 0.6s ease;
}

.card-front {
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.7);
  transition: box-shadow 0.6s ease;
}

/* La lueur n'apparaît qu'une fois le tirage lancé, et reste douce.
   Elle est posée sur chaque face (un filtre sur la carte entière casserait l'effet 3D). */
.pull-card.glowing .card-back {
  filter:
    drop-shadow(0 0 6px color-mix(in srgb, var(--glow) 70%, transparent))
    drop-shadow(0 0 18px color-mix(in srgb, var(--glow) 40%, transparent));
}

.pull-card.glowing .card-front {
  box-shadow:
    0 0 12px 1px color-mix(in srgb, var(--glow) 55%, transparent),
    0 0 36px 6px color-mix(in srgb, var(--glow) 25%, transparent);
}

.pull-card.flipped {
  transform: rotateY(180deg);     /* retourne la carte : on voit la face avant */
}
/* Nouvelle carte : elle sort de la pile vers l'avant */
.pull-card.deal {
  animation: deal 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes deal {
  from { transform: translate3d(20px, 16px, -80px) rotate(4deg); opacity: 0.6; }
  to   { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 1; }
}

.card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;    /* une face disparaît quand elle est de dos */
}



.card-front {
  transform: rotateY(180deg);     /* la face avant commence déjà retournée */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  border-radius: 12px;
  border: 2px solid var(--glow);
  background: linear-gradient(160deg, #1a1d27 30%, color-mix(in srgb, var(--glow) 70%, #1a1d27));
}

.front-rarity {
  padding: 0 12px;
  font-size: clamp(1.2rem, 3vh, 1.8rem);   /* le texte grandit avec la carte */
  font-weight: bold;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.front-number {
  color: #e7eaf4;
  font-size: 0.85rem;
}

/* Image de la vraie carte : couvre toute la face avant, par-dessus le texte (rareté + numéro).
   Tant qu'elle n'a pas de src, elle est cachée et le texte sert de secours. */
.front-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;              /* un peu moins que la face (12px) : la bordure de couleur reste visible */
  user-select: none;
  pointer-events: none;             /* le clic passe à la carte, pas à l'image */
}

.front-image:not([src]),
.front-image[src=""] {
  display: none;
}

/* Image de la carte dans le récap (même principe que la face avant) */
.mini-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9px;
  pointer-events: none;
}

/* Suspense : la carte tremble */
.pull-card.shaking {
  animation: shake 0.3s infinite;
}

@keyframes shake {
  0%   { transform: translate(0, 0) rotate(0deg); }
  25%  { transform: translate(-3px, 2px) rotate(-1.5deg); }
  50%  { transform: translate(3px, -2px) rotate(1.5deg); }
  75%  { transform: translate(-2px, -1px) rotate(-1deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

/* Hyper Rare : la lueur pulse en continu */
.pull-card.legendary .card-front {
  animation: pulse 1.1s ease-in-out infinite alternate;
}

@keyframes pulse {
  from {
    box-shadow: 0 0 14px 2px color-mix(in srgb, var(--glow) 60%, transparent),
      0 0 40px 8px color-mix(in srgb, var(--glow) 30%, transparent);
  }
  to {
    box-shadow: 0 0 24px 6px color-mix(in srgb, var(--glow) 75%, transparent),
      0 0 80px 18px color-mix(in srgb, var(--glow) 40%, transparent);
  }
}
/* Flash blanc plein écran à chaque montée de rareté */
.pull-flash {
  position: fixed;
  inset: 0;
  background-color: #ffffff;
  opacity: 0;
  pointer-events: none;           /* le flash ne bloque pas les clics */
}

.pull-flash.on {
  animation: flash 0.5s ease-out;
}

@keyframes flash {
  from { opacity: 0.6; }
  to   { opacity: 0; }
}

/* Onde de choc autour de la carte pour les raretés IR et plus */
.pull-burst {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 100%;                    /* suit la taille de la carte */
  aspect-ratio: 1;
  border: 4px solid var(--glow, #eab711);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.pull-burst.on {
  animation: burst 0.9s ease-out;
}

@keyframes burst {
  from { transform: scale(0.3); opacity: 1; }
  to   { transform: scale(2.6); opacity: 0; }
}

.pull-hint {
  min-height: 1.5em;              /* garde la place même quand le texte est vide */
  color: #9aa0ad;
}

.pull-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.pull-actions[hidden] {
  display: none;                  /* sinon "display: flex" empêcherait l'attribut hidden de les cacher */
}

.pull-secondary {
  background-color: transparent;
  color: #e7eaf4;
  border: 1px solid #727272;
}

.pull-secondary:hover {
  background-color: transparent;
  border-color: #ffffff;
}

/* Récapitulatif à la fin du tirage : les cartes obtenues en grandes cartes, comme dans un jeu gacha */
.pull-summary {
  width: min(960px, 92vw);
  max-height: calc(100vh - 160px);  /* laisse la place à la barre du bas */
  overflow-y: auto;                 /* avec 100 cartes, la grille défile */
  margin: 0 auto;
  padding: 8px;
}

/* Grille : autant de colonnes que la place le permet (100 cartes) */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 14px;
}

/* Un booster (10 cartes) : 5 grandes cartes par ligne, 2 lignes */
.summary-grid.summary-grid-booster {
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

/* Tirage gratuit : une seule carte -> dans la colonne du milieu (même taille que les cartes d'un booster) */
.summary-grid-booster > .mini-card:only-child {
  grid-column: 3;
}

/* Les cartes du récap s'ouvrent en grand au clic */
.summary-grid .mini-card {
  cursor: zoom-in;
}

/* "translate" et pas "transform" : transform est déjà pris par l'animation d'apparition (qui garderait la main) */
.summary-grid .mini-card {
  transition: translate 0.15s ease;
}

.summary-grid .mini-card:hover {
  translate: 0 -4px;
}

/* ---------- Carte du récap en grand ---------- */

.recap-zoom {
  --c: #8d93a3;                     /* couleur de la rareté, changée par le JavaScript */
  position: relative;
  width: min(420px, calc(100% - 32px));
  margin: auto;
  padding: 0;
  background: none;
  border: none;
  color: #e7eaf4;
  text-align: center;
  overflow: visible;
}

.recap-zoom::backdrop {
  background-color: rgba(0, 0, 0, 0.85);
}

.zoom-image {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 0 28px 4px color-mix(in srgb, var(--c) 55%, transparent),
    0 18px 40px rgba(0, 0, 0, 0.7);
}

.zoom-name {
  margin: 16px 0 4px;
  font-size: 1.4rem;
  font-weight: bold;
  color: #ffffff;
}

.zoom-info {
  margin: 0;
  color: var(--c);
  font-weight: bold;
}

/* Croix de fermeture : au-dessus de la carte, à droite */
.zoom-close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  background-color: #1a1d27;
  color: #e7eaf4;
  font-size: 1.1rem;
}

.zoom-close:hover {
  background-color: #23273a;
  color: #ffffff;
}

/* Une carte du récap : mêmes proportions et même style que la face avant de l'animation */
.mini-card {
  position: relative;
  aspect-ratio: 538 / 742;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 3px solid var(--c);
  border-radius: 12px;
  background: linear-gradient(160deg, #1a1d27 30%, color-mix(in srgb, var(--c) 70%, #1a1d27));
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5);
  text-align: center;
  opacity: 0;                       /* invisible au départ : l'animation la fait apparaître */
  animation: apparition 0.4s cubic-bezier(0.2, 0.8, 0.3, 1.3) forwards;   /* "forwards" : elle reste visible à la fin */
}

.mini-rarity {
  font-size: 0.9rem;
  font-weight: bold;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.mini-number {
  font-size: 0.8rem;
  color: #e7eaf4;
}

/* IR et plus : lueur de la couleur de la rareté, pour qu'on les repère tout de suite */
.mini-card-rare {
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5), 0 0 16px 3px color-mix(in srgb, var(--c) 60%, transparent);
}

/* Apparition avec un petit rebond : la carte arrive un peu trop grande puis se pose */
@keyframes apparition {
  from { opacity: 0; transform: scale(0.6); }
  to   { opacity: 1; transform: scale(1); }
}

/* Barre du bas : relancer un tirage ou fermer */
.summary-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 20px 16px 28px;
  background: linear-gradient(to top, rgba(5, 6, 10, 0.95), rgba(5, 6, 10, 0));
}

.summary-bar[hidden] {
  display: none;
}

/* Gros boutons "x1" / "x10", comme dans un jeu gacha */
.again-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 170px;
  padding: 10px 24px;
  border-radius: 14px;
  background: linear-gradient(to bottom, #f5c93a, #d9a40a);
  color: #0f1117;
  box-shadow: 0 6px 0 #9c7608, 0 10px 20px rgba(0, 0, 0, 0.5);   /* effet de bouton en relief */
}

.again-btn:hover {
  background: linear-gradient(to bottom, #ffd75a, #e6b01a);
}

.again-btn:active {
  transform: translateY(4px);       /* le bouton s'enfonce au clic */
  box-shadow: 0 2px 0 #9c7608, 0 6px 12px rgba(0, 0, 0, 0.5);
}

.again-count {
  font-size: 1.6rem;
  font-weight: bold;
}

.again-cost {
  font-size: 0.9rem;
}

/* Bouton fermer, entre les deux */
.again-close {
  width: 64px;
  height: 64px;
  padding: 0;
  border-radius: 14px;
  background-color: #1a1d27;
  color: #e7eaf4;
  border: 1px solid #2a2e3a;
  font-size: 1.6rem;
}

.again-close:hover {
  background-color: #23273a;
  color: #eab711;
}
/* Accessibilité : animations réduites pour ceux qui les ont désactivées dans leur système */
@media (prefers-reduced-motion: reduce) {
  .pull-card,
  .pull-card.shaking,
  .pull-card.legendary .card-front,
  .pull-card.deal,
  .pull-booster.arrive,
  .pull-booster.charge,
  .pull-booster.ouvre {
    animation: none;
    transition: none;
  }

  .pull-flash.on,
  .pull-burst.on {
    animation: none;
  }

  .mini-card {
    animation: none;
    opacity: 1;
  }
}

/* Pendant qu'un tirage attend la réponse du serveur : boutons de tirage grisés et non cliquables
   (la classe est ajoutée sur <body> par js/pull.js ; on ne touche pas à "disabled", géré par le compte à rebours) */
.tirage-en-cours [data-pull],
.tirage-en-cours [data-pull-again] {
  opacity: 0.5;
  pointer-events: none;
  cursor: wait;
}


/* ===================== Message d'erreur d'un tirage ===================== */
/* Flotte en haut au centre, au-dessus de l'overlay de tirage (z-index 100) */
.draw-error {
  position: fixed;
  top: 20px;
  left: 50%;
  translate: -50% 0;                    /* centré horizontalement */
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 12px 12px 12px 16px;
  border: 1px solid #ff6b6b;
  border-radius: 12px;
  background-color: #2a1517;
  color: #ffe1e1;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  animation: erreur-arrive 0.25s ease-out;
}

/* Arrive en glissant un peu du haut */
@keyframes erreur-arrive {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Le petit rond rouge avec "!" */
.draw-error-icon {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #ff6b6b;
  color: #2a1517;
  font-weight: bold;
}

.draw-error p {
  margin: 0;
  line-height: 1.4;
}

.draw-error-close {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  background: none;
  color: #ffb3b3;
  font-size: 0.9rem;
}

.draw-error-close:hover {
  background-color: #3d1d20;
  color: #ffffff;
}

@media (prefers-reduced-motion: reduce) {
  .draw-error {
    animation: none;
  }
}


/* ===================== Bouton de tirage désactivé ===================== */
/* Plus de tirage gratuit (ou bouton bloqué) : le bouton passe en gris, sans effet au survol */
.draw-actions button:disabled,
.draw-actions button:disabled:hover {
  background-color: #2a2e3a;
  color: #6b7180;
  cursor: not-allowed;
}


/* ===================== Historique des tirages ===================== */

/* "Probabilities (i)" et le bouton "History" sur la même ligne */
.draw-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.draw-links .key-balance {
  margin-bottom: 0;
}

/* Bouton discret (contour), pour ne pas concurrencer les boutons de tirage */
.history-btn {
  padding: 6px 16px;
  background-color: transparent;
  border: 1px solid #3a3f4e;
  color: #e7eaf4;
  font-weight: normal;
}

.history-btn:hover {
  background-color: #1a1d27;
  border-color: #eab711;
  color: #eab711;
}

/* La fenêtre */
.history-dialog {
  width: min(640px, calc(100% - 32px));
  max-height: 85vh;
  margin: auto;
  padding: 0;
  border: 1px solid #2a2e3a;
  border-radius: 16px;
  background-color: #12141c;
  color: #e7eaf4;
}

/* Ouverte : titre en haut, liste qui défile au milieu, petite note en bas */
.history-dialog[open] {
  display: flex;
  flex-direction: column;
}

.history-dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.8);
}

.history-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid #2a2e3a;
}

.history-top h2 {
  margin: 0;
  font-size: 1.4rem;
}

.history-close {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  background-color: #1a1d27;
  color: #e7eaf4;
}

.history-close:hover {
  background-color: #23273a;
  color: #eab711;
}

/* Seule la liste défile : le titre et la note restent visibles */
.history-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 20px;
}

/* Un bloc = un tirage */
.history-entry {
  padding: 14px;
  border: 1px solid #2a2e3a;
  border-radius: 12px;
  background-color: #1a1d27;
}

.history-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.history-head h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #eab711;
}

.history-time {
  flex: 0 0 auto;
  font-size: 0.85rem;
  color: #9aa0ad;
}

/* Les cartes : 5 par ligne (comme un booster), moins sur petit écran */
.history-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.history-card {
  --c: #8d93a3;
  position: relative;
  aspect-ratio: 538 / 742;          /* mêmes proportions que les vraies cartes */
  padding: 0;
  border: 2px solid #2a2e3a;
  border-radius: 8px;
  background-color: #0f1117;
  overflow: hidden;
  cursor: zoom-in;
  transition: translate 0.15s ease;
}

.history-card:hover {
  background-color: #0f1117;        /* garde le fond (le jaune des boutons ne doit pas revenir) */
  translate: 0 -3px;
}

.history-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* IR et plus : bordure et lueur de la couleur de la rareté */
.history-card-rare {
  border-color: var(--c);
  box-shadow: 0 0 12px 2px color-mix(in srgb, var(--c) 55%, transparent);
}

/* Nombre d'exemplaires (×2) en bas à gauche, comme sur les jeux */
.history-qty {
  position: absolute;
  left: 4px;
  bottom: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  background-color: rgba(15, 17, 23, 0.85);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: bold;
}

/* La preuve (provably fair) : discrète, sous les cartes */
.history-proof {
  margin: 10px 0 0;
  font-size: 0.8rem;
  color: #6b7180;
}

.history-proof a {
  color: #12b5f0;
}

.history-empty {
  margin: 0;
  padding: 24px 20px;
  color: #9aa0ad;
  text-align: center;
}

.history-note {
  margin: 0;
  padding: 12px 20px;
  border-top: 1px solid #2a2e3a;
  font-size: 0.8rem;
  color: #6b7180;
  text-align: center;
}

/* Téléphone : 4 cartes par ligne pour qu'elles restent lisibles */
@media (max-width: 480px) {
  .history-cards {
    grid-template-columns: repeat(4, 1fr);
  }

  .history-list {
    padding: 12px;
  }
}
