/* Styles personnalisés pour les formulaires Startup243 */

/* Amélioration des champs de formulaire */
.form-control, .form-select {
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-shadow: none;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
    outline: none;
}

/* Taille des champs réduite */
.form-control-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 6px;
}

/* Labels améliorés */
.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-label i {
    color: #6b7280;
    margin-right: 0.5rem;
}

/* Cartes de formulaire compactes */
.form-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.form-card-header {
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.form-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.25rem;
}

.form-card-subtitle {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Groupes de champs */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

/* Messages d'erreur améliorés */
.form-error {
    color: #dc2626;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

.form-error i {
    margin-right: 0.25rem;
}

/* Messages de succès */
.form-success {
    color: #059669;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Boutons de formulaire */
.form-btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
}

.form-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    color: white;
}

/* Champs avec icônes */
.input-icon-group {
    position: relative;
}

.input-icon-group .form-control {
    padding-left: 2.75rem;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    z-index: 3;
}

/* Checkboxes et radios personnalisés */
.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

.form-check-label {
    font-size: 0.9rem;
    color: #374151;
    margin-left: 0.5rem;
}

/* Sections de formulaire */
.form-section {
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid #e5e7eb;
}

.form-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.form-section-title i {
    margin-right: 0.5rem;
    color: #667eea;
}

/* Conteneurs de formulaire responsifs */
.form-container {
    max-width: 600px;
    margin: 0 auto;
}

.form-container-wide {
    max-width: 800px;
    margin: 0 auto;
}

.form-container-narrow {
    max-width: 400px;
    margin: 0 auto;
}

/* Espacements réduits pour mobile */
@media (max-width: 768px) {
    .form-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .form-control, .form-select {
        padding: 0.625rem 0.875rem;
        font-size: 0.9rem;
    }
    
    .form-btn {
        padding: 0.625rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Amélioration des textareas */
textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Champs requis */
.form-label.required::after {
    content: " *";
    color: #dc2626;
    font-weight: bold;
}

/* Groupes de boutons */
.form-btn-group {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.form-btn-group .btn {
    flex: 1;
    max-width: 200px;
}

/* Indicateurs de progression */
.form-progress {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    margin-bottom: 2rem;
}

.form-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Styles pour les select2 si utilisé */
.select2-container--default .select2-selection--single {
    height: 46px !important;
    border: 1px solid #e0e6ed !important;
    border-radius: 8px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 44px !important;
    padding-left: 1rem !important;
    color: #374151 !important;
}

/* File inputs améliorés */
.form-control[type="file"] {
    padding: 0.5rem;
}

.file-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: #667eea;
    background: #f8faff;
}

.file-upload-area.dragover {
    border-color: #667eea;
    background: #f0f4ff;
}

/* Tooltips pour formulaires */
.form-tooltip {
    position: relative;
    display: inline-block;
    margin-left: 0.25rem;
}

.form-tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #374151;
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 0.5rem;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.form-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Améliorations spécifiques */
.form-check:has(.form-check-input:checked) {
    background-color: #e3f2fd;
    border-color: #2196f3 !important;
}

.input-group .form-control:focus {
    z-index: 2;
}

.payment-details {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    border: 1px solid #e9ecef;
}

/* Responsive improvements */
@media (max-width: 576px) {
    .form-btn-group {
        flex-direction: column;
    }
    
    .form-btn-group .btn {
        max-width: none;
        margin-bottom: 0.5rem;
    }
    
    .form-card {
        margin: 0 0.5rem;
    }
    
    .form-section {
        padding: 1rem;
    }
}

/* Animation pour les messages d'erreur */
.form-error {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Style pour les champs obligatoires */
.form-control:invalid {
    border-color: #dc3545;
}

.form-control:valid {
    border-color: #28a745;
}

/* Amélioration des sélecteurs */
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

/* Style pour les zones de drag & drop */
.file-upload-area.dragover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: scale(1.02);
}

/* Boutons d'amélioration */
.btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
}

/* Améliorations pour les grandes tables */
@media (min-width: 992px) {
    .form-container {
        max-width: 700px;
    }
    
    .form-container-wide {
        max-width: 900px;
    }
}