/* responsive.css - Styles adaptatifs partagés pour l'intranet AS Pagny Handball */

/* ---------- Topbar responsive (complète topbar.css) ---------- */
.topbar .container-fluid {
    flex-wrap: wrap;
    gap: .5rem;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

@media (max-width: 575.98px) {
    .topbar-actions {
        width: 100%;
        justify-content: space-between;
    }
    .topbar-actions .btn {
        font-size: .75rem;
        padding: .25rem .5rem;
    }
}

/* Topbar de l'éditeur OnlyOffice/local (blanc) */
.topbar:has(> div > .btn-outline-secondary) {
    flex-wrap: wrap;
    gap: .5rem;
}

.topbar:has(> div > .btn-outline-secondary) > div:first-child {
    flex: 1;
    min-width: 0;
}

.topbar:has(> div > .btn-outline-secondary) > .topbar-actions {
    flex: 0 0 auto;
}

@media (max-width: 575.98px) {
    .topbar:has(> div > .btn-outline-secondary) {
        align-items: flex-start;
    }
    .topbar:has(> div > .btn-outline-secondary) > .topbar-actions {
        width: auto;
        justify-content: flex-end;
    }
}

/* ---------- Boutons d'action compactés ---------- */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
}

@media (max-width: 575.98px) {
    .btn-icon {
        width: 2rem;
        height: 2rem;
    }
}

/* ---------- Tableaux ---------- */
.table-responsive {
    border-radius: .375rem;
    overflow-x: visible !important;
    overflow-y: visible !important;
}

.table-responsive .dropdown-menu {
    z-index: 1060;
}

.table-actions {
    display: inline-flex;
    gap: .25rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

@media (max-width: 767.98px) {
    .table-actions {
        justify-content: center;
    }
}

/* ---------- Cartes / padding ---------- */
@media (max-width: 575.98px) {
    .card-body {
        padding: 1rem !important;
    }
    .hero-card {
        padding: 1.5rem !important;
    }
    .hero-card h1 {
        font-size: 1.5rem;
    }
    .hero-card img {
        max-width: 100px !important;
    }
}

/* ---------- Formulaire weekend ---------- */
.match-entry td:last-child,
.match-entry td:has(.remove-match-btn) {
    position: relative;
}

.match-entry .remove-match-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@media (max-width: 575.98px) {
    .match-entry .remove-match-btn {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
    }
}

/* ---------- Bibliothèque technique ---------- */
.sheet-card .card-title {
    font-size: 1rem;
}

@media (max-width: 575.98px) {
    .attachment-thumb,
    .attachment-icon {
        height: 120px;
    }
}

/* ---------- Trombinoscope ---------- */
.trombi-card .card-title {
    font-size: 1rem;
}

/* ---------- File manager ---------- */
@media (max-width: 991.98px) {
    .sidebar-card {
        position: relative !important;
        top: auto !important;
        max-height: none !important;
    }
}

.file-list-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
}

@media (max-width: 575.98px) {
    .file-list-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .file-list-toolbar > * {
        width: 100%;
    }
    .file-list-toolbar .btn-group {
        display: flex;
        justify-content: center;
    }
}

/* ---------- Toolbar d'édition de contenu ---------- */
@media (max-width: 575.98px) {
    .btn-toolbar {
        flex-wrap: wrap;
        gap: .25rem;
    }
    .btn-toolbar .btn-group {
        flex: 1 1 auto;
        min-width: 3rem;
    }
    .btn-toolbar .btn {
        padding: .25rem .4rem;
        font-size: .8rem;
    }
    .feed-editor {
        min-height: 140px;
    }
}

/* ---------- Quick links ---------- */
@media (max-width: 575.98px) {
    .quick-link {
        padding: .75rem 1rem !important;
    }
}

/* ---------- Admin tables ---------- */
@media (max-width: 767.98px) {
    .admin-actions {
        display: inline-flex;
        gap: .25rem;
        flex-wrap: wrap;
    }
}

/* ---------- Pagination ---------- */
@media (max-width: 575.98px) {
    .pagination {
        flex-wrap: wrap;
        gap: .25rem;
    }
}

/* ---------- Général : pas de débordement ---------- */
img, video, iframe, pre {
    max-width: 100%;
}

.text-break {
    word-break: break-word;
    overflow-wrap: anywhere;
}
