:root {
    --primary-color: rgb(222, 2, 43); /* Blue */
    --secondary-color: rgb(43, 43, 43); /* Green */
    --accent-color: rgb(255, 255, 255); /* Red */
}

.navbar-custom {
    background-color: var(--primary-color);
}

.navbar-custom .navbar-brand,
.navbar-custom .navbar-text {
    color: var(--accent-color);
}

.btn-custom {
    background-color: var(--secondary-color);
    color: var(--accent-color);
}

.btn-custom:hover {
    background-color: rgb(157, 157, 157); /* Pale Gray */
    color:rgb(255, 255, 255)
}
.btn-z {
    --bs-btn-bg: var(green) !important;
    --bs-btn-color: var(--accent-color) !important;
}

.btn-z:hover {
    background-color: rgb(157, 157, 157) !important;
    color: rgb(255, 255, 255) !important;
}

body {
    background-color: var(--accent-color);
}

/* Prevent long formulas/strings from forcing horizontal scroll */
.formule-latex,
.latex-content,
.table td,
.table th {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Constrain MathJax blocks inside the viewport */
.mjx-container {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    display: block;
}

/* Shared list styles (tables + cards + filters) */
.list-filters {
    border: 0;
    padding: 0;
}

.list-filters__summary {
    list-style: none;
    cursor: pointer;
    font-weight: 600;
    padding: 10px 14px;
    border: 1px solid #d7d7d7;
    border-radius: 12px;
    background: #f7f7f7;
}

.list-filters__summary::-webkit-details-marker {
    display: none;
}

.list-filters__summary::after {
    content: "Filtrer";
    float: right;
    font-weight: 600;
}

.list-card {
    border-radius: 16px;
    border: 1px solid #e2e2e2;
    box-shadow: 0 10px 20px rgba(16, 24, 40, 0.08);
}

.list-card__title a {
    color: #111111;
    font-weight: 700;
    text-decoration: none;
}

.list-card__meta {
    font-size: 0.95rem;
    color: #333333;
    margin-top: 8px;
}

.list-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.list-badge {
    border: 1px solid #cccccc;
    padding: 2px 8px;
    border-radius: 999px;
    background: #ffffff;
    font-size: 0.85rem;
}

.list-code {
    font-family: "Courier New", monospace;
    background: #f5f5f5;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 0.9rem;
    margin-top: 8px;
    word-break: break-word;
}

/* Keep table headers readable on the questions list */
.list-questions-table th {
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
}

@media (min-width: 768px) {
    .list-filters__summary {
        display: none;
    }
}
