/* Import des fonts du site vitrine */
@font-face {
  font-family: Thicccboi;
  src: url('../../fonts/THICCCBOI-Regular.ttf') format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Thicccboi;
  src: url('../../fonts/THICCCBOI-Medium.ttf') format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Thicccboi;
  src: url('../../fonts/THICCCBOI-Bold.ttf') format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Variables de couleurs du site vitrine */
:root {
  --neutral-200: #f5f9ff;
  --neutral-600: #66666e;
  --neutral-800: #1a1b1e;
  --primary-1: #7aafff;
  --neutral-100: white;
  --neutral-700: #3b3f44;
  --neutral-500: #8a8a92;
  --neutral-400: #c0c4d1;
  --neutral-300: #e5ecf5;
  --shadow-small-1: #0c0c0c0a;
  --shadow-small-2: #a3a6ff21;
  --mini-card-shadow: #448cfc1a;
  --icon-shadow: #448cfc14;
  --secondary-2: #ecebff;
  --bg-square: #ddebff;
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Thicccboi', 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--neutral-200);
  color: var(--neutral-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Page Wrapper */
.page-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

/* Background Blobs */
.bg-blobs-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.blob-animated {
  position: absolute;
  width: 120%;
  max-width: 1200px;
  height: auto;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.3;
  animation: blob-float 20s ease-in-out infinite;
}

@keyframes blob-float {
  0%, 100% {
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
  }
  25% {
    transform: translate(-48%, -52%) rotate(5deg) scale(1.05);
  }
  50% {
    transform: translate(-52%, -50%) rotate(-5deg) scale(0.95);
  }
  75% {
    transform: translate(-50%, -48%) rotate(3deg) scale(1.02);
  }
}

/* Login Container */
.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  animation: fade-in 0.6s ease-out;
}

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

/* Logo */
.logo-wrapper {
  text-align: center;
  margin-bottom: 2rem;
  animation: fade-in 0.6s ease-out 0.1s both;
}

.logo {
  max-width: 180px;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

/* Login Card */
.login-card {
  background: var(--neutral-100);
  border-radius: 24px;
  padding: 3rem;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(0, 0, 0, 0.04);
  animation: fade-in 0.6s ease-out 0.2s both;
  backdrop-filter: blur(10px);
}

/* Card Header */
.card-header {
  text-align: center;
  margin-bottom: 2rem;
}

.title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--neutral-800);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: 1rem;
  color: var(--neutral-600);
  font-weight: 400;
}

/* Forms */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.auth-form.hidden {
  display: none;
}

/* Form Back Link */
.form-back {
  margin-bottom: 1rem;
}

.back-link {
  color: var(--primary-1);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.2s ease;
}

.back-link:hover {
  color: var(--neutral-800);
  transform: translateX(-4px);
}

/* Input Wrapper */
.input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--neutral-800);
  letter-spacing: 0.01em;
}

.input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--neutral-300);
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--neutral-800);
  background-color: var(--neutral-100);
  transition: all 0.2s ease;
  outline: none;
}

.input:focus {
  border-color: var(--primary-1);
  box-shadow: 0 0 0 4px rgba(122, 175, 255, 0.1);
}

.input::placeholder {
  color: var(--neutral-500);
}

.input-help {
  font-size: 0.75rem;
  color: var(--neutral-600);
  margin-top: 0.25rem;
}

/* Form Footer */
.form-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: -0.5rem;
}

.forgot-password-link {
  color: var(--primary-1);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.forgot-password-link:hover {
  color: var(--neutral-800);
}

/* Submit Button */
.submit-button {
  width: 100%;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--primary-1) 0%, #5a9fff 100%);
  color: var(--neutral-100);
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px var(--mini-card-shadow);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--shadow-small-2);
}

.submit-button:active {
  transform: translateY(0);
}

.submit-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.button-text {
  position: relative;
  z-index: 1;
}

/* Button Loader */
.button-loader {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.button-loader.hidden {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Messages */
.error-message,
.success-message {
  padding: 1rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1rem;
  animation: slide-in 0.3s ease-out;
}

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

.error-message {
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.success-message {
  background-color: #efe;
  color: #3a3;
  border: 1px solid #cfc;
}

.error-message.hidden,
.success-message.hidden {
  display: none;
}

/* Login Footer */
.login-footer {
  text-align: center;
  margin-top: 2rem;
  color: var(--neutral-600);
  font-size: 0.875rem;
  animation: fade-in 0.6s ease-out 0.3s both;
}

.login-footer p {
  margin-bottom: 0.75rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--neutral-600);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--primary-1);
}

/* Responsive */
@media (max-width: 768px) {
  .page-wrapper {
    padding: 1rem;
  }

  .login-card {
    padding: 2rem 1.5rem;
    border-radius: 20px;
  }

  .title {
    font-size: 1.75rem;
  }

  .logo {
    max-width: 150px;
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 1.5rem 1.25rem;
  }

  .title {
    font-size: 1.5rem;
  }

  .submit-button {
    padding: 0.875rem 1.25rem;
  }
}
