/**
 * Styles pour le popup espace vendeur
 */

/* Overlay du popup vendeur */
.vendor-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.vendor-popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Popup vendeur */
.vendor-popup {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 24px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.vendor-popup-overlay.show .vendor-popup {
    transform: scale(1) translateY(0);
}

/* En-tête du popup */
.vendor-popup-header {
    background: linear-gradient(135deg, var(--primary-color, #1565c0) 0%, var(--secondary-color, #4fc3f7) 100%);
    color: white;
    padding: 2rem 2rem 1.5rem;
    border-radius: 24px 24px 0 0;
    position: relative;
    overflow: hidden;
}

.vendor-popup-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.vendor-popup-header-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.vendor-popup-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.vendor-popup-title svg {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.vendor-popup-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    flex-shrink: 0;
}

.vendor-popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Corps du popup */
.vendor-popup-body {
    padding: 2rem;
}

.vendor-popup-description {
    color: #64748b;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    text-align: center;
}

.vendor-popup-description strong {
    color: #334155;
    font-weight: 600;
}

/* Formulaire */
.vendor-form {
    margin-bottom: 1.5rem;
}

.vendor-form-group {
    margin-bottom: 1.5rem;
}

.vendor-form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
    font-size: 0.95rem;
}

.vendor-form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
    color: #374151;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.vendor-form-input:focus {
    outline: none;
    border-color: var(--primary-color, #1565c0);
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.1);
    transform: translateY(-1px);
}

.vendor-form-input::placeholder {
    color: #9ca3af;
    text-transform: none;
    letter-spacing: normal;
}

/* Boutons */
.vendor-popup-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.vendor-btn {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.vendor-btn-primary {
    background: linear-gradient(135deg, var(--primary-color, #1565c0) 0%, var(--secondary-color, #4fc3f7) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.3);
}

.vendor-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(21, 101, 192, 0.4);
}

.vendor-btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.vendor-btn-secondary {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.vendor-btn-secondary:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    transform: translateY(-1px);
}

.vendor-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Messages */
.vendor-popup-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: none;
    animation: slideDown 0.2s ease;
}

.vendor-popup-loading {
    display: none;
    text-align: center;
    padding: 1rem;
    color: #64748b;
}

.vendor-popup-loading::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid var(--primary-color, #1565c0);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* Section contact */
.vendor-popup-contact {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.vendor-popup-contact-title {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 0.75rem;
}

.vendor-popup-contact-text {
    font-size: 0.85rem;
    color: #9ca3af;
    line-height: 1.5;
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 640px) {
    .vendor-popup {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
    
    .vendor-popup-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .vendor-popup-title {
        font-size: 1.25rem;
    }
    
    .vendor-popup-body {
        padding: 1.5rem;
    }
    
    .vendor-popup-description {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    .vendor-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }
}

/* Accessibilité */
@media (prefers-reduced-motion: reduce) {
    .vendor-popup-overlay,
    .vendor-popup,
    .vendor-btn,
    .vendor-form-input {
        transition: none;
    }
    
    .vendor-popup-loading::before {
        animation: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .vendor-popup {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
        color: #f1f5f9;
    }
    
    .vendor-popup-description {
        color: #94a3b8;
    }
    
    .vendor-form-input {
        background: #0f172a;
        border-color: #334155;
        color: #f1f5f9;
    }
    
    .vendor-form-input::placeholder {
        color: #64748b;
    }
    
    .vendor-form-label {
        color: #e2e8f0;
    }
    
    .vendor-popup-contact {
        border-top-color: #334155;
    }
}
