/* ========================================
   LOGIN PAGE - Against Stones
   Design épuré, moderne et minimaliste
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --login-gold: #FFD700;
    --login-gold-dark: #D4AF37;
    --login-red: #EF4444;
    --bg-primary: #0A0A0A;
    --bg-card: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 215, 0, 0.3);
    --text-primary: #FFFFFF;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;
    --text-subtle: #64748B;
}

/* ========================================
   CONTENT - Full height centering
   ======================================== */
.content {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   LOGIN CONTAINER
   ======================================== */
.login-container {
    width: 100%;
    max-width: 480px;
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ========================================
   LOGIN BOX - Glassmorphism
   ======================================== */
.login-box {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1.5px solid var(--border-subtle);
    border-radius: 24px;
    padding: 48px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6),
                0 0 0 1px rgba(255, 255, 255, 0.03),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

/* Accent doré en haut */
.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg,
                transparent 0%,
                var(--login-gold) 50%,
                transparent 100%);
    border-radius: 0 0 2px 2px;
}

/* Glow subtil */
.login-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: radial-gradient(circle at 50% 0%,
                rgba(255, 215, 0, 0.05) 0%,
                transparent 70%);
    pointer-events: none;
}

/* ========================================
   TITLE - Élégant
   ======================================== */
.login-title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(28px, 5vw, 36px);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    text-align: center;
    letter-spacing: -0.03em;
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg,
                var(--login-gold) 0%,
                #FFFFFF 50%,
                var(--login-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   ERROR MESSAGE - Visible et clair
   ======================================== */
.error-msg {
    margin: 24px 0;
    padding: 16px 20px;
    background: rgba(239, 68, 68, 0.1);
    border: 1.5px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    color: var(--login-red);
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    text-align: center;
    position: relative;
    z-index: 1;
    animation: shake 0.4s ease;
}

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

.error-msg::before {
    content: '⚠';
    margin-right: 8px;
    font-size: 16px;
}

/* ========================================
   FORM - Épuré
   ======================================== */
.login-form {
    margin: 32px 0 28px 0;
    position: relative;
    z-index: 1;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Inter', sans-serif;
}

.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    height: 56px;
    padding: 0 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 1.5px solid var(--border-subtle);
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
}

.form-group input::placeholder {
    color: var(--text-subtle);
    font-weight: 300;
}

.form-group input:focus {
    outline: none;
    border-color: var(--login-gold);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.1),
                inset 0 2px 6px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.form-group input:hover:not(:focus) {
    border-color: rgba(255, 215, 0, 0.2);
}

/* ========================================
   LOGIN BUTTON - Premium
   ======================================== */
.login-btn {
    width: 100%;
    height: 60px;
    padding: 0 32px;
    background: linear-gradient(135deg,
                var(--login-gold) 0%,
                var(--login-gold-dark) 100%);
    border: none;
    border-radius: 14px;
    color: #000;
    font-size: 17px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

/* Shine effect */
.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
                transparent 0%,
                rgba(255, 255, 255, 0.4) 50%,
                transparent 100%);
    transition: left 0.6s ease;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(255, 215, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.login-btn:active {
    transform: translateY(-1px);
}

/* ========================================
   REGISTER LINK - Subtil
   ======================================== */
.login-register-link {
    margin: 28px 0 0 0;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    position: relative;
    z-index: 1;
}

.login-register-link a {
    color: var(--login-gold);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.login-register-link a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--login-gold);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.login-register-link a:hover {
    color: #FFFFFF;
}

.login-register-link a:hover::after {
    transform: scaleX(1);
}

/* ========================================
   RESPONSIVE - TABLET
   ======================================== */
@media (max-width: 768px) {
    .content {
        padding: 60px 20px;
        min-height: calc(100vh - 180px);
    }

    .login-box {
        padding: 40px 32px;
        border-radius: 20px;
    }

    .login-title {
        font-size: 28px;
    }

    .form-group input {
        height: 52px;
        font-size: 15px;
    }

    .login-btn {
        height: 56px;
        font-size: 16px;
    }
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */
@media (max-width: 480px) {
    .content {
        padding: 40px 16px;
    }

    .login-box {
        padding: 32px 24px;
        border-radius: 18px;
    }

    .login-box::before {
        width: 80px;
        height: 2px;
    }

    .login-title {
        font-size: 26px;
        margin-bottom: 6px;
    }

    .error-msg {
        padding: 14px 16px;
        font-size: 13px;
        margin: 20px 0;
    }

    .login-form {
        margin: 28px 0 24px 0;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-group label {
        font-size: 12px;
        margin-bottom: 8px;
    }

    .form-group input {
        height: 50px;
        font-size: 15px;
        padding: 0 18px;
        border-radius: 12px;
    }

    .login-btn {
        height: 54px;
        font-size: 15px;
        border-radius: 12px;
    }

    .login-register-link {
        font-size: 13px;
        margin-top: 24px;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
.login-btn:focus-visible,
.form-group input:focus-visible,
.login-register-link a:focus-visible {
    outline: 2px solid var(--login-gold);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .login-box {
        border-width: 2px;
    }

    .form-group input {
        border-width: 2px;
    }

    .error-msg {
        border-width: 2px;
    }
}

/* ========================================
   LOADING STATE (optionnel)
   ======================================== */
.login-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.login-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .login-box {
        box-shadow: none;
        border: 1px solid #333;
    }

    .login-btn {
        box-shadow: none;
    }
}
