```css
/* =========================================================
   RESET
   ========================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  margin: 0;
  overflow-x: hidden;
}

#tir53Container {
  width: 100%;
}

#tir53Container * {
  box-sizing: border-box;
}


/* =========================================================
   ÉTATS / ANIMATIONS
   ========================================================= */

.tir53Hidden {
  display: none !important;
}

.tir53Visible {
  display: block;
}

.tir53FadeIn {
  animation: tir53FadeIn .6s ease forwards;
}

.tir53FadeOut {
  animation: tir53FadeOut .6s ease forwards;
}

@keyframes tir53FadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes tir53FadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}


/* =========================================================
   INTRODUCTION
   ========================================================= */

#tir53Intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 25px;

  width: 100%;

  text-align: center;
}

#tir53IntroImage {
  width: 90%;
  max-width: 500px;

  overflow: hidden;

  border: 2px solid rgba(214, 180, 106, .7);
  border-radius: 18px;

  box-shadow:
    0 0 30px rgba(214, 180, 106, .25),
    0 15px 40px rgba(0, 0, 0, .45);

  line-height: 0;
}

#tir53IntroImage img {
  display: block;

  width: 100%;
  height: auto;
}

#tir53IntroContent {
  max-width: 900px;

  margin: auto;
}

#tir53IntroTitre {
  margin: 0 0 20px;

  font-size: clamp(2rem, 4vw, 3rem);

  font-weight: normal;

  color: #f0d88a;
}

#tir53IntroTexte {
  margin: 0;

  line-height: 1.5;

  font-size: 1rem;
}

#tir53BtnStart {
  margin-top: 30px;
}

.btntir {
  display: inline-flex !important;

  justify-content: center;
  align-items: center;
}


/* =========================================================
   LES 3 POSITIONS DU TIRAGE
   ========================================================= */

#tir53Selection {
  display: flex;

  justify-content: center;
  align-items: flex-start;

  gap: clamp(8px, 2vw, 25px);

  width: 100%;

  margin: 0;
}

.tir53Slot {
  flex: 0 1 auto;

  width: auto;

  display: flex;

  flex-direction: column;
  align-items: center;
}

.tir53SlotTitle {
  margin: 0;

  font-size: clamp(.85rem, 2vw, 1.2rem);

  font-weight: normal;

  color: #f0d88a;

  text-align: center;
}

.tir53SelectedCard {
  width: clamp(50px, 12vw, 85px);

  aspect-ratio: 174 / 288;

  border: 2px dashed rgba(255, 255, 255, .20);

  border-radius: 10px;

  display: flex;

  align-items: center;
  justify-content: center;

  background: rgba(255, 255, 255, .04);

  transition: .4s;

  overflow: hidden;

  position: relative;
}

.tir53SelectedCard img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: contain;

  background: #16130d;
}


/* =========================================================
   MOBILE — POSITIONS
   ========================================================= */

@media (max-width: 600px) {

  #tir53Selection {
    gap: 8px;

    margin-top: 15px;
  }

  .tir53SelectedCard {
    width: 70px;
  }

  .tir53SlotTitle {
    font-size: .85rem;
  }
}

@media (max-width: 360px) {

  #tir53Selection {
    gap: 5px;
  }

  .tir53SelectedCard {
    width: 58px;
  }

  .tir53SlotTitle {
    font-size: .75rem;
  }
}


/* =========================================================
   JEU
   ========================================================= */

#tir53Game {
  width: 100%;

  max-width: 100%;

  overflow: visible;

  text-align: center;
}


/* =========================================================
   RUBAN DES 55 CARTES
   ========================================================= */


#tir53RibbonContainer {

  /*
   * Le conteneur prend toute la largeur disponible.
   */
  width: 100%;

  /*
   * Pas de défilement horizontal :
   * les 19 cartes doivent tenir sur chaque ligne.
   */
  overflow-x: hidden;

  overflow-y: visible;

  margin: 15px auto 25px;

  padding: 35px 0 25px;

  display: flex;

  justify-content: center;

  align-items: flex-start;
}


/*
 * GRILLE PRINCIPALE
 *
 * 55 cartes :
 *
 * Ligne 1 : 19 cartes
 * Ligne 2 : 19 cartes
 * Ligne 3 : 17 cartes
 *
 * La grille crée automatiquement les trois lignes.
 */

#tir53Ribbon {

  display: grid;

  grid-template-columns: repeat(19, minmax(0, 1fr));

  grid-auto-rows: auto;

  align-items: end;

  justify-items: center;

  width: 100%;

  max-width: 1200px;

  padding: 0 8px;

  margin: 0 auto;

  row-gap: 10px;
}


/* =========================================================
   CARTES DU RUBAN
   ========================================================= */

.tir53RibbonCard {

  position: relative;

  /*
   * La largeur est calculée par la grille.
   * La carte ne doit jamais dépasser sa cellule.
   */
  width: 100%;

  max-width: 58px;

  aspect-ratio: 174 / 288;

  cursor: pointer;

  user-select: none;

  z-index: 1;

  transition:
    transform .30s ease,
    filter .30s ease,
    opacity .30s ease,
    box-shadow .30s ease;
}


/*
 * Image du dos des cartes
 */

.tir53RibbonCard img {

  display: block;

  width: 100%;

  height: 100%;

  object-fit: contain;

  border-radius: 6px;

  box-shadow:
    0 4px 10px rgba(0, 0, 0, .45);

  pointer-events: none;
}


/*
 * Survol ordinateur
 */

.tir53RibbonCard:hover {

  transform:
    translateY(-14px)
    scale(1.08);

  z-index: 50;

  box-shadow:
    0 14px 28px rgba(0, 0, 0, .45);
}


/*
 * Première carte :
 * aucune marge héritée de l'ancien système
 * de chevauchement.
 */

.tir53RibbonCard:first-child {
  margin-left: 0;
}


/* =========================================================
   CARTE CHOISIE
   ========================================================= */

.tir53RibbonCard.tir53Chosen {

  opacity: 0;

  pointer-events: none;

  cursor: default;

  transform: none;
}

.tir53RibbonCard.tir53Chosen img {
  visibility: hidden;
}


/* =========================================================
   RUBAN BLOQUÉ
   ========================================================= */

#tir53Ribbon.tir53Locked {
  pointer-events: none;
}

#tir53Ribbon.tir53Locked .tir53RibbonCard {

  cursor: default;

  filter: grayscale(.55);
}

#tir53Ribbon.tir53Locked .tir53RibbonCard:hover {
  transform: none;
}


/* =========================================================
   TABLETTE
   ========================================================= */

@media (max-width: 900px) {

  #tir53RibbonContainer {
    padding: 30px 0 25px;
  }

  #tir53Ribbon {

    grid-template-columns:
      repeat(19, minmax(0, 1fr));

    padding-left: 5px;
    padding-right: 5px;

    row-gap: 8px;
  }

  .tir53RibbonCard {

    max-width: 44px;
  }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

  #tir53RibbonContainer {

    padding:
      25px 0 20px;
  }

  #tir53Ribbon {

    grid-template-columns:
      repeat(19, minmax(0, 1fr));

    padding-left: 2px;
    padding-right: 2px;

    row-gap: 6px;
  }

  .tir53RibbonCard {

    max-width: 32px;
  }

  .tir53RibbonCard:hover {

    transform:
      translateY(-8px)
      scale(1.12);
  }
}


/* =========================================================
   PETIT MOBILE
   ========================================================= */

@media (max-width: 420px) {

  #tir53Ribbon {

    grid-template-columns:
      repeat(19, minmax(0, 1fr));

    padding-left: 1px;
    padding-right: 1px;

    row-gap: 5px;
  }

  .tir53RibbonCard {

    max-width: 25px;
  }
}


/* =========================================================
   DISPARITION DU RUBAN
   ========================================================= */

#tir53RibbonContainer.tir53RibbonHide {

  animation:
    tir53RibbonHide .8s ease forwards;
}

@keyframes tir53RibbonHide {

  0% {

    opacity: 1;

    transform:
      translateY(0);
  }

  60% {

    opacity: .5;
  }

  100% {

    opacity: 0;

    transform:
      translateY(20px);

    visibility: hidden;

    height: 0;

    margin: 0;

    padding: 0;
  }
}


/* =========================================================
   BARRE D'INFORMATION
   ========================================================= */

#tir53InfoBar {

  display: inline-block;

  width: auto;

  max-width: 90%;

  margin: 15px;

  padding: 14px 18px;

  box-sizing: border-box;

  background:
    rgba(255, 255, 255, .05);

  border:
    1px solid rgba(216, 199, 155, .25);

  border-radius: 8px;

  text-align: center;
}

#tir53InfoText {

  width: 100%;

  max-width: 100%;

  margin: 0;

  overflow-wrap: break-word;

  font-size: 1rem;

  line-height: 1.5;

  color: #e6d7b2;

  transition:
    opacity .4s ease;
}


/* =========================================================
   RETOURNEMENT DES CARTES
   ========================================================= */

.tir53CardFlip {

  width: 100%;

  height: 100%;

  perspective: 1000px;
}

.tir53CardInner {

  position: relative;

  width: 100%;

  height: 100%;

  transition:
    transform .8s;

  transform-style: preserve-3d;
}

.tir53CardFront,
.tir53CardBack {

  position: absolute;

  top: 0;
  left: 0;

  width: 100%;
  height: 100%;

  border-radius: 10px;

  overflow: hidden;

  backface-visibility: hidden;

  -webkit-backface-visibility: hidden;
}

.tir53CardFront img,
.tir53CardBack img {

  display: block;

  width: 100%;
  height: 100%;

  object-fit: contain;
}

.tir53CardBack {

  transform:
    rotateY(180deg);
}

.tir53Flipped .tir53CardInner {

  transform:
    rotateY(180deg);
}


/* =========================================================
   CLASSES UTILITAIRES
   ========================================================= */

.tir53Disabled {
  pointer-events: none;
}

.tir53Invisible {
  visibility: hidden;
}

.tir53Transparent {
  opacity: 0;
}

.tir53Opaque {
  opacity: 1;
}


/* =========================================================
   LECTURE DU TIRAGE
   ========================================================= */

#tir53ReadingContent {

  display: flex;

  align-items: flex-start;

  justify-content: center;

  gap:
    clamp(25px, 5vw, 60px);

  width: 100%;

  margin-top: 0;
}

.ORTIR-container {
  padding: 0 !important;
}

#tir53CardTitle {
  margin-bottom: 0 !important;

  text-align: center;

  color: #f0d88a;

  font-size:
    clamp(.9rem, 1.8vw, 1.4rem);

  font-weight: normal;

  letter-spacing: 2px;

  text-transform: uppercase;
}


/* =========================================================
   GRANDE CARTE
   ========================================================= */

#tir53ReadingCard {

  flex:
    0 0 auto;

  width:
    clamp(130px, 18vw, 180px);

  display: flex;

  flex-direction: column;

  align-items: center;
}

#tir53BigCardContainer {

  width: 100%;

  padding: 0;

  border-radius: 18px;
margin-top: 20px;
  background:
    radial-gradient(
      circle,
      rgba(240, 216, 138, .35),
      rgba(240, 216, 138, 0) 70%
    );

  border:
    1px solid rgba(216, 199, 155, .35);

  box-shadow:
    0 0 35px rgba(214, 180, 106, .25);
}

#tir53BigCardImage {

  display: block;

  width: 100%;

  height: auto;

  border-radius: 12px;

  box-shadow:
    0 10px 25px rgba(0, 0, 0, .55);
}


/* =========================================================
   TEXTE DE LECTURE
   ========================================================= */

#tir53ReadingText {

  flex: 1;
 margin-top: 20px;
  max-width: 700px;
}

#tir53DefinitionBlock,
#tir53AnswerBlock {

  background:
    rgba(255, 255, 255, .05);

  border:
    1px solid rgba(216, 199, 155, .25);

  border-radius: 14px;

  padding: 15px;

  box-shadow:
    0 8px 25px rgba(0, 0, 0, .25);
}

#tir53AnswerBlock {
  margin-top: 15px;
}

.tir53BlockTitle {

  margin: 0;

  color: #f0d88a;

  font-size: 1.25rem;

  font-weight: normal;

  letter-spacing: 1px;
}

#tir53DefinitionText,
#tir53AnswerText {

  line-height: 1.5;

  color: #e6d7b2;

  font-size: 1rem;
}


/* =========================================================
   MOBILE — LECTURE
   ========================================================= */

@media (max-width: 750px) {

  #tir53BtnStart {
    margin-bottom: 80px !important;
  }

  #tir53AnswerBlock {
    margin-bottom: 70px;
  }

  #tir53InfoBar {
    margin:
      15px auto 50px !important;
  }

  #tir53ReadingContent {

    flex-direction: column;

    align-items: center;

    gap: 30px;
  }

  #tir53ReadingCard {

    width: 180px;
  }

  #tir53ReadingText {

    width: 100%;

    max-width: none;
  }

  #tir53DefinitionBlock,
  #tir53AnswerBlock {

    padding: 18px;
  }
}


/* =========================================================
   TRÈS PETIT MOBILE
   ========================================================= */

@media (max-width: 380px) {

  #tir53ReadingCard {
    width: 140px;
  }

  #tir53CardTitle {
    font-size: 1.1rem;
  }
}






















/* =========================================================
   MOBILE — 7 CARTES
   ========================================================= */

@media (max-width: 600px) {

    #tir53Selection {
        gap: 8px;
        padding: 0 8px;
    }

    .tir53Slot {
        width: 100%;
        min-width: 0;
    }

    .tir53SlotTitle {
        font-size: 12px;
        line-height: 1.2;
        margin-bottom: 6px;
        padding: 0 2px;
    }

    .tir53SelectedCard {
        width: 100%;
        max-width: 70px;
        margin: 0 auto;
    }

    .tir53SelectedCard img {
        width: 100%;
        height: auto;
        display: block;
    }
}


@media (max-width: 600px) {

    #tir53Selection {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 12px 5px;
        padding: 0 5px;
    }

    .tir53Slot {
        width: 100%;
        min-width: 0;
    }

    .tir53SlotTitle {
        font-size: 10px;
        line-height: 1.15;
        margin: 0 auto 5px;
        max-width: 80px;
    }

    .tir53SelectedCard {
        width: 52px;
        max-width: 100%;
        margin: 0 auto;
    }

    .tir53SelectedCard img {
        width: 100%;
        height: auto;
        display: block;
    }

    /* La 5e carte commence la deuxième ligne */
    #tir53Slot5 {
        grid-column: 1;
    }
}
