/* Journal des accès */
.ja-wrap { max-width: 1100px; margin: 0 auto; }
.ja-title { color: #3A3A3C; border-bottom: 3px solid #3A3A3C; padding-bottom: 8px; }
.ja-version { font-size: 14px; font-weight: 400; color: #8a8a8a; vertical-align: middle; }
.ja-box { padding: 16px; background: #f4f4f5; border-radius: 8px; color: #3A3A3C; }
.ja-notice { padding: 10px 14px; border-radius: 6px; margin: 12px 0; font-size: 14px; }
.ja-ok { background: #e6f4ea; color: #1E792F; border: 1px solid #1E792F; }
.ja-aide { font-size: 13px; color: #555; }
.ja-legende { background: #f6f6f7; border: 1px solid #e6e6e8; border-radius: 8px; padding: 8px 12px; }
.ja-vide { color: #777; font-style: italic; }
.ja-resume { font-size: 13px; color: #555; }

/* Bannière d'alerte « fantômes » */
.ja-fantomes-banner {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    background: #fbeaea; border: 1px solid #e3b4b4; border-left: 4px solid #7B1018;
    border-radius: 10px; padding: 12px 16px; margin: 12px 0 16px;
}
.ja-fantomes-txt { flex: 1; min-width: 220px; color: #5e0c12; font-size: 14px; }
.ja-fantomes-banner form { margin: 0; }

.ja-stats { display: flex; gap: 14px; flex-wrap: wrap; margin: 16px 0; }
.ja-stat {
    flex: 1; min-width: 150px; background: #fff; border: 1px solid #e3e3e3;
    border-top: 4px solid #3A3A3C; border-radius: 10px; padding: 14px; text-align: center;
    display: block; text-decoration: none; transition: box-shadow .15s, transform .15s;
}
a.ja-stat:hover { box-shadow: 0 3px 10px rgba(0,0,0,.10); transform: translateY(-1px); }
.ja-stat-num { display: block; font-size: 26px; font-weight: 700; color: #3A3A3C; }
.ja-stat-lab { font-size: 13px; color: #666; }
.ja-stat--visites { border-top-color: #213984; }
.ja-stat--visites .ja-stat-num { color: #213984; }
.ja-stat--connexions { border-top-color: #1E792F; }
.ja-stat--connexions .ja-stat-num { color: #1E792F; }
.ja-stat--echecs { border-top-color: #7B1018; }
.ja-stat--echecs .ja-stat-num { color: #7B1018; }
.ja-stat--total { border-top-color: #3A3A3C; }
.ja-stat--total .ja-stat-num { color: #3A3A3C; }

.ja-filtres { background: #f8f8f9; border: 1px solid #e3e3e3; border-radius: 10px; padding: 14px; margin: 8px 0 16px; }
.ja-filtre-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.ja-filtres label { font-size: 13px; font-weight: 600; color: #333; }
.ja-filtres input, .ja-filtres select {
    width: 100%; padding: 7px 9px; border: 1px solid #ccc; border-radius: 6px; font-size: 14px; font-weight: 400;
}
.ja-filtre-actions { margin-top: 12px; }

.ja-table-wrap { overflow-x: auto; }
.ja-table { width: 100%; border-collapse: collapse; }
.ja-table th, .ja-table td { border-bottom: 1px solid #eaeaea; padding: 8px 10px; text-align: left; font-size: 14px; }
.ja-table th { background: #f6f6f7; color: #3A3A3C; white-space: nowrap; }
.ja-ua { color: #777; font-size: 12px; }

.ja-badge { font-size: 12px; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.ja-badge-ok { background: #e6f4ea; color: #1E792F; }
.ja-badge-err { background: #fbeaea; color: #7B1018; }
.ja-badge-neutre { background: #ececee; color: #3A3A3C; }
.ja-badge-info { background: #e7eefb; color: #213984; }
.ja-badge-role { font-weight: 600; }

.ja-pagination { display: flex; align-items: center; gap: 12px; margin: 14px 0; }
.ja-page-info { font-size: 13px; color: #555; }

.ja-sep { border: none; border-top: 1px solid #e3e3e3; margin: 28px 0; }
.ja-form { display: grid; gap: 10px; max-width: 360px; }
.ja-form label { font-size: 14px; font-weight: 600; color: #333; }
.ja-form input { width: 100%; padding: 8px 10px; border: 1px solid #ccc; border-radius: 6px; font-weight: 400; }

.ja-btn {
    background: #3A3A3C; color: #fff; border: none; padding: 9px 18px; border-radius: 6px;
    font-size: 14px; cursor: pointer; text-decoration: none; display: inline-block;
}
.ja-btn:hover { background: #222; color: #fff; }
.ja-btn-mini {
    background: #ececee; color: #3A3A3C; border: none; padding: 5px 12px; border-radius: 5px;
    font-size: 13px; cursor: pointer; text-decoration: none;
}

.ja-check { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.ja-check input { width: auto; }

.ja-ip-toggle { margin: 6px 0 10px; }
.ja-hide-ip .ja-col-ip { display: none; }

/* Liste des visites (menu déroulant par visite) */
.ja-visites { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.ja-visite { border: 1px solid #e3e3e3; border-radius: 10px; background: #fff; overflow: hidden; }
.ja-visite > summary {
    display: grid; grid-template-columns: 160px 1fr auto auto; gap: 14px; align-items: center;
    padding: 11px 14px; cursor: pointer; list-style: none; font-size: 14px;
}
.ja-visite > summary::-webkit-details-marker { display: none; }
.ja-visite > summary::before {
    content: '▸'; color: #3A3A3C; font-size: 12px; margin-right: -8px;
}
.ja-visite[open] > summary::before { content: '▾'; }
.ja-visite[open] > summary { background: #f6f6f7; }
.ja-v-heure { font-weight: 600; color: #3A3A3C; }
.ja-v-user { color: #213984; font-weight: 600; }
.ja-v-count { font-size: 12px; color: #555; background: #ececee; padding: 2px 8px; border-radius: 10px; }
.ja-v-ip { font-size: 13px; color: #777; }

.ja-v-detail { padding: 6px 16px 14px; border-top: 1px solid #eee; }
.ja-v-meta { font-size: 12px; color: #777; margin: 8px 0; }
.ja-nav-liste { margin: 0; padding-left: 22px; }
.ja-nav-liste li { margin: 4px 0; font-size: 13px; }
.ja-nav-heure { color: #999; font-variant-numeric: tabular-nums; margin-right: 6px; }
.ja-nav-titre { color: #222; font-weight: 600; }
.ja-nav-url { color: #888; font-size: 12px; word-break: break-all; }

@media (max-width: 600px) {
    .ja-visite > summary { grid-template-columns: 1fr auto; row-gap: 4px; }
    .ja-v-heure { grid-column: 1 / -1; }
}

/* Onglets de vue */
.ja-vues { display: flex; gap: 4px; margin: 8px 0 14px; flex-wrap: wrap; }
.ja-vue {
    padding: 8px 16px; background: #ececee; color: #3A3A3C; text-decoration: none;
    border-radius: 8px; font-size: 14px;
}
.ja-vue.actif { background: #3A3A3C; color: #fff; }

/* Sous-filtre (pilules) pour la vue Connexions */
.ja-sousfiltre { display: flex; gap: 6px; margin: 4px 0 12px; flex-wrap: wrap; }
.ja-pill {
    padding: 5px 12px; background: #f1f1f2; color: #3A3A3C; text-decoration: none;
    border: 1px solid #e3e3e3; border-radius: 14px; font-size: 13px;
}
.ja-pill.actif { background: #3A3A3C; color: #fff; border-color: #3A3A3C; }
.ja-periode { align-items: center; }
.ja-periode-lab { font-size: 13px; font-weight: 600; color: #555; margin-right: 2px; }
.ja-periode-perso { font-size: 12px; color: #888; font-style: italic; }
.ja-evt-essai { color: #7B1018; font-size: 12px; }

/* Bouton destructif (maintenance) */
.ja-btn-danger { background: #7B1018; }
.ja-btn-danger:hover { background: #5e0c12; color: #fff; }

/* Pages les plus visitées */
.ja-pages .ja-rang { font-weight: 700; color: #777; width: 36px; }
.ja-page-titre { font-weight: 600; color: #222; }
.ja-page-url { font-size: 12px; color: #888; word-break: break-all; }
.ja-bar { display: inline-block; width: 120px; height: 8px; background: #ececee; border-radius: 5px; overflow: hidden; vertical-align: middle; margin-right: 8px; }
.ja-bar span { display: block; height: 100%; background: #3A3A3C; }
.ja-bar-num { font-weight: 600; color: #3A3A3C; }
