/**
 * Style global - Collecte VDT
 * Système de gestion des tournées
 * N.B. : Ce fichier à été généré par IA pour fournir une base de style cohérente et moderne.
 */

 

/* ============================================
   VARIABLES CSS
   ============================================ */
:root {
    /* Couleurs principales */
    --primary-color: #2c5f2d;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    
    /* Couleurs neutres */
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
    --text-muted: #6c757d;
    
    /* Espacements */
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    /* Bordures */
    --border-radius: 0.375rem;
    --border-radius-lg: 0.5rem;
    
    /* Ombres */
    --shadow-sm: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0,0,0,0.15);
    --shadow-lg: 0 1rem 3rem rgba(0,0,0,0.175);
    
    /* Transitions */
    --transition: all 0.3s ease;
}

/* ============================================
   RESET & BASE
   ============================================ */
* {
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #212529;
    background-color: #ffffff;
}

main {
    flex: 1;
}

/* ============================================
   TYPOGRAPHIE
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #1d3f1e;
    text-decoration: underline;
}

/* ============================================
   LAYOUT
   ============================================ */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1d3f1e 100%);
    color: white;
    padding: var(--spacing-lg) 0;
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-md);
}

.page-header h1 {
    color: white;
    margin: 0;
}

.content-wrapper {
    padding: var(--spacing-xl) 0;
}

.card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header {
    background-color: var(--light-bg);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--primary-color);
}

/* ============================================
   BOUTONS
   ============================================ */
.btn {
    border-radius: var(--border-radius);
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #1d3f1e;
    border-color: #1d3f1e;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================
   FORMULAIRES
   ============================================ */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #495057;
}

.form-control,
.form-select {
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: 0.6rem 0.75rem;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(44, 95, 45, 0.25);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.input-group-text {
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
}

/* ============================================
   TABLEAUX
   ============================================ */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table thead {
    background-color: var(--primary-color);
    color: white;
}

.table thead th {
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    padding: 1rem 0.75rem;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background-color: rgba(44, 95, 45, 0.05);
}

.table td {
    vertical-align: middle;
    padding: 0.75rem;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 500;
    border-radius: var(--border-radius);
}

/* ============================================
   ALERTS & MESSAGES FLASH
   ============================================ */
.alert {
    border-radius: var(--border-radius);
    border: none;
    /* Ne pas écraser le padding-right de Bootstrap sur .alert-dismissible
       (Bootstrap réserve ~3rem à droite pour le bouton de fermeture) */
}

/* Toasts flash (coin haut-droite) */
.flash-toast-container {
    z-index: 9999;
    margin-top: 64px; /* décalage sous la navbar */
}

.flash-toast-container .alert {
    min-width: 320px;
    max-width: 420px;
    word-break: break-word;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(110%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-color) !important;
}

.nav-link {
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination .page-link {
    color: var(--primary-color);
    border-color: var(--border-color);
}

.pagination .page-link:hover {
    background-color: var(--light-bg);
    border-color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* ============================================
   UTILITIES
   ============================================ */
.text-primary-custom {
    color: var(--primary-color) !important;
}

.bg-primary-custom {
    background-color: var(--primary-color) !important;
}

.shadow-custom {
    box-shadow: var(--shadow-md);
}

.rounded-custom {
    border-radius: var(--border-radius-lg);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.95rem;
    }
    
    .table {
        font-size: 0.9rem;
    }
    
    .card {
        margin-bottom: var(--spacing-md);
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

