/* ===== COMPOSANTS RÉUTILISABLES ONL ===== */

/* === MODALES === */
.modal-content {
    border: none;
    border-radius: var(--onl-border-radius-large);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
}

.modal-header {
    background: var(--onl-gradient-light);
    border-bottom: 2px solid var(--onl-light);
    border-radius: var(--onl-border-radius-large) var(--onl-border-radius-large) 0 0;
    padding: 1.5rem 2rem;
}

.modal-title {
    color: var(--onl-dark);
    font-weight: 700;
    font-family: var(--onl-font-primary);
    margin: 0;
}

.modal-body {
    padding: 2rem;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    background: #f8f9fa;
    border-top: 1px solid var(--onl-light);
    padding: 1rem 2rem;
    border-radius: 0 0 var(--onl-border-radius-large) var(--onl-border-radius-large);
}

/* === FORMULAIRES DE VALIDATION === */
.validation-form {
    max-height: 70vh;
    overflow-y: auto;
}

.validation-section {
    background: var(--onl-light);
    border-radius: var(--onl-border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--onl-primary);
}

.validation-section h5 {
    color: var(--onl-dark);
    font-weight: 600;
    margin-bottom: 1rem;
    font-family: var(--onl-font-primary);
}

.validation-controls {
    background: white;
    border-radius: var(--onl-border-radius);
    padding: 1.5rem;
    border: 2px solid var(--onl-primary);
    margin-top: 1.5rem;
}

.validation-status {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.status-option {
    flex: 1;
    padding: 1rem;
    border: 2px solid #dee2e6;
    border-radius: var(--onl-border-radius);
    text-align: center;
    cursor: pointer;
    transition: var(--onl-transition);
    background: white;
}

.status-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.status-option.selected {
    border-color: var(--onl-green) !important;
    background: rgba(39, 174, 96, 0.1) !important;
    transform: scale(1.02);
}

.status-option.rejected {
    border-color: #dc3545 !important;
    background: rgba(220, 53, 69, 0.1) !important;
    transform: scale(1.02);
}

.status-option h6 {
    margin: 0.5rem 0;
    font-weight: 600;
}

.status-option small {
    color: #6c757d;
    font-size: 0.85rem;
}

/* === DONNÉES AFFICHÉES === */
.data-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.data-label {
    font-weight: 600;
    color: var(--onl-dark);
    min-width: 150px;
    margin-right: 1rem;
    font-size: 0.9rem;
}

.data-value {
    color: #495057;
    flex: 1;
    font-size: 0.9rem;
}

.data-value strong {
    color: var(--onl-dark);
}

.data-value code {
    background: var(--onl-light);
    color: var(--onl-primary);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* === TABLEAUX DE MESURES === */
.measures-table, .dechets-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    border-radius: var(--onl-border-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.measures-table th, .measures-table td,
.dechets-table th, .dechets-table td {
    padding: 0.75rem;
    text-align: center;
    font-size: 0.85rem;
    border: 1px solid #dee2e6;
}

.measures-table th, .dechets-table th {
    background: var(--onl-primary);
    color: white;
    font-weight: 600;
    font-family: var(--onl-font-primary);
}

.measures-table tbody tr:nth-child(even),
.dechets-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.measures-table tbody tr:hover,
.dechets-table tbody tr:hover {
    background: var(--onl-light);
}

/* === STATISTIQUES DANS VALIDATION === */
.validation-section .row {
    margin: 0 -0.5rem;
}

.validation-section .col-md-3 {
    padding: 0 0.5rem;
    margin-bottom: 1rem;
}

.validation-section .text-center {
    background: white;
    padding: 1rem;
    border-radius: var(--onl-border-radius);
    border: 1px solid #dee2e6;
    transition: var(--onl-transition);
}

.validation-section .text-center:hover {
    border-color: var(--onl-primary);
    box-shadow: 0 2px 8px rgba(15, 160, 160, 0.1);
}

.validation-section .text-center h6 {
    color: var(--onl-primary);
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.validation-section .text-center small {
    color: #6c757d;
    font-weight: 500;
}

/* === LOADING STATES === */
.spinner-border {
    border-width: 3px;
}

.spinner-border.text-primary {
    color: var(--onl-primary) !important;
}

.spinner-border.text-warning {
    color: var(--onl-gold) !important;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
}

.loading-container .spinner-border {
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
}

.loading-container p {
    color: #6c757d;
    margin: 0;
    font-size: 1.1rem;
}

/* === BOUTONS D'ACTION === */
.btn-group .btn {
    border-radius: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-group .btn:first-child {
    border-radius: 6px 0 0 6px;
}

.btn-group .btn:last-child {
    border-radius: 0 6px 6px 0;
    border-right: none;
}

.btn-group .btn:only-child {
    border-radius: 6px;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 6px;
}

/* === BADGES PERSONNALISÉS === */
.sidebar-badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    font-weight: 700;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-badge i {
    font-size: 0.75rem;
}

/* === BREADCRUMBS PERSONNALISÉS === */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0 0 1.5rem 0;
    font-size: 0.9rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--onl-primary);
    font-weight: 600;
}

.breadcrumb-item a {
    color: var(--onl-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--onl-transition);
}

.breadcrumb-item a:hover {
    color: var(--onl-secondary);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--onl-dark);
    font-weight: 600;
}

/* === TOOLTIPS === */
[title] {
    position: relative;
}

/* === UTILITAIRES === */
.text-onl-primary { color: var(--onl-primary) !important; }
.text-onl-secondary { color: var(--onl-secondary) !important; }
.text-onl-dark { color: var(--onl-dark) !important; }
.text-onl-gold { color: var(--onl-gold) !important; }

.bg-onl-primary { background-color: var(--onl-primary) !important; }
.bg-onl-light { background-color: var(--onl-light) !important; }
.bg-onl-gradient { background: var(--onl-gradient) !important; }

.border-onl-primary { border-color: var(--onl-primary) !important; }
.border-onl-light { border-color: var(--onl-light) !important; }

.rounded-onl { border-radius: var(--onl-border-radius) !important; }
.rounded-onl-lg { border-radius: var(--onl-border-radius-large) !important; }

.shadow-onl { box-shadow: var(--onl-shadow) !important; }
.shadow-onl-hover { box-shadow: var(--onl-shadow-hover) !important; }

/* === ANIMATIONS === */
.fade-in {
    animation: onlFadeIn 0.5s ease;
}

.slide-up {
    animation: onlSlideIn 0.5s ease;
}

.hover-lift {
    transition: var(--onl-transition);
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: var(--onl-shadow-hover);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .validation-status {
        flex-direction: column;
    }
    
    .data-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .data-label {
        min-width: auto;
        margin-right: 0;
        font-size: 0.85rem;
    }
    
    .data-value {
        font-size: 0.9rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-header,
    .modal-footer {
        padding: 1rem;
    }
    
    .measures-table, .dechets-table {
        font-size: 0.75rem;
    }
    
    .measures-table th, .measures-table td,
    .dechets-table th, .dechets-table td {
        padding: 0.5rem;
    }
}

@media (max-width: 576px) {
    .btn-group {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        border-radius: 6px !important;
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        margin-bottom: 0.25rem;
    }
    
    .btn-group .btn:last-child {
        margin-bottom: 0;
        border-bottom: none;
    }
}