/* ============================================================
   SPORT / EPMS - Module Sport BMPM
   Responsive : PC et smartphone
   ============================================================ */

/* Cartes sous-modules : zones tactiles suffisantes sur mobile */
.sport-card {
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 640px) {
    .sport-card {
        min-height: 120px;
    }
}

/* Modals : au-dessus du header (z-index), contenus entre header et footer, scrollables */
.sport-modal-overlay {
    position: fixed;
    top: 4rem;       /* sous le header (min-h-[4rem]) */
    left: 0;
    right: 0;
    bottom: 4rem;    /* au-dessus du footer */
    z-index: 10000;  /* au-dessus du header (z-9999) */
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.5);
    -webkit-overflow-scrolling: touch;
}

.sport-modal-overlay.hidden {
    display: none !important;
}

@media (min-width: 640px) {
    .sport-modal-overlay {
        padding: 1rem;
    }
}

/* Contenu modal : scroll interne si besoin, max-height pour rester dans la zone */
.sport-modal-overlay .sport-modal-box {
    max-height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
.sport-modal-overlay .sport-modal-box .sport-modal-body {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

/* Contenu article (lecture) et éditeur : tableaux lisibles */
.journal-contenu table,
#article-editor table {
    border-collapse: collapse;
    width: 100%;
    margin: 0.75rem 0;
    font-size: 0.9rem;
}
.journal-contenu th,
.journal-contenu td,
#article-editor th,
#article-editor td {
    border: 1px solid #cbd5e1;
    padding: 0.4rem 0.6rem;
    text-align: left;
}
.journal-contenu th,
#article-editor th {
    background: #f1f5f9;
    font-weight: 700;
}

.journal-contenu img,
#article-editor img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    display: block;
    margin: 0.5rem 0;
}
#article-editor td:empty::after,
#article-editor th:empty::after {
    content: '\00a0';
}
#article-editor .ql-editor {
    min-height: 200px;
    max-height: 50vh;
}
