:root {
    --background: #030B20;
    --background-hover: #151821;
    --card-hover: #1E293B;
    --blue: #3B82F6;
    --primary: #3B82F6;
    --primary-hover: #2563EB;
    --border: #1E293B;
    --text: #FFFFFF;
    --text-secondary: #94A3B8;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--background);
    color: var(--text);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin: 0 auto;
}

.auth-container {
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
    align-items: center;
    justify-content: center;
    max-width: 700px;
    text-align: center;
    margin: 3% auto;
}

.auth-container p {
    color: var(--text-secondary);
    text-align: left;
    margin-top: 1%;
}

.auth-tabs {
    border-radius: 1rem;
    display: flex;
    justify-content: space-between;
    background: var(--card-hover);
    padding: 0.5rem;
    margin-bottom: 1rem;
    width: 100%;
}

.auth-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 10px;
    cursor: pointer;
    text-align: center;
    font-weight: 500;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.auth-tab.active {
    background: var(--background);
    color: white;
}

.auth-card {
    position: relative;
    background: linear-gradient(140deg, #090E28 0%, #0C1538 50%, #0F1B4A 100%);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(150, 140, 255, 0.08);
    border: 1px solid rgba(110, 125, 220, 0.2);
    border-radius: 12px;
    padding: 2rem;
    width: 100%;
    margin-bottom: 1%;
    transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    will-change: height;
}

.auth-form {
    opacity: 0;
    visibility: hidden;
    transition: 
        opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    position: absolute;
    top: 2rem;
    left: 2rem;
    right: 2rem;
    transform: translateY(10px);
    transition-property: opacity, visibility, transform;
    transition-duration: 0.5s;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-form.active {
    opacity: 1;
    visibility: visible;
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    transform: translateY(0);
    pointer-events: auto;
    transition: 
        opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-form h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    text-align: start;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    margin: 1% 0%;
    color: var(--text);
    width: 100%;
    text-align: start;
    overflow: hidden;
}

.display {
    display: flex;
    align-items: center;
    border-radius: 10px;
    background: linear-gradient(165deg, #070F2A 0%, #0D1A44 60%, #121D4C 100%);
    border: 1px solid rgba(110, 120, 220, 0.2);
    width: 100%;
    transition: border 0.3s ease-in-out;
    color: var(--text-secondary);
}

.form-group .display:focus-within {
    border: 1px solid var(--blue);
    box-shadow: 0 0 0 1px var(--blue);
}

.form-group:focus-within i[data-icon="key"] {
    opacity: 1;
}

/* Styles pour le système d'étapes */
.steps-compact {
    margin: 0.5rem auto;
    position: relative;
    width: 50%;
}

.progress-track {
    height: 3px;
    background: #334155;
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    z-index: 1;
}

.progress-fill {
    height: 100%;
    background: #3B82F6;
    transition: width 0.4s ease;
    border-radius: 3px;
}

.step-bubbles {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.bubble {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #1E293B;
    border: 2px solid #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94A3B8;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: default;
    transition: all 0.3s ease;
    position: relative;
}

.bubble.active {
    background: #3B82F6;
    border-color: #3B82F6;
    color: white;
    transform: scale(1.1);
}

.bubble.completed {
    background: #1E40AF;
    border-color: #1E40AF;
    color: white;
}

/* Tooltip pour les labels */
.bubble:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1E293B;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    margin-bottom: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.bubble:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #1E293B transparent transparent transparent;
    margin-bottom: 3px;
    opacity: 0;
    transition: opacity 0.2s;
}

.bubble:hover::after,
.bubble:hover::before {
    opacity: 1;
}
.steps-navigation {
    display: flex;
    justify-content: space-between;
}

.prev-step-btn, .next-step-btn {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.prev-step-btn {
    background-color: transparent;
    border: 1px solid #4F46E5; /* indigo-600 */
    color: #4F46E5;
}

.prev-step-btn:hover {
    background-color: rgba(79, 70, 229, 0.1);
}

.next-step-btn {
    background-color: #4F46E5; /* indigo-600 */
    color: white;
    margin-left: auto;
}

.next-step-btn:hover {
    background-color: #4338CA; /* indigo-700 */
}

/* Animations pour les transitions d'étapes */
.form-section, .form-group.mt-6 {
    transition: all 0.3s ease-in-out;
}

/* Animation d'entrée et de sortie pour les étapes */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.form-section, .form-group.mt-6 {
    animation: fadeIn 0.3s ease forwards;
}

/* Styles pour les erreurs de validation */
.input-error .display {
    border-color: #EF4444 !important; /* red-500 */
    box-shadow: 0 0 0 1px #EF4444 !important;
}

.error-message {
    color: #EF4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    transition: opacity 0.3s ease;
}

.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.form-group input:not([type="checkbox"]),
.form-group textarea,
.form-group select {
    flex: 1;
    width: 100%;
    padding: 5px 5px 5px 15px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    outline: none;
    transition: border 0.3s ease-in-out;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    transform: scale(0.8);
}

.form-group input::placeholder {
    color: var(--text-secondary);
}

[data-icon="eye"] {
    color: var(--text-secondary);
}

.form-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #4f46e5;
    margin-bottom: 1rem;
}

select[multiple] {
    height: auto;
    min-height: 100px;
}

textarea {
    min-height: 80px;
    width: 100%;
    resize: vertical;
}

.custom-select-container {
    position: relative;
    width: 100%;
}

.custom-select-container .display {
    display: flex;
    align-items: center;
    background: rgba(15, 23, 74, 0.7);
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.custom-select-container select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    padding: 0.5rem 2rem 0.5rem 2.5rem;
    background: transparent;
    border: none;
    color: #E0E7FF;
    font-size: 0.95rem;
    cursor: pointer;
    outline: none;
}

.custom-select-container select option {
    background: #0F1B4A;
    color: #E0E7FF;
    padding: 10px;
}

.custom-select-container select:focus {
    color: #FFFFFF;
}

.custom-select-container .select-arrow {
    position: absolute;
    right: 12px;
    pointer-events: none;
    color: #818CF8;
    width: 18px;
    height: 18px;
}

.custom-select-container select:focus + .display {
    border-color: #3B82F6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Icône à gauche */
.custom-select-container .display i:first-child {
    position: absolute;
    left: 12px;
    color: #818CF8;
}

.submit-btn {
    width: 100%;
    padding: 10px;
    background: var(--primary);
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: var(--text);
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.submit-btn svg {
    color: var(--text);
}

.submit-btn:hover {
    background: var(--primary-hover);
}

/* Affichage correct des formulaires */
.hidden {
    visibility: hidden;
    transition: visibility 5.3s ease-in-out;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    html {
        height: 100vh;
    }

    .auth-container {
        position: absolute;
        top: 0;
        height: 100vh;
        max-width: 80%;
        margin: 0;
    }

    .auth-tabs {
        padding: 0.3rem;
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    .auth-tab {
        flex: 1;
        padding: 0.25rem;
        border-radius: inherit;
    }

    .auth-card {
        padding: 1rem;
    }

    .auth-form {
        /* padding: 0.5rem; */
        font-size: 1rem;
    }
    .auth-form h1 {
        font-size: 1rem;
        font-weight: 600;
    }
    .auth-form p {
        font-size: 0.9rem;
    }
    .form-section {
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
    }
    .form-section h3 {
        font-size: 0.9rem;
    }
    .form-group {
        margin-bottom: 0.5rem;
        margin-top: 0.2rem;
    }
    .form-group label {
        font-size: 0.8rem;
    }
    label {
        font-size: 0.8rem;
    }
    .form-group .display {
        padding: 0.2rem 0.5rem;
        font-size: 0.5rem;
        border-radius: 0.5rem;
    }
    .form-group .display svg {
        font-size: 0.8rem;
        width: 0.8rem;
        height: 0.8rem;
    }
    .form-group input:not([type="checkbox"]),
    .form-group textarea,
    .form-group select {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
    .form-group .display:focus-within {
        border-color: #3B82F6;
        box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
    }

    .auth-form button{
        padding: 0.3rem;
        font-size: 0.8rem;
        width: auto;
        justify-content: center;
        align-items: center;
        justify-self: center;
    }
    .auth-form button svg {
        font-size: 0.8rem;
        width: 0.8rem;
        height: 0.8rem;
    }

    .bubble {
        font-size: 0.5rem;
        width: 1rem;
        height: 1rem;
    }
    .progress-track {
        height: 2px;
        top: 50%;
    }
    .bubble span {
        font-size: 0.5rem;
    }
    .error-message {    
        font-size: 0.5rem;
        white-space: nowrap;
        margin-top: 0.2rem;
    }

    .animated-checkbox {
        margin-bottom: 0.5rem;
    }
    .animated-checkbox-label {
        font-size: 0.8rem;
    }
    .animated-checkbox-check::after {
        width: 0.8rem;
        height: 0.8rem;
    }
}




/* ==================================================
   ANIMATED CHECKBOX
   ================================================== */
/* Base Styles */
.animated-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 0.5rem;
    user-select: none;
  }
  
  .animated-checkbox-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
  }
  
  .animated-checkbox-check {
    position: relative;
    height: 1rem;
    width: 1rem;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
  }
  
  /* Checkmark icon */
  .animated-checkbox-check::after {
    content: '';
    position: absolute;
    display: none;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    transition: all 0.2s ease;
  }
  
  /* Hover and Focus states */
  .animated-checkbox:hover .animated-checkbox-check {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
  }
  
  .animated-checkbox-input:focus ~ .animated-checkbox-check {
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
  }
  
  /* Checked state */
  .animated-checkbox-input:checked ~ .animated-checkbox-check {
    background-color: #3498db;
    border-color: #3498db;
  }
  
  .animated-checkbox-input:checked ~ .animated-checkbox-check::after {
    display: block;
    animation: checkmark 0.2s ease forwards;
  }
  
  @keyframes checkmark {
    0% {
      opacity: 0;
      transform: rotate(45deg) scale(0.8);
    }
    50% {
      opacity: 1;
      transform: rotate(45deg) scale(1.2);
    }
    100% {
      opacity: 1;
      transform: rotate(45deg) scale(1);
    }
  }
  
  /* Label styling */
  .animated-checkbox-label {
    font-size: 0.8rem;
    line-height: 1.4;
    color: #333;
    transition: color 0.2s ease;
  }
  
  .animated-checkbox:hover .animated-checkbox-label {
    color: #3498db;
  }
  
  /* Variant: Rounded style */
  .animated-checkbox-rounded .animated-checkbox-check {
    border-radius: 50%;
  }
  
  /* Variant: Pill style */
  .animated-checkbox-pill {
    background-color: #f8f9fa;
    border-radius: 50px;
    padding: 8px 16px;
    transition: all 0.3s ease;
  }
  
  .animated-checkbox-pill:hover {
    background-color: #e9ecef;
  }
  
  .animated-checkbox-pill .animated-checkbox-check {
    width: 18px;
    height: 18px;
  }
  
  .animated-checkbox-pill .animated-checkbox-check::after {
    width: 5px;
    height: 10px;
  }
  
  /* Dark mode styles */
  @media (prefers-color-scheme: dark) {
    .animated-checkbox-check {
      background-color: #333;
      border-color: #555;
      height: 0.8rem;
      width: 0.8rem;
      margin-right: 0.5rem;
      font-size: 0.6rem;
    }
    
    .animated-checkbox-label {
      color: #f5f5f5;
      font-size: 0.6rem;
    }
    
    .animated-checkbox:hover .animated-checkbox-check {
      border-color: #4dabf7;
      box-shadow: 0 0 0 2px rgba(77, 171, 247, 0.3);
    }
    
    .animated-checkbox-input:focus ~ .animated-checkbox-check {
      box-shadow: 0 0 0 3px rgba(77, 171, 247, 0.3);
    }
    
    .animated-checkbox-input:checked ~ .animated-checkbox-check {
      background-color: #4dabf7;
      border-color: #4dabf7;
    }
    
    .animated-checkbox:hover .animated-checkbox-label {
      color: #4dabf7;
    }
    
    .animated-checkbox-pill {
      background-color: #2a2a2a;
    }
    
    .animated-checkbox-pill:hover {
      background-color: #333;
    }

    .animated-checkbox-check::after {
      width: 0.2rem;
      height: 0.4rem;
      font-size: 0.6rem;
    }
}