#cards-container {
    position: relative;
    width: 90vw;
    max-width: 1200px;
    height: 350px;
    margin-bottom: 3em;
    user-select: none;
    perspective: 1500px;
  }

  .card {
    width: 120px;
    height: 190px;
    position: absolute;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.25);
    cursor: pointer;
    transform-style: preserve-3d;
    transition:
      transform 0.5s cubic-bezier(0.4,0,0.2,1),
      box-shadow 0.3s ease,
      opacity 0.4s ease,
      top 0.4s ease,
      left 0.4s ease;
    background: white;
    top: 0;
    left: 0;
  }

  .card-inner {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    position: relative;
    transition: transform 0.8s;
    transform-style: preserve-3d;
  }

  .card.flipped .card-inner {
    transform: rotateY(180deg);
  }

  .card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    backface-visibility: hidden;
    overflow: hidden;
  }

  .card-front {
    background: linear-gradient(135deg, #556bb2, #334f8a);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 0 15px rgba(255,255,255,0.2);
  }
  .card-front img {
    width: 122px;
    height: 191px;
    object-fit: cover;
    filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.2));
  }

.card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotateY(180deg);
  backface-visibility: hidden;
  overflow: hidden;
  padding: 0;
  margin: 0;
  background: transparent; /* ou white, selon ton design */
  border-radius: 10px;
  display: block;
}

.card-back img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;  /* Remplit sans déformation */
  border-radius: 10px;
  display: block;
  align-content: center;
}

  /*
  .card-back h3 {
    margin: 0 0 8px 0;
    color: #203354;
    font-size: 1.2em;
    text-align: center;
    font-weight: 700;
    display: none;
  }
  .card-back p {
    font-size: 1em;
    color: #444;
    text-align: center;
    line-height: 1.4;
    overflow-y: auto;
    display: none;
  }
  */

  /* Hover : la carte se décale vers le bas (10px) */
.card:not(.flipped):hover {
  top: calc(var(--base-top) + 20px); /* décale vers le bas */
  /* pas de changement de z-index */
  box-shadow: 0 18px 28px rgba(0,0,0,0.35);
  transition: top 0.3s ease, box-shadow 0.3s ease;
}

  .card.other {
    opacity: 0.3;
    pointer-events: none;
    filter: grayscale(30%);
    transition: opacity 0.4s ease;
  }

  #result-name {
    max-width: 700px;
    color: white;
    font-size: 30px;
    text-align: center;
    min-height: 30px;
    user-select: none;
    padding-bottom: 15px;
    margin-top: -40px;
    margin-left: 15px;
  }


  #result-text {
    max-width: 700px;
    color: white;
    font-size: 16px;
    text-align: center;
    user-select: none;
    padding-bottom: 30px;
    margin-left: 15px;
  }

  #details-link {
    color: white;
    font-weight: 700;
    font-size: 14px;
    text-decoration: underline;
    cursor: pointer;
    user-select: none;
    display: none;
    padding-top: 10px;
    margin-left: 15px;
  }
  #details-link:hover {
    color: white;
  }

  #reset-button {
    background-color: #334f8a;
    color: white;
    border: none;
    padding: 1em 2em;
    border-radius: 12px;
    font-size: 1.1em;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    user-select: none;
    transition: background-color 0.3s ease;
    display: none;
    margin-left: 15px;
  }
  #reset-button:hover {
    background-color: #22345f;
  }

.disable-interaction {
  pointer-events: none !important;
  cursor: wait !important; /* Curseur sablier */
  user-select: none !important; /* Empêche la sélection aussi */
}