/* MKDO Studio - Styles d'authentification - Version gris moderne */

:root {
    --primary: #2d3748;          /* Gris très foncé */
    --secondary: #f7fafc;        /* Gris très clair */
    --dark: #1a202c;            /* Noir gris */
    --light: #ffffff;
    --accent: #4a5568;          /* Gris moyen pour les hovers */
    --cta: #390256;
    --cta-hover: #8E0F23;
    --success: #7bb173;
    --error: #390256;
    --warning: #e6a955;
    --border: #e2e8f0;
    --shadow: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.auth-body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--secondary) 0%, #f0ede8 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Background pattern */
.auth-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.auth-pattern {
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, var(--primary) 2px, transparent 2px),
        radial-gradient(circle at 75% 75%, var(--accent) 1px, transparent 1px);
    background-size: 60px 60px, 40px 40px;
    opacity: 0.03;
    animation: float 20s ease-in-out infinite;
}

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

/* Main container */
.auth-main {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
}

.login-container {
    width: 100%;
}

.login-card {
    background: var(--light);
    border-radius: 20px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.5);
    padding: 40px 35px;
    text-align: center;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--cta));
}

/* Header */
.login-header {
    margin-bottom: 35px;
}

.login-logo {
    width: 180px;
    height: auto;
    object-fit: contain;
    margin-bottom: 15px;
    box-shadow: none !important;  /* Supprime complètement l'ombre */
    background: transparent;       /* Supprime tout fond */
    border: none;                 /* Supprime toute bordure */
    border-radius: 0;             /* Supprime l'arrondi */
}

.login-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.login-subtitle {
    color: var(--accent);        /* Gris au lieu du beige */
    font-size: 16px;
    font-weight: 400;
    opacity: 0.8;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
}

.alert-error {
    background: rgba(212, 116, 116, 0.1);
    border: 1px solid rgba(212, 116, 116, 0.2);
    color: #c53030;
}

.alert-success {
    background: rgba(123, 177, 115, 0.1);
    border: 1px solid rgba(123, 177, 115, 0.2);
    color: #2f855a;
}

/* Form */
.login-form {
    text-align: left;
}

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

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--light);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);    /* Gris au lieu du beige */
    box-shadow: 0 0 0 3px rgba(45, 55, 72, 0.1);
    transform: translateY(-1px);
}

.form-input::placeholder {
    color: #999;
    font-weight: 400;
}

/* Button */
.btn {
    display: inline-block;
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--cta);
    color: var(--light);
    box-shadow: 0 4px 15px rgba(215, 53, 39, 0.3);
}

.btn-primary:hover {
    background: var(--cta-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(215, 53, 39, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-block {
    width: 100%;
    margin-top: 8px;
}

/* Button loading effect */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Footer */
.login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.login-footer p {
    color: var(--accent);        /* Gris au lieu du beige */
    font-size: 12px;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 480px) {
    .auth-main {
        padding: 15px;
    }
    
    .login-card {
        padding: 30px 25px;
        border-radius: 15px;
    }
    
    .login-title {
        font-size: 24px;
    }
    
    /* Version responsive mobile */
@media (max-width: 480px) {
    .login-logo {
        width: 150px;
        height: auto;
        box-shadow: none !important;
        background: transparent;
        border: none;
        border-radius: 0;
    }
    
    .form-input, .btn {
        font-size: 16px; /* Évite le zoom sur iOS */
    }
}

/* Animations d'entrée */
.login-card {
    animation: slideUp 0.6s ease-out;
}

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

.form-group {
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.btn { animation: fadeIn 0.6s ease-out 0.3s forwards; opacity: 0; }

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