/* Reset et styles de base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  font-family: "Montserrat", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #f8f9fa;
  color: #1a1a1a;
  line-height: 1.6;
}
.main-layout{
  display: flex;
  flex-direction: row;
}
.content-area{
  width: 100%;
}
/* Scrollbar personnalisée */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;

  &:hover {
    background: #999;
  }
}

/* Utilitaires */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }


.auth-page-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #243b5d 0%, #2984a1 100%);
  padding: 20px;
  position: relative;
  overflow: hidden;



  .auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow:
      0 20px 60px rgba(0, 0, 0, 0.3),
      0 0 100px rgba(102, 126, 234, 0.2);
    overflow: hidden;
    animation: fadeInUp 0.6s ease;

    .auth-header {
      padding: 48px 40px 32px;
      text-align: center;
      background: linear-gradient(180deg, #f9fafb 0%, #ffffff 100%);

      .logo {
        display: inline-block;
        font-size: 32px;
        font-weight: 800;
        color: #2984a1;
        margin-bottom: 24px;
        letter-spacing: -1px;
      }

      .auth-title {
        font-size: 28px;
        font-weight: 700;
        color: #1f2937;
        margin: 0 0 12px 0;
        line-height: 1.2;
      }

      .auth-subtitle {
        font-size: 15px;
        color: #6b7280;
        margin: 0;
        font-weight: 400;
        line-height: 1.5;
      }
    }

    .auth-content {
      padding: 32px 40px 40px;

      .auth-form {
        display: flex;
        flex-direction: column;
        gap: 24px;

        .form-field {
          display: flex;
          flex-direction: column;
          gap: 8px;

          .form-label {
            font-size: 14px;
            font-weight: 600;
            color: #374151;
            margin: 0;
          }

          .input-wrapper {
            position: relative;
            display: flex;
            align-items: center;

            .form-input {
              width: 100%;
              padding: 14px 16px;
              padding-right: 48px;
              font-size: 15px;
              color: #1f2937;
              background: #f9fafb;
              border: 2px solid #e5e7eb;
              border-radius: 12px;
              transition: all 0.2s ease;
              outline: none;

              &::placeholder {
                color: #9ca3af;
              }

              &:focus {
                background: #ffffff;
                border-color: #667eea;
                box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
              }

              &.error {
                border-color: #ef4444;
                background: #fef2f2;

                &:focus {
                  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
                }
              }
            }

            .input-icon {
              position: absolute;
              right: 16px;
              color: #9ca3af;
              pointer-events: none;
              transition: color 0.2s ease;

              &.clickable {
                pointer-events: all;
                cursor: pointer;

                &:hover {
                  color: #667eea;
                }
              }
            }

            .form-input:focus ~ .input-icon {
              color: #667eea;
            }
          }

          .error-message {
            font-size: 13px;
            color: #ef4444;
            margin: 0;
            padding-left: 4px;
          }

          .success-message {
            font-size: 13px;
            color: #10b981;
            margin: 0;
            padding-left: 4px;
          }

          .info-message {
            font-size: 13px;
            color: #6b7280;
            margin: 0;
            padding-left: 4px;
          }
        }

        .form-options {
          display: flex;
          justify-content: space-between;
          align-items: center;
          gap: 16px;
          flex-wrap: wrap;

          .checkbox-wrapper {
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;

            input[type="checkbox"] {
              width: 18px;
              height: 18px;
              cursor: pointer;
              accent-color: #667eea;
            }

            .checkbox-label {
              font-size: 14px;
              color: #6b7280;
              user-select: none;
            }
          }

          .forgot-password-link {
            font-size: 14px;
            color: #667eea;
            text-decoration: none;
            font-weight: 500;
            transition: color 0.2s ease;

            &:hover {
              color: #5568d3;
              text-decoration: underline;
            }
          }
        }

        .auth-btn {
          width: 100%;
          padding: 14px 24px;
          font-size: 16px;
          font-weight: 600;
          color: #ffffff;
          background: linear-gradient(-45deg, #243b5d 0%, #2984a1 100%);
          border: none;
          border-radius: 12px;
          cursor: pointer;
          transition: all 0.3s ease;
          box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
          margin-top: 8px;

          &:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
          }

          &:active:not(:disabled) {
            transform: translateY(0);
          }

          &:disabled {
            opacity: 0.6;
            cursor: not-allowed;
          }

          span {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
          }
        }

        .divider {
          display: flex;
          align-items: center;
          text-align: center;
          margin: 8px 0;

          &::before,
          &::after {
            content: '';
            flex: 1;
            border-bottom: 1px solid #e5e7eb;
          }

          span {
            padding: 0 16px;
            font-size: 14px;
            color: #9ca3af;
            font-weight: 500;
          }
        }

        .social-buttons {
          display: flex;
          gap: 12px;

          .social-btn {
            flex: 1;
            padding: 12px;
            background: #ffffff;
            border: 2px solid #e5e7eb;
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            font-size: 14px;
            font-weight: 600;
            color: #374151;

            &:hover {
              border-color: #667eea;
              background: #f9fafb;
            }

            img, svg {
              width: 20px;
              height: 20px;
            }
          }
        }
      }
    }

    .auth-footer {
      padding: 24px 40px;
      text-align: center;
      background: #f9fafb;
      border-top: 1px solid #e5e7eb;

      p {
        margin: 0;
        font-size: 14px;
        color: #6b7280;
      }

      .register-link,
      .login-link,
      .back-to-login-link {
        color: #667eea;
        text-decoration: none;
        font-weight: 600;
        transition: color 0.2s ease;

        &:hover {
          color: #5568d3;
          text-decoration: underline;
        }
      }
    }
  }
}

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

@keyframes backgroundMove {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(5%, -5%) rotate(5deg);
  }
  66% {
    transform: translate(-5%, 5%) rotate(-5deg);
  }
}

@media (max-width: 640px) {
  .auth-page-container {
    padding: 16px;

    .auth-card {
      max-width: 100%;
      border-radius: 20px;

      .auth-header {
        padding: 32px 24px 24px;

        .logo {
          font-size: 28px;
          margin-bottom: 20px;
        }

        .auth-title {
          font-size: 24px;
        }

        .auth-subtitle {
          font-size: 14px;
        }
      }

      .auth-content {
        padding: 24px;

        .auth-form {
          gap: 20px;

          .form-field {
            .input-wrapper {
              .form-input {
                padding: 12px 14px;
                padding-right: 44px;
                font-size: 14px;
              }
            }
          }

          .form-options {
            flex-direction: column;
            align-items: flex-start;
            gap: 12px;
          }

          .auth-btn {
            padding: 12px 20px;
            font-size: 15px;
          }

          .social-buttons {
            flex-direction: column;

            .social-btn {
              width: 100%;
            }
          }
        }
      }

      .auth-footer {
        padding: 20px 24px;
      }
    }
  }
}

.auth-page-container {
  &.register-page {
    .auth-card {
      max-width: 480px;
    }
  }

  &.forgot-password-page {
    .auth-card {
      max-width: 400px;
    }
  }
}
