/* ==========================================
   SUBLIMIA BIOTY - AUTH.CSS
   Styles pour les pages d'authentification
   ========================================== */

/* ===== MAIN CONTENT ===== */
main {
  min-height: calc(100vh - 100px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 20px 40px;
}

.auth-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.auth-container {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(126, 200, 184, 0.2);
}

.auth-row {
  display: flex;
  flex-wrap: wrap;
  min-height: 600px;
}

.auth-col {
  flex: 0 0 50%;
  max-width: 50%;
}

/* ===== IMAGE SIDE ===== */
.auth-image-side {
  height: 100%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    rgba(126, 200, 184, 0.1),
    rgba(168, 213, 160, 0.1)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  
}

.auth-image-content {
  text-align: center;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-image-content.fade-out {
  opacity: 0;
  transform: scale(0.95);
}

.auth-image-content.fade-in {
  opacity: 1;
  transform: scale(1);
  animation: fadeScale 0.5s ease;
}

@keyframes fadeScale {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.auth-image-content img {
  max-width: 100%;
  height: auto;
  max-height: 400px;
  width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
  transition: all 0.5s ease;
}

/* ===== FORM SIDE ===== */
.auth-form-side {
  padding: 3rem;
  background: var(--color-white);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo {
  display: inline-block;
  margin-bottom: 1.5rem;
}

.auth-logo img {
  height: 60px;
  width: auto;
  transition: transform 0.3s ease;
}

.auth-logo:hover img {
  transform: scale(1.1);
}

.auth-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  color: var(--color-gray-600);
  font-size: 0.95rem;
}

/* ===== TOGGLE BUTTONS ===== */
.toggle-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  background: var(--color-gray-100);
  padding: 0.5rem;
  border-radius: var(--radius-full);
}

.toggle-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  border-radius: var(--radius-full);
  font-weight: 600;
  color: var(--color-gray-600);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.toggle-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
}

.toggle-btn:hover::before {
  width: 300px;
  height: 300px;
}

.toggle-btn.active {
  background: var(--gradient-primary);
  color: var(--color-white);
  box-shadow: var(--shadow-md);
}

.toggle-btn i {
  font-size: 1rem;
}

/* ===== FORMS ===== */
.auth-form {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  animation: slideForm 0.5s ease;
}

@keyframes slideForm {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-group.half {
  flex: 0 0 calc(50% - 0.5rem);
}

.form-label {
  display: block;
  font-weight: 500;
  color: var(--color-gray-700);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.form-label i {
  color: var(--color-primary);
  margin-right: 0.5rem;
  width: 16px;
}

.form-control {
  width: 100%;
  padding: 0.875rem 1.25rem;
  border: 2px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background: var(--color-white);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(126, 200, 184, 0.1);
  transform: translateY(-2px);
}

.form-control.is-invalid {
  border-color: #ff6b6b;
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

.password-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-gray-400);
  cursor: pointer;
  padding: 0.25rem;
  transition: all 0.3s ease;
  font-size: 1.1rem;
}

.password-toggle:hover {
  color: var(--color-primary);
  transform: translateY(-50%) scale(1.1);
}

/* ===== SEX SELECTION ===== */
.sex-selector {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.sex-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border: 2px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  flex: 1;
}

.sex-option input[type="radio"] {
  display: none;
}

.sex-option i {
  font-size: 1.2rem;
  color: var(--color-gray-400);
  transition: all 0.3s ease;
}

.sex-option span {
  color: var(--color-gray-600);
  transition: all 0.3s ease;
}

.sex-option.active {
  border-color: var(--color-primary);
  background: rgba(126, 200, 184, 0.1);
}

.sex-option.active i {
  color: var(--color-primary);
}

.sex-option.active span {
  color: var(--color-primary);
  font-weight: 600;
}

.sex-option:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

/* ===== CHECKBOX ===== */
.form-check {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  margin-bottom: 1.5rem;
}

.form-check-input {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--color-primary);
  transition: all 0.2s ease;
}

.form-check-input:checked {
  transform: scale(1.1);
}

.form-check-label {
  font-size: 0.9rem;
  color: var(--color-gray-600);
  cursor: pointer;
}

.form-check-label a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.form-check-label a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

.auth-link-primary {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  font-size: 0.9rem;
}

.auth-link-primary:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

/* ===== PHONE INPUT ===== */
.phone-input-group {
  display: flex;
  gap: 0.5rem;
}

.phone-number {
  flex: 1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
  .auth-col {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .auth-image-side {
    display: none; /* Image cachée sur mobile/tablette */
  }

  .auth-form-side {
    padding: 2rem;
  }
}

@media (max-width: 768px) {
  .auth-form-side {
    padding: 1.5rem;
  }

  .auth-title {
    font-size: 1.75rem;
  }

  .toggle-buttons {
    flex-direction: column;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .form-group.half {
    flex: 1;
  }

  .sex-selector {
    flex-direction: column;
    gap: 0.75rem;
  }

  .phone-input-group {
    flex-direction: column;
  }
}

@media (max-width: 576px) {
  main {
    padding: 80px 10px 20px;
  }

  .auth-form-side {
    padding: 1.5rem;
  }

  .auth-title {
    font-size: 1.5rem;
  }

  .auth-subtitle {
    font-size: 0.85rem;
  }

  .btn {
    padding: 0.75rem 1.5rem;
  }
}

/* ===== IMAGE SIDE - UNIQUEMENT L'IMAGE ===== */
.auth-image-side {
  height: 100%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    rgba(126, 200, 184, 0.1),
    rgba(168, 213, 160, 0.1)
  );
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-image-content {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-image-content img {
  max-width: 100%;
  max-height: 500px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
  transition: all 0.5s ease;
}

/* Animation de transition */
.auth-image-content.fade-out {
  opacity: 0;
  transform: scale(0.95);
}

.auth-image-content.fade-in {
  opacity: 1;
  transform: scale(1);
  animation: fadeScale 0.5s ease;
}

@keyframes fadeScale {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===== RESPONSIVE - CACHER L'IMAGE SUR MOBILE ===== */
@media (max-width: 991px) {
  .auth-col {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .auth-image-side {
    display: none; /* Image complètement cachée sur mobile/tablette */
  }

  .auth-form-side {
    padding: 2rem;
  }
}

/* ===== FORGOT PASSWORD MODAL STYLES ===== */
#forgotPasswordModal .modal-content {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

#forgotPasswordModal .modal-header {
  background: var(--gradient-primary);
  color: var(--color-white);
  border-bottom: none;
  padding: 1.5rem;
  position: relative;
}

#forgotPasswordModal .modal-header .modal-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

#forgotPasswordModal .modal-header .modal-title i {
  font-size: 1.25rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

#forgotPasswordModal .modal-header .btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.8;
  transition: all 0.3s ease;
  background-size: 0.8rem;
}

#forgotPasswordModal .modal-header .btn-close:hover {
  opacity: 1;
  transform: rotate(90deg);
}

#forgotPasswordModal .modal-body {
  padding: 2rem;
}

#forgotPasswordModal .modal-body p {
  color: var(--color-gray-600);
  font-size: 0.95rem;
  line-height: 1.6;
  background: rgba(126, 200, 184, 0.05);
  padding: 1rem;
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-primary);
}

#forgotPasswordModal .form-group {
  margin-bottom: 0;
}

#forgotPasswordModal .form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-gray-700);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

#forgotPasswordModal .form-label i {
  color: var(--color-primary);
  font-size: 1rem;
}

#forgotPasswordModal .form-control {
  padding: 0.875rem 1.25rem;
  border: 2px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

#forgotPasswordModal .form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(126, 200, 184, 0.1);
  outline: none;
}

#forgotPasswordModal .modal-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--color-gray-200);
  gap: 1rem;
}

#forgotPasswordModal .modal-footer .btn {
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

#forgotPasswordModal .modal-footer .btn-outline {
  background: transparent;
  border: 2px solid var(--color-gray-200);
  color: var(--color-gray-700);
}

#forgotPasswordModal .modal-footer .btn-outline:hover {
  border-color: var(--color-gray-400);
  background: var(--color-gray-100);
  transform: translateY(-2px);
}

#forgotPasswordModal .modal-footer .btn-primary {
  background: var(--gradient-primary);
  color: var(--color-white);
  border: none;
  box-shadow: var(--shadow-md);
}

#forgotPasswordModal .modal-footer .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

#forgotPasswordModal .modal-footer .btn-primary i {
  font-size: 0.9rem;
}

/* Animation d'entrée */
#forgotPasswordModal.fade .modal-dialog {
  transform: scale(0.95);
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

#forgotPasswordModal.show .modal-dialog {
  transform: scale(1);
}

/* Responsive */
@media (max-width: 576px) {
  #forgotPasswordModal .modal-body {
    padding: 1.5rem;
  }

  #forgotPasswordModal .modal-footer {
    flex-direction: column;
  }

  #forgotPasswordModal .modal-footer .btn {
    width: 100%;
    margin: 0 !important;
  }

  #forgotPasswordModal .modal-body p {
    font-size: 0.9rem;
    padding: 0.875rem;
  }
}
/* Styles spécifiques à la page new-password */
.new-password-container {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.new-password-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(126, 200, 184, 0.2);
  animation: slideUp 0.5s ease;
}

.new-password-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.new-password-header {
  padding: 2.5rem 2rem 1.5rem;
  text-align: center;
  background: linear-gradient(
    135deg,
    rgba(126, 200, 184, 0.05),
    rgba(168, 213, 160, 0.05)
  );
}

.new-password-logo {
  display: inline-block;
  margin-bottom: 1.5rem;
}

.new-password-logo img {
  height: 60px;
  width: auto;
  transition: transform 0.3s ease;
}

.new-password-logo:hover img {
  transform: scale(1.05);
}

.new-password-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: 0.75rem;
}

.new-password-subtitle {
  color: var(--color-gray-600);
  font-size: 0.95rem;
  max-width: 300px;
  margin: 0 auto;
}

.new-password-body {
  padding: 2rem;
}

.new-password-icon-wrapper {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(
    135deg,
    rgba(126, 200, 184, 0.15),
    rgba(168, 213, 160, 0.15)
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 2s ease-in-out infinite;
}

.new-password-icon-wrapper i {
  font-size: 2.5rem;
  color: var(--color-primary);
}

.password-strength {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.strength-bar {
  display: flex;
  gap: 0.25rem;
  height: 4px;
  margin-bottom: 0.5rem;
}

.strength-segment {
  flex: 1;
  height: 100%;
  background: var(--color-gray-200);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.strength-segment.active {
  background: var(--color-primary);
}

.strength-text {
  font-size: 0.8rem;
  color: var(--color-gray-600);
  display: flex;
  justify-content: space-between;
}

.strength-text span {
  font-weight: 600;
}

.strength-text .weak {
  color: #ff6b6b;
}
.strength-text .medium {
  color: #ffb347;
}
.strength-text .strong {
  color: #a8d5a0;
}

.password-requirements {
  background: rgba(126, 200, 184, 0.05);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.password-requirements p {
  font-size: 0.85rem;
  color: var(--color-gray-600);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.password-requirements p i {
  color: var(--color-primary);
  font-size: 0.9rem;
}

.requirement-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.requirement-list li {
  font-size: 0.8rem;
  color: var(--color-gray-500);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.requirement-list li i {
  font-size: 0.75rem;
  width: 16px;
}

.requirement-list li.valid {
  color: #a8d5a0;
}

.requirement-list li.valid i {
  color: #a8d5a0;
}

.requirement-list li.invalid {
  color: var(--color-gray-500);
}

.requirement-list li.invalid i {
  color: var(--color-gray-400);
}

.new-password-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.new-password-actions .btn {
  flex: 1;
}

.success-message {
  text-align: center;
  padding: 2rem 1rem;
  background: rgba(168, 213, 160, 0.2);
  border-radius: var(--radius-md);
  color: #2e7d32;
  border-left: 4px solid #a8d5a0;
  animation: slideDown 0.5s ease;
}

.success-message i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #a8d5a0;
}

.success-message h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: #2e7d32;
}

.success-message p {
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 576px) {
  .new-password-header {
    padding: 2rem 1.5rem 1rem;
  }

  .new-password-body {
    padding: 1.5rem;
  }

  .new-password-title {
    font-size: 1.5rem;
  }

  .new-password-actions {
    flex-direction: column;
  }

  .new-password-icon-wrapper {
    width: 60px;
    height: 60px;
  }

  .new-password-icon-wrapper i {
    font-size: 2rem;
  }
}
/* ===== IMAGE SIDE - VERSION COVER AVEC EFFET PARALLAXE ===== */
.auth-image-side {
  height: 100%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    rgba(126, 200, 184, 0.1),
    rgba(168, 213, 160, 0.1)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateZ(0); /* Active l'accélération matérielle */
}

.auth-image-content {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(1.02); /* Léger zoom initial */
}

.auth-image-content img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-image-side:hover .auth-image-content img {
  transform: scale(1.05); /* Zoom au survol de la colonne */
}