/* Vendor Auth Styles - Modern & Clean */
:root {
    --vendor-primary: #1E3A8A;
    --vendor-primary-dark: #1E40AF;
    --vendor-primary-light: #DBEAFE;
    --vendor-secondary: #9E1B1B;
    --vendor-secondary-dark: #7F1616;
    --vendor-secondary-light: #FBE4E4;
    --vendor-bg: #F3F4F6;
    --vendor-surface: #ffffff;
    --vendor-text: #0f172a;
    --vendor-text-muted: #64748b;
    --vendor-border: #e2e8f0;
    --vendor-border-dark: #cbd5e1;
    --vendor-danger: #DC2626;
    --vendor-success: #10B981;
    --vendor-warning: #F59E0B;
    --vendor-info: #3B82F6;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--vendor-bg);
    color: var(--vendor-text);
    line-height: 1.5;
    min-height: 100vh;
}

/* Fond pleine page (vraie bannière publicitaire active, cf.
   AdManager::getAuthBannerImageUrl()) : la page respirait trop sur l'aplat
   --vendor-bg uni, jamais un fond vide sur une page de conversion. */
.auth-bg {
    position: relative;
    min-height: calc(100vh - 6rem);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.auth-bg-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.25);
}

/* Container */
.auth-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 6rem);
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 28rem;
}

/* Card */
.auth-card-inner {
    position: relative;
    background-color: var(--vendor-surface);
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--vendor-border);
    overflow: hidden;
}

.auth-card-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    z-index: 1;
    background: linear-gradient(90deg, var(--vendor-primary) 0%, var(--vendor-primary) 55%, var(--vendor-secondary) 100%);
}

.auth-card-body {
    padding: 2rem;
}

/* Bandeau "Espace Vendeur" : la carte reprend le même habillage (bannière
   photo, fond assombri) que l'espace client — ce bandeau, en premier élément
   visible, évite toute confusion sur le portail concerné. */
.auth-space-badge {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem;
    background-color: var(--vendor-secondary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.auth-title {
    position: relative;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--vendor-text);
    margin-bottom: 0.5rem;
    padding-bottom: 0.6rem;
}

.auth-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 2.5rem;
    height: 3px;
    border-radius: 2px;
    background-color: var(--vendor-secondary);
}

.auth-subtitle {
    color: var(--vendor-text-muted);
    margin-bottom: 1.5rem;
}

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

.auth-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.auth-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--vendor-text);
}

.auth-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--vendor-border);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s;
    outline: none;
}

.auth-input:focus {
    border-color: var(--vendor-primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

.auth-input::placeholder {
    color: var(--vendor-text-muted);
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap .auth-input {
    padding-left: 2.5rem;
}

.auth-input-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--vendor-text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

.auth-error {
    font-size: 0.875rem;
    color: var(--vendor-danger);
    margin-top: 0.25rem;
}

/* Checkbox */
.auth-checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-checkbox {
    width: 1rem;
    height: 1rem;
    border: 1px solid var(--vendor-border);
    border-radius: 0.25rem;
    cursor: pointer;
}

.auth-checkbox:checked {
    background-color: var(--vendor-primary);
    border-color: var(--vendor-primary);
}

.auth-checkbox-label {
    font-size: 0.875rem;
    color: var(--vendor-text-muted);
    cursor: pointer;
}

/* Remember & Forgot */
.auth-remember-forgot {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-link {
    font-size: 0.875rem;
    color: var(--vendor-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.auth-link:hover {
    color: var(--vendor-primary-dark);
}

/* Button */
.auth-button {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--vendor-primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.auth-button:hover {
    background-color: var(--vendor-primary-dark);
    box-shadow: 0 4px 12px rgba(158, 27, 27, 0.25);
}

.auth-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--vendor-secondary-light);
}

/* Footer */
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--vendor-text-muted);
}

.auth-footer a {
    color: var(--vendor-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.auth-footer a:hover {
    color: var(--vendor-primary-dark);
}

.auth-footer-link {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color 0.2s;
}

.auth-footer-link:hover {
    color: #ffffff;
}

/* Flash Messages */
.flash-message {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 50;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.flash-success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.flash-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.flash-warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.flash-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Responsive */
@media (max-width: 640px) {
    .auth-card-body {
        padding: 1.5rem;
    }

    .auth-title {
        font-size: 1.25rem;
    }
}
