:root,
[data-bs-theme=light]{
    --bs-green-700 : #24a079;
}
:root,
[data-bs-theme=dark]{
    --bs-green-700 : #53d2ac;
}

html, body {
    height: 100%;
    margin: 0;
    font-family: "Roboto", Arial, sans-serif;
    font-optical-sizing: auto;
    font-weight: 200;
    font-style: normal;
    letter-spacing: 0.05rem;
}
.sidebar {
    min-height: 100vh;
}
.menu-toggle .bi {
    transition: transform 0.3s ease;
    display: inline-block;
    position: absolute;
    right: 2px;
}
.menu-toggle[aria-expanded="true"] .bi {
    transform: rotate(90deg);
}
.menu-toggle i {
    transition: transform .2s ease;
}
.menu-toggle i.rotated {
    transform: rotate(90deg); /* caret right → caret down */
}

#doodax a {
    font-family: "Michroma", sans-serif;
    text-decoration: none;
    color: var(--bs-green-700);
}

ul li {
    list-style: none;
}

.nav-link,
.nav-link:hover{
    color: var(--bs-primary-text-emphasis);
}

.nav-link.active {
    font-weight: 500;
}

.nav-item {
    position: relative;
}

.nav-item.active {
    color: var(--bs-secondary-text-emphasis);
    background-color: var(--bs-secondary-bg-subtle);
    border-color: var(--bs-secondary-border-subtle);
}

ul.success { --branch-color: var(--bs-success); }
ul.info { --branch-color: var(--bs-info); }
ul.warning { --branch-color: var(--bs-warning); }

main :where(li ul):before {
    position: absolute;
    bottom: .25rem;
    inset-inline-start: 0;
    top: .25rem;
    width: 2px;
    --tw-bg-opacity: 1;
    background-color: var(--branch-color, #ccc);
    opacity: .3;
    content: "";
}

:where(main li) {
    position: relative;
    display: flex;
    flex-shrink: 0;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: stretch;
}

.list-styled li {
    display: list-item;
}

ul.list-styled li {
    list-style: disc;
}

.card {
    border-color: var(--bs-dark-border-subtle);
}
.card-img-top {
    height: 200px;           /* fixe la hauteur à 200px (modifiable) */
    object-fit: cover;       /* recadre l'image pour remplir sans déformer */
    width: 100%;             /* garantit la largeur maximale */
}
/* Thème clair → en-tête clair */
[data-bs-theme="light"] thead {
    background-color: var(--bs-light);
    color: var(--bs-dark);
}

/* Thème sombre → en-tête sombre */
[data-bs-theme="dark"] thead {
    background-color: var(--bs-dark);
    color: var(--bs-light);
}

[data-bs-theme="light"] .list-group-item.active .badge {
    background-color: #fff !important;
    color: var(--bs-primary-text-emphasis);
}
[data-bs-theme="dark"] .list-group-item.active .badge {
    background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
    color: var(--bs-primary-text-emphasis);
}
[data-bs-theme="light"] .list-group-item.active.bg-body-secondary {
    color: #000;
    border: var(--bs-list-group-border-width) solid var(--bs-list-group-border-color) !important;
}
#eventList {
    flex-direction: row;
}

#eventList .col-12 {
    width: 100% !important;
}

.list-group-item.text-muted h5 {
    font-size: 1.0em;
}

.list-group-item.text-muted .badge {
    display: none;
}

.list-group-item .bi-microsoft-team,
.list-group-item .bi-eye {
    margin-right: 10px;
}

.list-group-item h5 small {
    font-size: 0.675em;
}

#eventList .list-group-item div:first-child {
    display: inline-block;
    width: 85%;
}

#eventList .list-group-item div:last-child {
    display: inline-block;
    width: 15%;
    height: 100%;
    text-align: center;
}

main {
    scroll-behavior: smooth; /* scroll fluide */
}

main section {
    scroll-margin-top: 120px; /* marge par défaut, sera ajustée en JS */
}

#toc .list-group-item.active {
    background-color: var(--bs-primary-bg-subtle);
    color: var(--bs-primary-text-emphasis);
    font-weight: bold;
    border-left: 4px solid var(--bs-primary);
}

/* TABLES DE VÉRITÉ */
.table-truth {
    width: auto;
}

.table-truth th,
.table-truth td {
    width: 60px; /* Ajuste si tu veux plus large ou responsive */
}

/* Colonnes de sortie (th + td) */
.table-truth .out {
    background-color: #ececec; /* Équivalent Bootstrap .table-success */
    border-left: 2px solid #000 !important;
}

.table-truth thead th {
    background-color: #a1ddff;
}

.table-truth td {
    padding: 0.25em 0.5em;
}

/* S’assurer que l’en-tête est cohérent */
.table-truth thead th.out {
    background-color: #59c6ff; /* Équivalent .table-dark mélangé à succès */
    color: #fff;
    border-left: 2px solid #000 !important;
}

/* Si plusieurs colonnes "out", la bordure ne s’applique qu’à la première */
.table-truth .out + .out {
    border-left: 1px solid #dee2e6 !important; /* fine séparation normale */
}

.equation {
    margin: 0 auto;
    width: 40%;
    display: block
}

.bi-1-square-fill::before,
.bi-2-square-fill::before,
.bi-3-square-fill::before,
.bi-4-square-fill::before,
.bi-5-square-fill::before,
.bi-6-square-fill::before,
.bi-7-square-fill::before,
.bi-8-square-fill::before {
    color: var(--bs-accordion-active-color) !important;
}

table#gates td{
    vertical-align: middle;
}

h3.card-subtitle {
    border-bottom: 1px solid var(--bs-secondary-border-subtle);
    margin-bottom: 20px;
    margin-top: 40px;
}