/* Bouton d'ouverture */
.modal-list-btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin: 10px 0;
    transition: background 0.3s;
}

.modal-list-btn:hover {
    background: #005a87;
}

/* Overlay de la popup */
.modal-list-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Popup */
.modal-list-popup {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: auto;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
}

/* Header */
.modal-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: #f9f9f9;
    border-radius: 10px 10px 0 0;
}

.modal-list-header h3 {
    margin: 0;
    color: #333;
}

.close-modal-list {
    font-size: 28px;
    cursor: pointer;
    color: #666;
    line-height: 1;
}

.close-modal-list:hover {
    color: #000;
}

/* Contenu */
.modal-list-content {
    padding: 20px;
}

/* Statistiques */
.modal-stats {
    background: #f0f8ff;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #007cba;
}

.type-stats {
    margin-top: 10px;
}

.type-badge {
    background: #007cba;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    margin-right: 5px;
}

/* Items de modales */
.modal-items {
    list-style: none;
    padding: 0;
    margin: 15px 0 0 0;
}

.modal-item {
    padding: 15px;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    border-radius: 5px;
    background: #fafafa;
    transition: background 0.3s;
}

.modal-item:hover {
    background: #f0f0f0;
}

.modal-source {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.modal-source strong {
    color: #007cba;
    font-size: 16px;
}

.modal-type {
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    text-transform: uppercase;
}

.modal-details small {
    color: #666;
    font-size: 12px;
}

.modal-details a {
    color: #007cba;
    text-decoration: none;
    font-weight: bold;
    font-size: 13px;
}

.modal-details a:hover {
    text-decoration: underline;
}

/* Aucune modale trouvée */
.no-modals {
    text-align: center;
    padding: 30px;
}

.no-modals p {
    font-size: 18px;
    margin-bottom: 20px;
}

.debug-info {
    text-align: left;
    background: #fff3cd;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #ffc107;
}

.debug-info ul {
    margin: 10px 0;
    padding-left: 20px;
}

.debug-info li {
    margin-bottom: 5px;
}

/* Loader */
.modal-loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #007cba;
    color: white;
    padding: 15px 25px;
    border-radius: 5px;
    z-index: 10000;
    font-weight: bold;
}