@font-face {
  font-family: "Poppins";
  src: url(../../../asets/fonts/Poppins-Medium.ttf);
}

*,
::before,
::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Poppins, sans-serif;
}

body {
  background: #f1f1f1;
}

.container {
  width: 90%;
  max-width: 1400px;
  margin: auto;
}

h1 {
  color: #1a2f42;
  margin: 20px 0;
  padding-bottom: 20px;
  border-bottom: 1px dashed gray;
}
h1 span {
  display: block;
}
h1 span:nth-child(1) {
  font-weight: normal;
  color: #ed5d34;
}

.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  grid-gap: 30px;
  margin: 80px 0;
}

.card-wrapper {
  position: relative;
  min-height: 350px;
}
.card-wrapper:hover .card {
  rotate: y 180deg;
}

/* Utiliser l'Effet 3D avec transform-style: preserve-3d (block multifaces) */
.card {
  position: relative;
  height: 100%;
  transform-style: preserve-3d;
  transition: rotate 0.8s ease-out;
  color: white;
  font-weight: bold;
}
/* Gérer la visibilité des faces de l'objet 3D avec backface-visibility: hidden */
.card-front,
.card-back {
  position: absolute;
  height: 100%;
  width: 100%;
  padding: 30px;
  border-radius: 8px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.card-front {
  background: #ed5d34;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Jouer sur l'alternance avec :nth-child(even) = les enfants pairs */
.card-wrapper:nth-child(even) .card-front {
  background: #1a2f42;
}

.card-front p {
  font-size: 25px;
  line-height: 35px;
}

.arrow-icon {
  position: absolute;
  right: 30px;
  bottom: 30px;
}

.card-price {
  font-size: 45px;
}

.card-back {
  background: #ed5d34;
  rotate: y 180deg;
  display: flex;
  justify-content: center;
  align-items: center;
}

.card-wrapper:nth-child(even) .card-back {
  background: #1a2f42;
}

.card-back a {
  display: inline-block;
  border-radius: 10px;
  padding: 15px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: normal;
  background-color: #fff;
  font-size: 14px;
  color: #333;
  transition: background-color 0.3s ease-out, color 0.3s ease-out;
}

/* Jouer sur l'alternance avec :nth-child(odd) = les enfants impairs */
.card-wrapper:nth-child(odd) .card-back a:hover {
  background-color: #1a2f42;
  color: #fff;
}
.card-wrapper:nth-child(even) .card-back a:hover {
  background-color: #ed5d34;
  color: #fff;
}
