/**
 * Fichier CSS personnalisé pour le système de réservation de voitures
 */

/* Variables de couleurs */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

/* Style général */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Badges de statut pour les réservations */
.status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background-color: #ffc107;
    color: #000;
}

.status-confirmed {
    background-color: #17a2b8;
    color: #fff;
}

.status-in_progress {
    background-color: #007bff;
    color: #fff;
}

.status-completed {
    background-color: #28a745;
    color: #fff;
}

.status-cancelled {
    background-color: #dc3545;
    color: #fff;
}

/* Niveau de carburant */
.fuel-level {
    position: relative;
    width: 100%;
    height: 30px;
    background-color: #e9ecef;
    border: 2px solid #ced4da;
    border-radius: 5px;
    overflow: hidden;
}

.fuel-level-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.fuel-level-empty .fuel-level-fill {
    width: 0%;
    background-color: #dc3545;
}

.fuel-level-quarter .fuel-level-fill {
    width: 25%;
    background-color: #ffc107;
}

.fuel-level-half .fuel-level-fill {
    width: 50%;
    background-color: #17a2b8;
}

.fuel-level-three_quarters .fuel-level-fill {
    width: 75%;
    background-color: #007bff;
}

.fuel-level-full .fuel-level-fill {
    width: 100%;
    background-color: #28a745;
}

/* Cartes de véhicules */
.vehicle-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.vehicle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.vehicle-image {
    height: 200px;
    object-fit: cover;
    width: 100%;
}

/* Alertes */
.alert-container {
    position: relative;
}

.alert.unread {
    border-left: 4px solid var(--primary-color);
    background-color: #e7f3ff;
}

/* Calendrier */
.calendar {
    width: 100%;
    border-collapse: collapse;
}

.calendar th {
    background-color: var(--primary-color);
    color: white;
    padding: 10px;
    text-align: center;
}

.calendar td {
    border: 1px solid #dee2e6;
    padding: 10px;
    vertical-align: top;
    height: 100px;
    position: relative;
}

.calendar td.today {
    background-color: #fff3cd;
}

.calendar td.other-month {
    background-color: #f8f9fa;
    color: #6c757d;
}

.calendar-day-number {
    font-weight: bold;
    margin-bottom: 5px;
}

.calendar-reservation {
    background-color: var(--primary-color);
    color: white;
    padding: 2px 5px;
    margin: 2px 0;
    border-radius: 3px;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.calendar-reservation:hover {
    opacity: 0.8;
}

/* Réservations annulées concurrentes */
.cancelled-concurrent-reservation {
    background-color: #ffcccc !important;
    color: #721c24 !important;
    text-decoration: line-through;
    opacity: 0.8;
}

.cancelled-concurrent-reservation:hover {
    background-color: #ffb3b3 !important;
    opacity: 1;
}

/* Formulaires */
.form-group label {
    font-weight: 600;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Boutons */
.btn {
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Tables */
.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* Cards */
.card {
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
}

/* Badges */
.badge {
    padding: 0.5em 0.75em;
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.nav-link {
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: rgba(255, 255, 255, 0.75) !important;
}

/* Dropdown */
.dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.dropdown-item {
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: rgba(0, 123, 255, 0.1);
}

/* Footer */
footer {
    margin-top: auto;
    border-top: 1px solid #dee2e6;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .calendar td {
        height: 80px;
        padding: 5px;
    }

    .calendar-reservation {
        font-size: 0.65rem;
    }

    .vehicle-image {
        height: 150px;
    }
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner-border-custom {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

/* Utility classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cursor-pointer {
    cursor: pointer;
}

/* Amélioration du jumbotron */
.jumbotron {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
}

.jumbotron h1 {
    font-weight: bold;
}

.jumbotron .btn {
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 50px;
}

/* Icônes Font Awesome */
.fa-4x {
    color: var(--primary-color);
}

/* Style pour les messages flash */
.alert {
    border-radius: 8px;
    animation: fadeIn 0.3s ease;
}

/* Style pour les modals */
.modal-content {
    border-radius: 15px;
}

.modal-header {
    border-radius: 15px 15px 0 0;
}

/* Print styles */
@media print {
    .navbar,
    footer,
    .btn,
    .no-print {
        display: none !important;
    }
}
