body {
  background-color: #121212;
  color: white;
  font-family: "Poppins", sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ------ ANIMATIONS DU HEADER ------ */
@keyframes slideFromLeft {
  0% {
    transform: translateX(-5%);
    opacity: 0.7;
  }
  100% {
    transform: translateX(-20px);
    opacity: 1;
  }
}

@keyframes slideFromRight {
  0% {
    transform: translateX(5%);
    opacity: 0.7;
  }
  100% {
    transform: translateX(20px);
    opacity: 1;
  }
}


@keyframes slideIn {
  0% {
    transform: scale(0.8);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ------ STYLES DU HEADER ------ */
header {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  height: 200px;
  background-color: #000000;
}

/* Images de fond animées */
.header-left,
.header-right {
  position: absolute;
  top: 0;
  height: 100%;
  width: 50%;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: 1;
}

.header-left {
  left: 0;
  background-image: url("../images/headerLeft.jpg");
  background-position: right center;
  animation: slideFromLeft 9s forwards;
}

.header-right {
  right: 0;
  background-image: url("../images/headerRight.jpg");
  background-position: left center;
  animation: slideFromRight 9s forwards;
}

.logo-container {
  position: relative;
  z-index: 2;
  text-align: center;
}

.logo {
  max-width: 250px;
  animation: zoom 9s forwards;
}

.flags-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  position: relative;
  z-index: 2;
}

.flag {
  width: 15px;
  height: 15px;
  border-radius: 50%;
}

.flag-blue {
  background-color: #0055a4;
}

.flag-white {
  background-color: #ffffff;
}

.flag-red {
  background-color: #ef4135;
}

main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background: url("../images/carpe_gauche.png") no-repeat left top;
  background-size: 60%;
  padding: 40px 20px;
}

.form-container {
  width: 90%;
  max-width: 500px;
  backdrop-filter: blur(5px);
  box-shadow: 5px 15px 30px rgba(0, 0, 0, 1);
  margin: 0 auto;
  border-radius: 20px;
  border: 1px solid #333;
  padding: 30px;
  animation: slideIn 1s forwards;
}

h1 {
  text-align: center;
  text-transform: uppercase;
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 25px;
  color: white;
}

p {
  color: white;
  text-align: center;
  margin-bottom: 20px;
  font-size: 16px;
  line-height: 1.6;
}

/* Nouveaux styles pour les champs de formulaire avec effet de flottement du label */
.container {
  display: flex;
  flex-direction: column;
  gap: 7px;
  position: relative;
  color: white;
  margin-bottom: 25px;
  width: 100%;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

.container .label {
  font-size: 15px;
  padding-left: 10px;
  position: absolute;
  top: 13px;
  transition: 0.3s;
  pointer-events: none;
  color: #f0f0f0;
  font-weight: 500;
}

.input {
  width: 100%;
  height: 45px;
  border: none;
  outline: none;
  padding: 0px 7px;
  border-radius: 6px;
  margin-bottom: 10px;
  margin-bottom: 5px;
  color: #fff;
  font-size: 15px;
  background-color: transparent;
  box-shadow: 3px 3px 10px rgba(0, 0, 0, 1),
    -1px -1px 6px rgba(255, 255, 255, 0.1);
}

.input:focus {
  box-shadow: 3px 3px 10px rgba(0, 0, 0, 1),
    -1px -1px 6px rgba(255, 255, 255, 0.2), inset 3px 3px 10px rgba(0, 0, 0, 1),
    inset -1px -1px 6px rgba(255, 255, 255, 0.1);
}

.container .input:valid ~ .label,
.container .input:focus ~ .label {
  transform: translateY(-35px);
  padding-left: 2px;
  font-size: 13px;
}

/* Nouveau style pour le bouton de validation */
.submit-btn {
  width: 9em;
  height: 3em;
  border-radius: 30em;
  font-size: 15px;
  font-family: inherit;
  border: none;
  position: relative;
  overflow: hidden;
  z-index: 1;
  box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.8),
    -1px -1px 6px rgba(255, 255, 255, 0.1);
  background-color: #e21617;
  color: white;
  padding: 12px 24px;
  font-size: 16px;
  text-transform: uppercase;
  transition: all 0.3s ease;
  font-weight: 500;
  letter-spacing: 0.5px;
  cursor: pointer;
  margin: 0 auto;
  margin-top: 20px;
  display: block;
}

.submit-btn::before {
  content: "";
  width: 0;
  height: 3em;
  border-radius: 30em;
  position: absolute;
  top: 0;
  left: 0;
  background-image: linear-gradient(to right, #ff3019 0%, #e21617 100%);
  transition: 0.5s ease;
  z-index: -1;
}

.submit-btn:hover::before {
  width: 9em;
}

.submit-btn:hover {
  background-color: transparent;
  transform: scale(1.05);
}

/* Style pour les cases à cocher client type */
.client-type-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 25px;
}

.client-type-option {
  /* cursor: pointer; */
  position: relative;
  padding: 10px 15px;
  /* background-color: rgba(42, 42, 42, 0.5); */
  border-radius: 8px;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
}

.client-type-option:hover {
  background-color: #333;
}

/* .client-type-option.selected {
  border-color: #e21617;
  background-color: rgba(226, 22, 23, 0.1);
} */

/* Style personnalisé pour les radio boutons */
.check {
  cursor: pointer;
  position: relative;
  margin-right: 10px;
  width: 18px;
  height: 18px;
  transform: translate3d(0, 0, 0);
}

.check:before {
  content: "";
  position: absolute;
  top: -10px;
  left: -10px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.check svg {
  position: relative;
  z-index: 1;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke: #c8ccd4;
  stroke-width: 1.5;
  transition: all 0.2s ease;
}

input:checked + .check svg {
  stroke: #e21617;
}

input:checked + .check svg path {
  stroke-dashoffset: 60;
  transition: all 0.3s linear;
}

input:checked + .check svg polyline {
  stroke-dashoffset: 42;
  transition: all 0.2s linear;
  transition-delay: 0.15s;
}

.error-message {
  color: #e21617;
  background-color: rgba(226, 22, 23, 0.1);
  border: 1px solid rgba(226, 22, 23, 0.3);
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 20px;
  text-align: center;
  font-weight: 500;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #1e1e1e;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  max-width: 400px;
  width: 90%;
}

.close-modal {
  background-color: #e21617;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 20px;
}

footer {
  background-color: #000;
  padding: 15px;
  text-align: center;
  border-top: 1px solid #333;
}

footer p {
  color: #999;
  font-size: 14px;
  margin: 10px 0;
}

/* Styles pour l'affichage statique de la prochaine formation */
.next-formation-display {
  background-color: #2a2a2a;
  border-radius: 10px;
  padding: 20px;
  width: 80%;
  border: 1px solid #333;
  text-align: left;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  margin: 1rem auto;
}

.next-formation-display .formation-name {
  font-size: 18px;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 15px;
  color: rgb(255, 255, 255);
}

.next-formation-display .formation-details {
  display: flex;
  align-items: center;
  gap: 12px;
}

.formation-details {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.formation-date,
.formation-time {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #ccc;
}

.formation-date .icon,
.formation-time .icon {
  margin-right: 8px;
  font-size: 16px;
}

/* Style pour l'affichage du prix */
.formation-price {
  display: flex;
  align-items: center;
  margin-left: auto;
  font-size: 1.2rem;
  color: rgb(255, 255, 255);
  font-weight: bold;
}

.formation-price .icon {
  margin-right: 8px;
  font-size: 16px;
}

.no-formation-message {
  background-color: rgba(226, 22, 23, 0.1);
  border: 1px solid rgba(226, 22, 23, 0.3);
  border-radius: 10px;
  padding: 15px;
  width: 80%;
  margin: 0 auto;
  text-align: center;
}

.no-formation-message p {
  margin: 0;
  color: #e21617;
  font-weight: 500;
}

@media (max-width: 768px) {
  .next-formation-display,
  .no-formation-message {
    width: 90%;
  }

  .container {
    max-width: 260px;
  }
}

/* Animation pour la recherche vide */
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px);
  }
}

.shake {
  animation: shake 0.6s ease;
}

/* Ajustements pour mobile */
@media (max-width: 480px) {
  .formation-details {
    gap: 8px;
  }

  .container {
    max-width: 230px;
  }

  .container .label {
    font-size: 14px;
  }
}

/* Style pour les champs en erreur */
.error-field {
  border: 2px solid #e21617 !important;
  box-shadow: 0 0 8px rgba(226, 22, 23, 0.5) !important;
  animation: shake 0.6s ease;
}

/* Styles pour les champs conditionnels */
.field-group {
  display: none;
}

.field-group.active {
  display: block;
  animation: slideIn 0.3s forwards;
}

/* Style pour la classe focused */
.container.focused {
  transform: scale(1.02);
  transition: transform 0.3s ease;
}

/* Nouveaux boutons animés */
.button {
  position: relative;
  display: block; /* Changer de inline-block à block pour centrer le bouton */
  margin: 0 auto; /* Centrer le bouton horizontalement */
  cursor: pointer;
  outline: none;
  border: 0;
  vertical-align: middle;
  text-decoration: none;
  background: transparent;
  padding: 0;
  font-size: inherit;
  font-family: inherit;
}

button.learn-more {
  width: 12rem;
  height: auto;
}

button.learn-more .circle {
  transition: all 0.45s cubic-bezier(0.65, 0, 0.076, 1);
  position: relative;
  display: block;
  margin: 0;
  width: 3rem;
  height: 3rem;
  background: #e21617; /* Couleur rouge de Connivence */
  border-radius: 1.625rem;
}

button.learn-more .circle .icon {
  transition: all 0.45s cubic-bezier(0.65, 0, 0.076, 1);
  position: absolute;
  top: 0;
  bottom: 0;
  margin: auto;
  background: #fff;
}

button.learn-more .circle .icon.arrow {
  transition: all 0.45s cubic-bezier(0.65, 0, 0.076, 1);
  left: 0.625rem;
  width: 1.125rem;
  height: 0.125rem;
  background: none;
}

button.learn-more .circle .icon.arrow::before {
  position: absolute;
  content: "";
  top: -0.29rem;
  right: 0.0625rem;
  width: 0.625rem;
  height: 0.625rem;
  border-top: 0.125rem solid #fff;
  border-right: 0.125rem solid #fff;
  transform: rotate(45deg);
}

button.learn-more .button-text {
  transition: all 0.45s cubic-bezier(0.65, 0, 0.076, 1);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.25rem 0;
  margin: 0 0 0 1.85rem;
  color: #dbdbdb;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

button:hover .circle {
  width: 100%;
}

button:hover .circle .icon.arrow {
  background: #fff;
  transform: translate(1rem, 0);
}

button:hover .button-text {
  color: #fff;
}

/* Variante pour les liens (à utiliser dans thanks_dist.php) */
a.button-link {
  text-decoration: none;
  display: inline-block;
}

a.button-link .learn-more {
  display: block;
}

/* Variante verte pour certains boutons */
button.learn-more.green .circle,
a.button-link.green .learn-more .circle {
  background: rgb(0, 214, 36);
}

/* Variante grise pour bouton retour */
button.learn-more.gray .circle,
a.button-link.gray .learn-more .circle {
  background: #333;
}
