* {
  box-sizing: border-box;
}
img {
  max-width: 100%;
  display: block;
}
.tir6-hidden {
  display: none !important;
}
.tir6-fade-out {
  opacity: 0;
  transition: opacity .8s ease;
}
.tir6-fade-in {
  opacity: 1;
  transition: opacity .8s ease;
}
.ORTIR-container, .ORACLES-TIRAGES, .ORTIR-titre {
  height: auto;
  min-height: 0;
  max-height: none;
  padding: 0;
  margin: 0;
}
#tir6-intro {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.tir6-centertir2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}
.tir6-centertir2 h3 {
  margin: 20px 0;
}
/* image d'introduction */
.tir6-intro-image {
  margin: 0 auto;
  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;
}
.tir6-intro-image img {
  width: 100%;
  height: auto;
}
.tir6-btntir {
  padding: 10px 20px;
  border: none;
  cursor: pointer;
  background: #b08d57;
  color: white;
  font-size: 16px;
  border-radius: 6px;
}
#tir6-theme {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
}
.tir6-theme-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
}
.tir6-theme-header {
  width: 100%;
  text-align: center;
  font-size: 18px;
  color: #f0f0f0;
  letter-spacing: .5px;
}
.tir6-theme-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}
.tir6-theme-card {
  text-align: center;
}
.tir6-theme-card img {
  width: 200px;
  margin: 0 auto;
  border-radius: 10px;
  border: 2px solid rgba(214, 180, 106, .7);
  box-shadow:
    0 0 30px rgba(214, 180, 106, .25), 0 15px 40px rgba(0, 0, 0, .45);
  transition:
    transform .3s ease, box-shadow .3s ease;
}
.tir6-theme-card img:hover {
  transform: translateY(-10px);
  box-shadow:
    0 10px 25px rgba(255, 215, 0, .3);
}
.tir6-theme-card button {
  margin-top: 10px;
  padding: 8px 16px;
  border: none;
  background: #444;
  color: white;
  cursor: pointer;
}
/* sécurité affichage */
#tir6-theme.tir6-hidden {
  display: none !important;
}
#tir6-selected-theme {
  width: 100%;
  margin: 0px auto;
  display: none;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 0px;
  opacity: 0;
  transition: opacity .6s ease;
  position: relative;
  z-index: 5;
}
#tir6-selected-theme.show {
  opacity: 1;
  display: flex;
}
#tir6-theme-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin: 0 20px 0 20px;
}
#tir6-theme-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 13px;
  margin: 0px;
  color: #f0f0f0;
}
#tir6-theme-label span {
  color: #d8b46a;
  font-weight: bold;
  margin: 0px;
}
#tir6-theme-img {
  width: 80px;
  height: auto;
  border-radius: 10px;
  border: 2px solid rgba(214, 180, 106, .7);
  box-shadow:
    0 0 20px rgba(214, 180, 106, .25), 0 10px 30px rgba(0, 0, 0, .45);
}
#tir6-selected-theme .tir6-mini-container {
  width: 500px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 5px;
  padding: 3px;
  margin: 0;
  overflow: hidden;
  border: 1px dashed rgba(255, 255, 255, .15);
  flex: 0 0 auto;
}
#tir6-selected-theme .tir6-mini-container img {
  width: 50px;
  border-radius: 5px;
  height: auto;
  flex: 0 0 auto;
  transition: opacity .3s ease;
}
#tir6-selected-theme.tir6-compact {
  gap: 15px;
}
#tir6-selected-theme.tir6-compact .tir6-mini-container {
  height: 75px;
  padding: 3px;
}
#tir6-info-bar {
  width: 100%;
  text-align: center;
  font-size: 14px;
  margin: 10px auto;
  padding: 8px 10px;
  background: rgba(30, 30, 35, .85);
  color: #e6e6e6;
  border-radius: 8px;
  border: 1px solid rgba(216, 180, 106, .25);
}
#tir6-ruban {
  padding: 5px 10px;
}
.tir6-grid-cards {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  position: relative;
  width: 100%;
  height: 210px;
}
.tir6-card {
  width: 100px;
  height: 150px;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  cursor: pointer;
  margin-left: -75px;
  position: relative;
  transition:
    transform .3s ease, box-shadow .3s ease, opacity .3s ease;
}
.tir6-card:first-child {
  margin-left: 0;
}
.tir6-card:hover {
  transform: translateY(-15%) scale(1.05);
  box-shadow:
    0 0 20px rgba(255, 215, 0, .6);
  z-index: 10;
}
/* disparition sans déplacement */
.tir6-card {
  flex-shrink: 0;
}
.tir6-grid-layout {
  display: grid;
  grid-template-columns: repeat(4, 80px);
  grid-template-rows: repeat(3, 105px);
  justify-content: center;
  align-items: center;
  gap: 6px;
}
#tir6-cell-1 {
  grid-column: 1;
  grid-row: 1;
}
#tir6-cell-2 {
  grid-column: 2;
  grid-row: 1;
}
#tir6-cell-3 {
  grid-column: 3;
  grid-row: 1;
}
#tir6-cell-4 {
  grid-column: 1;
  grid-row: 2;
}
#tir6-cell-5 {
  grid-column: 3;
  grid-row: 2;
}
#tir6-cell-6 {
  grid-column: 1;
  grid-row: 3;
}
#tir6-cell-7 {
  grid-column: 2;
  grid-row: 3;
}
#tir6-cell-8 {
  grid-column: 3;
  grid-row: 3;
}
#tir6-cell-theme {
  grid-column: 2;
  grid-row: 2;
}
#tir6-cell-11 {
  grid-column: 4;
  grid-row: 3;
}
#tir6-cell-theme img {
  width: 60px;
  height: auto;
  border-radius: 8px;
  border: 2px solid rgba(214, 180, 106, .7);
  box-shadow: 0 0 15px rgba(214, 180, 106, .25);
}
.tir6-cell img {
  width: 60px;
  height: auto;
}
.tir6-grid-label {
  font-size: 11px;
  margin: 0px;
  color: #d8b46a;
  font-weight: bold;
  position: relative;
  top: 5px;
  left: 5px;
}
.tir6-flip-card {
  width: 60px;
  height: 90px;
  perspective: 1000px;
  position: relative;
  cursor: pointer;
}
.tir6-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform .8s;
  transform-style: preserve-3d;
}
.tir6-flipped .tir6-inner {
  transform: rotateY(180deg);
}
.tir6-front, .tir6-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 6px;
}
.tir6-back {
  background-image: url(images/dos.jpg);
  background-size: cover;
  background-position: center;
}
.tir6-front {
  transform: rotateY(180deg);
  background-size: cover;
  background-position: center;
}
.tir6-flip-card.tir6-active-card {
  z-index: 5;
}
.tir6-flip-card.tir6-active-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background:
    radial-gradient(circle, rgba(216, 180, 106, .4) 0%, transparent 70%);
  box-shadow:
    0 0 20px rgba(216, 180, 106, .8);
  z-index: -1;
  animation: tir6-glow 1.5s infinite alternate;
}
@keyframes tir6-glow {
  from {
    opacity: .6;
    transform: scale(.98);
  }
  to {
    opacity: 1;
    transform: scale(1.03);
  }
}
.tir6-flying-card {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  transition: all .6s ease;
}
#tir6-ruban.tir6-fade-out {
  height: 0;
  min-height: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
}
#tir6-interpretation {
  width: 350px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 5px;
}
.tir6-interpretation-layout-single {
  display: flex;
  justify-content: center;
  width: 100%;
}
.tir6-interpretation-right {
  width: 100%;
  max-width: 350px;
  padding: 8px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid rgba(216, 180, 106, .15);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, .6);
  overflow: hidden;
}
.tir6-card-header {
  text-align: center;
  margin-bottom: 10px;
}
.tir6-card-image {
  display: flex;
  justify-content: center;
  margin: 0px;
}
.tir6-card-reading {
  width: 100%;
  display: flex;
  justify-content: center;
}
.tir6-card-navigation {
  margin-top: 10px;
}
.tir6-card-help {
  margin-top: 10px;
}
#tir6-info-interpret {
  font-size: 13px;
  color: #e6e6e6;
  margin: 0px;
  padding: 0px;
}
#tir6-card-title {
  font-size: 18px;
  font-weight: bold;
  color: #d8b46a;
  margin: 0px;
  letter-spacing: 1px;
}
#tir6-card-large {
  width: 100px;
  height: auto;
  margin: 0px;
  border-radius: 14px;
  border: 2px solid rgba(216, 180, 106, .45);
  box-shadow:
    0 0 25px rgba(216, 180, 106, .35), 0 15px 40px rgba(0, 0, 0, .7);
  transition:
    transform .4s ease, box-shadow .4s ease;
  animation: fadeCard .5s ease;
}
#tir6-card-large:hover {
  transform:
    scale(1.05);
  box-shadow:
    0 0 40px rgba(216, 180, 106, .55), 0 20px 50px rgba(0, 0, 0, .8);
}
#tir6-card-large:hover {
  transform: scale(1.05);
}
.tir6-card-reading {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 10px;
}
#tir6-card-text {
  width: 100%;
  max-width: 320px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.5;
  color: #e6e6e6;
  text-align: left;
  background:
    rgba(255, 255, 255, .04);
  border-radius: 12px;
  border: 1px solid rgba(216, 180, 106, .18);
  box-shadow:
    inset 0 0 20px rgba(0, 0, 0, .25);
  max-height: 170px;
  overflow-y: auto;
}
.tir6-nav {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 8px;
}
.tir6-nav button {
  background: transparent;
  border: 1px solid rgba(216, 180, 106, .4);
  color: #d8b46a;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition:
    background .3s ease, transform .3s ease;
}
.tir6-nav button:hover {
  background: rgba(216, 180, 106, .15);
  transform: translateY(-2px);
}
.tir6-help-text {
  font-size: 11px;
  opacity: .6;
  margin: 0px;
  line-height: 1.1;
  margin-top: 5px;
}
@keyframes fadeCard {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (min-width:769px) {
  #tir6-top-panel {
    width: 100%;
  }
  #tir6-bottom-panel {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    width: 100%;
    margin-top: 5px;
  }
  #tir6-final-grid {
    width: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  #tir6-interpretation {
    width: 350px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
  }
  .tir6-interpretation-right {
    max-height: 480px;
  }
}
@media (max-width:768px) {
  body {
    font-size: 14px;
  }
  .ORTIR-titre {
    font-size: 16px;
  }
  h3 {
    font-size: 20px;
    margin: 10px 0 20px;
  }
  .tir6-theme-container {
    gap: 10px;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .tir6-theme-card img {
    width: 90px;
  }
  .tir6-theme-card {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  /* thème sélectionné */
  #tir6-selected-theme {
    flex-direction: column;
    gap: 10px;
  }
  #tir6-selected-theme .tir6-mini-container {
    width: 100%;
    max-width: 320px;
    height: 65px;
    justify-content: center;
  }
  #tir6-selected-theme .tir6-mini-container img {
    width: 35px;
  }
  #tir6-theme-img {
    width: 55px;
  }
  .tir6-grid-cards {
    height: 100px;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 10px;
  }
  .tir6-card {
    width: 45px;
    height: 70px;
    margin-left: -39px;
  }
  #tir6-bottom-panel {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }
  #tir6-final-grid {
    width: 100%;
  }
  .tir6-grid-layout {
    grid-template-columns: repeat(3, 70px);
    grid-template-rows: repeat(3, 95px);
    gap: 5px;
  }
  .tir6-flip-card {
    width: 55px;
    height: 82px;
  }
  .tir6-cell img {
    width: 55px;
  }
  .tir6-grid-label {
    font-size: 10px;
  }
  /* interprétation */
  #tir6-interpretation {
    width: 100%;
  }
  .tir6-interpretation-right {
    width: 100%;
    max-width: 350px;
    padding: 10px;
  }
  #tir6-card-large {
    width: 120px;
  }
  #tir6-card-title {
    font-size: 17px;
  }
  #tir6-card-text {
    font-size: 13px;
    max-height: 170px;
  }
  .tir6-nav button {
    min-width: 90px;
  }
  .btncommencer, .tir6-theme-wrapper, #tir6-info-bar, .tir6-grid-layout, .tir6-interpretation-right {
    margin-bottom: 80px !important;
  }
  .tir6-mini-container img {
    margin-left: -30px;
  }
}