/*  ==== STYLE CSS PERSO  ==== */
html {
    scroll-behavior: smooth;
}

html, body {
    height: 100%;  /* Laisser l'ensemble du body occuper toute la hauteur de la fenêtre */
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;  /* Assure que le body prend au moins toute la hauteur de la fenêtre */
}

/*  ==== Le contenu principal occupe l'espace disponible  ==== */
.main-content {
    flex: 1;
}

.content-wrapper { 
    display: block !important; 
}

.btn-success {
    background-color: #1a8754 !important; 
    color: white !important; 
    border-color: #1a8754 !important;
}

.btn-secondary {
    background-color: #6b757d !important; 
    color: white !important; 
    border-color: #6b757d !important;
}

.btn-primary {
    background-color: #0d6dfc !important; 
    color: white !important; 
    border-color: #0d6dfc !important;
}

.btn-danger {
    background-color: #db3545 !important; 
    color: white !important; 
    border-color: #db3545 !important;
}

.modal-header {
    border-bottom: 2px solid #dee2e6;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
}

.modal-content {
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15);
}

.modal-body {
    font-size: 1rem;
    line-height: 1.6;
}

.note-box {
    border: 1px solid #ddd;
    border-radius: 10px;
    background-color: #f8f9fa;
    max-height: 300px;
    overflow-y: auto;
    font-family: 'Segoe UI', sans-serif;
    font-size: 1rem;
    line-height: 1.5;
}

.form-label {
    font-weight: 600;
}

/* ==== Cartes métriques ==== */
.card.shadow-sm {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card.shadow-sm:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.75rem 1.5rem rgba(0,0,0,0.15);
}


/* ==== Cartes modernes (sans dégradé) ==== */
.card.shadow-sm {
    border-radius: 12px;
    transition: all 0.2s ease-in-out;
    border: none;
}

/*  ==== Effet hover  ==== */
.card.shadow-sm:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* ==== Couleurs modernes ==== */

.total-presentoir {
    background-color: #3b82f6 !important; /* bleu moderne */
    color: #fff !important;
}

.total-lieux {
    background-color: #10b981 !important; /* vert moderne */
    color: #fff !important;
}

.total-proclamateur {
    background-color: #f59e0b !important; /* orange moderne */
    color: #1f2937 !important;
}

.total-mouvement {
    background-color: #374151 !important; /* gris moderne */
    color: #fff !important;
}

/* ===== Statuts ===== */

.total-en-cours {
    background-color: #fbbf24 !important;
    color: #1f2937 !important;
}

.total-termines {
    background-color: #059669 !important;
    color: #fff !important;
}

.total-alertes {
    background-color: #dc2626 !important;
    color: #fff !important;
}

/* ==== Texte ==== */

.card-title {
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0.9;
}

.card .display-6 {
    font-weight: 700;
}

/*  ==== Supprime l’ancien effet d’ombre texte  ==== */
.card.shadow-sm.text-white h5,
.card.shadow-sm.text-white p {
    text-shadow: none;
}

/*  ==== Texte blanc sur les cartes métriques  ==== */
.card.shadow-sm.text-white h5,
.card.shadow-sm.text-white p {
    text-shadow: 0 0.1rem 0.2rem rgba(0,0,0,0.2);
}

/* ==== Badges ==== */
.badge {
    font-size: 0.85rem;
    padding: 0.35em 0.65em;
    border-radius: 0.5rem;
}

.badge.bg-primary   { background-color: #0d6efd !important; }
.badge.bg-success   { background-color: #198754 !important; }
.badge.bg-warning   { background-color: #ffc107 !important; color: #212529; }
.badge.bg-danger    { background-color: #dc3545 !important; }
.badge.bg-secondary { background-color: #6c757d !important; }

/* ==== Tableau des mouvements ==== */
.table-responsive { overflow-x: auto; }
table.dataTable thead th { background-color: #212529; color: #fff; }
table.dataTable tbody tr.table-warning { background-color: #fff3cd !important; }
table.dataTable tbody tr.table-danger  { background-color: #f8d7da !important; }

/* ==== Boutons de notes ==== */
.btn-outline-info,
.btn-outline-warning,
.btn-outline-success {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.4rem;
}

/* ==== Graphiques ==== */
canvas { max-width: 100%; }

/* ==== Espacement horizontal des colonnes ==== */
#tableau-mouvements {
    border-collapse: separate !important;
    border-spacing: 0 8px;
}

#tableau-mouvements tbody tr {
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    border-radius: 10px;
}

td.note-align {
    text-align: center !important;
}

.bg-light {
    background-color: #f8fafc !important;
}

.rounded-3 {
    border-radius: 10px !important;
}

.highlight-row {
    background-color: #ffe08a !important;
    transition: background-color 0.6s ease;
}

/*  ==== RESPONSIVE MÉDIAS QUERIES  ==== */
@media (min-width : 320px) and (max-width : 768px) {
    .title {
        font-size: 1.5em;
        margin-bottom: 15px !important;
    }

    .nav-title {
        justify-content: center !important;
    }

    .bienvenue-title {
        margin-right: auto;
    }

    .proclamateur-sortie,
    .proclamateur-retour {
        margin-bottom: 10px;
    }

    .lieu-sortie,
    .lieu-retour,
    .date-sortie,
    .heure-sortie,
    .date-retour,
    .heure-retour {
        margin-bottom: 20px;
    }
}

@media (min-width : 768px) and (max-width : 992px) {
    .proclamateur-sortie,
    .proclamateur-retour {
        margin-bottom: 10px;
    }
}

@media (max-width: 768px) {
    .card.shadow-sm { margin-bottom: 1rem; }
    .d-flex.justify-content-around { flex-direction: column; gap: 0.5rem; }
}

@media (min-width: 992px) {
    .resizer-handler {
        display: none;
    }
}