/* Overlay Dofus Retro : par-dessus les jetons du guide (guide/assets/css/style.css).
   Boutons-icônes dorés repris du jeu Teckium IDLE RPG (game/assets/css/refonte.css, refonte-v3.css). */
:root {
  --or-1: #f8dd8a; --or-2: #e2a93b; --or-3: #a8711c;
  --or-trait: rgba(226, 169, 59, .42); --or-trait-fort: rgba(248, 221, 138, .75);
  --cac: #E5596B; --neutre: #F5B52E; --distance: #5B8DEF;
}

.or-ic { width: 20px; height: 20px; flex: none; fill: currentColor; color: var(--or-1); filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .6)); }

/* ---------- Page de lancement ---------- */

.or-lance { display: grid; place-items: center; min-height: 100vh; margin: 0; padding: 16px; background: var(--bg-base); color: var(--fg); font-family: var(--font); }
.or-lance__boite { width: 100%; max-width: 440px; display: grid; gap: 16px; }
.or-lance h1 { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
.or-lance__texte { margin: 0; color: var(--fg-muted); line-height: 1.5; }
.or-lance__liste { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.or-lance__liste li { display: flex; align-items: center; gap: 10px; }
.or-lance .btn { justify-self: start; }
.or-badge { justify-self: start; margin: 0; padding: 3px 10px; border-radius: 999px; font-size: 12px; color: var(--warn); box-shadow: inset 0 0 0 1px rgba(250, 204, 21, .35); }

/* ---------- Overlay ---------- */

.or-app { display: flex; flex-direction: column; color: var(--fg); font-family: var(--font); }
.or-barre { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--border); background: var(--bg-elevated); }
/* Choix du jeu (comme le menu Outils du site), puis les icônes de ses outils sur la ligne du dessous */
.or-jeux { flex: 1; min-width: 0; display: flex; gap: 4px; padding: 3px; border-radius: 999px; background: rgba(0, 0, 0, .3); box-shadow: inset 0 0 0 1px var(--or-trait); }
.or-jeux button { flex: 1; min-width: 0; padding: 5px 8px; border: 0; border-radius: 999px; cursor: pointer; background: none; color: var(--fg-muted); font: 500 12.5px var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color var(--fast) var(--ease), background-color var(--fast) var(--ease); }
.or-jeux button:hover { color: var(--fg); }
.or-jeux button.is-active { color: #1a1205; font-weight: 600; background: linear-gradient(135deg, #fde68a, #f5b52e 55%, #e2a93b); }
.or-jeux button:focus-visible { outline: 2px solid var(--or-1); outline-offset: 1px; }
.or-barre .or-onglets { flex-basis: 100%; }
#jeux { display: none; }  /* puces de jeu de la vue Guide : c'est le jeu choisi en haut qui compte */
.or-onglets { display: flex; gap: 6px; }
.or-onglet {
  display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, rgba(255, 236, 190, .14), rgba(0, 0, 0, .45));
  box-shadow: inset 0 0 0 1px var(--or-trait); opacity: .7;
  transition: opacity var(--fast) var(--ease), box-shadow var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.or-onglet:hover { opacity: 1; }
.or-onglet:active { transform: scale(.94); }
.or-onglet.is-active { opacity: 1; box-shadow: inset 0 0 0 2px var(--or-trait-fort), 0 0 12px rgba(226, 169, 59, .25); }
.or-onglet:focus-visible, .or-grand:focus-visible, .or-ligne:focus-visible, .or-paquet:focus-visible, .or-retour:focus-visible {
  outline: 2px solid var(--or-1); outline-offset: 2px;
}
.or-titre { flex: 1; min-width: 0; font-weight: 600; color: var(--or-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.or-grand { display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px; border-radius: var(--radius-sm); font-size: 12px; color: var(--fg-muted); text-decoration: none; white-space: nowrap; }
.or-grand svg { width: 14px; height: 14px; fill: currentColor; }
.or-grand:hover { color: var(--fg); background: var(--surface-hover); }

.or-vue { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.or-vue[hidden] { display: none; }
.or-liste { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 10px 12px; display: grid; align-content: start; gap: 6px;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent; }
.or-liste[hidden] { display: none; }
.or-vide { margin: 8px 2px; color: var(--fg-muted); line-height: 1.5; }
.or-vide strong { color: var(--fg); }
.or-groupe { margin: 6px 2px 0; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--fg-muted); }

.or-ligne { display: grid; gap: 2px; width: 100%; padding: 10px 12px; border: 0; border-radius: var(--radius-sm); cursor: pointer; text-align: left;
  background: var(--surface); color: var(--fg); font: inherit; box-shadow: inset 0 0 0 1px var(--border); }
.or-ligne:hover { background: var(--surface-hover); box-shadow: inset 0 0 0 1px var(--or-trait); }
.or-ligne__nom { font-weight: 500; }
.or-ligne__info { font-size: 12px; color: var(--fg-muted); }

/* Lecteur du guide sous la barre (le mode compact du guide prend tout l'écran sinon) */
.or-lecteur { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.or-lecteur[hidden] { display: none; }
.or-lecteur #player { flex: 1; min-height: 0; }
.or-lecteur .player--compact { height: 100%; }
.or-retour { flex: none; align-self: start; margin: 6px 8px 0; padding: 4px 8px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--fg-muted); font: 12px var(--font); cursor: pointer; }
.or-retour:hover { color: var(--fg); background: var(--surface-hover); }

/* Recherche et filtres */
.or-filtres { flex: none; display: grid; gap: 6px; padding: 8px 10px 0; }
.or-filtres .or-recherche { margin: 0; }
.or-recherche { flex: none; display: flex; align-items: center; gap: 8px; margin: 8px 10px 0; padding: 0 10px; border-radius: var(--radius-sm); background: var(--bg-input); box-shadow: inset 0 0 0 1px var(--border-hover); }
.or-recherche:focus-within { box-shadow: inset 0 0 0 1px var(--or-trait-fort); }
.or-recherche .or-ic { width: 16px; height: 16px; opacity: .8; }
.or-recherche input { flex: 1; min-width: 0; height: 36px; border: 0; background: none; color: var(--fg); font: 14px var(--font); outline: none; }
.or-filtres select { height: 34px; padding: 0 8px; border: 0; border-radius: var(--radius-sm); background: var(--bg-input); color: var(--fg); font: 14px var(--font); box-shadow: inset 0 0 0 1px var(--border-hover); }

.or-filtres[hidden] { display: none; }
/* Boutons de choix (jeu, portée, placement), dorés quand ils sont choisis comme les onglets */
.or-puces { display: flex; flex-wrap: wrap; gap: 4px; }
.or-puces button {
  display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--surface); color: var(--fg-muted); font: 500 12px var(--font); box-shadow: inset 0 0 0 1px var(--border-hover);
  transition: color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.or-puces button:hover { color: var(--fg); }
.or-puces button.is-active { color: var(--or-1); background: rgba(226, 169, 59, .1); box-shadow: inset 0 0 0 1px var(--or-trait-fort); }
.or-puces button:focus-visible, .or-plus:focus-visible { outline: 2px solid var(--or-1); outline-offset: 2px; }
.or-n { font-variant-numeric: tabular-nums; opacity: .7; }
.or-point { display: inline-block; width: 8px; height: 8px; border-radius: 3px; }
.p-cac { background: var(--cac); }
.p-neutre { background: var(--neutre); }
.p-distance { background: var(--distance); }
.or-compte { flex: none; margin: 8px 12px 0; font-size: 12px; color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.or-plus { justify-self: center; margin-top: 4px; padding: 6px 14px; border: 0; border-radius: var(--radius-sm); cursor: pointer;
  background: var(--surface); color: var(--fg); font: 13px var(--font); box-shadow: inset 0 0 0 1px var(--or-trait); }
.or-plus:hover { background: var(--surface-hover); }

/* Maps */
.or-map { display: grid; gap: 8px; padding: 10px; border-radius: var(--radius-sm); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.or-map h3 { margin: 0; font-size: 14px; font-weight: 600; }
.or-map .coord { font-family: var(--mono); color: var(--or-1); }
.or-map__zone { margin: 2px 0 6px; font-size: 12px; color: var(--fg-muted); }
.or-map__chiffres { margin: 6px 0 0; font-size: 12px; color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.or-map__chiffres strong { color: var(--fg); font-weight: 500; }
.or-tags { display: flex; gap: 6px; }
.or-tag { padding: 2px 8px; border-radius: 999px; font-size: 12px; background: var(--surface-hover); }
.t-cac { color: #F7A3AE; background: rgba(229, 89, 107, .12); box-shadow: inset 0 0 0 1px rgba(229, 89, 107, .35); }
.t-neutre { color: #F9D27A; background: rgba(245, 181, 46, .10); box-shadow: inset 0 0 0 1px rgba(245, 181, 46, .32); }
.t-distance { color: #A9C4F7; background: rgba(91, 141, 239, .12); box-shadow: inset 0 0 0 1px rgba(91, 141, 239, .35); }
/* Style du mode tactique du jeu (maps/style.css) */
svg.tactique { display: block; width: 100%; height: auto; }
svg.tactique polygon { stroke-linejoin: round; }
svg.tactique .sol1 { fill: #9db262; stroke: #c5d496; stroke-width: .8; }
svg.tactique .sol2 { fill: #a6ba6b; stroke: #c5d496; stroke-width: .8; }
svg.tactique .rouge { fill: #ff0000; stroke: #ff6a6a; stroke-width: .8; }
svg.tactique .bleue { fill: #0000ff; stroke: #6a6aff; stroke-width: .8; }
svg.tactique .trou { fill: #15181b; }
svg.tactique .trou-bord { fill: #6c7a83; }
svg.tactique .bloc-h { fill: #6f8794; stroke: #8fa5b0; stroke-width: .6; }
svg.tactique .bloc-g { fill: #c4d0d6; }
svg.tactique .bloc-d { fill: #e6edf0; }

/* Paquets */
.or-paquet { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--fg); text-decoration: none; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.or-paquet:hover { background: var(--surface-hover); box-shadow: inset 0 0 0 1px var(--or-trait); }
.or-paquet img, .or-paquet__img { width: 34px; height: 34px; flex: none; object-fit: contain; }
.or-paquet__nom { flex: 1; min-width: 0; font-size: 13px; }
.or-paquet__prix { display: grid; justify-items: end; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--or-1); white-space: nowrap; }
.or-paquet__prix em { font-style: italic; color: var(--fg-muted); font-size: 12px; }
.or-paquet__joueurs { font-size: 11px; color: var(--fg-muted); }
.or-paquet__nom > span { display: block; }
.or-paquet__offres { font-size: 11px; color: var(--ok); }
/* Achats / ventes : liens vers la page du marché (connexion Discord, chat) */
.or-actions { flex: none; display: flex; gap: 6px; padding: 8px 10px 0; }
.or-actions[hidden] { display: none; }
.or-action { flex: 1; padding: 7px 10px; border-radius: var(--radius-sm); text-align: center; font-size: 13px; color: var(--or-1); text-decoration: none;
  background: rgba(226, 169, 59, .08); box-shadow: inset 0 0 0 1px var(--or-trait); }
.or-action:hover { box-shadow: inset 0 0 0 1px var(--or-trait-fort); }
.or-action:focus-visible { outline: 2px solid var(--or-1); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) { .or-onglet, .or-puces button { transition: none; } }

/* Maps : explication du filtre Fourbe */
.or-aide { margin: 0; font-size: 12px; color: var(--fg-subtle, #8F93A3); }

/* 🛠️ Onglet Atelier de craft : la page /atelier/?overlay=1 dans un cadre qui prend toute la place (29/10/2026) */
.or-atelier { flex: 1; min-height: 0; width: 100%; border: 0; display: block; background: transparent; }

/* 🖱️ Barres de défilement de l'overlay (29/10/2026, demande de Julien) : la barre fine du navigateur était dure à attraper
   (il fallait viser son bord). Barre dorée de 12 px, au style de l'overlay ; Chrome n'applique ::-webkit-scrollbar que si
   scrollbar-width et scrollbar-color restent à auto, d'où la remise à auto. Firefox garde une barre fine aux couleurs dorées. */
body.or-app *, body.or-app .player--compact .player__content { scrollbar-width: auto; scrollbar-color: auto; }
body.or-app ::-webkit-scrollbar { width: 12px; height: 12px; }
body.or-app ::-webkit-scrollbar-track { background: rgba(0, 0, 0, .3); border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(226, 169, 59, .15); }
body.or-app ::-webkit-scrollbar-thumb { min-height: 40px; border: 2px solid transparent; border-radius: 999px; background-clip: padding-box;
  background-color: var(--or-2); background-image: linear-gradient(180deg, var(--or-1), var(--or-2) 55%, var(--or-3)); }
body.or-app ::-webkit-scrollbar-thumb:hover { border-width: 1px; background-color: var(--or-1); }
body.or-app ::-webkit-scrollbar-thumb:active { background-image: linear-gradient(180deg, #fde68a, var(--or-1)); }
body.or-app ::-webkit-scrollbar-corner { background: transparent; }
@supports (-moz-appearance: none) {
  body.or-app *, body.or-app .player--compact .player__content { scrollbar-width: thin; scrollbar-color: var(--or-2) rgba(0, 0, 0, .3); }
}
/* La fenêtre Picture-in-Picture prend le bord droit (5-6 px) pour le redimensionnement : la barre collée au bord ne se laissait
   attraper que par sa moitié gauche. On la décale de 8 px vers l'intérieur. */
body.or-app .or-vue { padding-right: 8px; }
/* 🔨 Bouton « Crafter » d'une fiche objet : l'envoie dans l'onglet Atelier */
.or-crafter { margin-left: 8px; padding: 3px 10px; border: 0; border-radius: 999px; cursor: pointer; font: 600 11px var(--font); letter-spacing: 0;
  text-transform: none; color: #1a1205; background: linear-gradient(135deg, #fde68a, #f5b52e 55%, #e2a93b); vertical-align: middle; }
.or-crafter:hover { filter: brightness(1.08); }
.or-crafter:focus-visible { outline: 2px solid var(--or-1); outline-offset: 2px; }

/* bouton retour (30/10/2026) et bulle « copié » du clic droit */
.or-retour-btn { border: 0; cursor: pointer; }
.or-retour-btn:disabled { opacity: .35; cursor: default; }
.or-bulle { position: fixed; left: 50%; bottom: 18px; transform: translate(-50%, 20px); padding: 8px 14px; border-radius: 10px; background: rgba(20, 18, 14, .95);
  border: 1px solid rgba(226, 169, 59, .5); color: #f3e6c8; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; }
.or-bulle.is-on { opacity: 1; transform: translate(-50%, 0); }

/* maps : favori et distance à ma position (30/10/2026) */
.or-fav { border: 0; background: none; color: #8a7650; font-size: 16px; line-height: 1; padding: 0 4px 0 0; cursor: pointer; vertical-align: -1px; }
.or-fav.is-on, .or-fav:hover { color: #e2a93b; }
.or-dist { font-size: 11px; font-weight: 600; color: #e2a93b; background: rgba(226, 169, 59, .12); border-radius: 6px; padding: 1px 6px; margin-left: 4px; white-space: nowrap; }
