/* ==========================================
   SERVME - COMPONENTS MODALS
   Styles modals d'authentification
   Extrait de modals.css (DESKTOP uniquement)
   ========================================== */

/* ============================================
   MODAL OVERLAY
   ============================================ */
.modal-overlay {
  display: none !important; /* Forcer display none par défaut */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: var(--z-modal, 1000);
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
}

.modal-overlay.active {
  display: flex !important;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ============================================
   MODAL CONTAINER
   ============================================ */
.modal-container {
  background: #FFFFFF;
  border-radius: 20px;
  max-width: 520px;
  width: 92%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   MODAL HEADER
   ============================================ */
.modal-header {
  padding: 2rem;
  border-bottom: 1px solid #EBEBEB;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: #222222;
  letter-spacing: -0.02em;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  flex-shrink: 0;
  color: #717171;
  position: relative; /* Au-dessus de tout */
  z-index: 10;
  opacity: 1 !important; /* FORCER l'opacité */
  visibility: visible !important; /* FORCER la visibilité */
}

.modal-close:hover {
  background: #F7F7F7;
  color: #222222;
}

.modal-close svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.5;
  pointer-events: none; /* Le SVG ne bloque pas les clics */
}

/* ============================================
   MODAL BODY
   ============================================ */
.modal-body {
  padding: 2rem;
}

/* ============================================
   USER TYPE SELECTOR
   ============================================ */
.user-type-selector {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.user-type-btn {
  flex: 1;
  padding: 1.5rem 1.25rem;
  border: 2px solid #DDDDDD;
  border-radius: 16px;
  background: #FFFFFF;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
}

.user-type-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #FF385C 0%, #BC1A6E 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.user-type-btn > * {
  position: relative;
  z-index: 1;
}

.user-type-icon {
  font-size: 2.5rem;
  line-height: 1;
  transition: transform 0.3s ease;
}

.user-type-label {
  font-size: 1.125rem;
  font-weight: 700;
  color: #222222;
  transition: color 0.3s ease;
}

.user-type-desc {
  font-size: 0.8125rem;
  color: #717171;
  font-weight: 400;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.user-type-btn:hover {
  border-color: #FF385C;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(255, 56, 92, 0.2);
}

.user-type-btn:hover .user-type-icon {
  transform: scale(1.1);
}

.user-type-btn.active {
  border-color: #FF385C;
  box-shadow: 0 8px 24px rgba(255, 56, 92, 0.25);
}

.user-type-btn.active::before {
  opacity: 1;
}

.user-type-btn.active .user-type-label,
.user-type-btn.active .user-type-desc {
  color: #FFFFFF;
}

.user-type-btn.active .user-type-icon {
  transform: scale(1.15);
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.625rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: #222222;
}

.form-group input {
  width: 100%;
  padding: 0.875rem 1.125rem;
  border: 1.5px solid #DDDDDD;
  border-radius: 16px;
  font-size: 1rem;
  font-family: inherit;
  color: #222222;
  background: #FFFFFF;
  transition: all 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: #222222;
  box-shadow: 0 0 0 4px rgba(34, 34, 34, 0.08);
}

.form-group input::placeholder {
  color: #B0B0B0;
}

/* ============================================
   BOUTONS MODAL
   ============================================ */
.btn-block {
  width: 100%;
  justify-content: center;
}

.btn-primary,
.btn-secondary,
.btn-google {
  width: 100%;
  padding: 0.9375rem 1.5rem;
  border-radius: 24px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
}

.btn-primary {
  background: linear-gradient(135deg, #FF385C 0%, #BC1A6E 100%);
  color: #FFFFFF;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(255, 56, 92, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 56, 92, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-google {
  background: #FFFFFF;
  border: 1.5px solid #DDDDDD;
  color: #222222;
  margin-bottom: 1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-google:hover {
  background: #F7F7F7;
  border-color: #222222;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.btn-google svg {
  flex-shrink: 0;
}

/* ============================================
   DIVIDER
   ============================================ */
.divider {
  text-align: center;
  margin: 1.75rem 0;
  position: relative;
  color: #717171;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.divider::before,
.divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: #EBEBEB;
}

.divider::before {
  left: 0;
}

.divider::after {
  right: 0;
}

/* ============================================
   LEGAL CHECKBOXES
   ============================================ */
.legal-checkboxes {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.checkbox-container {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1.5;
  font-weight: 400;
}

.checkbox-container input[type="checkbox"] {
  margin-top: 0.25rem;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.checkbox-text {
  color: #717171;
  flex: 1;
}

.checkbox-text a {
  color: #FF385C;
  text-decoration: none;
  font-weight: 600;
}

.checkbox-text a:hover {
  text-decoration: underline;
}

/* ============================================
   MODAL SWITCH
   ============================================ */
.modal-switch {
  text-align: center;
  color: #717171;
  font-size: 0.9375rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #EBEBEB;
}

.modal-switch a {
  color: #FF385C;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.modal-switch a:hover {
  color: #E31C5F;
  text-decoration: underline;
}

/* ============================================
   MODAL FOOTER
   ============================================ */
.modal-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid #EBEBEB;
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  background: #F7F7F7;
  border-radius: 0 0 20px 20px;
}

.modal-footer .btn-secondary {
  background: #FFFFFF;
  color: #222222;
  border: 1.5px solid #DDDDDD;
  width: auto;
  padding: 0.75rem 1.5rem;
}

.modal-footer .btn-secondary:hover {
  background: #F7F7F7;
  border-color: #222222;
}

.modal-footer .btn-primary {
  width: auto;
  padding: 0.75rem 1.5rem;
  margin: 0;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

