/* =============================================================================
   vehicules.css — CSS consolidé pour le module vehicules
   Lié dans base_admin.html
   Chaque section est scopée sous sa classe wrapper (.vehicules-XXX-page)
============================================================================= */


/* =============================================================================
   detail.html  (style extrait du bloc scripts)
============================================================================= */

.vehicules-detail-page .timeline {
    position: relative;
    padding: 20px 0;
}

.vehicules-detail-page .timeline .progress {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    z-index: 1;
}

.vehicules-detail-page .timeline .position-absolute {
    z-index: 2;
    text-align: center;
}


/* =============================================================================
   documents.html
============================================================================= */

.vehicules-documents-page .document-card {
    border-left: 4px solid;
    transition: all 0.2s;
    height: 100%;
}

.vehicules-documents-page .document-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.vehicules-documents-page .document-card.carte_grise { border-left-color: #0d6efd; }
.vehicules-documents-page .document-card.assurance   { border-left-color: #198754; }
.vehicules-documents-page .document-card.ct          { border-left-color: #ffc107; }
.vehicules-documents-page .document-card.facture     { border-left-color: #dc3545; }
.vehicules-documents-page .document-card.garantie    { border-left-color: #6f42c1; }
.vehicules-documents-page .document-card.autre       { border-left-color: #6c757d; }

.vehicules-documents-page .document-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.vehicules-documents-page .expired-badge {
    position: absolute;
    top: 10px;
    right: 10px;
}

.vehicules-documents-page .upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s;
}

.vehicules-documents-page .upload-area:hover {
    border-color: #0d6efd;
    background-color: #e7f1ff;
}

.vehicules-documents-page .upload-area.dragover {
    border-color: #0d6efd;
    background-color: #cfe2ff;
}

.vehicules-documents-page .file-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 5px;
}

.vehicules-documents-page .file-info {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.vehicules-documents-page .file-icon {
    margin-right: 10px;
    color: #6c757d;
}

.vehicules-documents-page .document-preview {
    max-height: 300px;
    object-fit: contain;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 5px;
    background-color: white;
}


/* =============================================================================
   historique.html
============================================================================= */

.vehicules-historique-page .timeline-container {
    position: relative;
    padding-left: 30px;
}

.vehicules-historique-page .timeline-line {
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #dee2e6;
}

.vehicules-historique-page .timeline-item {
    position: relative;
    margin-bottom: 30px;
    padding-left: 20px;
}

.vehicules-historique-page .timeline-item:before {
    content: '';
    position: absolute;
    left: -8px;
    top: 15px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 3px solid white;
    z-index: 1;
}

.vehicules-historique-page .timeline-item.location:before    { background-color: #0d6efd; }
.vehicules-historique-page .timeline-item.maintenance:before { background-color: #ffc107; }
.vehicules-historique-page .timeline-item.incident:before    { background-color: #dc3545; }
.vehicules-historique-page .timeline-item.vente:before       { background-color: #198754; }
.vehicules-historique-page .timeline-item.acquisition:before { background-color: #6f42c1; }

.vehicules-historique-page .history-card {
    border-radius: 8px;
    border-left: 4px solid;
    transition: all 0.2s;
}

.vehicules-historique-page .history-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.vehicules-historique-page .history-card.location    { border-left-color: #0d6efd; }
.vehicules-historique-page .history-card.maintenance { border-left-color: #ffc107; }
.vehicules-historique-page .history-card.incident    { border-left-color: #dc3545; }
.vehicules-historique-page .history-card.vente       { border-left-color: #198754; }
.vehicules-historique-page .history-card.acquisition { border-left-color: #6f42c1; }

.vehicules-historique-page .history-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.vehicules-historique-page .history-icon.location    { background-color: #e7f1ff; color: #0d6efd; }
.vehicules-historique-page .history-icon.maintenance { background-color: #fff3cd; color: #ffc107; }
.vehicules-historique-page .history-icon.incident    { background-color: #f8d7da; color: #dc3545; }
.vehicules-historique-page .history-icon.vente       { background-color: #d1e7dd; color: #198754; }
.vehicules-historique-page .history-icon.acquisition { background-color: #e2d9f3; color: #6f42c1; }

.vehicules-historique-page .stat-badge {
    font-size: 0.85rem;
    padding: 3px 8px;
    margin-right: 5px;
    margin-bottom: 5px;
}

.vehicules-historique-page .year-header {
    background-color: #f8f9fa;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #0d6efd;
}


/* =============================================================================
   maintenance.html
============================================================================= */

.vehicules-maintenance-page .maintenance-card {
    border-left: 4px solid;
    transition: all 0.2s;
}

.vehicules-maintenance-page .maintenance-card.planifiee { border-left-color: #6c757d; }
.vehicules-maintenance-page .maintenance-card.en_cours  { border-left-color: #ffc107; }
.vehicules-maintenance-page .maintenance-card.terminee  { border-left-color: #198754; }

.vehicules-maintenance-page .timeline {
    position: relative;
    padding-left: 30px;
}

.vehicules-maintenance-page .timeline-item {
    position: relative;
    margin-bottom: 25px;
    padding-left: 20px;
}

.vehicules-maintenance-page .timeline-item:before {
    content: '';
    position: absolute;
    left: -8px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.vehicules-maintenance-page .timeline-item.planifiee:before { background-color: #6c757d; }
.vehicules-maintenance-page .timeline-item.en_cours:before  { background-color: #ffc107; }
.vehicules-maintenance-page .timeline-item.terminee:before  { background-color: #198754; }

.vehicules-maintenance-page .timeline-item:after {
    content: '';
    position: absolute;
    left: -3px;
    top: 20px;
    bottom: -25px;
    width: 2px;
    background-color: #dee2e6;
}

.vehicules-maintenance-page .timeline-item:last-child:after {
    display: none;
}

.vehicules-maintenance-page .cost-badge {
    font-size: 0.9rem;
    padding: 3px 8px;
}

.vehicules-maintenance-page .stat-card {
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    margin-bottom: 15px;
}

.vehicules-maintenance-page .stat-card.total    { background-color: #e3f2fd; border: 1px solid #bbdefb; }
.vehicules-maintenance-page .stat-card.en-cours { background-color: #fff3cd; border: 1px solid #ffeaa7; }
.vehicules-maintenance-page .stat-card.terminee { background-color: #d4edda; border: 1px solid #c3e6cb; }
.vehicules-maintenance-page .stat-card.cout     { background-color: #f8d7da; border: 1px solid #f5c6cb; }


/* =============================================================================
   photos.html  (style extrait du bloc scripts)
============================================================================= */

.vehicules-photos-page .photo-item {
    cursor: move;
    transition: transform 0.2s;
}

.vehicules-photos-page .photo-item:hover {
    transform: translateY(-5px);
}

.vehicules-photos-page .photo-item.dragging {
    opacity: 0.5;
}


/* =============================================================================
   recherche.html
============================================================================= */

.vehicules-recherche-page .search-card {
    border-left: 4px solid #0d6efd;
    transition: all 0.2s;
}

.vehicules-recherche-page .search-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.vehicules-recherche-page .vehicle-card {
    height: 100%;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s;
}

.vehicules-recherche-page .vehicle-card:hover {
    border-color: #0d6efd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.vehicules-recherche-page .vehicle-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background-color: #f8f9fa;
}

.vehicules-recherche-page .vehicle-img-placeholder {
    width: 100%;
    height: 180px;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.vehicules-recherche-page .price-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.1rem;
    padding: 5px 10px;
}

.vehicules-recherche-page .availability-badge {
    position: absolute;
    top: 10px;
    left: 10px;
}

.vehicules-recherche-page .filter-section {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.vehicules-recherche-page .filter-section h6 {
    color: #0d6efd;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.vehicules-recherche-page .results-count {
    font-size: 0.9rem;
    color: #6c757d;
}

.vehicules-recherche-page .view-toggle {
    font-size: 1.2rem;
}

.vehicules-recherche-page .view-toggle .active {
    color: #0d6efd;
}

.vehicules-recherche-page .quick-filter {
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    transition: all 0.2s;
}

.vehicules-recherche-page .quick-filter:hover {
    background-color: #e7f1ff;
}

.vehicules-recherche-page .quick-filter.active {
    background-color: #0d6efd;
    color: white;
}
