/**
 * ═══════════════════════════════════════════════════════════
 *  CROPSIDE V2 - STYLES PAGES AUTHENTIFICATION
 *  Login, Register, etc.
 * ═══════════════════════════════════════════════════════════
 */

/* ═══ ANIMATIONS ═══ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-10px) rotate(3deg); }
}

@keyframes floatAlt {
    0%, 100% { transform: translateY(0) rotate(3deg); }
    50% { transform: translateY(-8px) rotate(-3deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25%, 75% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ═══ CONTENEUR AUTH ═══ */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #87ceeb 0%, #b0e0e6 50%, var(--color-light) 100%);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.5s ease-out;
}

/* ═══ CARTE AUTH ═══ */
.auth-card {
    background: var(--panel-bg);
    border: 4px solid var(--panel-border);
    border-radius: var(--radius-xl);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 10;
    animation: fadeInUp 0.6s ease-out;
    box-shadow: 0 10px 40px rgba(54, 73, 88, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(54, 73, 88, 0.3);
}

.auth-card h1 {
    font-family: 'Fredoka', sans-serif;
    font-size: var(--font-2xl);
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-card .subtitle {
    text-align: center;
    color: var(--text-medium);
    font-size: var(--font-base);
    margin-bottom: 30px;
    animation: fadeIn 0.5s ease-out 0.2s both;
}

/* ═══ FORMULAIRE ═══ */
.auth-card .form-group {
    margin-bottom: 20px;
}

.auth-card .form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: var(--font-base);
}

.auth-card .form-group input {
    width: 100%;
    padding: 14px 18px;
    border: 3px solid var(--panel-border);
    border-radius: var(--radius-md);
    font-size: var(--font-base);
    background: white;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.auth-card .form-group input:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(85, 130, 139, 0.2);
}

.auth-card .form-group input::placeholder {
    color: var(--text-medium);
    opacity: 0.6;
}

/* ═══ BOUTON SUBMIT ═══ */
.auth-card button[type="submit"] {
    width: 100%;
    padding: 16px;
    background: var(--green);
    border: 3px solid var(--green-dark);
    border-radius: var(--radius-md);
    color: white;
    font-size: var(--font-lg);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.auth-card button[type="submit"]:hover {
    background: var(--green-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 96, 100, 0.3);
}

/* ═══ LIENS ═══ */
.auth-card .links {
    text-align: center;
    margin-top: 24px;
    font-size: var(--font-base);
}

.auth-card .links a {
    color: var(--green);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.auth-card .links a:hover {
    color: var(--green-dark);
    transform: translateY(-2px);
}

/* ═══ FOOTER AUTH ═══ */
.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: var(--font-sm);
    color: var(--text-medium);
    opacity: 0.7;
    position: relative;
    z-index: 1;
}

/* ═══ MESSAGE ERREUR ═══ */
.auth-card .error {
    background: linear-gradient(180deg, #ffebee 0%, #ffcdd2 100%);
    border: 3px solid var(--red);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-bottom: 20px;
    color: #c62828;
    font-weight: 600;
    font-size: var(--font-base);
    text-align: center;
    animation: shake 0.5s ease-out, fadeIn 0.3s ease-out;
    position: relative;
    z-index: 1;
}

/* ═══ MESSAGE SUCCES ═══ */
.auth-card .success {
    background: linear-gradient(180deg, #e8f5e9 0%, #c8e6c9 100%);
    border: 3px solid var(--color-sage);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-bottom: 20px;
    color: var(--color-teal);
    font-weight: 600;
    font-size: var(--font-base);
    text-align: center;
    animation: fadeIn 0.3s ease-out;
    position: relative;
    z-index: 1;
}

/* ═══ DÉCOR - NUAGES ═══ */
.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50px;
    filter: blur(2px);
    z-index: 1;
}

.cloud::before, .cloud::after {
    content: '';
    position: absolute;
    background: inherit;
    border-radius: 50%;
}

.cloud-1 {
    width: 100px;
    height: 35px;
    top: 8%;
    left: 20%;
    animation: cloudMove1 25s linear infinite;
}
.cloud-1::before { width: 50px; height: 50px; top: -25px; left: 15px; }
.cloud-1::after { width: 35px; height: 35px; top: -15px; left: 55px; }

.cloud-2 {
    width: 80px;
    height: 28px;
    top: 15%;
    left: 60%;
    animation: cloudMove2 30s linear infinite;
    opacity: 0.6;
}
.cloud-2::before { width: 40px; height: 40px; top: -20px; left: 10px; }
.cloud-2::after { width: 30px; height: 30px; top: -12px; left: 40px; }

.cloud-3 {
    width: 120px;
    height: 40px;
    top: 5%;
    left: -5%;
    animation: cloudMove3 35s linear infinite;
    opacity: 0.7;
}
.cloud-3::before { width: 60px; height: 55px; top: -30px; left: 20px; }
.cloud-3::after { width: 45px; height: 40px; top: -18px; left: 65px; }

@keyframes cloudMove1 {
    from { transform: translateX(0); }
    to { transform: translateX(calc(100vw + 200px)); }
}
@keyframes cloudMove2 {
    from { transform: translateX(0); }
    to { transform: translateX(calc(100vw + 200px)); }
}
@keyframes cloudMove3 {
    from { transform: translateX(0); }
    to { transform: translateX(calc(100vw + 200px)); }
}

/* ═══ DÉCOR - SOL HERBE ═══ */
.ground {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(180deg, var(--color-sage) 0%, var(--color-teal-mid) 50%, var(--color-teal) 100%);
    border-top: 4px solid var(--color-teal);
    z-index: 1;
}

.ground::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    right: 0;
    height: 20px;
    background: repeating-linear-gradient(
        90deg,
        transparent 0px,
        transparent 20px,
        var(--color-sage) 20px,
        var(--color-sage) 25px
    );
    opacity: 0.5;
}

/* ═══ DÉCOR - SOLEIL ═══ */
.sun {
    position: absolute;
    top: 8%;
    right: 10%;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, #ffe066 0%, #ffb347 70%, transparent 70%);
    border-radius: 50%;
    box-shadow: 0 0 60px rgba(255, 200, 50, 0.5), 0 0 100px rgba(255, 180, 50, 0.3);
    animation: sunPulse 4s ease-in-out infinite;
    z-index: 1;
}

.sun::before {
    content: '';
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, rgba(255, 230, 100, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: sunGlow 2s ease-in-out infinite alternate;
}

@keyframes sunPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes sunGlow {
    from { opacity: 0.5; transform: scale(1); }
    to { opacity: 1; transform: scale(1.1); }
}

/* ═══ DÉCOR - FEUILLES ═══ */
.particles {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.leaf {
    position: absolute;
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, var(--color-sage) 0%, var(--color-teal-mid) 100%);
    border-radius: 0 50% 50% 50%;
    opacity: 0.6;
    animation: leafFall linear infinite;
}

.leaf:nth-child(1) { left: 10%; top: 20%; animation-duration: 12s; animation-delay: -6s; }
.leaf:nth-child(2) { left: 25%; top: 50%; animation-duration: 15s; animation-delay: -10s; width: 8px; height: 8px; }
.leaf:nth-child(3) { left: 40%; top: 10%; animation-duration: 10s; animation-delay: -3s; }
.leaf:nth-child(4) { left: 60%; top: 70%; animation-duration: 14s; animation-delay: -8s; width: 10px; height: 10px; }
.leaf:nth-child(5) { left: 75%; top: 35%; animation-duration: 11s; animation-delay: -5s; }
.leaf:nth-child(6) { left: 90%; top: 60%; animation-duration: 13s; animation-delay: -11s; width: 9px; height: 9px; }

@keyframes leafFall {
    0% {
        transform: rotate(0deg) translateX(0) translateY(0);
        opacity: 0.6;
    }
    100% {
        transform: rotate(360deg) translateX(50px) translateY(100vh);
        opacity: 0.6;
    }
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 480px) {
    .auth-card {
        padding: 28px 24px;
        margin: 16px;
    }

    .auth-card h1 {
        font-size: 26px;
    }

    .sun {
        width: 60px;
        height: 60px;
        top: 5%;
        right: 5%;
    }

    .ground {
        height: 60px;
    }
}
