/* Formulaire de devis textile - Design moderne */

:root {
    /* Palette VIP Impression */
    --vip-yellow: #F2B82F;
    --vip-white: #FFFFFF;
    --vip-magenta: #D6306A;
    --vip-cyan: #0A7CBF;
    --vip-gold: #FFD700;
    --vip-black: #000000;
    
    /* Variables principales */
    --primary: var(--vip-magenta);
    --primary-hover: #B8285A;
    --secondary: var(--vip-cyan);
    --accent: var(--vip-yellow);
    --success: #10b981;
    --error: #ef4444;
    --text: var(--vip-white);
    --text-muted: #cccccc;
    --border: #333333;
    --bg: var(--vip-black);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 8px;
    --transition: all 0.15s ease;
}

/* Container principal */
.txqf-container {
    max-width: 700px;
    margin: 2rem auto;
    padding: 0 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.txqf-form-wrapper {
    background: linear-gradient(135deg, var(--vip-black) 0%, #1a1a1a 100%);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 
                0 0 0 1px rgba(242, 184, 47, 0.1);
    overflow: hidden;
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.txqf-form-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        var(--vip-cyan) 0%, 
        transparent 20%, 
        transparent 80%, 
        var(--vip-gold) 100%);
    opacity: 0.1;
    pointer-events: none;
}

/* Header épuré */
.txqf-header {
    background: linear-gradient(135deg, 
        var(--vip-magenta) 0%, 
        var(--vip-cyan) 50%, 
        var(--vip-yellow) 100%);
    padding: 2.5rem 2rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.txqf-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M30 30l15-15v30l-15-15zm-15 0L0 15v30l15-15z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: float 20s ease-in-out infinite;
}

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

.txqf-title {
    font-size: 1.875rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.025em;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.txqf-subtitle {
    font-size: 1rem;
    margin: 0;
    opacity: 0.9;
    font-weight: 400;
    position: relative;
    z-index: 1;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Formulaire */
.txqf-form {
    padding: 2rem;
    background: var(--vip-black);
}

.txqf-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.txqf-field {
    display: flex;
    flex-direction: column;
}

.txqf-field-full {
    grid-column: 1 / -1;
}

/* Labels simples */
.txqf-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.txqf-required {
    color: var(--error);
}

/* Champs épurés */
.txqf-input,
.txqf-select,
.txqf-textarea {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    font-size: 0.875rem;
    transition: var(--transition);
    outline: none;
}

.txqf-input:focus,
.txqf-select:focus,
.txqf-textarea:focus {
    border-color: var(--vip-yellow);
    box-shadow: 0 0 0 3px rgba(242, 184, 47, 0.2);
}

.txqf-input::placeholder,
.txqf-textarea::placeholder {
    color: var(--text-muted);
}

/* Select moderne */
.txqf-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.25em 1.25em;
    padding-right: 2.5rem;
}

.txqf-select:disabled {
    background-color: var(--secondary);
    color: var(--text-muted);
    cursor: not-allowed;
}

/* Zone d'upload moderne */
.txqf-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--secondary);
    position: relative;
}

.txqf-upload-area:hover {
    border-color: var(--vip-yellow);
    background: rgba(242, 184, 47, 0.05);
}

.txqf-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.txqf-upload-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.txqf-upload-text {
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.txqf-upload-help {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Fichier sélectionné */
.txqf-file-selected {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius);
    padding: 1rem;
    margin-top: 0.75rem;
    display: none;
}

.txqf-file-preview img {
    max-width: 150px;
    max-height: 150px;
    border-radius: var(--radius);
    margin-top: 0.5rem;
}

.txqf-file-remove {
    background: var(--error);
    color: white;
    border: none;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    margin-top: 0.5rem;
}

/* Checkbox RGPD */
.txqf-rgpd-field {
    background: var(--secondary);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin: 1.5rem 0;
}

.txqf-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1.5;
}

.txqf-checkbox {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--primary);
}

.txqf-link {
    color: var(--primary);
    text-decoration: none;
}

.txqf-link:hover {
    text-decoration: underline;
}

/* Bouton moderne */
.txqf-submit-wrapper {
    text-align: center;
    margin-top: 2rem;
}

.txqf-submit-btn {
    background: linear-gradient(135deg, 
        var(--vip-magenta) 0%, 
        var(--vip-cyan) 50%, 
        var(--vip-yellow) 100%);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    min-width: 200px;
    position: relative;
    overflow: hidden;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.txqf-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    transition: left 0.5s;
}

.txqf-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, 
        var(--vip-cyan) 0%, 
        var(--vip-magenta) 50%, 
        var(--vip-gold) 100%);
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(214, 48, 106, 0.3);
}

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

.txqf-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.txqf-btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.txqf-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.txqf-submit-note {
    margin-top: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Message de succès */
.txqf-success-message {
    background: var(--success);
    color: white;
    padding: 2rem;
    text-align: center;
    border-radius: var(--radius);
    margin-top: 1rem;
}

.txqf-success-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.txqf-success-message h2 {
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
}

.txqf-new-quote-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    margin-top: 1rem;
}

/* Messages d'erreur */
.txqf-error {
    color: var(--error);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: none;
}

.txqf-error.show {
    display: block;
}

.txqf-field.error .txqf-input,
.txqf-field.error .txqf-select,
.txqf-field.error .txqf-textarea {
    border-color: var(--vip-magenta);
    box-shadow: 0 0 0 3px rgba(214, 48, 106, 0.2);
}

.txqf-field.success .txqf-input,
.txqf-field.success .txqf-select,
.txqf-field.success .txqf-textarea {
    border-color: var(--vip-yellow);
    box-shadow: 0 0 0 3px rgba(242, 184, 47, 0.2);
}

/* Alertes */
.txqf-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    color: white;
    font-weight: 500;
    z-index: 1000;
    max-width: 350px;
    box-shadow: var(--shadow-lg);
}

.txqf-alert-success {
    background: linear-gradient(135deg, var(--vip-cyan), var(--vip-yellow));
}

.txqf-alert-error {
    background: linear-gradient(135deg, var(--vip-magenta), #B8285A);
}

.txqf-alert-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    float: right;
    margin-left: 1rem;
    opacity: 0.8;
}

.txqf-alert-close:hover {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .txqf-container {
        margin: 1rem auto;
        padding: 0 0.5rem;
    }
    
    .txqf-header {
        padding: 2rem 1.5rem;
    }
    
    .txqf-title {
        font-size: 1.5rem;
    }
    
    .txqf-form {
        padding: 1.5rem;
    }
    
    .txqf-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .txqf-submit-btn {
        width: 100%;
    }
    
    .txqf-alert {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Thème sombre */
.txqf-container[data-theme="dark"] {
    --bg: var(--vip-black);
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #333333;
    --secondary: #1a1a1a;
}

/* Thème clair avec couleurs VIP */
.txqf-container[data-theme="light"] {
    --bg: var(--vip-white);
    --text: var(--vip-black);
    --text-muted: #666666;
    --border: #dddddd;
    --secondary: #f8f9fa;
}

/* Focus visible pour l'accessibilité */
.txqf-input:focus-visible,
.txqf-select:focus-visible,
.txqf-textarea:focus-visible,
.txqf-submit-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}