/* Espaces connectés, octobre 2026 : l'avatar de Mimir là où il parle, et la
   page Aujourd'hui composée par le joueur en modules. Vient après style.css
   et le style propre à chaque page. */

/* ---- la pastille de Mimir ---- */
.pastille { position: relative; display: inline-block; flex: none; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; border: 1px solid rgba(184,77,255,.38); background: #0d0a1c; box-shadow: 0 0 0 3px rgba(184,77,255,.12); vertical-align: middle; }
.pastille img { position: absolute; width: 220%; max-width: none; left: -56%; top: -25%; }
.pastille.lg { width: 56px; height: 56px; }
.pastille.sm { width: 30px; height: 30px; box-shadow: none; }
.pastille.xs { width: 22px; height: 22px; box-shadow: none; }
.coach-msg.coach { gap: 8px; align-items: flex-end; }
.coach-msg.coach .coach-bubble { max-width: calc(80% - 38px); }
.co-panel h3 .pastille, .pn h4 .pastille { margin-right: 4px; }
.mimir-dit { display: flex; gap: 14px; align-items: flex-start; }
.mimir-dit .txt { flex: 1; min-width: 0; }
.mimir-dit .etape { background: transparent; border: 0; padding: 0; }

/* ---- Aujourd'hui en modules ---- */
.widgets { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; align-items: start; }
.wg { grid-column: span 6; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; min-width: 0; position: relative; }
.wg-s { grid-column: span 2; } .wg-m { grid-column: span 3; } .wg-l { grid-column: span 6; }
.wg-tete { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.wg-tete h5 { margin: 0; font-family: var(--mono); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-dim); font-weight: 400; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.wg-poignee, .wg-outils { display: none; }
.widgets.edit .wg { border-style: dashed; border-color: rgba(184,77,255,.38); cursor: grab; }
.widgets.edit .wg-poignee { display: inline; color: var(--ink-faint); letter-spacing: -2px; cursor: grab; }
.widgets.edit .wg-outils { display: inline-flex; gap: 3px; }
.wg-outils button { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 5px; border: 1px solid var(--line); background: transparent; font-family: var(--mono); font-size: .6rem; color: var(--ink-dim); cursor: pointer; padding: 0; }
.wg-outils button.on { border-color: var(--gold); color: var(--gold); }
.wg-outils button.x { color: #f0506e; border-color: rgba(240,80,110,.4); font-size: .9rem; }
.wg.glisse { opacity: .45; } .wg.cible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wg .pn { background: transparent; border: 0; padding: 0; }
.wg .wg-date { font-family: var(--mono); font-size: .66rem; color: var(--ink-faint); margin: 0 0 8px; }
.wg .st-embed:empty::before { content: "Chargement…"; color: var(--ink-faint); font-size: .85rem; }
.wg textarea.wg-notes { width: 100%; min-height: 120px; resize: vertical; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); padding: 10px 12px; font: inherit; font-size: .9rem; }
.wg-ajout { grid-column: span 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 120px; border: 1px dashed var(--line-strong); background: transparent; color: var(--ink-dim); cursor: pointer; font: inherit; }
.wg-ajout b { font-family: var(--title); font-size: 2rem; color: var(--gold); line-height: 1; }
.widgets .pn h4, .widgets .chat h4 { display: none; }
/* tailles étroites : les tuiles et parties se resserrent */
.wg-s .st-tiles, .wg-m .st-tiles { grid-template-columns: 1fr 1fr; }
@media (max-width: 1100px) { .wg-s { grid-column: span 3; } }
@media (max-width: 760px) { .wg-s, .wg-m, .wg-ajout { grid-column: span 6; } }

/* ---- fenêtre « Ajouter un module » et message de confirmation ---- */
.ap-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; }
.ap-modal .voile { position: absolute; inset: 0; background: rgba(7,10,18,.72); backdrop-filter: blur(3px); }
.ap-modal .boite { position: relative; width: min(560px, 100%); max-height: 90vh; overflow: auto; background: var(--surface); border: 1px solid rgba(184,77,255,.38); border-radius: 16px; box-shadow: 0 40px 100px rgba(0,0,0,.7); }
.ap-modal .boite-tete { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.ap-modal .boite-tete h4 { margin: 0; font-family: var(--title); font-size: 1.1rem; letter-spacing: .02em; text-transform: uppercase; }
.ap-modal .boite-tete button { background: none; border: 0; color: var(--ink-dim); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.ap-modal .boite-corps { padding: 16px 18px; display: grid; gap: 8px; }
.ap-modal .module { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.ap-modal .module b { display: block; font-size: .9rem; } .ap-modal .module span { font-size: .74rem; color: var(--ink-dim); }
.ap-toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 90; background: var(--gold); color: #1a1200; padding: 9px 16px; border-radius: 8px; font-size: .84rem; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
/* le module « Mes dernières parties » porte déjà son titre ; la liste partagée se limite à l'écran */
.wg .auj-parties .panel-h { display: none; }
.wg .auj-parties { max-height: 640px; overflow: auto; padding-right: 4px; }
.wg-l .auj-parties { max-height: none; }

/* ---- modules : une seule carte, pas de carte dans la carte ---- */
.wg .st-embed.auj-stats { background: transparent; border: 0; padding: 0; border-radius: 0; }
.wg .gc { background: transparent; border: 0; padding: 0; box-shadow: none; }
.wg .gc::after { display: none; }
.wg .gc-top { margin-bottom: 12px; }
.wg .wg-tete h5 small { font-family: var(--mono); font-size: .62rem; color: var(--ink-faint); margin-left: 10px; letter-spacing: .08em; }
.widgets { grid-auto-flow: dense; }
.wg-m .gc-gauges { gap: 8px; }
.wg-s .gc-gauges { grid-template-columns: 1fr 1fr; }
/* mode édition : commandes lisibles */
.wg-bandeau { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(245,184,65,.4); background: var(--gold-soft, rgba(245,184,65,.12)); font-size: .9rem; }
.widgets.edit .wg-tete { padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.wg-outils button { width: 28px; height: 28px; font-size: .68rem; font-weight: 700; }
.wg-outils button.on { background: var(--gold); color: #1a1200; border-color: var(--gold); }
.wg-outils button.x { width: 28px; margin-left: 6px; }
.widgets.edit .wg-corps { opacity: .85; pointer-events: none; }
.widgets.edit .wg-poignee { font-size: 1rem; }

/* liste compacte des parties dans son module */
.wg-parties { display: grid; gap: 6px; }
.wg-partie { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 9px; background: var(--bg); border: 1px solid var(--line); border-left: 3px solid #4ade80; color: var(--ink); text-decoration: none; }
.wg-partie.perdu { border-left-color: #f0506e; }
.wg-partie img { width: 36px; height: 36px; border-radius: 7px; display: block; }
.wg-pt b { display: block; font-size: .9rem; } .wg-pt span { font-family: var(--mono); font-size: .66rem; color: var(--ink-dim); }
.wg-pk { text-align: right; } .wg-pk b { display: block; font-family: var(--mono); font-size: .82rem; font-weight: 400; } .wg-pk span { font-family: var(--mono); font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; color: #4ade80; } .wg-partie.perdu .wg-pk span { color: #f0506e; }
.wg-parties .btn { justify-self: start; margin-top: 4px; }

/* ---- Aujourd'hui aligné sur la démo de l'accueil ---- */
.wg-tuiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.wg-tuile { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.wg-tuile small { display: block; font-family: var(--mono); font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wg-tuile b { display: block; margin-top: 6px; font-family: var(--title); font-size: 1.6rem; line-height: 1; white-space: nowrap; }
.wg-tuile b.or { color: var(--gold); } .wg-tuile b.vert { color: #4ade80; } .wg-tuile b.rouge { color: #f0506e; }
.wg-tuile span { display: block; margin-top: 4px; font-size: .72rem; color: var(--ink-dim); }
.wg-m .wg-tuiles, .wg-s .wg-tuiles { grid-template-columns: 1fr 1fr; }
.wg-nom { font-family: var(--mono); font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.wg[data-w="mot"] { border-color: rgba(184,77,255,.38); background: linear-gradient(90deg, rgba(184,77,255,.10), var(--surface) 60%); }
.wg[data-w="mot"] .etape .k { display: none; }
.wg[data-w="mot"] .etape .o { font-size: 1rem; font-weight: 500; }
.wg[data-w="chat"] .coach-log { min-height: 220px; max-height: 360px; overflow: auto; }
.wg[data-w="chat"] .coach-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wg[data-w="chat"] .chat { display: grid; gap: 10px; }
.wg-partie { grid-template-columns: 6px 36px 1fr auto auto; }
.wg-partie::before { content: ""; width: 6px; height: 100%; border-radius: 3px; background: #4ade80; align-self: stretch; }
.wg-partie.perdu::before { background: #f0506e; }
.wg-partie { border-left: 1px solid var(--line); }
.wg-pk { display: flex; gap: 12px; align-items: baseline; } .wg-pk b { font-size: .8rem; } .wg-pk span { font-size: .62rem; }
@media (max-width: 760px) { .wg-tuiles { grid-template-columns: 1fr 1fr; } }

/* ---- harmonisation avec la démo de l'accueil : titres de blocs, étiquettes, tuiles ---- */
.ap .pn h4, .ap .co-panel h3, .ap .st-card .panel-h, .ap .pg-card h4 { font-family: var(--mono); font-size: .62rem; font-weight: 400; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-dim); }
.ap .pn h4 small, .ap .co-panel h3 small { text-transform: none; letter-spacing: .06em; }
.ap .co-panel h3 .pastille, .ap .pn h4 .pastille { vertical-align: middle; }
.ap .tag { border-radius: 5px; }
.ap .tag .pastille { margin-right: 6px; }
.mimir-dit.petit { gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(184,77,255,.3); background: linear-gradient(90deg, rgba(184,77,255,.08), transparent 70%); }
.mimir-dit.petit p { margin: 0; font-size: .92rem; }
.ap .tile { padding: 12px 14px; }
.ap .tile .v { font-size: 1.6rem; }
.ap .tile .k { margin-top: 6px; font-size: .58rem; letter-spacing: .14em; }
.ap .chip { font-family: var(--mono); font-size: .66rem; letter-spacing: .04em; }

/* blocs « bientôt » : annoncés, jamais inventés */
.bientot { border-style: dashed; opacity: .9; }
.tag-bientot { margin-left: auto; font-family: var(--mono); font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); border: 1px solid rgba(245,184,65,.4); border-radius: 4px; padding: 2px 6px; }
.bientot p.vide { margin: 0; }

/* espace coach : tableau pleine largeur avec ses filtres dans l'en-tête ; sélecteur d'élève */
.tbl-wrap.pn h4 .chips { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.tbl-wrap.pn table { margin-top: 6px; }
.ap-sel { background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink); border-radius: 6px; padding: 7px 10px; font: inherit; font-size: .84rem; max-width: 360px; }

/* Ma communauté : la mise en page de la démo */
.cm-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.cm-membres { display: grid; gap: 6px; }
.cm-membre { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); }
.cm-membre .av { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #5cb6f9); }
.cm-membre .av.o { background: linear-gradient(135deg, var(--gold), #f08a3e); } .cm-membre .av.v { background: linear-gradient(135deg, #4ade80, #5cb6f9); }
.cm-membre b { display: block; font-size: .9rem; } .cm-membre div span { display: block; font-size: .74rem; color: var(--ink-dim); }
.cm-membre em { font-style: normal; font-family: var(--mono); font-size: .76rem; color: #4ade80; }
.ap .points { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ap .points li { padding: 8px 10px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); font-size: .86rem; }
.ap .points li b { color: var(--gold); font-weight: 600; }
.ap .pn > .btn { justify-self: start; }
@media (max-width: 960px) { .cm-grid { grid-template-columns: 1fr; } }

/* ---- fiche build, à la façon d'OP.GG ---- */
.fb { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 10px; }
.coach-msg .fb { max-width: calc(100% - 38px); margin-left: 38px; }
.fb-tete { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fb-tete .fb-champ { width: 48px; height: 48px; border-radius: 10px; }
.fb-tete b { display: block; font-family: var(--title); font-size: 1.15rem; letter-spacing: .02em; text-transform: uppercase; }
.fb-tete > div > span { font-size: .8rem; color: var(--ink-dim); }
.fb-src { margin-left: auto; align-self: flex-end; font-size: .62rem; color: var(--ink-faint); opacity: .7; }
.fb-avert { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin: 0; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(240,80,110,.45); border-left: 3px solid #F0506E; background: linear-gradient(90deg, rgba(240,80,110,.14), rgba(240,80,110,.03)); font-size: .88rem; box-shadow: 0 0 24px rgba(240,80,110,.12); }
.fb-avert b { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: #F0506E; }
.fb-avert span { flex: 1 1 260px; color: var(--ink); }
.fb-avert .btn { margin-left: auto; }
.fb-l { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: center; padding-top: 8px; border-top: 1px solid var(--line); }
.fb-l small { font-family: var(--mono); font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
.fb-c { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.fb-opt { display: flex; align-items: center; gap: 8px; }
.fb-opt.aussi { opacity: .8; }
.fb-ic { display: inline-flex; align-items: center; gap: 3px; }
.fb-ic img { width: 36px; height: 36px; border-radius: 6px; border: 1px solid var(--line-strong); background: #0b111e; }
.fb-ic .fl { font-style: normal; color: var(--ink-faint); padding: 0 2px; }
.fb-c em { font-style: normal; font-family: var(--mono); font-size: .72rem; color: var(--ink-dim); }
.fb-runes { gap: 18px; }
.fb-page { display: inline-flex; align-items: center; gap: 4px; }
.fb-page img { width: 26px; height: 26px; border-radius: 50%; background: #0b111e; }
.fb-page img.pg { width: 22px; height: 22px; padding: 2px; margin-right: 4px; opacity: .8; }
.fb-page img:nth-child(2) { width: 34px; height: 34px; }
.fb-prio { font-family: var(--mono); font-size: 1rem; letter-spacing: .1em; }
.fb-montee { font-family: var(--mono); font-size: .7rem; color: var(--ink-dim); }
.fb-form { display: flex; gap: 8px; flex-wrap: wrap; }
.fb-form .ap-search { flex: 1 1 240px; }
.fb-zone { display: grid; }
.pn.fb-mot, .fb-mot { display: flex; gap: 14px; align-items: flex-start; }
.fb-mot .txt p { margin: 0 0 8px; font-size: .95rem; line-height: 1.6; }
.fb-form .ap-search, .fb-form .ap-sel { background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink); border-radius: 8px; padding: 10px 12px; font: inherit; font-size: .9rem; height: auto; }
.fb-form .ap-sel { flex: 0 1 240px; }
.fb-form .btn { align-self: stretch; }
@media (max-width: 760px) { .fb-l { grid-template-columns: 1fr; gap: 6px; } .fb-src { margin-left: 0; } }

/* ---- choix du champion en images (onglet Build) : cartes splash, look HUD ---- */
.fb-hero { position: relative; display: block; padding: 28px 0 6px; }
.fb-hero::before { content: ""; position: absolute; inset: -40px -40px auto -40px; height: 220px; pointer-events: none; z-index: -1;
  background: radial-gradient(60% 100% at 20% 0%, rgba(245,184,65,.16), transparent 70%), radial-gradient(40% 80% at 80% 10%, rgba(184,77,255,.14), transparent 70%); }
.fb-kicker { font-family: var(--mono); font-size: .72rem; letter-spacing: .28em; color: var(--gold); }
.fb-hero h1 { margin: 6px 0 4px; background: linear-gradient(90deg, #fff 30%, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fb-sub { margin: 0; color: var(--ink-dim); font-size: .95rem; }
.fb-form { margin-top: 18px; padding: 8px; border: 1px solid var(--line-strong); border-radius: 14px; background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.01)); backdrop-filter: blur(8px); }
.fb-form .ap-search, .fb-form .ap-sel { border-color: transparent; background: rgba(0,0,0,.35); transition: border-color .2s, box-shadow .2s; }
.fb-form .ap-search:focus, .fb-form .ap-sel:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245,184,65,.18), 0 0 24px rgba(245,184,65,.2); }
.fb-champs { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 12px; margin: 20px 0 24px; }
.fb-champs > .fb-champ { position: relative; display: block; aspect-ratio: 4 / 5; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #0b0d14; color: var(--ink); font: inherit; cursor: pointer; min-width: 0;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  transition: transform .25s cubic-bezier(.2,.8,.2,1), border-color .25s, box-shadow .25s; }
.fb-champs > .fb-champ img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; filter: saturate(.75) brightness(.8); transform: scale(1.04); transition: filter .3s, transform .5s cubic-bezier(.2,.8,.2,1); }
.fb-champs > .fb-champ::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.92)); }
.fb-champs > .fb-champ::after { content: ""; position: absolute; inset: -60% 0 auto; height: 40%; z-index: 2; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(245,184,65,.35), transparent); }
.fb-champs > .fb-champ span { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 3; text-align: left; font-weight: 700; font-size: .85rem; letter-spacing: .02em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 2px 8px #000; transition: transform .25s; }
.fb-cta { position: absolute; left: 10px; bottom: 10px; z-index: 3; font-style: normal; font-family: var(--mono); font-size: .66rem; letter-spacing: .12em; color: var(--gold); opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; }
.fb-champs > .fb-champ:hover, .fb-champs > .fb-champ:focus-visible { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 10px 30px rgba(0,0,0,.6), 0 0 0 1px var(--gold), 0 0 28px rgba(245,184,65,.35); outline: none; }
.fb-champs > .fb-champ:hover img, .fb-champs > .fb-champ:focus-visible img { filter: saturate(1.1) brightness(1); transform: scale(1.1); }
.fb-champs > .fb-champ:hover::after, .fb-champs > .fb-champ:focus-visible::after { opacity: 1; animation: fb-scan 1.1s ease-out; }
.fb-champs > .fb-champ:hover span, .fb-champs > .fb-champ:focus-visible span { transform: translateY(-16px); }
.fb-champs > .fb-champ:hover .fb-cta, .fb-champs > .fb-champ:focus-visible .fb-cta { opacity: 1; transform: none; }
@keyframes fb-scan { from { top: -60%; } to { top: 120%; } }
@media (prefers-reduced-motion: reduce) { .fb-champs > .fb-champ, .fb-champs > .fb-champ img, .fb-champs > .fb-champ span, .fb-cta { transition: none; } .fb-champs > .fb-champ::after { animation: none; } }
@media (max-width: 520px) { .fb-champs { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; } }
.fb-champs > .fb-champ[hidden], .fb-champs[hidden] { display: none; }
.fb-repli { font-size: .72rem; color: var(--ink-faint); align-self: center; }
