/*
 * Correctifs maison par-dessus le thème GXON.
 * Le thème n'est jamais modifié : tout ce qui suit vient après styles.css.
 */

/*
 * GXON donne à chaque .card la hauteur de sa colonne (une carte par colonne).
 * Empilées, elles réclament chacune toute la hauteur et débordent sur le pied
 * de page : on leur rend leur hauteur naturelle.
 */
[class*="col-"] > .card:not(:only-child) {
    height: auto;
}

/*
 * .btn-primary survolé lit --bs-btn-primary-hover, que seul appSettings.js
 * déclare (via data-color-theme). Valeur de repli si le script manque.
 */
:root {
    --bs-btn-primary-hover: #2a5ad9;
}

/* Logo texte à la place de celui du thème. */
.app-logo {
    display: flex;
    align-items: center;
    gap: .6rem;
    text-decoration: none;
}

.app-logo-mark {
    display: inline-grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: .6rem;
    background: var(--bs-primary);
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
}

.app-logo-text {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--bs-heading-color, var(--bs-body-color));
}

/* Tableau des lignes de journal */
.log-table { --bs-table-bg: transparent; }
.log-table thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-secondary-color); white-space: nowrap; }
.log-table td { padding-top: .35rem; padding-bottom: .35rem; vertical-align: top; }
.log-heure { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; }
.log-projet { font-size: .85rem; font-weight: 600; }
.log-message { min-width: 0; max-width: 0; width: 100%; }
.log-texte { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-texte.tout, tr.ouverte .log-texte { white-space: pre-wrap; word-break: break-all; overflow: visible; }
.log-detail { display: none; margin-top: .6rem; padding-top: .6rem; border-top: 1px dashed var(--bs-border-color); }
tr.ouverte .log-detail { display: block; }
tr.log-ligne { cursor: pointer; }
tr.log-ligne.niveau-error, tr.log-ligne.niveau-critical { box-shadow: inset 3px 0 0 var(--bs-danger); }
tr.log-ligne.niveau-warning { box-shadow: inset 3px 0 0 var(--bs-warning); }
tr.ouverte { background: rgba(var(--bs-primary-rgb), .05); }
tr.ligne-cible { background: rgba(var(--bs-warning-rgb), .15); }
tr.log-suite { cursor: default; }

/* Histogramme : une barre par tranche de temps, la part d'erreurs en rouge */
.histogramme { display: flex; align-items: flex-end; gap: 2px; height: 72px; }
.histo-barre { flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; min-width: 0; }
.histo-barre:hover { background: rgba(var(--bs-primary-rgb), .06); }
.histo-total { display: flex; flex-direction: column; justify-content: flex-end; width: 100%; background: rgba(var(--bs-primary-rgb), .55); border-radius: 2px 2px 0 0; min-height: 0; }
.histo-erreurs { display: block; width: 100%; background: var(--bs-danger); border-radius: 2px 2px 0 0; }
.histo-legende { display: inline-block; width: .7rem; height: .7rem; border-radius: 2px; vertical-align: -1px; }
.histo-legende.erreurs { background: var(--bs-danger); }
.histo-legende.autres { background: rgba(var(--bs-primary-rgb), .55); }
