/* Habillage propre au site, en complément du thème MudBlazor (Components/Theme/AppTheme.cs).
   Les couleurs viennent toujours des variables du thème (--mud-palette-…) :
   elles changent automatiquement entre le mode sombre et le mode clair. */

:root {
    --ea-gold: var(--mud-palette-secondary, #C9A54B);
}

/* --- Icônes de badges et ornements : touches dorées --- */
.ea-icon, .ea-ornament { flex: none; vertical-align: middle; }
.ea-icon .g, .ea-ornament .g { stroke: var(--ea-gold); fill: var(--ea-gold); fill-opacity: .22; }
.ea-icon .gs, .ea-ornament .gs { stroke: var(--ea-gold); fill: none; }
.ea-icon .gf, .ea-ornament .gf { fill: var(--ea-gold); stroke: none; }

.ea-frieze { display: block; width: 100%; max-width: 240px; height: auto; color: var(--mud-palette-text-secondary); }
.ea-corner { width: 48px; height: 48px; color: var(--mud-palette-text-secondary); }
.ea-illustration { display: block; width: 100%; max-width: 360px; height: auto; color: var(--mud-palette-primary); }

/* --- Grille de saisie façon tableur : cellules numériques légères --- */
.ea-grid { width: 100%; border-collapse: collapse; }
.ea-grid th, .ea-grid td { padding: 4px 6px; border-bottom: 1px solid var(--mud-palette-table-lines); text-align: left; }
.ea-grid th { font-size: .8rem; font-weight: 700; color: var(--mud-palette-text-secondary); white-space: nowrap; }
.ea-grid .num { text-align: right; }
.ea-grid tbody tr:hover { background: var(--mud-palette-table-hover); }
.ea-cell {
    width: 100%; min-width: 4.5rem; height: 36px; padding: 0 8px;
    text-align: right; font: inherit; font-variant-numeric: tabular-nums;
    color: var(--mud-palette-text-primary); background: transparent;
    border: 1px solid var(--mud-palette-lines-inputs); border-radius: 6px;
    -moz-appearance: textfield; appearance: textfield;
}
.ea-cell::-webkit-outer-spin-button, .ea-cell::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ea-cell:focus { outline: 2px solid var(--mud-palette-primary); outline-offset: -1px; border-color: transparent; }
.ea-cell.changed { background: color-mix(in srgb, var(--ea-gold) 12%, transparent); }
.ea-total { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ea-gold); }

/* --- Barre du haut : nom de la confrérie et frise --- */
.ea-appbar { border-bottom: 1px solid var(--mud-palette-lines-default); }
.ea-brand { display: flex; flex-direction: column; justify-content: center; min-width: 0; margin-left: 4px; color: inherit; text-decoration: none; }
.ea-brand-text { font-family: var(--mud-typography-h4-family); font-weight: 700; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ea-brand-guild { font-size: 1.15rem; }
.ea-brand-game { font-size: .95rem; color: var(--ea-gold); }
.ea-brand-frieze { max-width: 180px; margin-top: 2px; opacity: .9; }
.ea-appbar-user { text-transform: none; }
/* Sur téléphone : nom du jeu, frise et pseudo masqués pour garder la barre lisible. */
@media (max-width: 599.98px) {
    .ea-brand-game, .ea-brand-frieze, .ea-appbar-user-name { display: none; }
    .ea-brand-guild { font-size: 1.05rem; }
}

/* --- Menu latéral --- */
.ea-drawer { border-right: 1px solid var(--mud-palette-lines-default); }
.ea-nav-button { width: 100%; background: none; border: 0; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.ea-drawer-ornament { display: flex; justify-content: center; padding: 16px 24px; opacity: .7; }

/* --- Contenu --- */
.ea-content { padding-top: 20px; padding-bottom: 96px; }
.ea-page-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 4px; }
.ea-muted { color: var(--mud-palette-text-secondary); }
.ea-clickable { cursor: pointer; }

/* Barre d'action fixée en bas de l'écran (grille sur mobile). */
.ea-sticky-actions {
    position: sticky; bottom: 0; z-index: 5;
    margin: 12px -12px 0; padding: 12px;
    background: color-mix(in srgb, var(--mud-palette-background) 92%, transparent);
    backdrop-filter: blur(4px);
    border-top: 1px solid var(--mud-palette-lines-default);
}

/* --- Accueil --- */
.ea-hero { position: relative; max-width: 640px; margin: 0 auto; padding: 32px 16px; }
.ea-hero .ea-illustration { max-width: 300px; }
.ea-hero-corner { position: absolute; top: 8px; width: 40px; height: 40px; }
.ea-hero-corner-left { left: 8px; }
.ea-hero-corner-right { right: 8px; transform: scaleX(-1); }

/* --- Cartes cliquables (liste des aventures) --- */
.ea-adventure-card { height: 100%; transition: border-color .15s; }
.ea-adventure-card:hover { border-color: var(--mud-palette-primary); }
.ea-card-link { display: block; height: 100%; color: inherit !important; text-decoration: none; }
.ea-card-link:focus-visible { outline: 2px solid var(--ea-gold); outline-offset: -2px; border-radius: inherit; }

/* --- Grille des badges : compléments --- */
.ea-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ea-cell.invalid { border-color: var(--mud-palette-error); background: color-mix(in srgb, var(--mud-palette-error) 12%, transparent); }
.ea-cell-readonly { display: block; text-align: right; font-variant-numeric: tabular-nums; }
.ea-recipe { display: inline-block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.ea-recipe.changed { color: var(--ea-gold); }
.ea-recipe-wrap { overflow-wrap: anywhere; }
.ea-row-invalid td { background: color-mix(in srgb, var(--mud-palette-error) 6%, transparent); }
.ea-row-error td { color: var(--mud-palette-error); font-size: .85rem; padding-top: 0; }
.ea-card-invalid { border-color: var(--mud-palette-error) !important; }
.ea-card-cells { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ea-card-cells label { display: flex; flex-direction: column; gap: 2px; font-size: .8rem; color: var(--mud-palette-text-secondary); }
.ea-card-cells .ea-cell { height: 44px; font-size: 1rem; }
.ea-save-button { min-width: 160px; }
@media (max-width: 599.98px) { .ea-save-button { flex-grow: 1; } }
/* Réorganisation : poignée de glisser-déposer (PC), repères de dépôt, flèches (mobile) */
.ea-drag-handle { display: inline-flex; cursor: grab; color: var(--mud-palette-text-secondary); margin-left: -4px; touch-action: none; }
.ea-drag-handle:hover { color: var(--ea-gold); }
.ea-dragging { opacity: .45; }
.ea-grid tr.ea-drop-before td { box-shadow: inset 0 2px 0 var(--ea-gold); }
.ea-grid tr.ea-drop-after td { box-shadow: inset 0 -2px 0 var(--ea-gold); }
.ea-move-buttons { display: flex; flex-direction: column; margin: -6px 0 -6px -8px; }
.ea-move-buttons .mud-icon-button { padding: 2px; }

/* --- Participants --- */
.ea-participant { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 12px; border-bottom: 1px solid var(--mud-palette-lines-default); }
.ea-participant:last-child { border-bottom: 0; }
.ea-profile-toggle { flex: none; grid-auto-columns: 1fr; }
.ea-profile-toggle .mud-toggle-item { padding: 4px 14px !important; min-width: 6.5rem; }

/* --- Référentiel des badges --- */
.ea-badge-card { height: 100%; display: flex; flex-direction: column; }
.ea-badge-card .mud-card-content { flex: 1; }
.ea-badge-card.ea-inactive { opacity: .7; }
.ea-badge-avatar {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 52px; height: 52px; border-radius: 12px;
    color: var(--mud-palette-primary);
    border: 1px solid var(--mud-palette-lines-default);
    background: color-mix(in srgb, var(--mud-palette-primary) 8%, transparent);
}
.ea-icon-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 6px; }
.ea-icon-choice {
    display: inline-flex; align-items: center; justify-content: center; height: 48px;
    color: var(--mud-palette-text-primary); background: transparent; cursor: pointer;
    border: 1px solid var(--mud-palette-lines-default); border-radius: 8px;
}
.ea-icon-choice:hover { border-color: var(--mud-palette-primary); }
.ea-icon-choice.selected { color: var(--mud-palette-primary); border: 2px solid var(--mud-palette-primary); background: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent); }
.ea-icon-choice:focus-visible { outline: 2px solid var(--ea-gold); outline-offset: 1px; }

/* --- Fenêtres (MudDialog) ---
   MudBlazor fait défiler le contenu de la fenêtre ET la fenêtre elle-même : un ascenseur apparaissait
   dans le contenu pour quelques pixels (étiquettes des champs). Seule la fenêtre défile désormais,
   et seulement si elle dépasse la hauteur de l'écran. */
.mud-dialog .mud-dialog-content { overflow: visible; }

/* --- Anticipation --- */
/* Équivalent en badges affiché en direct sous un champ de productions. */
.ea-equivalent {
    display: flex; align-items: center; gap: 12px; margin-top: 8px; padding: 10px 12px;
    border-radius: 10px; color: var(--mud-palette-primary);
    border: 1px solid var(--mud-palette-lines-default);
    background: color-mix(in srgb, var(--mud-palette-primary) 8%, transparent);
}
.ea-equivalent-value { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ea-gold); }
.ea-equivalent-text { color: var(--mud-palette-text-primary); line-height: 1.3; }
.ea-equivalent-detail { display: block; font-size: .8rem; color: var(--mud-palette-text-secondary); }

/* Repère « idéal » sous un champ de ressource : atteint, ou en dessous (icône + couleur). */
.ea-ideal { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: .85rem; color: var(--mud-palette-text-secondary); }
.ea-ideal.below { color: var(--mud-palette-warning); font-weight: 600; }
.ea-ideal.reached { color: var(--mud-palette-success); }

/* Aide aux pluies de pièces : petits boutons à additionner. */
.ea-rain-steps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ea-rain-steps .mud-button-root { min-width: 64px; }

/* Tableau d'anticipation : valeur sous l'idéal, ligne sans saisie, lignes de totaux. */
.ea-below { display: inline-flex; align-items: center; gap: 2px; color: var(--mud-palette-warning); font-weight: 700; }
.ea-grid tr.ea-no-entry td { color: var(--mud-palette-text-secondary); }
.ea-grid tfoot td { font-weight: 700; border-top: 2px solid var(--mud-palette-lines-default); white-space: nowrap; }
.ea-grid tfoot tr.ea-foot-muted td { font-weight: 400; color: var(--mud-palette-text-secondary); border-top: 0; }
.ea-grid .ea-sub, .ea-kv .ea-sub { display: block; font-size: .75rem; font-weight: 400; color: var(--mud-palette-text-secondary); }

/* Cartes de synthèse (totaux, attendus, % atteint). */
.ea-summary { height: 100%; padding: 12px; }
.ea-summary-value { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.ea-summary-label { display: flex; align-items: center; gap: 6px; font-weight: 600; margin-bottom: 4px; }

/* Cartes mobiles : paires libellé / valeur sur deux colonnes. */
.ea-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.ea-kv > div { display: flex; flex-direction: column; }
.ea-kv .ea-kv-label { font-size: .75rem; color: var(--mud-palette-text-secondary); }
.ea-kv .ea-kv-value { font-weight: 600; font-variant-numeric: tabular-nums; }

/* Charge de travail : champ « nombre de cycles » compact dans la grille. */
.ea-cycles-field { max-width: 110px; }

/* Ligne « case à cocher + champ » (paramètres d'anticipation) : le nom prend la place restante
   et peut passer à la ligne, le champ garde une largeur fixe ; les champs restent alignés. */
.ea-choice-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 110px;
    align-items: center;
    gap: 8px;
}
.ea-choice-row > * { min-width: 0; }
.ea-choice-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: normal;
}
.ea-nowrap { white-space: nowrap; }

/* --- Stock et équilibre --- */
/* « Mettre à jour mon stock » : une ligne par badge (nom à gauche, champ à droite), ligne modifiée repérée. */
.ea-stock-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 10px;
    border-left: 4px solid transparent;
}
.ea-stock-row > * { min-width: 0; }
.ea-stock-row + .ea-stock-row { margin-top: 4px; }
/* Prise en charge rappelée sous son badge (case « déjà récoltée ») */
.ea-stock-commitment { padding: 0 8px 0 44px; margin-top: -2px; margin-bottom: 4px; font-size: .875rem; }
.ea-stock-commitment .mud-checkbox { margin: 0; }
.ea-stock-commitment + .ea-stock-row { margin-top: 4px; }
/* Texte qui ouvre un détail au survol ou au toucher (« et 2 autres ») */
.ea-more { text-decoration: underline dotted; cursor: pointer; }
.ea-stock-row.ea-changed {
    border-left-color: var(--mud-palette-primary);
    background: color-mix(in srgb, var(--mud-palette-primary) 10%, transparent);
}
.ea-stock-name { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.ea-stock-hint { display: block; font-size: .8rem; font-weight: 400; color: var(--mud-palette-text-secondary); }

/* Écrans de saisie ligne par ligne (stock) : largeur limitée sur PC pour garder le champ près du nom. */
.ea-narrow { max-width: 760px; }

/* Précisions sous un badge du tableau d'équilibre (trop tard pour produire). */
.ea-balance-note { font-size: .8rem; margin-top: 4px; }
.ea-balance-note .ea-sub { display: block; }

/* Tableau large dans une carte : il défile en lui-même, sans élargir la page. */
.ea-scroll-x { max-width: 100%; overflow-x: auto; }

/* --- Tableau de pilotage (§ 6.5, 6.6) --- */
.ea-coverage { font-weight: 700; font-variant-numeric: tabular-nums; }
.ea-shortfall { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--mud-palette-info); }
.ea-warning-text { color: var(--mud-palette-warning) !important; }
.ea-bottleneck { border-left: 4px solid var(--mud-palette-error) !important; }
/* Cartes mobiles : liseré de la couleur de l'indicateur (en plus de la pastille, qui porte l'icône et le libellé). */
/* Tableau de pilotage (PC) : la colonne des badges garde une largeur lisible */
.ea-piloting td:first-child { min-width: 220px; }
.ea-piloting-card { border-left: 4px solid transparent !important; }
.ea-piloting-card.ea-indicator-bottleneck { border-left-color: var(--mud-palette-error) !important; }
.ea-piloting-card.ea-indicator-toproduce { border-left-color: var(--mud-palette-info) !important; }
.ea-piloting-card.ea-indicator-balanced { border-left-color: var(--mud-palette-success) !important; }
.ea-piloting-card.ea-indicator-overproduction { border-left-color: var(--mud-palette-warning) !important; }

/* --- Historique des mises à jour du stock --- */
.ea-history-entry { padding-bottom: 8px; border-bottom: 1px solid var(--mud-palette-lines-default); }
.ea-history-entry:last-child { border-bottom: 0; padding-bottom: 0; }

/* --- Éditeur du puits (modèle et aventure) --- */
.ea-pit-encounter .mud-card-header { padding-bottom: 0; }
.ea-pit-requirement {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 96px auto;
    align-items: center;
    gap: 8px;
}
.ea-pit-requirement + .ea-pit-requirement { margin-top: 6px; }
.ea-pit-actions { display: flex; align-items: center; }
.ea-pit-actions .mud-icon-button { padding: 4px; }

/* Stocks de la confrérie : stock pas mis à jour depuis le début des Chemins. */
.ea-stale { color: var(--mud-palette-warning); font-weight: 700; }
/* Sur téléphone : le badge prend toute la largeur (noms longs), quantité et flèches en dessous. */
@media (max-width: 599.98px) {
    .ea-pit-requirement { grid-template-columns: 110px 1fr; row-gap: 4px; }
    .ea-pit-requirement > .ea-pit-actions { justify-self: end; }
    .ea-pit-requirement > :first-child { grid-column: 1 / -1; }
    .ea-pit-requirement + .ea-pit-requirement { margin-top: 14px; }
}

/* Onglets Cigales / Fourmis / Confrérie du tableau de pilotage : les trois tiennent sur un téléphone
   (avec MinimumTabWidth="0px" dans la page : sinon 160 px par onglet, et le troisième passe derrière une flèche). */
.ea-scope-tabs .mud-tab {
    flex: 1 1 0;
    padding-left: 8px;
    padding-right: 8px;
}

/* --- Fenêtre « Je prends en charge » : changements survenus depuis l'ouverture --- */
.ea-situation-changes { margin: 4px 0; padding-left: 1.25rem; }
/* Confirmation (« Valider quand même / Ajuster à N / Annuler ») : boutons empilés sur mobile. */
.ea-conflict-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; width: 100%; }
@media (max-width: 600px) {
    .ea-conflict-actions { flex-direction: column-reverse; }
    .ea-conflict-actions > .mud-button-root { width: 100%; margin: 0 !important; }
}

/* --- Astuces --- */
.ea-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ea-tip-card-link { display: block; color: inherit; text-decoration: none; border-radius: var(--mud-default-borderradius); }
.ea-tip-card-link:focus-visible { outline: 2px solid var(--mud-palette-primary); outline-offset: 2px; }
.ea-tip-card { overflow: hidden; transition: border-color .15s; }
.ea-tip-card-link:hover .ea-tip-card { border-color: var(--ea-gold); }
.ea-tip-cover { display: block; width: 100%; max-height: 200px; object-fit: cover; }
.ea-tip-card-title, .ea-tip-title { overflow-wrap: anywhere; }

/* Contenu d'une astuce (HTML nettoyé) et zone de saisie de l'éditeur : même présentation. */
.ea-tip-content, .ea-rich-editor .ql-editor { font-size: 1rem; line-height: 1.6; overflow-wrap: anywhere; }
.ea-tip-content h2, .ea-rich-editor .ql-editor h2 { font-family: var(--mud-typography-h5-family); font-size: 1.35rem; margin: 1.2em 0 .4em; }
.ea-tip-content h3, .ea-rich-editor .ql-editor h3 { font-family: var(--mud-typography-h6-family); font-size: 1.15rem; margin: 1em 0 .3em; }
.ea-tip-content p { margin: 0 0 .8em; }
.ea-tip-content ul, .ea-tip-content ol { margin: 0 0 .8em; padding-left: 1.6em; }
.ea-tip-content blockquote, .ea-rich-editor .ql-editor blockquote {
    margin: 0 0 .8em; padding: .3em 1em; border-left: 4px solid var(--ea-gold);
    background: color-mix(in srgb, var(--ea-gold) 8%, transparent); color: var(--mud-palette-text-primary);
}
.ea-tip-content a, .ea-comment-text a { color: var(--mud-palette-primary-lighten, var(--mud-palette-primary)); text-decoration: underline; }
.ea-tip-content img, .ea-rich-editor .ql-editor img { display: block; max-width: 100%; height: auto; margin: .6em 0; border-radius: 6px; }

/* Éditeur Quill habillé aux couleurs du thème (clair ou sombre). */
.ea-rich-editor .ql-toolbar.ql-snow, .ea-rich-editor .ql-container.ql-snow { border-color: var(--mud-palette-lines-inputs); }
.ea-rich-editor .ql-toolbar.ql-snow { border-radius: 6px 6px 0 0; background: var(--mud-palette-background-gray); }
.ea-rich-editor .ql-container.ql-snow { border-radius: 0 0 6px 6px; font: inherit; }
.ea-rich-editor .ql-editor { min-height: 260px; color: var(--mud-palette-text-primary); }
.ea-rich-editor .ql-editor.ql-blank::before { color: var(--mud-palette-text-secondary); font-style: normal; }
.ea-rich-editor .ql-snow .ql-stroke { stroke: var(--mud-palette-text-primary); }
.ea-rich-editor .ql-snow .ql-fill { fill: var(--mud-palette-text-primary); }
.ea-rich-editor .ql-snow .ql-picker { color: var(--mud-palette-text-primary); }
.ea-rich-editor .ql-snow .ql-picker-options { background: var(--mud-palette-surface); }
.ea-rich-editor .ql-snow button:hover .ql-stroke, .ea-rich-editor .ql-snow button.ql-active .ql-stroke { stroke: var(--ea-gold); }
.ea-rich-editor .ql-snow button:hover .ql-fill, .ea-rich-editor .ql-snow button.ql-active .ql-fill { fill: var(--ea-gold); }
.ea-rich-editor .ql-snow .ql-picker-label:hover, .ea-rich-editor .ql-snow .ql-picker-label.ql-active { color: var(--ea-gold); }
.ea-rich-editor .ql-snow .ql-tooltip { background: var(--mud-palette-surface); color: var(--mud-palette-text-primary); border-color: var(--mud-palette-lines-default); z-index: 5; }
.ea-rich-editor .ql-snow .ql-tooltip input[type=text] { background: var(--mud-palette-background); color: var(--mud-palette-text-primary); border-color: var(--mud-palette-lines-inputs); }
/* Boutons de la barre d'outils assez grands pour le doigt sur mobile. */
.ea-rich-editor .ql-toolbar.ql-snow { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; }
.ea-rich-editor .ql-toolbar.ql-snow button { width: 36px; height: 36px; padding: 6px; }
.ea-rich-editor .ql-toolbar.ql-snow .ql-formats { margin-right: 8px; }

/* Commentaires : texte simple, retours à la ligne conservés. */
.ea-comment-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.ea-emoji-toggle { min-width: 44px; height: 44px; font-size: 1.4rem; line-height: 1; }
.ea-emoji-grid { width: fit-content; display: grid; grid-template-columns: repeat(8, 44px); gap: 2px; padding: 6px; max-width: calc(100vw - 32px); }
@media (max-width: 420px) { .ea-emoji-grid { grid-template-columns: repeat(6, 44px); } }
.ea-emoji {
    width: 44px; height: 44px; font-size: 1.5rem; line-height: 1; cursor: pointer;
    background: none; border: 0; border-radius: 8px;
}
.ea-emoji:hover, .ea-emoji:focus-visible { background: var(--mud-palette-action-default-hover); outline: none; }

/* --- Aide --- */
.ea-help-panel { max-width: 100vw; }
@media (max-width: 599.98px) { .ea-help-panel.mud-drawer { width: 100vw !important; } }
.ea-help-panel-header { position: sticky; top: 0; background: var(--mud-palette-surface); z-index: 1; }
.ea-help-panel-body { overflow-y: auto; }
.ea-help-content { line-height: 1.6; overflow-wrap: anywhere; }
.ea-help-content h1 { display: none; } /* le titre est déjà affiché par la page ou le panneau */
.ea-help-content h2 { font-family: var(--mud-typography-h5-family); font-size: 1.3rem; margin: 1.2em 0 .4em; }
.ea-help-content h3 { font-family: var(--mud-typography-h6-family); font-size: 1.1rem; margin: 1em 0 .3em; }
.ea-help-content p, .ea-help-content ul, .ea-help-content ol, .ea-help-content table { margin: 0 0 .8em; }
.ea-help-content ul, .ea-help-content ol { padding-left: 1.5em; }
.ea-help-content li { margin-bottom: .25em; }
.ea-help-content a { color: var(--mud-palette-primary-lighten, var(--mud-palette-primary)); text-decoration: underline; }
.ea-help-content img { display: block; max-width: 100%; height: auto; margin: .6em 0 1em; border: 1px solid var(--mud-palette-lines-default); border-radius: 6px; }
.ea-help-content blockquote { margin: 0 0 .8em; padding: .3em 1em; border-left: 4px solid var(--ea-gold); background: color-mix(in srgb, var(--ea-gold) 8%, transparent); }
.ea-help-content table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.ea-help-content th, .ea-help-content td { border-bottom: 1px solid var(--mud-palette-lines-default); padding: 4px 6px; text-align: left; vertical-align: top; }
.ea-help-content code { font-size: .9em; padding: 0 .25em; border-radius: 4px; background: var(--mud-palette-background-gray); }
.ea-help-content .task-list-item { list-style: none; margin-left: -1.3em; }
.ea-help-content .task-list-item-checkbox { margin-right: .5em; accent-color: var(--mud-palette-primary); }
.ea-help-content h3[id], .ea-help-content h2[id] { scroll-margin-top: 80px; }
/* Passage réservé aux responsables : encadré doré, avec son intitulé. */
.ea-help-content .responsables {
    margin: 0 0 1em; padding: .6em 1em .2em; border: 1px solid var(--ea-gold); border-radius: 6px;
    background: color-mix(in srgb, var(--ea-gold) 7%, transparent);
}
.ea-help-content .responsables::before {
    content: "Réservé aux responsables"; display: block; margin-bottom: .3em;
    font-size: .8rem; font-weight: 700; letter-spacing: .03em; color: var(--ea-gold);
}

/* Mot du vocabulaire et son ⓘ (définition du glossaire au survol ou au toucher). */
.ea-term { display: inline-flex; align-items: center; white-space: nowrap; }
.ea-term-info {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    width: 1.15em; height: 1.15em; margin-left: .2em; padding: 0; border: 0; background: none; cursor: help;
    line-height: 1; color: var(--ea-gold); vertical-align: middle; flex: none;
}
/* Zone tactile agrandie à 44 px autour du ⓘ, sans déplacer le texte. */
.ea-term-info::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); }
.ea-term-info:focus-visible { outline: 2px solid var(--mud-palette-primary); border-radius: 50%; }
.ea-term-popover { max-width: min(320px, calc(100vw - 24px)); white-space: normal; }
.ea-term-info .ea-term-icon { width: 100%; height: 100%; font-size: inherit; }
.ea-help-index { list-style: none; margin: 0 0 .5em; padding: 0; }
.ea-help-index li { display: flex; align-items: center; gap: 10px; min-height: 44px; border-bottom: 1px solid var(--mud-palette-lines-default); }
.ea-help-index a { color: var(--mud-palette-text-primary); text-decoration: none; flex: 1; padding: 10px 0; }
.ea-help-index a:hover, .ea-help-index a:focus-visible { color: var(--ea-gold); text-decoration: underline; }
.ea-help-tag { font-size: .75rem; padding: 1px 8px; border: 1px solid var(--ea-gold); border-radius: 10px; color: var(--ea-gold); }
