.MathJax {
    font-size: 100% !important;
}

/* ==========================================================================
   EMAN — Termes : page publique d'un terme (/eman-termes/show/:term)
   Mise en page sobre, alignée sur le registre de l'admin :
   gris neutres, bordures fines, liens bleus, libellés discrets.
   Chargée APRÈS transcript.css : surcharge les anciennes règles « .term table ».

   Note thème : le thème eman applique un cadre (fond + ombre) à
   « #content > div » ET à « #content section ». On conserve donc UN seul
   cadre (le conteneur .eman-term-show) et on aplatit les <section> internes
   pour éviter les cadres imbriqués.
   ========================================================================== */

.eman-term-show {
    --et-card-border:  #e3e0da;
    --et-line:         #eceae5;
    --et-head-bg:      #f3f1ec;
    --et-row-hover:    #fbfaf8;
    --et-input-border: #c9c4bb;
    --et-link:         #2f6fb0;
    --et-ink:          #333;
    --et-muted:        #777;
    --et-muted-2:      #999;
    --et-radius:       6px;
    --et-radius-card:  8px;

    /* Espace le cadre du menu situé au-dessus */
    margin-top: 2.5em;
}

/* Aplatit les <section> internes : plus de cadre dans le cadre */
#content .eman-term-section {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    margin: 0 0 1.8em;
}

#content .eman-term-section:last-of-type {
    margin-bottom: 0;
}

/* En-tête du terme */
.eman-term-definition {
    margin: 0 0 1.6em;
    padding-bottom: 1.2em;
    border-bottom: 1px solid var(--et-line);
    font-size: 16px;
    line-height: 1.6;
    color: var(--et-ink);
}

/* Libellés de section */
.eman-term-show .eman-term-section > h3 {
    margin: 0 0 .7em;
    padding: 0 0 .35em;
    border-bottom: 1px solid var(--et-line);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--et-muted);
}

.eman-term-fields h4 {
    margin: .8em 0 .15em;
    font-size: 16px;
    color: var(--et-ink);
}

.eman-term-fields p {
    margin: 0 0 .4em;
    font-size: 16px;
    line-height: 1.55;
}

.eman-term-linked {
    margin: 0;
    font-size: 16px;
    line-height: 1.7;
}

.eman-term-show a {
    color: var(--et-link);
    text-decoration: none;
}

.eman-term-show a:hover {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Tableau des occurrences (« Apparaît dans »)
   -------------------------------------------------------------------------- */

.eman-term-show .eman-term-occurrences {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    background: #fff;
    border: 1px solid var(--et-card-border);
    border-radius: var(--et-radius-card);
    overflow: hidden;
    font-size: 16px;
    table-layout: fixed;
}

.eman-term-show .eman-term-occurrences thead th {
    padding: 8px 14px;
    background: var(--et-head-bg);
    border-bottom: 1px solid var(--et-card-border);
    color: var(--et-muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-align: left;
}

.eman-term-show .eman-term-occurrences th.occ-h-anchor {
    width: 180px;
}

/* Ligne d'en-tête d'un fichier / item (groupe) */
.eman-term-show .eman-term-occurrences tr.occ-file > td {
    padding: 9px 14px;
    background: #faf8f4;
    border-top: 1px solid var(--et-card-border);
    font-weight: 600;
    color: var(--et-ink);
}

.eman-term-show .eman-term-occurrences tbody tr:first-child.occ-file > td {
    border-top: 0;
}

/* Lignes d'occurrence */
.eman-term-show .eman-term-occurrences tr.occ-row > td {
    padding: 8px 14px;
    border-top: 1px solid var(--et-line);
    vertical-align: top;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.eman-term-show .eman-term-occurrences tr.occ-row:hover > td {
    background: var(--et-row-hover);
}

/* Colonne « occurrence » : ancre, indentée sous le groupe fichier */
.eman-term-show .eman-term-occurrences td.occ-anchor {
    width: 180px;
    padding-left: 28px;
    white-space: nowrap;
    color: var(--et-muted);
}

.eman-term-show .eman-term-occurrences td.occ-context {
    color: var(--et-ink);
}

/* Mise en évidence du terme dans le contexte */
.eman-term-show .term-highlight {
    font-weight: 700;
    color: var(--et-ink);
    background: #fff3cd;
    border-radius: 3px;
    padding: 0 2px;
}

.eman-term-show .transcript-not-found {
    color: #c0392b;
    font-weight: 400;
    font-style: italic;
}

/* --------------------------------------------------------------------------
   Lien de retour vers le glossaire
   -------------------------------------------------------------------------- */

.eman-term-back {
    margin: 1.8em 0 0;
}

.eman-term-back-link {
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    height: 36px;
    padding: 0 16px;
    border: 1px solid var(--et-input-border);
    border-radius: var(--et-radius);
    background: #f7f5f1;
    color: var(--et-ink) !important;
    font-size: 15px;
    text-decoration: none !important;
}

.eman-term-back-link:hover {
    background: #efece6;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 640px) {
    .eman-term-show .eman-term-occurrences {
        table-layout: auto;
    }

    .eman-term-show .eman-term-occurrences th.occ-h-anchor,
    .eman-term-show .eman-term-occurrences td.occ-anchor {
        width: auto;
        padding-left: 14px;
        white-space: normal;
    }
}
