/**
 * VALIDATION STYLES - Styles CSS pour les modales de validation
 * Fichier: assets/css/validation-styles.css
 * 
 * Styles spécialisés pour les interfaces de validation
 */

/* === MODAL DE VALIDATION === */
#validationModal .modal-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-bottom: none;
    border-radius: 0.5rem 0.5rem 0 0;
}

#validationModal .modal-header.bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
}

#validationModal .modal-header.bg-danger {
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
}

#validationModal .modal-title {
    font-weight: 600;
    font-size: 1.1rem;
}

/* === CONTENU DE VALIDATION === */
.validation-content {
    padding: 0;
}

.validation-content .alert {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.validation-content .alert h6 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.validation-content .alert-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    color: #1565c0;
    border-left: 4px solid #2196f3;
}

.validation-content .alert-warning {
    background: linear-gradient(135deg, #fff8e1 0%, #fff3e0 100%);
    color: #e65100;
    border-left: 4px solid #ff9800;
}

.validation-content .alert-danger {
    background: linear-gradient(135deg, #ffebee 0%, #fce4ec 100%);
    color: #c62828;
    border-left: 4px solid #f44336;
}

.validation-content .alert-success {
    background: linear-gradient(135deg, #e8f5e8 0%, #f1f8e9 100%);
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

/* === INFORMATIONS SUR L'ÉLÉMENT === */
.validation-content .card {
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.validation-content .card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.validation-content .card-title {
    color: #1976d2;
    font-size: 0.95rem;
    font-weight: 600;
}

.validation-content .card-body {
    padding: 1rem;
}

/* === ZONE DE COMMENTAIRE === */
.validation-content .form-group {
    margin-bottom: 1.5rem;
}

.validation-content .form-label {
    font-weight: 500;
    color: #424242;
    margin-bottom: 0.5rem;
    display: block;
}

.validation-content .form-control {
    border: 2px solid #e0e0e0;
    border-radius: 0.5rem;
    padding: 0.75rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    resize: vertical;
    min-height: 80px;
}

.validation-content .form-control:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
    outline: none;
}

.validation-content .form-control::placeholder {
    color: #9e9e9e;
    font-style: italic;
}

/* === AVERTISSEMENTS === */
.validation-content .alert-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.validation-content .alert-sm:last-child {
    margin-bottom: 0;
}

/* === VALIDATION EN LOT === */
.bulk-validation-summary {
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.bulk-validation-summary .card {
    transition: all 0.2s ease;
    cursor: pointer;
}

.bulk-validation-summary .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.bulk-validation-summary .card-body {
    padding: 1rem;
}

.bulk-validation-summary h5 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.bulk-validation-summary small {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* === LISTES D'ERREURS/AVERTISSEMENTS === */
.validation-errors-list,
.validation-warnings-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 0.25rem;
    margin-top: 0.5rem;
}

.validation-errors-list li {
    color: #d32f2f;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.validation-warnings-list li {
    color: #f57c00;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.validation-errors-list li::marker,
.validation-warnings-list li::marker {
    font-size: 0.8rem;
}

/* === CHECKBOXES DE VALIDATION === */
.validation-content .form-check {
    margin-bottom: 0.75rem;
    padding-left: 1.75rem;
}

.validation-content .form-check-input {
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid #dee2e6;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.validation-content .form-check-input:checked {
    background-color: #28a745;
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.validation-content .form-check-label {
    font-size: 0.9rem;
    color: #495057;
    cursor: pointer;
    line-height: 1.4;
}

.validation-content .form-check-input:disabled + .form-check-label {
    opacity: 0.5;
    cursor: not-allowed;
}

/* === BOUTONS DE VALIDATION === */
.validation-content .btn-group .btn {
    border-radius: 0.5rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.validation-content .btn-group .btn:not(:last-child) {
    margin-right: 0.5rem;
}

#confirmValidationBtn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

#confirmValidationBtn:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea085 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

#confirmValidationBtn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* === ANIMATIONS === */
.validation-content .fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.validation-content .slide-in {
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* === ICÔNES === */
.validation-content .fa {
    margin-right: 0.5rem;
}

.validation-content .fa-2x {
    margin-bottom: 0.5rem;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .validation-content {
        padding: 0.5rem;
    }
    
    .validation-content .card-body {
        padding: 0.75rem;
    }
    
    .bulk-validation-summary .row .col-md-4 {
        margin-bottom: 1rem;
    }
    
    .validation-content .btn-group {
        flex-direction: column;
    }
    
    .validation-content .btn-group .btn {
        margin-right: 0;
        margin-bottom: 0.5rem;
        width: 100%;
    }
    
    #confirmValidationBtn {
        width: 100%;
        margin-top: 0.5rem;
    }
}

/* === ÉTATS DES ÉLÉMENTS === */
.validation-item-valid {
    border-left: 4px solid #28a745;
    background: rgba(40, 167, 69, 0.05);
}

.validation-item-warning {
    border-left: 4px solid #ffc107;
    background: rgba(255, 193, 7, 0.05);
}

.validation-item-error {
    border-left: 4px solid #dc3545;
    background: rgba(220, 53, 69, 0.05);
}

/* === PROGRESS BAR POUR VALIDATION EN LOT === */
.bulk-validation-progress {
    margin-top: 1rem;
    display: none;
}

.bulk-validation-progress.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

.bulk-validation-progress .progress {
    height: 8px;
    border-radius: 4px;
    background: #f8f9fa;
    overflow: hidden;
}

.bulk-validation-progress .progress-bar {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    transition: width 0.3s ease;
}

/* === STATISTIQUES DE VALIDATION === */
.validation-stats {
    display: flex;
    justify-content: space-around;
    margin: 1rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
}

.validation-stat-item {
    text-align: center;
    flex: 1;
}

.validation-stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #495057;
    display: block;
}

.validation-stat-label {
    font-size: 0.8rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.validation-stat-item.success .validation-stat-number {
    color: #28a745;
}

.validation-stat-item.warning .validation-stat-number {
    color: #ffc107;
}

.validation-stat-item.danger .validation-stat-number {
    color: #dc3545;
}

/* === TOOLTIPS POUR VALIDATION === */
.validation-tooltip {
    position: relative;
    cursor: help;
}

.validation-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
}

.validation-tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
}

/* === DARK MODE SUPPORT === */
@media (prefers-color-scheme: dark) {
    .validation-content .card {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .validation-content .form-control {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .validation-content .form-control:focus {
        border-color: #38a169;
        background: #2d3748;
    }
    
    .validation-content .form-label {
        color: #cbd5e0;
    }
    
    .bulk-validation-summary {
        background: #2d3748;
        border-color: #4a5568;
    }
}