* {
  font-family: "Poppins", Arial, Helvetica, sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: var(--white);
  padding: 20px;
}

li {
  list-style-type: none;
}

.form-container {
  background-color: white;
  position: relative;
  width: 90%;
  max-width: 800px;
  height: 90vh;
  border-radius: 25px;
  overflow: hidden;
  box-shadow: 0 0px 30px rgba(76, 22, 144, 0.1);
}

.form-wrapper {
  display: flex;
  width: 200%;
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.form-wrapper.show-login {
  transform: translateX(-50%);
}

.form-creation,
.form-connexion {
  width: 50%;
  height: 100%;
  display: flex;
  flex-direction: row;
}

.div-sign-up {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 0;
  max-width: 55%;
  overflow: auto;
  background-color: var(--real-white);
}

.div-sign-up h1 {
  color: var(--accent-ff-color);
  margin-bottom: 10px;
}

.sous-div-sign-up {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  gap: 8px;
  width: 100%;
  padding: 0 30px;
}

.div-sign-up label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--accent-ff-color);
}

/* Boutons Annuler / Finaliser */
.div-btn-annuler-finaliser {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 0 30px;
}

.btn-annuler {
  border: 2px solid var(--accent-ff-color);
  background-color: var(--accent-transparant-color);
  border-radius: 10px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-annuler a {
  text-decoration: none;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--accent-ff-color);
}

.div-btn-annuler-finaliser button {
  background-color: var(--accent-ff-color);
  color: white;
  border-radius: 10px;
  height: 40px;
  border: 2px solid var(--accent-ff-color);
  font-size: 16px;
  cursor: pointer;
  font-weight: 600;
}

/*-- cgu --*/
.div-cgu {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--accent-ff-color);
  font-size: 15px;
  width: 100%;
  margin-bottom: 5px;
  padding: 0 30px;
}

.div-cgu > div {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  width: 100%;
}

.div-cgu a {
  color: var(--accent-color);
}

.mdp-sign-up {
  position: relative;
}

.mdp-sign-up i {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 10px;
  color: black;
  cursor: pointer;
  display: none;
}

i.oeil-active {
  display: block;
}

input {
  height: 45px;
  padding: 0 10px;
  border: 1px solid var(--extra-light-red);
  border-radius: 5px;
  outline: 0;
  font-size: 15px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  background-color: var(--footer-bg-color);
}

input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--accent-transparant-color);
}

.switch {
  font-size: 10.625px;
  position: relative;
  display: inline-block;
  width: 38.75px;
  height: 21.875px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--real-white);
  transition: 0.4s;
  border-radius: 30px;
  border: 1px solid var(--darker-white);
}

.slider:before {
  position: absolute;
  content: "";
  height: 1.9em;
  width: 1.9em;
  border-radius: 16px;
  left: 1.2px;
  top: 0;
  bottom: 0;
  margin: auto;
  background-color: var(--real-white);
  box-shadow: 0 2px 5px var(--gray-mid);
  transition: 0.4s;
}

input:checked + .slider {
  background-color: var(--accent-ff-color);
  border: 1px solid transparent;
}

input:checked + .slider:before {
  transform: translateX(1.5em);
}

.div-sign-in,
.div-sign-up-promo {
  flex: 1;
  max-width: 45%;
  background-color: var(--accent-ff-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 20px;
}

.div-sign-in img,
.div-sign-up-promo img {
  width: 60px;
  position: absolute;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
}

.div-sign-in h1,
.div-sign-up-promo h1 {
  color: white;
  text-align: center;
}

.btn-switch {
  border: 2px solid white;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
  width: auto;
  margin-top: 10px;
}

.btn-switch:hover {
  background-color: white;
}

.btn-switch:hover a {
  color: var(--accent-ff-color);
}

.div-sign-in p,
.div-sign-up-promo p {
  color: white;
  padding: 20px;
  text-align: center;
}

.div-sign-in a,
.div-sign-up-promo a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  display: block;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
}

.div-connexion {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px;
  gap: 20px;
  max-width: 55%;
  background-color: var(--real-white);
}

.div-connexion h1 {
  color: var(--accent-ff-color);
  margin-bottom: 10px;
}

.div-connexion label {
  width: 100%;
  display: flex;
  flex-direction: column;
  color: var(--accent-ff-color);
}

.div-connexion button {
  width: 100%;
  background-color: var(--accent-ff-color);
  color: white;
  border-radius: 10px;
  height: 45px;
  border: 2px solid var(--accent-ff-color);
  font-size: 16px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-connect:hover {
  background-color: var(--accent-color-light);
  border-color: var(--accent-color-light);
}

.forgot-password {
  text-align: right;
  width: 100%;
  margin-top: -10px;
}

.forgot-password a {
  color: var(--accent-color);
  text-decoration: none;
  font-size: 15px;
}

.btn-retour {
  position: absolute;
  top: 20px;
  left: 20px;
  border: 2px solid var(--accent-ff-color);
  height: 40px;
  width: 130px;
  background-color: white;
  border-radius: 25px;
  z-index: 100;
}

.btn-retour a {
  text-decoration: none;
  height: 100%;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--accent-ff-color);
  font-weight: 600;
}

.mobile-switch-link {
  display: none;
  text-align: center;
  margin-top: 20px;
  color: var(--accent-color);
  font-size: 15px;
}

.mobile-switch-link a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
}

/* responsive */
@media screen and (max-width: 768px) {
  body {
    padding: 0;
    align-items: flex-start;
    background-color: white;
  }

  .form-container {
    width: 100%;
    height: auto;
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
  }

  .form-wrapper {
    width: 200%;
    height: auto;
    min-height: 100vh;
  }

  .div-sign-in,
  .div-sign-up-promo {
    display: none;
  }

  .form-creation,
  .form-connexion {
    width: 50%;
    min-height: 100vh;
    flex-direction: column;
    padding-top: 70px;
    justify-content: flex-start;
  }

  .div-sign-up,
  .div-connexion {
    max-width: 100%;
    padding: 20px;
    width: 100%;
    min-height: calc(100vh - 70px);
    justify-content: flex-start;
  }

  .div-sign-up {
    padding-top: 10px;
  }

  .sous-div-sign-up {
    padding: 0;
    gap: 12px;
  }

  .div-btn-annuler-finaliser,
  .div-cgu {
    padding: 0;
    margin-top: 10px;
  }

  .btn-retour {
    top: 15px;
    left: 15px;
    width: auto;
    padding: 0 15px;
    height: 40px;
    font-size: 15px;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  input {
    height: 50px;
    font-size: 16px;
  }

  .div-connexion button,
  .div-btn-annuler-finaliser button,
  .btn-annuler {
    height: 50px;
    font-size: 16px;
  }

  .mobile-switch-link {
    display: block;
  }

  .form-wrapper {
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  }
}

/* Mobile */
@media screen and (max-width: 480px) {
  .div-sign-up h1,
  .div-connexion h1 {
    font-size: 24px;
    margin-bottom: 15px;
    text-align: center;
  }

  .switch {
    transform: scale(0.95);
  }

  .div-cgu {
    font-size: 14px;
  }

  .btn-retour {
    height: 36px;
    font-size: 14px;
  }

  .sous-div-sign-up {
    gap: 10px;
  }

  input {
    font-size: 16px;
  }
}

.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  --webkit-backdrop-filter: blur(2px);
}

.modal-content {
  background-color: var(--real-white);
  margin: 10% auto;
  padding: 20px;
  border-radius: 15px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: relative;
}

.modal-content h3 {
  color: var(--accent-ff-color);
  margin: 0;
}

.modal-body {
  max-height: 300px;
  overflow-y: auto;
  background: var(--real-white);
  padding: 15px;
  border: 1px solid var(--ddd);
  border-radius: 8px;
  color: var(--accent-ff-color);
  font-size: 15px;
  line-height: 1.5;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Bouton Accepter */
.btn-accept {
  background-color: var(--accent-ff-color);
  color: var(--real-white);
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s;
}

.btn-accept:disabled {
  background-color: var(--darker-white);
  cursor: not-allowed;
}

.btn-accept:not(:disabled):hover {
  background-color: var(--accent-color);
}

/* Bouton Fermer */
.btn-close-modal {
  background-color: transparent;
  border: 1px solid var(--light-gray);
  color: var(--dark-gray);
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
}

.btn-close-modal:hover {
  background-color: var(--mega-light-red);
}
.switch input:disabled + .slider {
  background-color: var(--extra-light);
  cursor: not-allowed;
}

.switch input:disabled + .slider:before {
  background-color: var(--darker-white);
}

.modal {
  z-index: 9999 !important;
}

.texte-conditions {
  margin-top: 15px;
  font-size: 15px;
  color: var(--accent-ff-color);
}

body.no-scroll {
  overflow: hidden;
  height: 100vh;
}

.consent-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--white-light);
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 10px;
  border: 1px solid var(--mega-light-red);
}
.consent-text {
  font-size: 15px;
  color: #333;
  flex: 1;
  padding-right: 15px;
}
.badge-obligatoire {
  background-color: var(--mega-light-red);
  color: #666;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  white-space: nowrap;
}

.modal-body .switch {
  margin: 0;
  transform: scale(0.8);
}

/*-- cgu et données --*/
.div-cgu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--accent-ff-color);
  font-size: 15px;
  width: 100%;
  margin-bottom: 5px;
  padding: 0 30px;
}

.cgu-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.div-cgu a {
  color: var(--accent-color);
  font-weight: 600;
}

.separator-donnees {
  border: 0;
  height: 1px;
  background: var(--light-purple);
  margin: 5px 0;
}

.data-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
}

.data-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.data-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: #555;
}

.badge-required {
  font-size: 10px;
  background-color: var(--accent-ff-color);
  color: var(--real-white);
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: bold;
  opacity: 0.8;
}

.badge-optional {
  font-size: 10px;
  background-color: var(--mega-light-red);
  color: #777;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: bold;
}

.tooltip {
  position: relative;
  cursor: help;
}

.tooltip:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--light-black);
  color: var(--real-white);
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
}

.switch.locked {
  opacity: 0.6;
  cursor: not-allowed;
}

.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  --webkit-backdrop-filter: blur(2px);
}

/* Bordure rouge si invalide */
input.input-error {
  border-color: #e74c3c !important;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
  background-color: #fdf2f2;
}

/* Bordure verte si valide */
input.input-valid {
  border-color: #2ecc71 !important;
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
  background-color: #f0fcf6;
}

.password-requirements {
  font-size: 12px;
  margin-top: 8px;
  background-color: white;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #eee;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  display: none;
}

.password-requirements.visible {
  display: block;
}

.password-requirements p {
  margin-bottom: 5px;
  font-weight: 600;
  color: var(--accent-ff-color);
  padding: 0;
  text-align: left;
}

.password-requirements ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.password-requirements li {
  margin-bottom: 2px;
  color: #e74c3c;
  display: flex;
  align-items: center;
  gap: 5px;
}

.password-requirements li::before {
  content: "✕";
  font-weight: bold;
}

/* Style quand une condition est remplie */
.password-requirements li.valid {
  color: #2ecc71;
  text-decoration: line-through;
  opacity: 0.7;
}

.password-requirements li.valid::before {
  content: "✓";
}

.souvenir-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.custom-checkbox {
  position: relative;
  height: 20px;
  width: 20px;
  min-width: 20px;
  background-color: #eee;
  border: 2px solid #ccc;
  border-radius: 6px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-right: 12px;
}

.custom-checkbox:after {
  content: "";
  position: absolute;
  display: none;
  left: 5px;
  top: 1px;
  width: 4px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.souvenir-label:hover .custom-checkbox {
  background-color: #e0e0e0;
  border-color: #bbb;
}

.souvenir-label input:checked ~ .custom-checkbox {
  background-color: #6c5ce7;
  border-color: #6c5ce7;
  animation: bounce 0.4s ease;
}

.souvenir-label input:checked ~ .custom-checkbox:after {
  display: block;
}

/* Animation */
@keyframes bounce {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}

.souvenir-label {
  flex-direction: row !important;
  max-width: 400px;
  margin: 15px auto;
  cursor: pointer;
  font-size: 0.95rem;
  user-select: none;
  transition: color 0.2s ease;
  align-items: center;
}
