body {
    margin: 0;
    overflow: hidden;
}

.auth-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, #1a4876 0%, #1557b0 100%);
    overflow: hidden;
}

/* Vague animée */
.auth-container::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
        rgba(26, 72, 118, 0.1) 25%, 
        rgba(21, 87, 176, 0.1) 50%, 
        rgba(26, 72, 118, 0.1) 75%);
    animation: waveMove 15s infinite linear;
    mask: radial-gradient(50% 50% at center, #000, transparent);
    -webkit-mask: radial-gradient(50% 50% at center, #000, transparent);
}

.auth-box {
    background: rgba(255, 255, 255, 0.92);
    padding: 2.5rem;
    border-radius: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(8px);
    width: 100%;
    max-width: 400px;
    transform: translateY(100px);
    opacity: 0;
    animation: slideUp 0.4s ease forwards 0.6s;  /* Commence après le saut initial du logo */
    position: relative;
    overflow: visible;  /* Permettre au contenu de déborder */
}

.auth-box::before {
    display: none;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.auth-header img {
  position: relative;
  transform-origin: center;
  will-change: transform, filter, opacity;
  animation: 
    logoReveal 2s cubic-bezier(0.4, 0, 0.2, 1) forwards,
    logoBreath 3s ease-in-out infinite 2s;  /* Démarre après logoReveal */
}

.form-group {
    margin-bottom: 1rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    border-color: #1a4876;
    box-shadow: 0 0 0 3px rgba(26, 72, 118, 0.2);
    transform: translateY(-2px);
}

.btn-login {
    width: 100%;
    padding: 0.75rem;
    background: #1a4876;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    background: #1557b0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(21, 87, 176, 0.2);
}

.btn-login:active {
    transform: translateY(0);
}

.error-message {
    color: #dc3545;
    text-align: center;
    margin-top: 1rem;
    animation: shake 0.5s ease;
}

/* Animations */
@keyframes floatParticle {
    0% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-20px) translateX(10px); }
    50% { transform: translateY(-40px) translateX(0); }
    75% { transform: translateY(-20px) translateX(-10px); }
    100% { transform: translateY(0) translateX(0); }
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

@keyframes backgroundMove {
    0% { transform: translate(-25%, -25%) rotate(0deg); }
    100% { transform: translate(-25%, -25%) rotate(360deg); }
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulseImage {
    0% { transform: scale(0.9); }
    50% { transform: scale(1); }
    100% { transform: scale(0.9); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes waveMove {
    0% {
        transform: translate(-25%, -25%) rotate(0deg) scale(1);
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
    50% {
        transform: translate(-25%, -25%) rotate(180deg) scale(1.1);
        border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    }
    100% {
        transform: translate(-25%, -25%) rotate(360deg) scale(1);
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
}

/* Particules flottantes */
.particle {
    position: absolute;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

@keyframes logoReveal {
  0% {
    transform: scale(2) translateY(-50px);
    filter: blur(20px) drop-shadow(0 30px 30px rgba(0, 0, 0, 0.05));
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    filter: blur(0) drop-shadow(0 10px 15px rgba(0, 0, 0, 0.2));
    opacity: 1;
  }
}

@keyframes logoBreath {
  0% {
    transform: translateY(0);
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.2));
  }
  50% {
    transform: translateY(-10px);
    filter: drop-shadow(0 20px 20px rgba(0, 0, 0, 0.15));
  }
  100% {
    transform: translateY(0);
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.2));
  }
}

@media screen and (max-width: 480px) {
  .auth-box {
    margin: 1rem;
    padding: 1.5rem;
    width: calc(100% - 2rem);
    max-width: none;
  }

  .auth-container {
    padding: 0 1rem;
  }
}