/* MODAL CUSTOM - Complètement indépendant de Bootstrap */
/* Ce CSS ne s'applique QUE aux éléments du modal custom */

/* Modal overlay */
.custom-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.8) !important;
    z-index: 9999 !important;
    display: none !important;
    justify-content: center !important;
    align-items: center !important;
    cursor: pointer !important;
}

.custom-modal-overlay.show {
    display: flex !important;
}

/* Modal content */
.custom-modal-content {
    position: relative !important;
    max-width: 90vw !important;
    max-height: 90vh !important;
    background: white !important;
    border-radius: 8px !important;
    padding: 20px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
    cursor: default !important;
}

/* Modal image */
.custom-modal-image {
    max-width: 100% !important;
    max-height: 70vh !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
}

/* Modal header */
.custom-modal-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 15px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid #eee !important;
}

.custom-modal-title {
    margin: 0 !important;
    font-size: 1.2rem !important;
    color: #333 !important;
}

/* Bouton de fermeture */
.custom-modal-close {
    background: #dc3545 !important;
    color: white !important;
    border: none !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    font-size: 20px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    transition: background-color 0.2s !important;
}

.custom-modal-close:hover {
    background: #c82333 !important;
    transform: scale(1.1) !important;
}

/* Empêcher le scroll du body quand modal ouvert */
body.modal-open {
    overflow: hidden !important;
}

/* Correction spécifique aux éléments du modal custom */