/* Section Expérience et aging : onglets, réglages, résultats, tables. Composants communs dans /assets/site.css. */
.onglets { margin: 4px 0 14px; }
.onglets a { font-weight: 600; }

.xp { display: grid; gap: 14px; max-width: 760px; }
/* Calculateur d'XP : tant que le script ne l'a pas construit, sa place est gardée, à la hauteur qu'il prend (mesurée le
   08/11/2026, la même pour chaque serveur et chaque langue : trois champs sur une ligne, puis sur deux sous 381 px). La
   table, dessous, ne saute pas à son arrivée (CLS). Le calculateur d'aging arrive, lui, déjà écrit dans la page. */
#xp:empty { min-height: 362px; }
@media (max-width: 479px) { #xp:empty { min-height: 356px; } }
@media (max-width: 380px) { #xp:empty { min-height: 428px; } }
.xp .bloc { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 14px; min-width: 0; display: grid; gap: 12px; }
.xp .ligne { display: grid; gap: 10px; }
.xp .ligne.deux { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.xp .ligne.trois { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
.xp .champ { display: grid; gap: 4px; font-size: 13px; color: var(--doux); min-width: 0; align-content: start; }
/* Bord des champs à 3,5:1 sur la carte : la zone de saisie se voit (WCAG 1.4.11). */
.xp select, .xp input { width: 100%; min-width: 0; font: inherit; font-size: 16px; color: var(--texte); background: #fffdf8;
  border: 1px solid var(--bord-champ); border-radius: 8px; padding: 8px 10px; }
.xp input[aria-invalid=true] { border-color: var(--alerte); }
.xp select:focus, .xp input:focus, .xp button:focus-visible, .onglets a:focus-visible { outline: 2px solid var(--bleu); outline-offset: 1px; }
.xp select:disabled { opacity: .55; }
.xp .erreur { color: var(--alerte); font-size: 13px; margin: -6px 0 0; }
.xp .note { margin: 0; font-size: 13px; }
/* Repli marqué (.repli et .legende-repli de site.css) : une table ou une règle que le serveur ne publie pas est la plus
   proche ; l'astérisque suit la valeur, et la ligne de légende ferme le bloc ou ouvre les notes, sans marge de plus. */
.xp .legende-repli, #xp-notes .legende-repli, #ag-notes .legende-repli { margin: 0; }
.xp .raccourcis { margin: 0; }
.xp .raccourcis button { font-size: 13px; padding: 4px 11px; }

/* Calculateur d'XP : un chiffre principal, le temps en second. */
.xp .resultat { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; background: #f6efe2; border-radius: 8px; padding: 10px 12px; }
.xp .resultat > span { font-size: 13px; color: var(--doux); }
.xp .resultat strong { font-size: clamp(20px, 5.5vw, 26px); color: var(--bleu); font-variant-numeric: tabular-nums; text-align: right; min-width: 0; margin-left: auto; }
.xp .resultat strong.petit { font-size: 15px; color: var(--doux); font-weight: 600; }
.xp .resultat.second strong { font-size: 18px; color: var(--texte); }

/* Calculateur d'aging. */
.xp .resultats { display: grid; gap: 10px; }
.xp .chiffres { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.xp .chiffres div { background: #f6efe2; border-radius: 8px; padding: 8px 10px; min-width: 0; }
.xp .chiffres dt { font-size: 12px; color: var(--doux); }
.xp .chiffres dd { margin: 0; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.xp .chiffres dd small { display: inline-block; font-size: 13px; font-weight: 600; color: var(--doux); }
.xp .chiffres .fort { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.xp .chiffres .fort dt { font-size: 13px; }
.xp .chiffres .fort dd { font-size: 26px; color: var(--bleu); margin-left: auto; }
.xp .sheltoms-attendus > span { display: block; font-size: 12px; color: var(--doux); margin-bottom: 4px; }
.xp .sheltoms-attendus ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.xp .sheltoms-attendus li { background: #f6efe2; border-radius: 999px; padding: 3px 10px; font-size: 14px; font-variant-numeric: tabular-nums; }
.xp .comparaison, .xp .gain { margin: 0; font-size: 14px; }
.xp .gain strong { color: var(--brun); }
/* Pierre (laquelle, puis à partir de quand) et cuivre : sur une ligne en bureau, l'un sous l'autre sur téléphone. */
.xp .ligne.objets { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
/* Aging d'un objet, replié (« + ») : niveau et stats saisis côte à côte, le résultat dessous. */
.xp .inverse { font-size: 14px; }
.xp .inverse > summary { list-style: none; cursor: pointer; color: var(--bleu); font-weight: 600; width: fit-content; padding: 4px 0; }
.xp .inverse > summary::-webkit-details-marker { display: none; }
.xp .inverse > summary::before { content: '+ '; }
.xp .inverse[open] > summary::before { content: '- '; }
.xp .inverse > summary:focus-visible { outline: 2px solid var(--bleu); outline-offset: 2px; }
.xp .inverse .ligne.stats { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); margin-top: 8px; }
.xp .inverse-resultat { margin: 10px 0 0; }
.xp .inverse-resultat:empty { display: none; }

/* Tables : en-têtes de ligne lisibles et figés à gauche quand la table défile en largeur ; les en-têtes de colonne
   passent à la ligne plutôt que d'élargir la table. La table d'XP (jusqu'à 185 lignes) défile dans son cadre, en-tête
   figé ; la table d'aging (25 lignes au plus) suit la page, sans second défilement. */
.titre-table { margin-top: 24px; }
.table-xp { max-height: 75vh; }
.table-xp thead th, .table-aging thead th { white-space: normal; vertical-align: bottom; }
/* En-têtes sans mot seul sur une ligne (lierEntete, aging-vue.mjs : « incl. +2 » et « With Aging Stone » d'un bloc, « With
   Superior / Copper Ore ») ; la colonne d'un en-tête de quatre mots garde la place des deux premiers. */
.table-aging thead th.ref { min-width: 7.6em; }
.tableau tbody th { position: sticky; left: 0; top: auto; z-index: 0; background: var(--carte); color: var(--texte); font-weight: 700; font-size: 14px; }
.tableau tbody tr:nth-child(even) th { background: #fbf6ec; }
.tableau thead th:first-child { left: 0; z-index: 2; }
/* Lignes surlignées : sur les cellules, pour passer devant les rayures des lignes paires (règles plus précises). */
.tableau tbody tr.actuel > td, .tableau tbody tr.actuel > th { background: #fde7b0; }
.tableau tbody tr.vise > td, .tableau tbody tr.vise > th { background: #d9e7f8; }
.tableau tbody tr.dans > td, .tableau tbody tr.dans > th { background: #f8ecd2; }
/* Valeur supposée : en italique et suivie d'un astérisque (expliqué par la légende sous la table), dans la couleur du texte. */
.tableau td.suppose { font-style: italic; }
.tableau td.utilisee { font-weight: 700; color: var(--bleu); }
.tableau td.evitee { text-decoration: line-through; }
.tableau td.sheltoms { font-size: 13px; white-space: normal; min-width: 15em; }
#xp-notes, #ag-notes { margin-top: 12px; display: grid; gap: 6px; max-width: 760px; }
#xp-notes .note, #ag-notes .note { font-size: 13px; margin: 0; }
/* Lien vers le guide de l'expérience : une note de plus, sous celles du serveur. */
#xp-guide { font-size: 13px; margin: 6px 0 0; max-width: 760px; }

/* Pertes à la mort : le nombre entier, et sur téléphone sa notation courte (« 4,95 bi ») pour que les cinq colonnes
   tiennent ; celle qui est cachée n'est pas lue non plus. */
.table-xp .court { display: none; }

/* Téléphone : la table d'aging garde réussite, échecs et tentatives attendues ; chances avec pierre ou minerai,
   sheltoms et or d'une tentative en sont retirés (les totaux de la série restent dans les résultats), les chiffres
   sont plus serrés : pas de défilement en largeur. */
@media (max-width: 640px) {
  .table-aging .large { display: none; }
}
/* Téléphone : la table d'XP suit la page (un seul défilement, et pas de barre de défilement qui mange la largeur). */
@media (max-width: 560px) {
  .table-xp { max-height: none; }
  .table-xp .exact { display: none; }
  .table-xp .court { display: inline; }
}
@media (max-width: 480px) {
  .xp .ligne.empile { grid-template-columns: minmax(0, 1fr); }
  .table-xp .tableau, .table-aging .tableau { font-size: 12.5px; }
  .table-xp .tableau th, .table-xp .tableau td, .table-aging .tableau th, .table-aging .tableau td { padding: 6px 5px; }
  .table-xp .tableau thead th, .table-aging .tableau thead th { font-size: 12px; }
  .table-xp .tableau tbody th, .table-aging .tableau tbody th { font-size: 12.5px; padding-left: 7px; }
}
/* 400 px et moins (390, 375, 360) : chiffres de 12 px, marges de 3 px, chiffres un peu resserrés ; à 375 px, les cinq
   colonnes de l'EPT (jusqu'à 189.616.201.000.000) tiennent encore. */
@media (max-width: 400px) {
  .table-xp .tableau, .table-aging .tableau, .table-xp .tableau tbody th, .table-aging .tableau tbody th { font-size: 12px; }
  .table-xp .tableau th, .table-xp .tableau td, .table-aging .tableau th, .table-aging .tableau td { padding: 6px 3px; }
  .table-xp .tableau td { letter-spacing: -0.2px; }
}
@media (max-width: 380px) {
  .xp .ligne.trois { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .xp .ligne.trois > :first-child { grid-column: 1 / -1; }
}
