/* ===== Foire marchande (js/foire.js) : même fenêtre que le raid (.dp.hs.rw), classes fo-* (docs/maquette_foire.html) ===== */
.panel.foire-panel[hidden] { display: none !important; }
.pfl-net .c-foire { background: #5fa8d3; }
#foire-dialog { width: min(96vw, 1180px); max-width: 96vw; max-height: 94dvh; padding: 0; border: 0; background: none; color: inherit; overflow: visible; }
#foire-dialog::backdrop { background: rgba(0, 0, 0, .7); }
.foire-panel #foire-alert { display: flex; flex-direction: column; gap: 10px; }
.foire-panel .raid-call { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 12px; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; }
.foire-panel .raid-call > img { width: 56px; height: 56px; object-fit: contain; }
.foire-panel .raid-call b { font: 17px/1.25 var(--font-title), serif; }
.foire-panel .raid-call div b { display: block; }
.foire-panel .raid-call small { display: block; margin-top: 4px; color: var(--muted); font-size: 16px; }
.foire-panel .raid-time { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.foire-panel .raid-time img { width: 22px; height: 22px; object-fit: contain; }
.foire-panel .raid-goal { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 8px; }
.foire-panel .raid-goal > img { width: 32px; height: 32px; object-fit: contain; }
.foire-panel .raid-goal .pg2-bar { margin: 0; }
.foire-panel .raid-next { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.foire-panel .raid-go { width: 100%; min-height: 44px; }
.fo-rew { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-width: 0; }
.fo-part { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.fo-part img { width: 30px !important; height: 30px !important; object-fit: contain; margin: 0; flex: none; }
.foire-panel .fo-part img { width: 24px !important; height: 24px !important; }

.fo .hs-ban { background: #1f4a7a; }
.fo .hs-tabs { display: flex; } .fo .hs-tab { flex: 1 1 auto; } .fo .hs-tab .sm { display: none; }
.fo .hs-tab img { width: 24px; height: 24px; object-fit: contain; margin-right: 6px; flex: none; }
.fo-tot { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 12px; background: #f7dc97; }
.fo-tot > img { width: 38px; height: 38px; object-fit: contain; }
.fo-tot .pg2-bar { height: 30px; margin: 0; }
.fo-rec { font: 17px/1.15 var(--font-title), serif; color: #2f6a32; white-space: nowrap; }
.fo-me2 { display: none; justify-content: space-between; gap: 8px; padding: 8px 4px 0; font: 17px/1.15 var(--font-title), serif; }
.fo-me2 b { font-weight: 400; }
.fo .rw-land { min-height: 190px; display: flex; align-items: center; justify-content: center; background: url("../img/foire/fond_bleu.png") center / cover; }
.fo.fo-combats .rw-land { background-image: url("../img/foire/fond_rouge.png"); }
.fo .rw-land > img.tw { position: static; width: 62%; height: auto; max-height: 180px; object-fit: contain; margin-bottom: 28px; }
.fo-me { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 14px; background: #f7dc97; }
.fo-me b, .fo-me i, .fo-pill b, .fo-pill i { font-weight: 400; font-style: normal; font-variant-numeric: tabular-nums; }
.fo-top { display: grid; grid-template-columns: 46px minmax(0, 1fr); align-items: center; column-gap: 10px; padding: 4px 10px; border-radius: 12px; background: linear-gradient(100deg, #7d1214, #b3322a); color: #fff; }
.fo .fo-top img { grid-row: 1 / 3; width: 46px; height: 46px; object-fit: contain; margin: 0; } .fo-top i { align-self: end; font: 16px/1.1 var(--font-title), serif; opacity: .9; } .fo-top b { font: 24px/1.1 var(--font-title), serif; text-shadow: 0 2px 0 rgba(0, 0, 0, .35); white-space: nowrap; }
.fo-pill { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 36px; box-sizing: border-box; padding: 2px 14px 2px 6px; border-radius: 999px; font: 17px/1 var(--font-title), serif; white-space: nowrap; }
.fo .fo-pill img { width: 28px; height: 28px; object-fit: contain; margin: 0; }
.fo-pill.rang { background: rgba(255, 246, 214, .85); } .fo-pill.or { background: rgba(233, 165, 32, .4); } .fo-pill.objets { background: rgba(176, 92, 190, .28); } .fo-pill.combats { background: rgba(217, 88, 74, .32); } .fo-pill.renom { background: rgba(120, 170, 80, .35); }
.fo .hs-foot > .fo-pill { display: inline-flex; min-height: 44px; padding: 4px 20px 4px 10px; font-size: 19px; } .fo .hs-foot > .fo-pill img { width: 32px; height: 32px; } .fo .hs-foot > .fo-pill b { font-size: 22px; } .fo .hs-foot > .fo-pill + .fo-pill { margin-right: auto; }
.dp.fo .rw-pane { height: clamp(240px, calc(94dvh - 440px), 372px); padding-right: 10px; box-sizing: border-box; }
.dp.fo .hs-foot { flex: none; min-height: 68px; box-sizing: border-box; }
.dp.fo .hs-foot .btn { min-height: 44px; font: 18px var(--font-title), serif; }
.dp.fo .hs-foot .btn.primary { padding-inline: 24px; }
.fo-note { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 12px; background: rgba(233, 185, 73, .35); font-size: 16px; }
.fo-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fo-act { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 6px; min-height: 128px; padding: 10px; border: 0; border-radius: 12px; background: rgba(214, 190, 140, .28); color: inherit; font: inherit; text-align: center; cursor: pointer; }
.fo-act.or { background: radial-gradient(ellipse at 50% 35%, rgba(255, 214, 90, .75), rgba(233, 165, 32, .28) 75%); } .fo-act.objets { background: radial-gradient(ellipse at 50% 35%, rgba(214, 140, 226, .6), rgba(176, 92, 190, .22) 75%); } .fo-act.combats { background: radial-gradient(ellipse at 50% 35%, rgba(240, 140, 110, .65), rgba(217, 88, 74, .24) 75%); }
.fo-act:hover { filter: brightness(1.04); }
.fo .fo-act img { width: 48px; height: 48px; object-fit: contain; margin: 0; }
html:not(.dark-win) .fo .fo-act small { color: #43260c; } .fo-act small { padding: 4px 14px; border-radius: 999px; background: rgba(255, 248, 225, .7); font-family: var(--font-title), serif; } html.dark-win .fo-act small { background: rgba(20, 12, 6, .55); }
.fo-bet .fo-pill { display: inline-flex; padding-right: 16px; } .fo-bet .fo-pill b { font-size: 20px; }
.fo-act b { font: 400 20px/1.1 var(--font-title), serif; }
.fo-act small, .fo-hero small { font-size: 16px; line-height: 1.25; color: #7a5a38; }
.fo-hero { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 14px; }
.dp.fo .rw-card.fo-hero { color: #fff; background: linear-gradient(90deg, rgba(40, 8, 8, .25), rgba(40, 8, 8, .72)), url("../img/foire/fond_rouge.png") center 30% / cover; } .fo .fo-hero b, .fo .fo-hero small, html.dark-win .fo .fo-hero small { color: #fff; text-shadow: 0 2px 2px rgba(0, 0, 0, .7); } .fo .fo-hero b { color: #ffe08a; }
.fo-hero img { width: 64px; height: 72px; object-fit: contain; }
.fo-hero b, .fo-hero small { display: block; } .fo-hero b { font: 400 20px/1.2 var(--font-title), serif; }
.fo-days { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; font: 18px/1.2 var(--font-title), serif; }
.dp.fo .rw-card.fo-story { position: relative; color: #fff; background: linear-gradient(90deg, rgba(30, 14, 4, .9), rgba(30, 14, 4, .74) 70%, rgba(30, 14, 4, .35)), url("../img/foire/decor_ville.webp") center 60% / cover; } .fo .fo-story h4, .fo .fo-story p { color: #fff; text-shadow: 0 2px 2px rgba(0, 0, 0, .6); } .fo .fo-story h4 { color: #ffe08a; }
.fo-bet { flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 14px; border-radius: 12px; color: #fff; background: radial-gradient(ellipse at 50% 50%, rgba(30, 14, 4, .8) 25%, rgba(30, 14, 4, .35) 100%), url("../img/foire/decor_ville.webp") center / cover; text-align: center; font-size: 17px; }
.fo-bet h4 { color: #ffe08a; text-shadow: 0 2px 2px rgba(0, 0, 0, .6); } .fo .fo-bet .fo-gain { color: #a6f2a4; } .fo-bet .fo-pill.or { background: rgba(233, 165, 32, .55); }
.fo .fo-bet > img { width: 72px; height: 72px; object-fit: contain; }
.fo-bet h4 { margin: 0; font: 400 22px/1.1 var(--font-title), serif; }
.fo-bet .btn { min-width: 200px; min-height: 46px; }
.fo-price, .fo-gain { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 22px/1 var(--font-title), serif; }
.fo-price img, .fo .fo-gain img { width: 26px; height: 26px; object-fit: contain; margin: 0; }
.fo-gain { color: #2f6a32; font-size: 19px; }
.fo-cmd { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 12px; }
.fo-cmd b { font: 400 18px var(--font-title), serif; } .fo-cmd small { margin-left: auto; font: 16px var(--font-title), serif; font-variant-numeric: tabular-nums; }
.fo-order { border: 0; color: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; background: rgba(120, 170, 80, .3); font: 16px var(--font-title), serif; }
.fo .fo-cmd img { width: 26px; height: 26px; object-fit: contain; }
.fo-order i { font-style: normal; } .fo-order:disabled { opacity: .55; cursor: default; } .fo-order.sel, html.dark-win .fo-order.sel { box-shadow: 0 0 0 3px #e9b949; }
.fo-order:focus-visible, .fo-q:focus-visible, .fo-all:focus-visible { outline: 2px solid #e9b949; outline-offset: 2px; }
/* Filtres : qualité (losange de couleur) et type (tuiles des recettes) */
.fo-qs { display: flex; flex-wrap: wrap; gap: 4px; }
.fo-q { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: none; cursor: pointer; }
.fo-q .q-dot { width: 15px; height: 15px; } .fo-q:hover { background: rgba(110, 92, 58, .2); } .fo-q.sel { background: #4a3520; box-shadow: 0 0 0 2px #e9b949; }
.fo-ts { flex: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 2px 3px; }
.dp.fo .fo-t.cat-tab.has-img { flex: 0 1 34px; width: auto; min-width: 0; height: auto; aspect-ratio: 1; } .dp.fo .fo-t img { margin: 0; }
.fo-all { flex: none; padding: 0 10px; border: 0; border-radius: 10px; background: rgba(110, 92, 58, .2); color: inherit; font: 16px/1 var(--font-title), serif; cursor: pointer; }
.fo-all.sel { background: #4a3520; color: #ffe9b0; box-shadow: 0 0 0 2px #e9b949; }
html.dark-win .fo-q:hover, html.dark-win .fo-all { background: rgba(255, 226, 170, .12); } html.dark-win .fo-q.sel, html.dark-win .fo-all.sel { background: #5a4429; }
.fo-tags { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fo-tag { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-content: center; align-items: center; column-gap: 8px; min-width: 0; min-height: 64px; box-sizing: border-box; padding: 4px 16px 4px 12px; border-radius: 32px; color: #fff; white-space: nowrap; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2); }
.fo .fo-tag > img { grid-row: 1 / 3; width: 36px; height: 36px; object-fit: contain; margin: 0; }
.fo-tag > i { font: 16px/1.2 var(--font-title), serif; overflow: hidden; text-overflow: ellipsis; }
.fo-tag > b { display: flex; align-items: center; gap: 8px; font: 22px/1.2 var(--font-title), serif; font-variant-numeric: tabular-nums; text-shadow: 0 2px 0 rgba(0, 0, 0, .3); }
.fo-tag em { display: inline-flex; align-items: center; gap: 4px; font: 17px/1.2 var(--font-title), serif; } .fo .fo-tag em img { width: 19px; height: 19px; object-fit: contain; margin: 0; }
.fo-tag > i em { margin-left: 8px; font-size: 16px; }
.fo-tag.now { background: #a3520f; } .fo-tag.stk { background: #79398f; } .fo-tag.bonus { background: #1f4a7a; } .fo-tag.ready { background: #226b32; }
.fo-pips { display: inline-flex; gap: 3px; } .fo-pips u { width: 12px; height: 12px; box-sizing: border-box; border: 2px solid rgba(255, 255, 255, .75); border-radius: 4px; } .fo-pips u.on { border-color: #fff; background: #ffd24a; }
.fo-ok { display: inline-flex; align-items: center; gap: 4px; } .fo .fo-ok img { width: 22px; height: 22px; object-fit: contain; margin: 0; } .fo-pips.full u { border-color: #fff; background: #57d06a; }
.fo-hid { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 2px 12px; border: 0; border-radius: 999px; background: rgba(110, 92, 58, .18); color: inherit; font: 16px/1.2 var(--font-title), serif; white-space: nowrap; cursor: pointer; } .fo-hid:focus-visible { outline: 2px solid #e9b949; } .fo-tags > .fo-hid { grid-column: 1 / -1; justify-self: center; background: #4a3520; color: #ffe9b0; } .hs-head .fo-hid { display: none; }
.hs-head > .fo-tags { display: none; }
/* Onglet actif : plus clair, sans barre (fenêtre de la Foire seulement) */
html.dark-win .dp.fo .hs-tab.on { box-shadow: none; background: #6b5132; } html.dark-win .dp.fo .hs-tab { border-block-width: 7px 8px; }
.dp.hs.rw.fo .rw-send .btn.fo-give { min-width: 196px; }
.fo-stock { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; }
.fo-it { position: relative; aspect-ratio: 1; padding: 0; border: 0; border-radius: 14px; background: rgba(110, 92, 58, .22); box-shadow: inset 0 0 0 3px var(--q); display: flex; align-items: center; justify-content: center; cursor: pointer; color: inherit; overflow: hidden; }
.fo-it > img { width: 74% !important; height: 74% !important; object-fit: contain; margin: 0; }
.fo-it b, .fo-it em, .fo-it u, .fo-v { position: absolute; font: normal 400 15px/1 var(--font-title), serif; color: #fff; text-decoration: none; -webkit-text-stroke: 3px #15100b; paint-order: stroke; }
.fo-it b { right: 6px; bottom: 6px; } .fo-it em { left: 7px; top: 7px; color: #8ff09a; } .fo-v { left: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 2px; color: #ffd968; }
.fo .fo-v img { width: 14px !important; height: 14px !important; object-fit: contain; margin: 0; } .fo-it.big .fo-v img { display: none; }
.fo-cell { position: relative; min-width: 0; } .fo-cell > .fo-it { width: 100%; height: 100%; box-sizing: border-box; }
.fo-it.wait { background: rgba(110, 92, 58, .22); outline: 3px dashed #e07a1a; outline-offset: -4px; box-shadow: none; }
.fo-n { position: absolute; right: 3px; top: 3px; display: flex; align-items: center; justify-content: flex-end; gap: 3px; min-width: 40px; height: 32px; box-sizing: border-box; padding: 0 2px; border: 0; border-radius: 999px; background: none; cursor: pointer; }
.fo-n > i { position: relative; width: 20px; height: 20px; flex: none; border-radius: 50%; background: #b3322a; box-shadow: 0 0 0 2px #fff3d0; } .fo-n > i::before { content: ''; position: absolute; left: 5px; right: 5px; top: 9px; height: 3px; border-radius: 2px; background: #fff; }
.fo-n u { min-width: 12px; padding: 4px 5px; border-radius: 999px; background: #4a3520; color: #ffe9b0; font: 15px/1 var(--font-title), serif; font-variant-numeric: tabular-nums; text-align: center; text-decoration: none; } .fo-n u.w { background: #c45a08; color: #fff; }
.fo-n:hover > i { background: #d8453a; } .fo-n:focus-visible { outline: 2px solid #e9b949; outline-offset: 1px; } .fo-cell.on em { top: 36px; }
.fo-tag.stk.cap { background: #a3243b; } .fo-tag.hit { animation: fo-cap .4s ease-out; } @keyframes fo-cap { 0%, 60% { transform: translateX(0); } 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } }
.fo-it.hit .fo-v, .fo-it.hit + .fo-n u { animation: fo-hit .35s ease-out; } .fo-it.hit > img { animation: fo-hit .35s ease-out; }
@keyframes fo-hit { 0% { transform: scale(1.35); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .fo-it.hit *, .fo-it.hit + .fo-n *, .fo-tag.hit { animation: none !important; } }
.fo-it.sel { background: color-mix(in srgb, #e9b949 55%, transparent); box-shadow: inset 0 0 0 4px #e9b949; }
.fo-it:focus-visible, .fo-act:focus-visible { outline: 2px solid #e9b949; outline-offset: -2px; }
/* Défier : deux décors face à face (img/foire/decor_*.webp, tirés de My_Assets/07_Ville/map_city.png), VS au milieu */
.fo-vs { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: stretch; }
.fo-x { position: absolute; left: 50%; top: 50%; z-index: 2; width: 120px; height: 106px; margin: -53px 0 0 -60px; display: flex; align-items: center; justify-content: center; background: url("../img/foire/lueur_rouge.png") center / 100% 100%; pointer-events: none; }
.fo-x b { font: 400 40px/1 var(--font-title), serif; color: #ffe08a; -webkit-text-stroke: 7px #2a1208; paint-order: stroke; transform: rotate(-6deg); }
.fo-side { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px; min-width: 0; padding: 10px; border-radius: 14px; overflow: hidden; color: #fff; background: url("../img/foire/decor_bleu.webp") left center / cover; }
.fo-side.foe { background-image: url("../img/foire/decor_rouge.webp"); background-position: right center; }
.fo-side::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, transparent 35%, rgba(6, 10, 22, .62) 100%), linear-gradient(rgba(8, 24, 48, .05), rgba(8, 24, 48, .5)); }
.fo-side.foe::before { background: radial-gradient(ellipse at 50% 45%, transparent 35%, rgba(22, 6, 6, .62) 100%), linear-gradient(rgba(48, 10, 8, .05), rgba(48, 10, 8, .5)); }
.fo-side > * { position: relative; }
.fo .fo-tw { position: absolute; left: 6px; bottom: -8%; width: auto; height: 62%; margin: 0; opacity: .8; } .fo .foe .fo-tw { left: auto; right: 6px; transform: scaleX(-1); }
/* Rubans des camps : mêmes proportions que l'image (900 × 157), titre centré sur la bande frontale (règle commune avec le ruban de résultat, plus bas) */
.fo-rib { flex: none; width: min(100%, 300px); aspect-ratio: 900 / 157; background: center / 100% 100% no-repeat; font: 19px/1 var(--font-title), serif; text-shadow: 0 2px 2px rgba(0, 0, 0, .7); white-space: nowrap; } .fo-rib span { -webkit-text-stroke: 4px rgba(16, 20, 40, .85); paint-order: stroke; }
.fo-pow { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 12px 0 6px; border-radius: 999px; background: rgba(10, 8, 12, .72); font: 18px/1 var(--font-title), serif; } .fo-pow b { font-weight: 400; } .fo .fo-pow img { width: 22px; height: 22px; object-fit: contain; margin: 0; }
.fo-team { --c: 64px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: calc(var(--c) * 3 + 16px); max-width: 100%; }
.fo-team span { position: relative; width: var(--c); height: var(--c); border-radius: 12px; overflow: hidden; background: radial-gradient(circle at 50% 35%, rgba(190, 225, 255, .55), rgba(16, 40, 80, .8)); box-shadow: 0 3px 8px rgba(0, 0, 0, .55); }
.fo .fo-team img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0; }
.fo-team b { position: absolute; inset: auto 0 0; padding: 10px 2px 4px; font: 400 16px/1 var(--font-title), serif; text-align: center; background: linear-gradient(transparent, rgba(10, 8, 12, .8)); -webkit-text-stroke: 3px #0d0a0c; paint-order: stroke; }
.foe .fo-team span { background: radial-gradient(circle at 50% 35%, rgba(255, 190, 160, .55), rgba(80, 20, 16, .8)); }
.fo-team.ghost img { filter: brightness(0); opacity: .6; }
.fo-empty { margin: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 16px; border-radius: 999px; background: rgba(10, 8, 12, .75); font: 18px/1.2 var(--font-title), serif; text-align: center; }
.fo-team, .fo-side > .fo-empty { margin-block: auto; }
.fo-team.ghost + .fo-empty { margin: 0; border-radius: 18px; position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%); width: max-content; max-width: calc(100% - 24px); box-sizing: border-box; }
.fo .fo-empty img { width: 26px; height: 26px; object-fit: contain; margin: 0; }
.fo-side.shut { background-color: #3a2a2a; background-blend-mode: luminosity; } .fo .shut .fo-tw { position: static; order: 0; height: 52%; max-height: 220px; margin-top: auto; opacity: 1; filter: grayscale(.85) brightness(.75); } .fo-side.shut .fo-rib { order: -1; }
.fo-marks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fo-marks div { padding: 8px; border-radius: 12px; background: rgba(214, 190, 140, .28); text-align: center; font: 17px/1.25 var(--font-title), serif; }
.fo-marks b { display: block; font-weight: 400; font-size: 22px; }
.fo-scores { flex: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.fo-sc { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; min-height: 44px; box-sizing: border-box; padding: 4px 10px; border-radius: 999px; background: rgba(214, 190, 140, .28); font: 17px/1 var(--font-title), serif; white-space: nowrap; }
.fo .fo-sc img { width: 28px; height: 28px; object-fit: contain; margin: 0; flex: none; } .fo-sc b { font-weight: 400; }
.fo-sc.top { background: rgba(233, 185, 73, .5); } .fo-sc.win { background: rgba(120, 170, 80, .35); } .fo-sc.low { background: rgba(224, 138, 60, .32); } .fo-sc.out { background: rgba(217, 88, 74, .3); cursor: help; }
.fo-sc:focus-visible { outline: 2px solid #e9b949; outline-offset: 2px; }
.fo .fo-row { grid-template-columns: 52px minmax(0, 1fr) 96px 92px 148px; }
.fo .fo-row > b { text-align: center; font: 400 20px var(--font-title), serif; }
.fo .rw-row.fo-person { grid-template-columns: 52px minmax(0, 1fr) 110px minmax(0, 1.9fr); column-gap: 16px; } .fo .rw-row.head.fo-person { min-height: 36px; }
.fo .fo-person > .fo-rew, .fo .fo-person > .rw-none { justify-self: start; text-align: left; } .fo .fo-person > .g { text-align: left; }
.fo .fo-person.me { position: sticky; top: 42px; bottom: 0; z-index: 1; background: #f9e3a4; }
.fo i.mob { display: none; font-style: normal; }
/* Résultat d'un combat : par-dessus la fenêtre, sans en changer la taille */
.fo-over { position: absolute; inset: -20px; z-index: 5; display: flex; align-items: center; justify-content: center; padding: 12px; border-radius: 18px; background: rgba(20, 12, 6, .72); overflow: auto; }
.dp.hs.rw.fo { position: relative; inset: auto; transform: none; }
.fo-res { width: min(100%, 720px); max-height: 100%; overflow: auto; box-sizing: border-box; padding: 16px 24px 22px; border-radius: 18px; background: url("../img/foire/fond_bleu.png") center / cover; color: #fff; text-align: center; }
.fo-res.lose { background-image: url("../img/foire/fond_rouge.png"); }
.fo-med { position: relative; padding: 152px 0 12px; } /* le ruban est dans le flux : 12 px sous ses queues avant les cases des héros, à toutes les largeurs */
.fo .fo-med img { position: absolute; left: 50%; transform: translateX(-50%); margin: 0; max-width: none; }
.fo .fo-med .gl { top: -90px; width: 440px; height: auto; } .fo .fo-med .st { top: 0; width: 340px; height: auto; } .fo .fo-med .ds { top: 34px; width: auto; height: 166px; }
/* Ruban et titre dans une même boîte aux proportions de l'image (900 × 157) : le titre suit la bande frontale à toutes les largeurs */
.fo-med .rb { position: relative; display: block; width: min(100%, 500px); aspect-ratio: 900 / 157; margin: 0 auto; }
.fo .fo-med .rb .ri { inset: 0; transform: none; width: 100%; height: 100%; vertical-align: top; }
.fo-med b { font: 400 31px/44px var(--font-title), serif; text-shadow: 0 2px 0 rgba(0, 0, 0, .5); }
/* Règle commune aux rubans de la Foire (img/foire/ruban_*.png) : la bande frontale occupe les lignes 0 à 91 sur 157, centre à 29 % de la hauteur */
.fo-rib span, .fo-med .rb b { position: absolute; left: 0; right: 0; top: 29%; transform: translateY(-50%); text-align: center; white-space: nowrap; }
.fo-duels { display: flex; justify-content: center; gap: 8px; }
.fo-duels span { flex: 0 1 110px; min-width: 0; padding: 6px; border-radius: 12px; background: rgba(10, 20, 30, .5); box-shadow: inset 0 0 0 3px #d9584a; } .fo-duels span.w { box-shadow: inset 0 0 0 3px #6fbf73; }
.fo-duels img { display: block; width: 56px; height: 56px; margin: 0 auto 4px; object-fit: cover; border-radius: 10px; } .fo-duels i { display: block; font: normal 15px/1.1 var(--font-title), serif; }
.fo-pts { display: inline-flex; align-items: center; gap: 12px; margin-top: 12px; font: 36px/1 var(--font-title), serif; -webkit-text-stroke: 5px #15100b; paint-order: stroke; }
.fo .fo-pts img { width: 52px; height: 46px; object-fit: contain; }
.fo-res p { margin: 8px 0 14px; font: 18px/1.35 var(--font-title), serif; text-shadow: 0 2px 2px #000; }
.fo-res .btn { min-height: 46px; min-width: 200px; font: 19px var(--font-title), serif; }
/* Fenêtres sombres */
html.dark-win .fo-pill.rang { background: rgba(255, 226, 170, .16); } html.dark-win .fo-pill.or { background: rgba(233, 165, 32, .3); } html.dark-win .fo-pill.combats { background: rgba(217, 88, 74, .38); } html.dark-win .fo-pill.objets { background: rgba(176, 92, 190, .36); } html.dark-win .fo-pill.renom { background: rgba(120, 170, 80, .32); }
html.dark-win .fo-tot, html.dark-win .fo-me { background: var(--dw-band); color: var(--dw-ink); }
html.dark-win .fo-act, html.dark-win .fo .fo-act small { color: var(--dw-ink); } html.dark-win .fo-act.or { background: radial-gradient(ellipse at 50% 35%, rgba(233, 165, 32, .5), rgba(233, 165, 32, .12) 75%); } html.dark-win .fo-act.objets { background: radial-gradient(ellipse at 50% 35%, rgba(176, 92, 190, .5), rgba(176, 92, 190, .14) 75%); } html.dark-win .fo-act.combats { background: radial-gradient(ellipse at 50% 35%, rgba(217, 88, 74, .5), rgba(217, 88, 74, .14) 75%); }
html.dark-win .fo-marks div { background: var(--dw-card); color: var(--dw-ink); }
html.dark-win .fo-act small, html.dark-win .fo-hero small { color: var(--dw-ink-3); }
html.dark-win .fo-gain, html.dark-win .fo-rec { color: var(--dw-ok); }
html.dark-win .fo-note { background: rgba(233, 185, 73, .18); color: var(--dw-ink); }
html.dark-win .fo-order { background: rgba(120, 190, 90, .22); color: var(--dw-ink); }
html.dark-win .fo-it { background: rgba(255, 226, 170, .08); } html.dark-win .fo-it.sel { background: rgba(233, 185, 73, .35); }
html.dark-win .fo .fo-person.me { background: #5a4429; }
/* Grande fenêtre (Foire.fit) : taille fixe, rapport constant, contenu à l'échelle --fo-z ; les pastilles de lots passent dans l'en-tête, dont le bandeau garde la même largeur partout */
#foire-dialog.fit { width: var(--fo-w); height: var(--fo-h); max-width: none; max-height: none; }
.fit > .dp.hs.rw.fo { zoom: var(--fo-z); width: calc(var(--fo-w) / var(--fo-z)); height: calc(var(--fo-h) / var(--fo-z)); max-height: none; border-width: 24px; }
.fit .dp.fo .hs-scroll { display: flex; flex-direction: column; overflow: hidden; }
.fit .dp.fo .hs-scroll > * { flex: none; }
.fit .dp.fo .hs-body { flex: 1 1 0; min-height: 0; grid-template-columns: 24.2% minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.fit .dp.fo .hs-main { min-height: 0; }
.fit .dp.fo .rw-pane { flex: 1 1 0; height: auto; min-height: 0; }
.fit .fo .rw-land { min-height: 0; }
.fit .fo .rw-land > img.tw { width: 78%; max-height: 78%; }
.fit .dp.fo .hs-foot { margin-top: 10px; flex-wrap: nowrap; }
.fit .dp.fo .rw-send { flex-wrap: nowrap; }
.fit .fo-objets .rw-pane > .fo-tags { display: none; }
.fit .fo .hs-head { gap: 12px; } .fit .fo .hs-ban { flex: none; padding-inline: 10px 20px; gap: 12px; } .fit .fo .hs-ban .hs-vsep { display: none; } .fit .fo .hs-id b { white-space: nowrap; } .fit .fo .hs-right { flex: none; margin-left: auto; }
.fit .hs-head > .fo-tags { display: grid; flex: 1 1 0; min-width: 0; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr) minmax(0, .95fr); }
@media (max-width: 1400px), (max-height: 800px) { .fit .hs-head .fo-tag { grid-template-columns: 28px minmax(0, 1fr); column-gap: 6px; padding-inline: 10px 12px; } .fit .fo .hs-head .fo-tag > img { width: 28px; height: 28px; } .fit .hs-head .fo-tag > i em { display: none; } .fit .hs-head .fo-tag em { font-size: 16px; } .fit .hs-head .fo-pips.more { display: none; } .fit .hs-head .fo-pips { gap: 2px; } .fit .hs-head .fo-pips u { width: 10px; height: 10px; } }
.fit .dp.hs.rw.fo .rw-send .btn { padding-inline: 12px; }
.fit .fo-apercu .rw-pane { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: stretch; }
.fit .fo-apercu .rw-pane > * { grid-column: 1 / -1; }
.fit .fo-apercu .rw-pane > .fo-next { grid-column: 1; }
.fit .fo-apercu .rw-pane > .fo-days { align-content: center; }
.fit .fo-apercu .rw-pane > .fo-next ~ .fo-days { grid-column: 2; }
.fit .fo-apercu .rw-pane > .fo-hero { order: 1; }
.fit .fo-apercu .fo-act { min-height: 0; justify-content: center; gap: 8px; }
.fit .dp.fo .hs-tab { border-width: 12px 8px 3px; padding: 0 2px; font-size: 19px; }
.fit .fo-objets .rw-pane { overflow: hidden; padding-right: 0; }
.fit .fo-objets .fo-stock { flex: 1 1 0; min-height: 0; grid-auto-rows: max-content; align-content: start; overflow-y: auto; padding-right: 10px; scrollbar-width: thin; scrollbar-color: #c9a45e transparent; }
.fit .fo-cmd { container-type: inline-size; flex-wrap: nowrap; padding: 6px 12px; white-space: nowrap; } .fit .fo-cmd > small { margin-left: 0; } .fit .fo-qs { margin-left: auto; flex-wrap: nowrap; }
.fit .fo-ts { flex-wrap: nowrap; padding-right: 13px; }
@container (max-width: 1000px) { .fit .fo-order i { display: none; } }
.fit .fo-combats .fo-vs { flex: 1 1 0; min-height: 0; }
.fit .fo-combats .fo-side { container-type: size; }
.fit .fo-combats .fo-team { --c: min(calc((100cqh - 118px) / 2), 23cqw, 130px); }
@container (max-height: 255px) { .fit .fo-combats .fo-team { --c: min(calc((100cqw - 34px) / 5), calc(100cqh - 112px)); width: 100%; flex-wrap: nowrap; gap: 8px; } .fit .fo-combats .fo-side:not(.shut) .fo-tw { display: none; } }
.fit .fo-over { inset: -24px; }
/* Repris du pied commun : même hauteur dans les 5 onglets */
.fit .dp.fo .hs-foot { min-height: 72px; padding-block: 8px; }
.fit .fo-apercu .rw-card:not(.fo-hero, .fo-days) { display: flex; flex-direction: column; justify-content: center; }
.fit .fo-gains .fo-row:not(.head) { min-height: 46px; padding-block: 2px; }
@media (max-width: 1150px) { .fit .hs-head .fo-tags { gap: 6px; } .fit .hs-head .fo-tag { grid-template-columns: minmax(0, 1fr); padding-inline: 12px; } .fit .fo .hs-head .fo-tag > img { display: none; } .fit .hs-head .fo-pips, .fit .fo .hs-ban > img, .fit .fo .rw-chip img { display: none; } .fit .hs-head .fo-tag > b { font-size: 19px; } .fit .hs-head .fo-tag > i { font-size: 14px; } .fit .fo .hs-ban { padding-inline: 14px; } .fit .fo .hs-id b { font-size: 22px; } .dp.hs.rw.fo .rw-send .btn.fo-give { min-width: 150px; } .fit .fo-cmd, .fit .fo-ts { flex-wrap: wrap; } .fit .fo-t.cat-tab.has-img { flex: none; width: 28px; } .fit .fo .hs-tab { font-size: 17px; border-width: 12px 6px 3px; padding: 0; } .fit .fo .hs-tab img { display: none; } .fit .fo-apercu .fo-hero img { width: 48px; height: 54px; } .fit .fo-apercu .rw-card { padding-block: 7px; } .fit .fo-apercu .fo-act { padding: 6px; gap: 4px; } .fit .fo-apercu .fo-act img { width: 40px; height: 40px; } }
@media (max-height: 760px) { .fit .fo-pill { min-height: 32px; } .fit .fo-me { gap: 4px; padding: 8px; } .fit .fo .fo-top img, .fit .fo-top img { width: 38px; height: 38px; } .fit .fo-apercu .rw-card { padding-block: 7px; } .fit .fo-apercu .fo-act { padding: 6px; gap: 4px; } .fit .fo-apercu .fo-act img { width: 40px; height: 40px; } .fit .fo-apercu .fo-hero img { width: 48px; height: 54px; } }
/* Fenêtre étroite */
@media (max-width: 1000px) { .fo .hs-tab { font-size: 17px; } .fo .hs-tab img { display: none; } .fo .fo-row { grid-template-columns: 44px minmax(0, 1fr) 84px 76px 130px; } }
@media (max-width: 900px) { .fo-tag { padding-inline: 10px; } .fo-pips { gap: 2px; } .fo-pips u { width: 9px; height: 9px; } .fo-tag > b { gap: 6px; } .fo .rw-side { display: none; } .fo-me2 { display: flex; } }
@media (max-width: 640px) {
  .fo .hs-tab { font-size: 14px; padding: 0; border-width: 10px 3px 3px; } .fo .hs-tab .lg { display: none; } .fo .hs-tab .sm { display: inline; }
  .fo-order i { display: none; } .fo-cmd { padding: 8px 10px; gap: 8px; } .fo-order { padding: 3px 8px; } .fo-qs { gap: 2px; } .fo-q { width: 36px; height: 36px; } .fo-ts { gap: 8px; } .dp.fo .fo-t.cat-tab.has-img { flex: none; width: 36px; } .fo-all { height: 36px; }
  .dp.fo .hs-right { display: none; }
  .fo-tot { grid-template-columns: auto minmax(0, 1fr); padding: 8px 10px; } .fo-rec { grid-column: 1 / -1; text-align: center; }
  .fo-3 { grid-template-columns: minmax(0, 1fr); } .fo-act { display: grid; grid-template-columns: 48px minmax(0, 1fr); min-height: 0; column-gap: 12px; text-align: left; } .fo .fo-act img { grid-row: 1 / 3; }
  .fo-objets .rw-pane > .fo-tags { grid-template-columns: repeat(2, minmax(0, 1fr)); position: sticky; top: 0; z-index: 2; gap: 8px; } .fo-tag { min-height: 50px; padding: 4px 12px; grid-template-columns: minmax(0, 1fr); } .fo .fo-tag > img, .fo-pips { display: none; } .fo-tag > b { font-size: 18px; gap: 6px; } .fo-tag em { font-size: 16px; } .fo-tags > .fo-tag:nth-child(3) { grid-column: 1 / -1; min-height: 34px; display: flex; justify-content: space-between; } .fo-objets .hs-foot > .fo-pill, .fo-objets .hs-foot > .fo-hid { display: none; } .fo .fo-ok img { width: 17px; height: 17px; }
  .fo-cmd small { margin-left: 0; } .fo-stock { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); } .fo-it .fo-v img { display: none; } .fo-it b, .fo-v { bottom: 5px; font-size: 14px; } .fo-it em { left: 5px; font-size: 14px; } .fo .hs-foot > .fo-pill { min-height: 30px; padding: 0 14px 0 6px; font-size: 16px; } .fo .hs-foot > .fo-pill img { width: 24px; height: 24px; } .fo-act small { justify-self: start; } .fo .hs-foot > .fo-pill b { font-size: 18px; } .fo .hs-foot > .fo-pill + .fo-pill { margin-right: 0; } .dp.hs.rw.fo .rw-send .btn.fo-give { min-width: 0; }
  .fo-vs { grid-template-columns: minmax(0, 1fr); } .fo-x { width: 78px; height: 68px; margin: -34px 0 0 -39px; } .fo-x b { font-size: 26px; -webkit-text-stroke-width: 5px; }
  .fo-side { padding: 6px 8px 8px; gap: 4px; display: grid; grid-template-columns: 1fr auto; } .fo-rib { width: 190px; font-size: 16px; } .fo-team { --c: calc((100vw - 84px) / 5); grid-column: 1 / -1; width: 100%; max-width: none; flex-wrap: nowrap; gap: 6px; } .fo-team b { font-size: 14px; } .fo .fo-tw { display: none; } .fo-side.shut { min-height: 110px; } .fo-empty { grid-column: 1 / -1; justify-self: center; }
  .fo .fo-row { grid-template-columns: 36px minmax(0, 1fr) 100px; row-gap: 6px; } .fo .fo-row.head { display: none; }
  .fo .fo-row > :nth-child(3) { grid-column: 3; } .fo .fo-row > :nth-child(4) { grid-column: 2; text-align: left; font-size: 15px; } .fo .fo-row > :nth-child(5) { grid-column: 3; justify-self: end; padding-inline: 8px; }
  .fo i.mob { display: inline; }
  .fo .rw-row.fo-person { grid-template-columns: 36px minmax(0, 1fr) 100px; column-gap: 8px; } .fo .fo-person.me { top: 0; } .fo .fo-person.head > .g { display: none; } .fo .fo-person > .rw-none { display: none; } .fo .fo-person > :nth-child(4) { grid-column: 2 / -1; }
  .fo-scores { gap: 6px; } .fo-sc { display: grid; grid-template-columns: auto auto; align-content: center; gap: 4px; padding: 6px 2px; border-radius: 14px; font-size: 15px; } .fo-sc span { grid-column: 1 / -1; order: -1; text-align: center; } .fo .fo-sc img { width: 20px; height: 20px; }
  .fo-marks div { padding: 6px 2px; font-size: 15px; } .fo-marks b { font-size: 18px; }
  .dp.fo .hs-foot { justify-content: center; } .dp.fo .rw-send { width: 100%; justify-content: center; margin: 0; } .dp.hs.rw.fo .rw-send .btn { flex: 1 1 40%; margin: 0; padding-inline: 8px; font-size: 16px; }
  .fo-over { inset: -12px; padding: 6px; } .fo-res { padding: 10px 8px 14px; } .fo .fo-med .gl { width: 340px; } .fo .fo-med .st { width: 290px; } .fo-med b { font-size: 25px; }
  .fo-duels { gap: 4px; } .fo-duels img { width: 42px; height: 42px; } .fo-duels span { padding: 4px 2px; } }
html.tel #foire-dialog { width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0; }
html.tel .dp.hs.rw.fo { width: 100%; height: 100dvh; max-height: none; }
html.tel .dp.fo .rw-pane { height: auto; min-height: 300px; overflow: visible; }
html.tel .dp.hs.rw.fo .hs-scroll { flex: 1 1 0; }
html.tel .fo-over { inset: 0; padding: 4px; border-radius: 0; }
html.tel .dp.hs.rw.fo .rw-send .btn { min-height: 44px; }
/* Visite guidée par Mila (Foire.tour) : couche dans la fenêtre, contour doré, bulle à côté */
.fo-help { flex: none; width: 40px; height: 40px; padding: 0; border: 2px solid #c9a45e; border-radius: 50%; background: #fff3d6; color: #6a4318; font: 24px/1 var(--font-title), serif; cursor: pointer; }
.fo-help:hover { background: #ffe6a8; } .fo-help:focus-visible { outline: 2px solid #e9b949; outline-offset: 2px; }
html.dark-win .fo-help { background: var(--dw-band); border-color: #8a6a3a; color: var(--dw-ink); }
.fo-tour { position: absolute; inset: 0; z-index: 2000; overflow: hidden; border-radius: 24px; } .fo-tour.dim { background: rgba(20, 10, 0, .55); }
.fo-tr { position: absolute; border: 3px solid #ffd24a; border-radius: 14px; box-shadow: 0 0 0 4000px rgba(20, 10, 0, .55), 0 0 18px 4px rgba(255, 210, 74, .65); pointer-events: none; }
.fit .fo-tb { zoom: var(--fo-z); }
.fo-tb { position: absolute; left: 0; top: 0; width: min(540px, calc(100% - 24px)); box-sizing: border-box; display: grid; grid-template-columns: 150px minmax(0, 1fr); grid-template-rows: auto auto 1fr auto; column-gap: 14px;
  padding: 14px 18px 14px 10px; border-radius: 18px; background: #fff3d6; color: #3a2412; box-shadow: 0 12px 34px rgba(0, 0, 0, .5); overflow: hidden; }
.fo-tp { grid-row: 1 / 5; align-self: end; width: 150px; height: auto; margin: 0 0 -14px; animation: fo-mila 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes fo-mila { 50% { transform: translateY(-3px) rotate(-1deg); } } @media (prefers-reduced-motion: reduce) { .fo-tp { animation: none; } }
.fo-tn { justify-self: start; padding: 2px 12px; border-radius: 999px; background: #a3520f; color: #fff; font: 15px/1.3 var(--font-title), serif; }
.fo-tb h3 { margin: 6px 0 4px; font: 24px/1.15 var(--font-title), serif; text-transform: none; letter-spacing: 0; color: #7d1214; } .fo-tb p { margin: 0 0 12px; font-size: 17px; line-height: 1.4; }
.fo-tf { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; } .fo-tf .tuto-dots { flex: 1 0 100%; gap: 6px; margin-bottom: 2px; } .fo-tb .tuto-dots i { background: rgba(110, 72, 24, .28); } .fo-tb .tuto-dots i.on { background: #c97a12; } html.dark-win .fo-tb .tuto-dots i { background: rgba(255, 226, 170, .25); } html.dark-win .fo-tb .tuto-dots i.on { background: #e9b949; }
.fo-tf .btn { min-height: 40px; padding-inline: 16px; font-size: 17px; } .fo-tf [data-tour="prev"] { min-width: 44px; font-size: 20px; }
html.dark-win .fo-tb { background: #3d2e21; color: var(--dw-ink); } html.dark-win .fo-tb h3 { color: #ffd27a; }
@media (max-width: 640px) { .fo-help { width: 36px; height: 36px; font-size: 20px; } .fo-tour { border-radius: 0; } .fo-tb { grid-template-columns: 78px minmax(0, 1fr); column-gap: 10px; padding: 10px 12px 10px 6px; } .fo-tp { width: 78px; margin-bottom: -10px; } .fo-tb h3 { font-size: 20px; } .fo-tb p { font-size: 15px; } .fo-tf .btn { min-height: 36px; padding-inline: 12px; font-size: 15px; } }
/* Filtre multi-qualités (03/12/2026, composant .qf-pill de style.css) : pastilles rondes sans libellé, fond crème ; téléphone : menu à cases */
.fo-qs.qf-row { gap: 8px; }
.fo-cmd .qf-pill { width: 30px; min-width: 0; height: 30px; padding: 0; background: rgba(110, 92, 58, .14); }
.fo-cmd .qf-pill:not(.on):not(:disabled) { opacity: .75; } /* éteinte : plus lisible sur le fond crème */
.fo-cmd .qf-pill.on { background: color-mix(in srgb, var(--q) 28%, #fff4dc); box-shadow: 0 0 5px color-mix(in srgb, var(--q) 60%, transparent); }
.fo-cmd .qf-pill .qf-dot { width: 14px; height: 14px; }
.fo-cmd .qf-pill .q-dot { width: 12px; height: 12px; }
html.dark-win .fo-cmd .qf-pill { background: rgba(0, 0, 0, .28); }
html.dark-win .fo-cmd .qf-pill.on { background: color-mix(in srgb, var(--q) 22%, #1d130a); }
.fo-qs.qf-tel { display: block; }
