﻿body {
    padding: 10px;
    background-color: #f8f9fa;
    overflow-x: hidden;
    font-size: 0.8rem;
}

.container-fluid {
    max-width: 100%;
    overflow-x: hidden;
    padding-left: 8px;
    padding-right: 8px;
}

.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

    .page-header h1 {
        font-size: 1.25rem;
        margin-bottom: 0.2rem;
    }

    .page-header p {
        font-size: 0.8rem;
        margin-bottom: 0;
    }

.card {
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 10px;
}

.card-header {
    background-color: #095797;
    color: white;
    font-weight: bold;
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
}

.card-body {
    padding: 0.75rem;
    overflow-x: auto;
}

/* Style pour les coordinateurs non disponibles dans SAS */
.coordinator-unavailable {
    background-color: #fff3cd !important;
    border-left: 4px solid #ffc107 !important;
    position: relative;
}

    .coordinator-unavailable::after {
        content: "";
        position: absolute;
        right: 10px;
        font-size: 0.75rem;
        color: #856404;
        font-weight: bold;
    }

/* Amélioration du dual listbox */
.bootstrap-duallistbox-container {
    max-width: 100%;
    overflow: visible;
}

    .bootstrap-duallistbox-container .box1,
    .bootstrap-duallistbox-container .box2 {
        height: auto !important;
        max-height: none;
        overflow-y: visible !important;
    }

    .bootstrap-duallistbox-container select {
        height: 300px !important;
        max-height: 75vh !important;
        border: 2px solid #dee2e6;
        border-radius: 4px;
        max-width: 100%;
        overflow-y: auto;
        font-size: 0.75rem;
        line-height: 1.3;
        overflow-y: auto !important;
    }

        .bootstrap-duallistbox-container select option {
            padding: 3px 6px;
            font-size: 0.75rem;
        }

    .bootstrap-duallistbox-container .info {
        background-color: #e9ecef;
        padding: 3px 5px;
        border-radius: 3px;
        margin-bottom: 4px;
        font-size: 0.7rem;
    }

    /* Conteneur responsive pour éviter le débordement */
    .bootstrap-duallistbox-container .col-md-5,
    .bootstrap-duallistbox-container .col-md-2 {
        padding: 2px;
    }

    /* Ajustement des boutons du dual listbox - SANS SUPERPOSITION */
    .bootstrap-duallistbox-container .btn-group {
        display: flex;
        flex-direction: row;
        flex-wrap:wrap;
        gap: 5px;
        align-items: center;
        justify-content: center;
        padding: 3px;
    }

    .bootstrap-duallistbox-container .btn {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
        width: auto;
        min-width: 40px;
        max-width: 70px;
        margin: 0 !important;
        line-height: 1.1;
        flex:0 0 auto;
    }

.btn-save {
    background: linear-gradient(135deg, #095797 0%, #095797 100%);
    border: none;
    padding: 8px 16px;
    font-size: 0.85rem;
}

    .btn-save:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }

.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.loading-spinner {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
}

.legend {
    background: white;
    padding: 6px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    font-size: 0.8rem;
}

.legend-item {
    display: inline-block;
    margin-right: 12px;
    font-size: 0.8rem;
}

.legend-box {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 4px;
    border: 1px solid #ddd;
    vertical-align: middle;
}

    .legend-box.unavailable {
        background-color: #fff3cd;
        border-left: 3px solid #ffc107;
    }

/* Styles responsives */
@media (max-width: 768px) {
    .bootstrap-duallistbox-container .box1,
    .bootstrap-duallistbox-container .box2 {
        height: 300px !important;
        max-height: 45vh;
    }

    .btn-save, .btn-secondary {
        width: 100%;
        margin-bottom: 10px;
    }

    .page-header {
        padding: 15px;
        margin-bottom: 15px;
    }

        .page-header h1 {
            font-size: 1.4rem;
        }
}

/* Éviter le débordement du contenu */
.card-body {
    overflow-x: auto;
}

/* Ajustement des boutons d'action */
.btn-save, .btn-secondary {
    white-space: nowrap;
    min-width: 160px;
    font-size: 0.85rem;
    padding: 7px 14px;
}

@media (max-width: 576px) {
    .btn-save, .btn-secondary {
        min-width: 100%;
        padding: 10px 15px;
        font-size: 14px;
    }
}

/* Ajustement des boutons d'action */
.btn-save, .btn-secondary {
    white-space: nowrap;
    min-width: 10px;
    font-size: 0.9rem;
    padding: 8px 16px;
}

@media (max-width: 576px) {
    .btn-save, .btn-secondary {
        min-width: 100%;
        padding: 10px 15px;
        font-size: 14px;
    }
}

/*Styles pour les notifications*/

.toast {
    min-width: 300px;
    max-width: 500px;
}

.toast-header {
    border-bottom: 2px solid;
}

.toast-success .toast-header {
    background-color: #d1e7dd;
    border-bottom-color: #198754;
    color: #0f5132;
}

.toast-error .toast-header {
    background-color: #f8d7da;
    border-bottom-color: #dc3545;
    color: #842029;
}

.toast-warning .toast-header {
    background-color: #fff3cd;
    border-bottom-color: #ffc107;
    color: #856404;
}

.toast-info .toast-header {
    background-color: #cfe2ff;
    border-bottom-color: #0dcaf0;
    color: #055160;
}

.toast-success .bi::before {
    content: "✓";
    font-size: 1.2rem;
    font-weight: bold;
    color: #198754;
}

.toast-error .bi::before {
    content: "✕";
    font-size: 1.2rem;
    font-weight: bold;
    color: #dc3545;
}

.toast-warning .bi::before {
    content: "⚠";
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffc107;
}

.toast-info .bi::before {
    content: "ℹ";
    font-size: 1.2rem;
    font-weight: bold;
    color: #0dcaf0;
}

