/**
 * Styles CSS pour WpDoliProspect
 */

/* Styles de base pour le formulaire */
.business-forms-for-doliprospect-deal-form {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    color: #333;
}

.business-forms-for-doliprospect-deal-form * {
    box-sizing: border-box;
}

/* Titre du formulaire */
.form-title {
    font-weight: 600;
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

/* Sections du formulaire */
.form-section {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.form-section:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.form-section legend {
    font-weight: 600;
    color: #495057;
    padding: 0 0.75rem;
    background: #ffffff;
    border-radius: 4px;
    font-size: 1.1rem;
}

/* Lignes du formulaire */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Labels */
.form-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #495057;
    font-size: 0.9rem;
}

.required {
    color: #dc3545;
    font-weight: bold;
}

/* Champs de saisie */
.form-control {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #ffffff;
}

.form-control:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0,124,186,0.1);
}

.form-control:invalid {
    border-color: #dc3545;
}

.form-control.error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220,53,69,0.1) !important;
}

/* Messages d'erreur */
.field-error {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Messages généraux */
.form-messages {
    margin-bottom: 1.5rem;
}

.form-message {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-message::before {
    content: '';
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
}

.form-message.success::before {
    background-color: #28a745;
}

.form-message.error::before {
    background-color: #dc3545;
}

/* Boutons */
.form-actions {
    text-align: center;
    margin-top: 2rem;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-width: 150px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(0,124,186,0.3);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #005a87 0%, #004466 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,124,186,0.4);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Spinner de chargement */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Masquer le texte de chargement par défaut */
.btn-loading {
    display: none;
}

/* Afficher le texte de chargement quand le bouton est en loading */
.btn.loading .btn-text {
    display: none;
}

.btn.loading .btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

/* Animations */
.form-section {
    opacity: 0;
    transform: translateY(20px);
    animation: slideInUp 0.6s ease forwards;
}

.form-section:nth-child(1) { animation-delay: 0.1s; }
.form-section:nth-child(2) { animation-delay: 0.2s; }
.form-section:nth-child(3) { animation-delay: 0.3s; }
.form-section:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .business-forms-for-doliprospect-deal-form {
        padding: 1rem;
        margin: 0;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-section {
        padding: 1rem;
    }
    
    .btn {
        width: 100%;
        padding: 1rem;
    }
    
    .form-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .business-forms-for-doliprospect-deal-form {
        padding: 0.5rem;
    }
    
    .form-section {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .form-control {
        padding: 0.5rem;
    }
}

/* Styles pour l'admin */
.business-forms-for-doliprospect-admin {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.business-forms-for-doliprospect-card {
    background: #ffffff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.business-forms-for-doliprospect-card h3 {
    margin-top: 0;
    color: #23282d;
    font-size: 1.2rem;
}

.shortcode-example {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #007cba;
}

.shortcode-example code {
    background: #e9ecef;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.5rem;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 4px;
    background: #f8f9fa;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.status-indicator.success {
    background-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40,167,69,0.2);
}

.status-indicator.error {
    background-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220,53,69,0.2);
}

/* Amélioration des champs de formulaire WordPress */
.form-table th {
    font-weight: 600;
    color: #23282d;
}

.form-table td .regular-text {
    width: 100%;
    max-width: 400px;
}

.form-table td .description {
    color: #666;
    font-style: italic;
    margin-top: 0.5rem;
}
