/* Pandora — nouvelle interface (neo.html, test local). Plat : aplats, filets fins, un seul accent, pas de dégradé ni de lueur.
   Les styles du jeu (HUD, cartes, pause) sont dans jeu.css : ne pas reprendre ses noms de classes (.btn, .win, .carte, .objet, .slot, .jauge, .cadre…). */
:root { --fond:#0b0b0c; --surface:#141416; --surface2:#1c1c1f; --trait:rgba(255,255,255,.07); --trait2:rgba(255,255,255,.14);
  --texte:#f2f2f0; --doux:#a4a4aa; --pale:#6d6d75; --accent:#c8f03c; --sur-accent:#151a02; --accent-doux:rgba(200,240,60,.1);
  --rouge:#ff6f61; --bleu:#74b0ff; --ok:#6fdd8b; --dore:#f1c453; --feu:#ff8a3a; --rayon:14px;
  --sans:'Lexend', system-ui, -apple-system, 'Segoe UI', sans-serif; --display:'Rowdies', 'Lexend', system-ui, sans-serif; /* les polices de dofus.com : Rowdies (titres), Lexend (textes) */ }

/* ---------- base ---------- */
#menu, #tchat, #dlg, #chargement, #toast, #tcAnnonce { -webkit-tap-highlight-color:transparent; font:400 14px/1.5 var(--sans); color:var(--texte); letter-spacing:0; -webkit-font-smoothing:antialiased; }
:where(#menu, #tchat, #dlg) button { font:inherit; color:inherit; background:none; border:0; padding:0; margin:0; cursor:pointer; text-align:inherit; }
:where(#menu, #tchat, #dlg) :where(h1, h2, h3, h4, p, ul) { margin:0; padding:0; font:inherit; }
:where(#menu, #tchat, #dlg) :focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
:where(#menu, #tchat, #dlg) * { scrollbar-width:thin; scrollbar-color:var(--trait2) transparent; }
.ico { flex:none; } .pic { width:20px; height:20px; flex:none; object-fit:contain; } /* .pic : petite icône du client Dofus 3 */

/* ---------- briques ---------- */
.b { display:inline-flex; align-items:center; justify-content:center; gap:8px; height:40px; padding:0 16px; border-radius:10px; border:1px solid var(--trait2); font-weight:500; white-space:nowrap; text-decoration:none; transition:background .15s, border-color .15s, opacity .15s; }
.b:hover { background:var(--surface2); border-color:rgba(255,255,255,.24); }
.b.primaire { background:var(--accent); border-color:transparent; color:var(--sur-accent); font-weight:600; }
.b.primaire:hover { background:#d7f860; }
.b.fantome { border-color:transparent; color:var(--doux); } .b.fantome:hover { color:var(--texte); }
.b:disabled { opacity:.4; cursor:default; pointer-events:none; }
.ib { width:36px; height:36px; flex:none; display:grid; place-items:center; border-radius:10px; color:var(--doux); transition:background .15s, color .15s; }
.ib:hover { background:var(--surface2); color:var(--texte); }
.puce { display:inline-flex; align-items:center; gap:7px; height:34px; padding:0 13px; border-radius:17px; border:1px solid var(--trait); font-weight:500; font-size:13px; font-variant-numeric:tabular-nums; }
.kam { display:inline-flex; align-items:center; gap:5px; font-variant-numeric:tabular-nums; } .kam img { height:13px; width:auto; } .b.primaire .kam img { filter:brightness(0); opacity:.7; } /* kama doré illisible sur l'accent */
.pastille { min-width:18px; height:18px; padding:0 5px; border-radius:9px; background:var(--accent); color:var(--sur-accent); font:600 11px/18px var(--sans); text-align:center; }
.jg { display:block; height:4px; border-radius:2px; background:rgba(255,255,255,.08); overflow:hidden; } .jg i { display:block; height:100%; border-radius:2px; background:var(--accent); transition:width .3s; }
.sur { font-weight:500; font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:var(--pale); }
.vide { color:var(--pale); font-size:13px; grid-column:1/-1; }
.seg { display:inline-flex; align-self:flex-start; gap:2px; padding:3px; border-radius:12px; background:var(--surface); border:1px solid var(--trait); }
.seg button { display:flex; align-items:center; gap:8px; height:34px; padding:0 14px; border-radius:9px; color:var(--doux); font-weight:500; transition:background .15s, color .15s; }
.seg button:hover { color:var(--texte); } .seg button.on { background:var(--surface2); color:var(--texte); } .seg small { color:var(--pale); font-size:12px; font-variant-numeric:tabular-nums; }
.chips { display:flex; gap:6px; overflow-x:auto; scrollbar-width:none; }
.chip { flex:none; display:inline-flex; align-items:center; gap:6px; height:30px; padding:0 12px; border-radius:15px; border:1px solid var(--trait); color:var(--doux); font-size:13px; transition:border-color .15s, color .15s; }
.chip:hover { border-color:var(--trait2); color:var(--texte); } .chip.on { background:var(--texte); border-color:transparent; color:var(--fond); } .chip.vide { opacity:.4; } .chip small { font-size:11px; opacity:.6; }
.sect { margin-top:36px; } .sect h3, .rang h3 { display:flex; align-items:center; gap:10px; margin-bottom:12px; font-weight:500; font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:var(--pale); }
.sect h3 small, .rang h3 small { display:flex; align-items:center; gap:6px; margin-left:auto; font-size:12px; letter-spacing:0; text-transform:none; }
.tuiles { display:grid; grid-template-columns:repeat(auto-fill, minmax(140px, 1fr)); gap:8px; }
.tuiles div { display:flex; flex-direction:column; gap:2px; padding:14px 16px; border-radius:var(--rayon); background:var(--surface); }
.tuiles b { font-weight:600; font-size:22px; line-height:1.2; font-variant-numeric:tabular-nums; } .tuiles span { font-size:12px; color:var(--doux); }
.rg { display:flex; justify-content:space-between; gap:16px; padding:11px 2px; border-bottom:1px solid var(--trait); } .rg b { font-weight:500; } .rg span { color:var(--doux); font-size:13px; text-align:right; } .rg.pale b { color:var(--pale); }
.lignes { display:grid; } .lignes span { display:flex; align-items:center; gap:9px; padding:9px 2px; border-bottom:1px solid var(--trait); color:var(--doux); font-size:13px; }
.lignes .pic { width:18px; height:18px; } .lignes b { margin-left:auto; color:var(--texte); font-weight:500; font-variant-numeric:tabular-nums; white-space:nowrap; }
.rangee { display:flex; gap:8px; flex-wrap:wrap; }
.avis { margin-bottom:20px; padding:14px 16px; border-radius:var(--rayon); background:var(--accent-doux); font-size:13px; } .avis .fiche-obj { margin-top:10px; }
.chapeau { display:flex; flex-wrap:wrap; gap:4px 24px; margin-bottom:20px; color:var(--doux); font-size:13px; } .chapeau b { color:var(--texte); font-weight:500; }
.grille { display:grid; grid-template-columns:repeat(auto-fill, minmax(min(330px, 100%), 1fr)); gap:10px; }
.badge-admin { margin-right:6px; padding:1px 6px; border-radius:5px; background:var(--dore); color:#2a1d00; font:600 10px/1.5 var(--sans); font-style:normal; letter-spacing:.04em; text-transform:uppercase; vertical-align:1px; }

/* ---------- coquille : rail à gauche, barre du haut, page ---------- */
#menu { position:fixed; inset:0; display:grid; grid-template-columns:232px minmax(0, 1fr); background:var(--fond); }
#rail { display:flex; flex-direction:column; min-height:0; padding:22px 12px 12px; border-right:1px solid var(--trait); overflow-y:auto; }
.mot { display:flex; align-items:baseline; gap:3px; padding:0 12px 22px; font:400 22px/1.15 var(--display); letter-spacing:0; }
.mot i { width:6px; height:6px; border-radius:50%; background:var(--accent); } .mot img { width:28px; height:28px; align-self:center; margin:-4px 7px -4px -2px; } /* le logo (œuf au P dans les flammes, game/ui/logo.webp) */
#chargement > img { width:112px; height:112px; margin-bottom:6px; }
#nav, #plus { display:flex; flex-direction:column; gap:2px; } #plus { flex:1; margin-top:24px; }
#plus > small { padding:0 12px 8px; font-weight:500; font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--pale); } .ressort { flex:1; min-height:16px; }
.lien { display:flex; align-items:center; gap:12px; height:38px; flex:none; padding:0 12px; border-radius:10px; color:var(--doux); font-weight:500; text-decoration:none; transition:background .12s, color .12s; }
.lien:hover { color:var(--texte); background:var(--surface); } .lien.on { color:var(--texte); background:var(--surface2); } .lien.on .ico { color:var(--accent); }
.lien .pastille { margin-left:auto; } .lien .pic, .lien > .ico { width:22px; height:22px; } .lien > .ico { padding:2px; } .lien .pic { opacity:.8; transition:opacity .12s; } .lien:hover .pic, .lien.on .pic { opacity:1; }
.lien .pic[src$="gear.png"] { filter:invert(1) !important; } /* pictogramme gris foncé du client, éclairci */ #btnPlus { display:none; }
#btnCompte { display:flex; align-items:center; gap:10px; flex:none; margin-top:10px; padding:8px; border-radius:12px; border:1px solid var(--trait); transition:background .12s, border-color .12s; }
#btnCompte:hover, #btnCompte.on { background:var(--surface); border-color:var(--trait2); }
#btnCompte img { width:34px; height:34px; border-radius:50%; background:var(--surface2); object-fit:cover; }
#avNom { min-width:0; display:flex; flex-direction:column; line-height:1.3; } #avNom b { font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } #avNom small { font-size:12px; color:var(--pale); }
#corps { position:relative; display:grid; grid-template-rows:auto minmax(0, 1fr); min-width:0; min-height:0; }
/* salle du donjon choisi, en grand derrière l'accueil ; le voile la fond dans la page (texte à gauche, cartes en bas) : seul dégradé du site, pour la lisibilité */
#djFond { position:absolute; inset:0; pointer-events:none; background:center 35%/cover no-repeat; transition:opacity .3s; } #djFond.verrou { filter:grayscale(1) brightness(.6); }
#djFond::after { content:''; position:absolute; inset:0; background:linear-gradient(rgba(11,11,12,.9), transparent 24%), linear-gradient(0deg, var(--fond) 22%, transparent 62%), linear-gradient(90deg, var(--fond) 4%, rgba(11,11,12,.6) 52%, rgba(11,11,12,.42)); } /* haut (barre), bas (cartes), gauche (titre) */
#corps:has(#accueil[hidden]) #djFond { opacity:0; } #haut, #accueil, #page { position:relative; }
#haut { display:flex; align-items:center; justify-content:space-between; gap:16px; height:76px; padding:0 max(32px, calc((100% - 1180px)/2)); }
#pTitre { font:400 25px/1.15 var(--display); letter-spacing:0; }
.outils { display:flex; align-items:center; gap:8px; }
#enLigne { cursor:pointer; } #enLigne:hover { border-color:var(--trait2); } #enLigne i { width:7px; height:7px; border-radius:50%; background:var(--ok); } #enLigne span { color:var(--doux); margin-left:-3px; }
#btnChat { position:relative; } body:has(#tcNonLus:not([hidden])) #btnChat::after { content:''; position:absolute; top:7px; right:7px; width:8px; height:8px; border-radius:50%; background:var(--accent); }
#accueil, #page { min-height:0; overflow-y:auto; padding:12px max(32px, calc((100% - 1180px)/2)) 56px; }

/* ---------- accueil : le donjon à lancer, le héros, les donjons, les quêtes du jour ---------- */
#accueil { display:grid; grid-template-columns:minmax(0, 1fr) minmax(260px, 400px); grid-template-areas:'lancement heros' 'donjons donjons' 'quetes quetes'; gap:36px 48px; align-content:start; }
.lancement { grid-area:lancement; align-self:center; display:flex; flex-direction:column; align-items:flex-start; gap:14px; min-width:0; }
#djSur b { color:var(--rouge); font-weight:500; }
#djNom { font:400 clamp(32px, 4.3vw, 62px)/1.08 var(--display); letter-spacing:0; text-wrap:balance; }
#djMeta { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; color:var(--doux); font-size:15px; } #djMeta i { width:3px; height:3px; border-radius:50%; background:var(--pale); } #djMeta .pic { width:17px; height:17px; margin-right:-3px; opacity:.75; }
.lancement .jg { width:min(340px, 100%); }
#choixDj { display:flex; align-items:center; gap:18px; flex-wrap:wrap; margin-top:12px; }
#go { height:56px; padding:0 22px 0 30px; gap:16px; border-radius:16px; font-size:17px; }
#go kbd { padding:3px 8px; border-radius:6px; background:rgba(21,26,2,.12); font:500 11px var(--sans); letter-spacing:.02em; }
#go.non { opacity:.35; } #go.attente { opacity:.6; pointer-events:none; } #go.attente #goTxt::after { content:'…'; }
/* pacte de chaleur (bouton à côté de « Jouer », fenêtre de choix) : le seul endroit où l'orange s'ajoute à l'accent */
#btnPacte { height:56px; padding:0 20px; border-radius:16px; font-size:15px; } #btnPacte.chaud { border-color:var(--feu); color:var(--feu); }
.feu { display:inline-flex; align-items:center; gap:3px; color:var(--feu); font-style:normal; } .jg.feu { display:block; } .jg.feu i { background:var(--feu); } .lg em { display:flex; align-items:center; justify-content:flex-end; } .lg em .feu { margin-right:10px; font-weight:600; } .feu.zero { color:var(--pale); } /* donjon terminé sans chaleur : 0 en gris */
#dlg.pacte .corps { padding-bottom:0; }
.pc-tete { display:flex; align-items:center; gap:18px; margin-bottom:14px; } .pc-nb { min-width:76px; font:400 54px/1 var(--display); color:var(--feu); text-align:center; font-variant-numeric:tabular-nums; }
.pc-tete > div { flex:1; min-width:0; display:flex; flex-direction:column; gap:8px; } .pc-tete p:last-child { color:var(--doux); font-size:13px; }
.pc { display:flex; align-items:center; gap:14px; padding:12px 2px; border-top:1px solid var(--trait); } .pc > div:first-child { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.pc b { display:flex; align-items:center; gap:8px; font-weight:500; } .pc b em { display:inline-flex; align-items:center; gap:2px; font-style:normal; font-size:13px; color:var(--feu); }
.pc > div:first-child > span { color:var(--pale); font-size:13px; } .pc.on > div:first-child > span { color:var(--texte); } .pc small { color:var(--pale); font-size:12px; }
.pc-rang { flex:none; display:flex; align-items:center; gap:6px; } .pc-rang .ib { border:1px solid var(--trait2); font-size:18px; color:var(--texte); } .pc-rang .ib:disabled { opacity:.25; pointer-events:none; }
.pc-pips { display:flex; justify-content:center; gap:3px; min-width:52px; } .pc-pips i { width:8px; height:8px; border-radius:50%; background:rgba(255,255,255,.12); } .pc-pips i.on { background:var(--feu); }
.pc-pied { position:sticky; bottom:0; display:flex; justify-content:space-between; gap:10px; padding:14px 0 18px; background:var(--surface); border-top:1px solid var(--trait); }
#annuler { color:var(--doux); font-size:13px; text-decoration:underline; text-underline-offset:3px; } #annuler:hover { color:var(--texte); }
.heros { grid-area:heros; position:relative; display:flex; flex-direction:column; align-items:center; text-align:center; }
#heros { position:relative; width:min(100%, 360px, 40vh); aspect-ratio:1; } /* pas de disque derrière le personnage (retiré à la demande, 2026-11-17) : il se tient directement devant le donjon */
#fiche { position:relative; } #fiche h3 { display:flex; align-items:center; justify-content:center; gap:8px; font:400 22px/1.15 var(--display); } #fiche h3 img { width:22px; height:22px; } #fiche p { max-width:340px; margin:4px auto 12px; color:var(--doux); font-size:13px; }
.puces { display:flex; flex-wrap:wrap; justify-content:center; gap:6px; } .puces span { background:rgba(11,11,12,.55); display:inline-flex; align-items:center; gap:7px; height:30px; padding:0 12px 0 8px; border-radius:15px; border:1px solid var(--trait); font-size:13px; color:var(--doux); }
.puces img { width:18px; height:18px; border-radius:4px; object-fit:contain; } .puces b { color:var(--texte); font-weight:500; }
.choix-cls { display:flex; justify-content:center; gap:10px; margin-top:16px; }
.choix-cls button { width:40px; height:40px; border-radius:50%; background:var(--surface2); opacity:.5; transition:opacity .15s; } .choix-cls img { width:100%; height:100%; border-radius:50%; object-fit:cover; }
.choix-cls button:hover { opacity:.85; } .choix-cls button.on { opacity:1; box-shadow:0 0 0 2px var(--fond), 0 0 0 4px var(--accent); } .choix-cls button:disabled { cursor:default; }
.choix-cls .ajout { opacity:1; background:none; border:1px dashed var(--trait2); color:var(--doux); font-size:18px; text-align:center; } .choix-cls .ajout:hover { color:var(--texte); border-color:var(--doux); }
.donjons { grid-area:donjons; min-width:0; }
#djListe { position:relative; display:grid; grid-auto-flow:column; grid-auto-columns:minmax(112px, 1fr); gap:4px; margin:10px -8px 0; padding-bottom:6px; overflow-x:auto; }
.dj { position:relative; display:flex; flex-direction:column; gap:3px; min-width:0; padding:8px; border-radius:16px; border:1px solid transparent; transition:background .15s, border-color .15s; }
.dj:hover { background:var(--surface); } .dj.on { background:var(--surface); border-color:var(--trait2); } .dj:disabled { opacity:.35; cursor:default; }
.dj .vign { aspect-ratio:1; margin-bottom:7px; border-radius:10px; background:var(--surface2) center/cover; } .dj.verrou .vign { filter:grayscale(1) brightness(.4); }
.dj .etat { position:absolute; top:14px; right:14px; width:22px; height:22px; display:grid; place-items:center; border-radius:50%; background:rgba(11,11,12,.8); color:var(--doux); } .dj .etat.ok { background:var(--accent); color:var(--sur-accent); }
.dj small { font-size:11px; color:var(--pale); font-variant-numeric:tabular-nums; } .dj b { min-height:2.5em; font-weight:500; font-size:13px; line-height:1.25; overflow-wrap:anywhere; } .dj.verrou b { color:var(--pale); } .dj .jg { height:3px; margin-top:4px; }
#apQuetes { grid-area:quetes; display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:10px; cursor:pointer; }
#apQuetes header { grid-column:1/-1; display:flex; align-items:center; gap:8px; } #apQuetes header span { display:flex; align-items:center; gap:2px; margin-left:auto; color:var(--pale); font-size:13px; transition:color .15s; } #apQuetes:hover header span { color:var(--texte); }
.ql { display:flex; align-items:center; gap:12px; min-width:0; padding:14px 16px; border-radius:var(--rayon); background:var(--surface); }
.ql img { width:32px; height:32px; flex:none; border-radius:50%; } .ql div { flex:1; min-width:0; } .ql b { display:block; margin-bottom:7px; font-weight:500; font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ql em { flex:none; display:flex; font-style:normal; font-size:12px; color:var(--pale); font-variant-numeric:tabular-nums; } .ql.pret em { color:var(--accent); font-weight:500; } .ql.fait { opacity:.45; }

/* ---------- équipement ---------- */
.p-equip { display:grid; grid-template-columns:340px minmax(0, 1fr); gap:44px; align-items:start; }
.perso header { display:flex; align-items:baseline; justify-content:space-between; margin-bottom:14px; } .perso h2 { font:400 22px/1.15 var(--display); } .perso header span { color:var(--pale); font-size:13px; }
.emps { display:grid; grid-template-columns:64px minmax(0, 1fr) 64px; grid-template-areas:'chapeau hero arme' 'cape hero amulette' 'ceinture hero anneau' 'bottes hero anneau2'; gap:8px; align-items:center; padding:16px; border-radius:20px; background:var(--surface); }
.emps canvas { grid-area:hero; width:100%; aspect-ratio:1; align-self:end; pointer-events:none; }
.emps canvas { width:320px; justify-self:center; } /* le perso en grand : un peu plus haut que les 4 emplacements (4 × 64 + 3 × 8 = 280) ; le canevas, transparent sur les bords, déborde sur eux et vers le haut */
.emp, .obj, .dof { position:relative; aspect-ratio:1; display:grid; place-items:center; border-radius:12px; background:var(--surface2); border:1px solid transparent; transition:border-color .15s, background .15s; }
.emp { background:none; border:1px dashed var(--trait2); } .emp.plein { background:var(--surface2); border:1px solid transparent; }
.emp img, .obj img, .dof img { width:76%; height:76%; object-fit:contain; } .emp .vide-emp { width:46%; height:46%; filter:brightness(2.6); } /* silhouette de l'emplacement vide (client), éclaircie */ .emp small { font-size:10px; color:var(--pale); }
button.emp:hover, .obj:hover, button.dof:hover { border-color:var(--trait2); } .emp.sel, .obj.sel, .dof.sel { border:1px solid var(--accent); }
.obj::after { content:''; position:absolute; left:26%; right:26%; bottom:5px; height:2px; border-radius:1px; background:var(--r); } /* couleur de sa panoplie */
.niv { position:absolute; top:5px; right:6px; font:600 10px/1 var(--sans); color:var(--doux); font-variant-numeric:tabular-nums; }
.point { position:absolute; top:6px; left:6px; width:7px; height:7px; border-radius:50%; } .point.libre { background:var(--bleu); } .point.amelio { background:var(--accent); }
.coche { position:absolute; bottom:4px; right:4px; width:15px; height:15px; display:grid; place-items:center; border-radius:50%; background:var(--accent); color:var(--sur-accent); }
.perso .lignes { margin-top:16px; } .pano-actif { margin-top:12px; font-size:13px; color:var(--doux); } .pano-actif b { display:block; color:var(--accent); font-weight:500; }
.contenu { min-width:0; display:flex; flex-direction:column; gap:16px; }
.sac { display:grid; grid-template-columns:repeat(auto-fill, minmax(64px, 1fr)); gap:8px; }
.legende { display:flex; flex-wrap:wrap; gap:4px 18px; font-size:12px; color:var(--pale); } .legende span { display:inline-flex; align-items:center; gap:6px; } .legende .point { position:static; }
.inspecteur { position:sticky; bottom:0; display:flex; flex-direction:column; gap:12px; padding:16px; border-radius:var(--rayon); background:var(--surface2); border:1px solid var(--trait2); }
.inspecteur > .ib { position:absolute; top:6px; right:6px; }
.fiche-obj { display:flex; align-items:center; gap:14px; padding-right:28px; } .fiche-obj img { width:56px; height:56px; flex:none; padding:6px; border-radius:12px; background:var(--fond); object-fit:contain; }
.fiche-obj b { display:block; font-weight:600; font-size:15px; } .fiche-obj small { display:block; color:var(--pale); font-size:12px; } .fiche-obj span { display:block; margin-top:3px; color:var(--accent); font-size:13px; } .fiche-obj em { display:block; font-style:normal; color:var(--doux); font-size:12px; }
.compare { font-size:13px; color:var(--doux); } .compare b { color:var(--texte); font-weight:500; } .compare .gain { color:var(--ok); } .compare .perte { color:var(--rouge); }
.panos { display:grid; grid-template-columns:repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap:10px; }
.pano { padding:16px; border-radius:var(--rayon); background:var(--surface); } .pano header { display:flex; align-items:baseline; justify-content:space-between; gap:8px; } .pano header b { font-weight:600; }
.pano header b::before { content:''; display:inline-block; width:8px; height:8px; margin-right:8px; border-radius:50%; background:var(--r); } .pano small, .pano > p { color:var(--pale); font-size:12px; }
.pano .its { display:flex; flex-wrap:wrap; gap:6px; margin:12px 0; } .pano .its img { width:38px; height:38px; padding:3px; border-radius:9px; background:var(--surface2); object-fit:contain; }
.pano .its img.non { filter:grayscale(1) brightness(.45); } .pano .its img.porte { box-shadow:inset 0 0 0 1px var(--accent); }
.pano ul { list-style:none; display:grid; gap:4px; font-size:12px; color:var(--pale); } .pano li.ok { color:var(--texte); } .pano li b { margin-right:8px; font-weight:500; }
.dofus { display:grid; grid-template-columns:repeat(auto-fill, minmax(72px, 1fr)); gap:8px; } .dof.non img { filter:grayscale(1) brightness(.45); } .dof.ray { border-color:var(--dore); }
.a-pose { animation:n-pose .4s cubic-bezier(.3,1.5,.5,1); } @keyframes n-pose { from { transform:scale(.6); } }
.a-fusion { animation:n-niveau .5s ease-out; } @keyframes n-niveau { 30% { transform:scale(1.12); border-color:var(--accent); } }
.a-tenue { animation:n-tenue .5s ease-out; } @keyframes n-tenue { 35% { transform:translateY(-8px); } }

/* ---------- talents, quêtes, sorts : une même carte ---------- */
.seg.large { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); align-self:stretch; } .seg.large button { height:48px; justify-content:center; min-width:0; }
.intro { margin:18px 0 0; color:var(--doux); }
.rang { margin-top:28px; } .rang:first-child { margin-top:0; }
.tal { display:flex; align-items:center; gap:14px; min-width:0; padding:16px; border-radius:var(--rayon); background:var(--surface); border:1px solid transparent; }
.tal > div { flex:1; min-width:0; } .tal header { display:flex; align-items:baseline; justify-content:space-between; gap:8px; } .tal header b { font-weight:600; } .tal header small { flex:none; color:var(--pale); font-size:12px; font-variant-numeric:tabular-nums; }
.tal .ic { width:40px; height:40px; flex:none; display:grid; place-items:center; border-radius:12px; background:var(--surface2); } .tal .ic img { width:22px; height:22px; object-fit:contain; } .tal .ic.sort img { width:100%; height:100%; border-radius:12px; }
.crans { display:flex; gap:3px; margin:8px 0; } .crans i { flex:1; height:3px; border-radius:2px; background:rgba(255,255,255,.08); } .crans i.on { background:var(--c, var(--accent)); }
.tal p { color:var(--doux); font-size:13px; line-height:1.4; } .tal p em { font-style:normal; color:var(--ok); }
.tal .b { height:34px; flex:none; padding:0 12px; font-size:13px; } .tal .fait { flex:none; display:flex; align-items:center; gap:5px; color:var(--pale); font-size:12px; }
.tal.ferme { opacity:.45; } .tal.achat { animation:n-achat .5s ease-out; } @keyframes n-achat { 40% { transform:scale(1.02); background:var(--surface2); } }
.quete .ic img { width:30px; height:30px; border-radius:50%; } .quete .jg { margin:8px 0 6px; } .quete.prete { border-color:var(--accent); } .quete.max { opacity:.5; }
.sect.etroit { max-width:520px; }

/* ---------- classes ---------- */
.p-classes { display:grid; grid-template-columns:250px minmax(0, 1fr); grid-auto-rows:max-content; gap:44px; align-items:start; } /* max-content : la liste défile (téléphone), sa rangée ne doit pas tomber à 0 */
.cls-liste { display:flex; flex-direction:column; gap:2px; }
.cls { display:flex; align-items:center; gap:12px; padding:9px 12px 9px 9px; border-radius:14px; color:var(--pale); transition:background .12s; } .cls:hover { background:var(--surface); } .cls.on { background:var(--surface2); }
.cls img { width:44px; height:44px; flex:none; border-radius:50%; background:var(--surface2); object-fit:cover; } .cls.verrou img { filter:grayscale(1) brightness(.6); } .cls .kam img { width:auto; height:11px; border-radius:0; background:none; filter:none; }
.cls > span { flex:1; min-width:0; display:flex; flex-direction:column; line-height:1.35; } .cls b { font-weight:500; color:var(--texte); } .cls small { font-size:12px; }
.cls-detail { display:grid; grid-template-columns:minmax(220px, 340px) minmax(0, 1fr); gap:36px; align-items:center; }
.cls-scene { border-radius:24px; background:var(--surface); } #clCanvas { display:block; width:100%; aspect-ratio:1; }
.cls-info { display:flex; flex-direction:column; align-items:flex-start; gap:14px; min-width:0; }
.cls-info h2 { display:flex; align-items:center; gap:12px; font:400 44px/1.15 var(--display); letter-spacing:0; } .cls-info h2 img { width:.7em; height:.7em; }
.texte { max-width:46ch; color:var(--doux); font-size:15px; } .cls-info .tuiles { width:min(360px, 100%); grid-template-columns:repeat(2, minmax(0, 1fr)); }
.choisie { display:inline-flex; align-items:center; gap:8px; height:40px; color:var(--accent); font-weight:500; }
.cls-detail .sect { grid-column:1/-1; margin-top:8px; }
.couleurs { display:flex; flex-direction:column; align-items:flex-start; gap:10px; width:100%; } .teintes { display:flex; flex-wrap:wrap; gap:14px; }
.teinte { display:flex; flex-direction:column; align-items:center; gap:6px; font-size:11px; color:var(--pale); } .teinte i { width:34px; height:34px; border-radius:50%; box-shadow:inset 0 0 0 1px rgba(255,255,255,.2); } .teinte:hover { color:var(--texte); }
.nuancier { width:min(280px, 100%); padding:12px; border-radius:var(--rayon); background:var(--surface); border:1px solid var(--trait2); }
.nuancier header, .nuancier footer { display:flex; align-items:center; gap:6px; } .nuancier header b { flex:1; font-weight:500; }
.palette { display:grid; grid-template-columns:repeat(10, 1fr); gap:4px; margin:8px 0 10px; } .palette i { aspect-ratio:1; border-radius:50%; cursor:pointer; } .palette i:hover { box-shadow:0 0 0 2px var(--surface), 0 0 0 3px var(--texte); }
.plan { display:flex; gap:10px; height:130px; margin-bottom:10px; }
.carte-ts { position:relative; flex:1; border-radius:10px; cursor:crosshair; touch-action:none; background:linear-gradient(transparent, #fff), linear-gradient(90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); }
.lum { position:relative; width:16px; border-radius:8px; cursor:pointer; touch-action:none; }
.carte-ts i, .lum i { position:absolute; width:14px; height:14px; margin:-7px 0 0 -7px; border-radius:50%; border:2px solid #fff; box-shadow:0 0 0 1px rgba(0,0,0,.5); pointer-events:none; } .lum i { left:50%; }
.nuancier label { flex:1; min-width:0; display:flex; align-items:center; gap:8px; height:36px; padding:0 10px; border-radius:10px; border:1px solid var(--trait2); } .nuancier label i { width:16px; height:16px; flex:none; border-radius:50%; }
.nuancier input { flex:1; min-width:0; border:0; background:none; color:var(--texte); font:500 13px var(--sans); letter-spacing:.04em; outline:none; }

/* ---------- classement ---------- */
.p-classement .chips { margin-bottom:20px; } .table { display:flex; flex-direction:column; }
.lg { display:grid; grid-template-columns:32px 32px minmax(0, 1fr) auto; align-items:center; gap:14px; padding:10px 12px; border-bottom:1px solid var(--trait); }
.lg > b { text-align:center; font-weight:500; color:var(--pale); font-variant-numeric:tabular-nums; } .lg:nth-child(-n+3) > b { color:var(--accent); }
.lg img { width:32px; height:32px; border-radius:50%; background:var(--surface2); object-fit:cover; } .lg span { font-weight:500; overflow:hidden; text-overflow:ellipsis; } .lg em { font-style:normal; color:var(--doux); font-size:13px; font-variant-numeric:tabular-nums; }
.lg.prof { cursor:pointer; } .lg.prof:hover { background:var(--surface); } .lg.moi { border-radius:10px; border-color:transparent; background:var(--accent-doux); }

/* ---------- compte ---------- */
.auth { display:grid; grid-template-columns:minmax(0, 420px) minmax(0, 1fr); gap:56px; align-items:start; } .auth > div > .sect:first-child { margin-top:0; }
.auth:has(> .boite:only-child) { grid-template-columns:minmax(0, 420px); justify-content:center; padding-top:4vh; }
.boite { display:flex; flex-direction:column; gap:14px; padding:28px; border-radius:20px; background:var(--surface); border:1px solid var(--trait); }
.boite h2 { font:400 25px/1.15 var(--display); letter-spacing:0; } .boite > p { color:var(--doux); font-size:13px; } .boite p b { color:var(--texte); font-weight:500; } .boite .rangee .b { flex:1; }
.boite label, .champs label { display:flex; flex-direction:column; gap:6px; font-weight:500; font-size:13px; color:var(--doux); } .boite label small, .champs label small { font-weight:400; font-size:12px; color:var(--pale); }
.boite input, .champs input { height:42px; padding:0 12px; border-radius:10px; border:1px solid var(--trait2); background:var(--fond); color:var(--texte); font:400 15px var(--sans); outline:none; transition:border-color .15s; }
.boite input:focus, .champs input:focus { border-color:var(--accent); }
.err { min-height:1.3em; color:var(--rouge); font-size:13px; } .err:empty { display:none; } .err.ok { color:var(--ok); } .boite .note { text-align:center; color:var(--pale); font-size:12px; margin-top:-6px; }
.tete { display:flex; align-items:center; gap:18px; } .tete img { width:64px; height:64px; flex:none; border-radius:50%; background:var(--surface2); object-fit:cover; }
.tete h2 { font:400 30px/1.15 var(--display); letter-spacing:0; } .tete p { margin-top:4px; color:var(--doux); font-size:13px; } .tete .b { margin-left:auto; }
.champs { display:grid; grid-template-columns:repeat(2, minmax(0, 280px)); gap:14px; align-items:start; } .champs .err, .champs .b { grid-column:1/-1; justify-self:start; }

/* ---------- aide ---------- */
.doc { columns:2 340px; column-gap:56px; color:var(--doux); line-height:1.65; }
.doc h4 { display:flex; align-items:center; gap:10px; margin:30px 0 8px; font:400 19px/1.2 var(--display); color:var(--texte); break-after:avoid; } .doc h4:first-child { margin-top:0; } .doc h4 img { width:22px; height:22px; object-fit:contain; }
.doc p { margin-bottom:10px; break-inside:avoid; } .doc b { color:var(--texte); font-weight:500; } .doc .rar { display:inline-block; margin-right:4px; padding:0 8px; border-radius:9px; color:#fff; font-size:11px; }
.doc .ancienne { margin-top:26px; color:var(--pale); font-size:13px; } .doc .ancienne a { color:var(--pale); } /* version, Nouveautés, l'ancien site gardé sur /ancien */
.doc.nouveautes ul { margin:0 0 0 18px; padding:0; } .doc.nouveautes li { margin:4px 0; }
.doc .dj-ligne { display:flex; justify-content:space-between; gap:12px; padding:9px 0; border-bottom:1px solid var(--trait); font-size:13px; break-inside:avoid; } .doc .dj-ligne .etat { color:var(--pale); text-align:right; }

/* ---------- paramètres : le panneau vient du jeu (panneauReglages, 03-audio.js, aussi dans la pause) ; ici, seulement son habillage sur le site ---------- */
#page .reglages { max-width:720px; }
#page .reglages h4 { margin:32px 0 6px !important; font:500 12px var(--sans); letter-spacing:.08em; text-transform:uppercase; color:var(--pale); } #page .reglages h4:first-child { margin-top:0 !important; }
#page .reglages .ligne { display:flex; align-items:center; gap:16px !important; margin:0; padding:14px 0; border:0; border-bottom:1px solid var(--trait); border-radius:0; background:none; box-shadow:none; cursor:pointer; }
#page .reglages .ligne span { flex:1; } #page .reglages .ligne small { font-weight:400 !important; font-size:12px; color:var(--pale) !important; }
#page .reglages .ligne b { min-width:56px; text-align:right; color:var(--doux); font-weight:500; font-variant-numeric:tabular-nums; }
#page .reglages input[type=range] { flex:1.2; height:20px; accent-color:var(--accent); }
#page .reglages input[type=checkbox] { appearance:none; position:relative; width:40px; height:24px; flex:none; margin:0; border-radius:12px; background:var(--surface2); border:1px solid var(--trait2); cursor:pointer; transition:background .15s; }
#page .reglages input[type=checkbox]::after { content:''; position:absolute; top:2px; left:2px; width:18px; height:18px; border-radius:50%; background:var(--doux); transition:transform .15s; }
#page .reglages input[type=checkbox]:checked { background:var(--accent); border-color:transparent; } #page .reglages input[type=checkbox]:checked::after { transform:translateX(16px); background:var(--sur-accent); }
#page .reglages .ligne .pill { flex:none; display:inline-flex; align-items:center; height:32px; padding:0 14px; border-radius:16px; border:1px solid var(--trait2); background:none; box-shadow:none; color:var(--doux); font:500 13px var(--sans); letter-spacing:0; cursor:pointer; }
#page .reglages .ligne .pill.or { background:var(--texte); border-color:transparent; color:var(--fond); }
#page .reglages p { margin-top:24px; color:var(--pale); font-weight:400; font-size:12px; line-height:1.6; }

/* ---------- chat : tiroir à droite ; pendant une partie (#menu caché), boîte compacte avec sa languette ---------- */
#tchat { position:fixed; top:0; right:0; bottom:0; z-index:9; width:min(340px, 100vw); display:flex; flex-direction:column; background:var(--surface); border-left:1px solid var(--trait); transition:transform .22s cubic-bezier(.2,.8,.2,1); }
#tchat.ferme { transform:translateX(100%); }
#tchat > header { flex:none; display:flex; align-items:center; justify-content:space-between; height:76px; padding:0 14px 0 20px; } #tchat h2 { font:400 19px/1.15 var(--display); }
#tcOnglet { position:absolute; right:100%; top:50%; width:36px; height:48px; margin-top:-24px; display:grid; place-items:center; border-radius:12px 0 0 12px; background:var(--surface); border:1px solid var(--trait); border-right:0; color:var(--doux); }
body:has(#menu:not([hidden])) #tcOnglet { display:none; } /* sur le site : bouton de la barre du haut */
#tcNonLus { position:absolute; top:-6px; left:-6px; min-width:18px; height:18px; padding:0 5px; border-radius:9px; background:var(--accent); color:var(--sur-accent); font:600 11px/18px var(--sans); text-align:center; }
#tchat #tcOnglets { flex:none; display:flex; flex-wrap:wrap; gap:6px; padding:0 20px 12px; }
#tchat .onglet { position:relative; display:inline-flex; align-items:center; height:28px; padding:0 12px; border-radius:14px; border:1px solid var(--trait); background:none; color:var(--doux); font-size:12px; cursor:pointer; }
#tchat .onglet.on { background:var(--texte); border-color:transparent; color:var(--fond); } #tchat .onglet i { margin-left:8px; font-style:normal; opacity:.55; } #tchat .onglet i:hover { opacity:1; color:inherit; }
#tchat .onglet.nonlu::after { content:''; position:absolute; top:-2px; right:-2px; width:8px; height:8px; border-radius:50%; background:var(--accent); box-shadow:none; }
#tchat #tcLog, #tchat #tcMp { flex:1; min-height:0; display:flex; flex-direction:column; gap:7px; padding:4px 20px 14px; overflow-y:auto; overflow-wrap:anywhere; font-size:13px; line-height:1.45; color:var(--doux); user-select:text; -webkit-user-select:text; }
#tchat #tcLog b, #tchat #tcMp b { color:var(--texte); font-weight:600; } #tchat #tcLog .moi b, #tchat #tcMp .moi b { color:var(--accent); } #tchat #tcLog .admin b { color:var(--dore); }
#tchat #tcLog .sys, #tchat #tcMp .sys, #tchat #tcLog .bienvenue { color:var(--pale); font-style:normal; font-size:12px; } #tchat #tcLog .admin { color:var(--doux); }
#tchat #tcIn { flex:none; height:44px; margin:0 16px calc(16px + env(safe-area-inset-bottom)); padding:0 14px; border-radius:12px; border:1px solid var(--trait2); background:var(--fond); color:var(--texte); font:400 14px var(--sans); outline:none; }
#tchat #tcIn:focus { border-color:var(--accent); }
body:has(#menu[hidden]) #tchat { top:50%; bottom:auto; height:min(420px, 64vh); margin-top:max(-210px, -32vh); border:1px solid var(--trait); border-right:0; border-radius:16px 0 0 16px; } body:has(#menu[hidden]) #tchat > header { height:52px; }
@media (min-width:1280px) { #menu { transition:right .22s cubic-bezier(.2,.8,.2,1); } body:has(#tchat:not(.ferme)) #menu { right:340px; } } /* grand écran : le site se pousse au lieu d'être recouvert */

/* ---------- fenêtre (profil, joueurs en ligne) ---------- */
#dlg { width:min(560px, calc(100vw - 24px)); max-height:min(780px, calc(100dvh - 24px)); padding:0; border:1px solid var(--trait2); border-radius:20px; background:var(--surface); overflow:hidden; }
#dlg[open] { display:flex; flex-direction:column; } #dlg:focus { outline:none; } #dlg::backdrop { background:rgba(0,0,0,.6); } #dlg.etroit { width:min(440px, calc(100vw - 24px)); }
#dlg > header { flex:none; display:flex; align-items:center; gap:8px; padding:18px 14px 10px 24px; } #dlg h2 { flex:1; min-width:0; font:400 22px/1.15 var(--display); letter-spacing:0; } #dlg h2 small { margin-left:10px; font:400 14px var(--sans); color:var(--pale); }
#dlg .corps { overflow-y:auto; padding:6px 24px 24px; } #dlg .corps > p { color:var(--doux); margin-bottom:16px; } #dlg .corps p b { color:var(--texte); font-weight:500; }
#dlg .sect { margin-top:28px; } #dlg .tuiles div, #dlg .emps { background:var(--surface2); } #dlg .emp.plein { background:var(--fond); } #dlg .emps { margin:14px 0 16px; } .fiche-profil { margin:-6px 0 16px; padding:12px 14px; border-radius:var(--rayon); background:var(--surface2); border:1px solid var(--trait2); } .rg span:has(.feu) { display:flex; align-items:center; gap:6px; } .rg .feu { font-weight:600; } #dlg .emps canvas { width:360px; } #dlg .lignes { grid-template-columns:repeat(2, minmax(0, 1fr)); column-gap:28px; } /* profil : le personnage au milieu de ses emplacements, sur toute la largeur */
.joueur { display:flex; align-items:center; gap:14px; padding:11px 0; border-bottom:1px solid var(--trait); } .joueur img { width:42px; height:42px; flex:none; border-radius:50%; background:var(--surface2); object-fit:cover; }
.joueur div { flex:1; min-width:0; display:flex; flex-direction:column; } .joueur b { font-weight:500; } .joueur b small { margin-left:6px; color:var(--pale); font-weight:400; font-size:12px; } .joueur span { color:var(--doux); font-size:12px; } .joueur span.enligne { color:var(--ok); }
.joueur.prof { cursor:pointer; } .joueur.prof:hover b { text-decoration:underline; text-underline-offset:3px; } .tete-profil { border:0; padding:0; cursor:default; }
/* ---------- titres : à côté du pseudo, à la couleur de leur rareté (posée en ligne, REGLES.RARETES_TITRE) ; seul le mythique s'anime ---------- */
:where(#menu, #tchat, #dlg, #toast, #tcLog) .titre { font-style:normal; font-weight:600; font-size:.82em; white-space:nowrap; } /* :where : la classe est posée par 01-base.js, le sélecteur doit citer un identifiant (verif-css) sans peser plus lourd */
.titre.r5 { background:linear-gradient(90deg, #ff4d6d, #ffc04d, #ff4d6d) 0 0/200% 100%; -webkit-background-clip:text; background-clip:text; color:transparent !important; animation:titre-myth 2.5s linear infinite; }
@keyframes titre-myth { to { background-position:-200% 0; } }
.lg span .titre { display:block; font-size:12px; line-height:1.3; } #avNom .titre { font-size:1em; } #tchat #tcLog .titre { font-size:11px; }
.joueur b .titre, #dlg h2 .titre { margin-left:8px; } #dlg h2 .titre { font:600 13px var(--sans); vertical-align:2px; }
.lien-titre { display:inline-flex; align-items:center; flex-wrap:wrap; gap:4px 12px; margin-top:10px; padding:8px 14px; border:1px solid var(--trait2); border-radius:999px; }
.lien-titre:hover { border-color:var(--accent); } .lien-titre .titre { font-size:14px; } .lien-titre span { color:var(--doux); font-size:12px; }
.raretes { display:flex; flex-wrap:wrap; gap:4px 14px; } .raretes .titre { font-size:12px; }
.tt-liste { display:flex; flex-direction:column; gap:6px; }
.tt { display:grid; grid-template-columns:minmax(0, 1fr) auto; align-items:center; gap:0 12px; padding:10px 14px; border:1px solid var(--trait); border-radius:12px; background:var(--surface2); }
.tt > .titre, .tt > b { font-size:15px; font-weight:600; white-space:normal; } .tt small { grid-column:1; color:var(--doux); font-size:12px; }
.tt em { grid-area:1 / 2 / 3 / 3; display:flex; align-items:center; gap:4px; font-style:normal; font-size:12px; color:var(--pale); }
.tt:hover:not(:disabled) { border-color:var(--trait2); } .tt:hover:not(:disabled) em { color:var(--texte); }
.tt.on { border-color:var(--accent); background:var(--accent-doux); } .tt.on em { color:var(--accent); }
.tt:disabled { cursor:default; opacity:.5; }

/* ---------- chargement, messages ---------- */
#chargement { position:fixed; inset:0; z-index:10; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:22px; background:var(--fond); transition:opacity .4s; }
#chargement.fin { opacity:0; pointer-events:none; } #chargement .mot { padding:0; font-size:44px; gap:5px; } #chargement .mot i { width:10px; height:10px; }
.piste { width:min(260px, 70vw); height:2px; border-radius:1px; background:rgba(255,255,255,.1); overflow:hidden; } #chBarre { width:0; height:100%; background:var(--accent); transition:width .15s; }
#chTxt { font-size:13px; color:var(--doux); font-variant-numeric:tabular-nums; text-align:center; padding:0 20px; } #chAstuce { max-width:380px; min-height:3em; padding:0 20px; text-align:center; font-size:13px; color:var(--pale); }
#toast { position:fixed; left:50%; bottom:calc(28px + env(safe-area-inset-bottom)); z-index:20; max-width:min(420px, 90vw); padding:11px 16px; border-radius:12px; background:var(--texte); color:var(--fond); font-weight:500; font-size:13px; text-align:center;
  pointer-events:none; opacity:0; transform:translate(-50%, 8px); transition:opacity .2s, transform .2s; } #toast.vu { opacity:1; transform:translate(-50%, 0); }
#toast.bon { display:flex; flex-direction:column; gap:2px; padding:12px 22px; border:1px solid var(--trait2); background:var(--surface2); color:var(--doux); } #toast.bon small { font-size:12px; } #toast.bon .titre { font-size:17px; white-space:normal; } /* titre gagné (annoncerTitres, 01-base.js) */
#tcAnnonce { position:fixed; left:50%; top:16px; transform:translateX(-50%); z-index:12; width:min(520px, calc(100vw - 32px)); padding:14px 18px; border-radius:var(--rayon); background:var(--surface2); border:1px solid var(--trait2); cursor:pointer; overflow-wrap:anywhere; }
#tcAnnonce b { display:block; margin-bottom:2px; font-weight:500; font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--accent); } #tcAnnonce small { display:block; margin-top:2px; color:var(--pale); font-size:12px; }
/* tutoriel du nouveau joueur (neo/tuto.js) : une bulle qui ne prend pas les clics, sauf ses boutons. En bas sur les pages, en haut à l'accueil (rien dessous), sous le compteur de vagues en jeu, tout en haut devant les cartes */
#tuto { position:fixed; left:50%; bottom:calc(28px + env(safe-area-inset-bottom)); transform:translateX(-50%); z-index:8; width:max-content; max-width:min(440px, calc(100vw - 24px)); padding:9px 14px 11px; border-radius:var(--rayon);
  background:var(--surface2); border:1px solid var(--accent); font:400 14px/1.45 var(--sans); color:var(--texte); pointer-events:none; }
#tuto.accueil { bottom:auto; top:84px; } #tuto.jeu { bottom:auto; top:128px; } #tuto.choix { bottom:auto; top:8px; }
#tuto div { display:flex; justify-content:space-between; align-items:center; gap:20px; } #tuto small { font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--accent); } #tuto p { margin:2px 0 0; } #tuto b { font-weight:600; color:var(--accent); }
#tuto button { pointer-events:auto; padding:2px 0; border:0; background:none; font:inherit; font-size:12px; color:var(--pale); cursor:pointer; } #tuto [data-passer]:hover { color:var(--texte); }
#tuto [data-ok] { display:block; margin:8px 0 0 auto; padding:6px 14px; border-radius:8px; background:var(--accent); color:var(--sur-accent); font-weight:600; }
#menu .tuto-cible { outline:2px solid var(--accent); outline-offset:3px; animation:tutoCible 1.1s ease-in-out infinite alternate; } @keyframes tutoCible { to { outline-offset:7px; outline-color:transparent; } }
@media (max-height:500px) { #tuto.jeu { left:8px; top:60px; transform:none; max-width:250px; font-size:13px; } } /* téléphone couché : à gauche, le personnage reste visible */

/* ---------- téléphone : le rail devient la barre du bas, « Plus » ouvre le reste ; chaque page est réordonnée pour le pouce (l'action en bas, à portée) ---------- */
@media (max-width:899px) {
  #menu { grid-template-columns:minmax(0, 1fr); padding:env(safe-area-inset-top) env(safe-area-inset-right) calc(60px + env(safe-area-inset-bottom)) env(safe-area-inset-left); }
  #rail { position:fixed; left:0; right:0; bottom:0; z-index:4; flex-direction:row; height:calc(60px + env(safe-area-inset-bottom)); padding:0 4px env(safe-area-inset-bottom); border-right:0; border-top:1px solid var(--trait); background:var(--fond); overflow:visible; }
  #rail > .mot, #plus > small, .ressort { display:none; }
  #nav { flex:1; flex-direction:row; gap:0; }
  #nav .lien { position:relative; flex:1 1 0; min-width:0; height:60px; flex-direction:column; justify-content:center; gap:3px; padding:0; border-radius:0; background:none; font-size:10px; }
  #nav .lien.on::before { content:''; position:absolute; top:-1px; left:30%; right:30%; height:2px; border-radius:1px; background:var(--accent); } /* page courante : trait d'accent sur la barre */
  #nav .lien .pastille { position:absolute; top:7px; left:calc(50% + 5px); margin:0; } #btnPlus { display:flex; }
  #plus { display:none; position:fixed; left:8px; right:8px; bottom:calc(68px + env(safe-area-inset-bottom)); z-index:1; margin:0; padding:8px; border-radius:18px; background:var(--surface2); border:1px solid var(--trait2); }
  #plus .lien { height:48px; } #rail.plus #plus { display:flex; } #rail.plus::before { content:''; position:fixed; inset:0 0 calc(60px + env(safe-area-inset-bottom)); background:rgba(0,0,0,.55); }
  #haut { height:52px; padding:0 16px; } #pTitre { font-size:20px; } #enLigne span { display:none; }
  #accueil, #page { padding:4px 16px 28px; overscroll-behavior:contain; }

  /* accueil : tout tient sur un écran — le héros devant le donjon, le donjon choisi, les donjons à faire défiler, et « Jouer » collé en bas, sous le pouce */
  #djFond { background-position:center top; background-size:auto 46%; } #djFond::after { background:linear-gradient(rgba(11,11,12,.9), transparent 16%), linear-gradient(0deg, var(--fond) 54%, rgba(11,11,12,.3) 82%); }
  #accueil { display:flex; flex-direction:column; gap:0; padding:0 16px; } .lancement { display:contents; } #accueil > *, .lancement > * { flex:none; }
  .heros { order:1; } #heros { width:min(200px, 50vw, 27vh); }
  #fiche { display:flex; align-items:center; justify-content:center; gap:14px; } #fiche p, #fiche .puces { display:none; } #fiche h3 { font-size:19px; } /* le détail de la classe est sur sa page */
  .choix-cls { margin:0; gap:8px; } .choix-cls button { width:44px; height:44px; }
  #djSur { order:2; margin-top:16px; font-size:11px; } #djNom { order:2; margin-top:2px; font-size:clamp(25px, 7.4vw, 34px); } #djMeta { order:2; margin-top:6px; font-size:14px; } .lancement .jg { order:2; width:100%; margin-top:12px; }
  .donjons { order:3; margin-top:20px; } .donjons > .sur { font-size:11px; }
  #djListe { grid-auto-columns:104px; margin:6px -16px 0; padding:0 8px 4px; scroll-padding:0 8px; scroll-snap-type:x proximity; overscroll-behavior-x:contain; scrollbar-width:none; }
  .dj { scroll-snap-align:start; } .dj b { font-size:12px; }
  #apQuetes { order:4; margin-top:24px; grid-template-columns:minmax(0, 1fr); gap:8px; }
  #choixDj { order:9; position:sticky; bottom:0; z-index:2; flex-direction:column; flex-wrap:nowrap; align-items:stretch; gap:6px; margin:auto -16px 0; padding:22px 16px 12px; background:linear-gradient(transparent, var(--fond) 36%); }
  #choixDj { flex-direction:row; flex-wrap:wrap; align-items:center; gap:8px; } #go { flex:1; height:52px; } #go kbd { display:none; } #btnPacte { height:52px; padding:0 16px; } #annuler { flex-basis:100%; text-align:center; padding:4px 8px; }
  .pc { gap:8px; } .pc-pips { min-width:0; flex-direction:column-reverse; } .pc-rang { gap:4px; }

  /* équipement : emplacements, puis tout de suite le sac ; les bonus passent dessous ; la fiche de l'objet touché reste collée en bas */
  .p-equip { display:flex; flex-direction:column; align-items:stretch; gap:12px; } .perso, .contenu { display:contents; } .perso > *, .contenu > * { flex:none; }
  .perso header { order:1; margin:0; } .emps { order:2; grid-template-columns:58px minmax(0, 1fr) 58px; padding:12px; } .emps canvas { width:296px; } /* 4 × 58 + 3 × 8 = 256, + 40 comme sur grand écran */
  .contenu .seg { order:3; margin-top:6px; } .contenu .chips { order:4; margin:0 -16px; padding:0 16px; } .sac, .panos, .dofus { order:5; } .contenu .legende { order:6; }
  .perso .lignes { order:7; margin-top:12px; } .pano-actif { order:8; margin:0; } .inspecteur { order:9; bottom:8px; gap:8px; margin:0 -8px; padding:12px; } .fiche-obj { gap:12px; } .fiche-obj img { width:46px; height:46px; } .compare { font-size:12px; } .inspecteur .b { flex:1; height:44px; }
  .seg { align-self:stretch; } .seg button { flex:1; justify-content:center; height:40px; padding:0 6px; } .seg small { display:none; }
  .chip { height:34px; padding:0 13px; }

  /* classes : l'aperçu à côté du nom, le bouton de choix juste dessous */
  .p-classes { grid-template-columns:minmax(0, 1fr); gap:16px; }
  .cls-liste { flex-direction:row; margin:0 -16px; padding:0 12px; overflow-x:auto; scrollbar-width:none; overscroll-behavior-x:contain; } .cls { flex:none; width:86px; flex-direction:column; gap:6px; padding:10px 4px; text-align:center; } .cls > .ico { display:none; } .cls > span { flex:none; align-items:center; }
  .cls-detail { grid-template-columns:132px minmax(0, 1fr); gap:4px 16px; align-items:start; } .cls-info { display:contents; }
  .cls-scene { grid-column:1; grid-row:1 / span 3; align-self:center; border-radius:18px; }
  .cls-info > .sur, .cls-info > h2, .cls-info > .texte { grid-column:2; } .cls-info > .sur { align-self:end; font-size:11px; } .cls-info > h2 { font-size:28px; gap:8px; } .cls-info > .texte { font-size:14px; }
  .cls-info > .tuiles, .cls-info > .b, .cls-info > .choisie, .cls-info > .couleurs { grid-column:1/-1; } .cls-info > .tuiles { width:auto; margin-top:12px; } .cls-info > .b { height:48px; margin-top:6px; } .cls-info > .couleurs { margin-top:10px; }
  .tuiles div { padding:10px 14px; } .tuiles b { font-size:20px; } .teintes { gap:10px 12px; } .teinte i { width:40px; height:40px; } .nuancier { width:100%; }

  /* cartes (talents, quêtes, sorts) : moins de marge, plus de place pour le texte */
  .tal { gap:12px; padding:12px; } .tal .ic { width:36px; height:36px; } .rang { margin-top:22px; } .sect { margin-top:28px; }
  .auth { grid-template-columns:minmax(0, 1fr); gap:24px; } .boite { padding:20px; } .boite .b, .champs .b { height:46px; }
  .champs { grid-template-columns:minmax(0, 1fr); } .tete { flex-wrap:wrap; } .tete .b { margin-left:0; }
  .lg { gap:10px; padding:10px 4px; } .doc { columns:1; } #toast, #tuto { bottom:calc(76px + env(safe-area-inset-bottom)); } #tuto.accueil { top:auto; bottom:calc(146px + env(safe-area-inset-bottom)); } /* au-dessus du bouton Jouer, collé en bas */
  /* paramètres : le libellé sur sa ligne, la réglette ou les choix dessous en pleine largeur ; les interrupteurs restent à droite */
  #page .reglages .ligne { flex-wrap:wrap; gap:10px 12px !important; } #page .reglages .ligne:has(input[type=range]) span, #page .reglages .ligne:has(.pill) span:not(.pill) { flex:1 1 100%; }
  #page .reglages input[type=range] { flex:1; height:28px; } #page .reglages .ligne .pill { height:38px; padding:0 16px; }
  #dlg { width:calc(100vw - 16px); } #dlg .lignes { grid-template-columns:minmax(0, 1fr); } #dlg .emps canvas { width:296px; } #dlg > header { padding:16px 10px 8px 18px; } #dlg .corps { padding:6px 18px 20px; }
}
@media (max-width:520px) { #tchat { width:100vw; border-left:0; } #tchat > header { height:56px; } } /* téléphone : le chat prend tout l'écran, pas de bande inutile à gauche */
/* téléphone couché : pas la place d'empiler — le donjon à gauche, le héros à droite, le bouton dans la page */
@media (max-width:899px) and (orientation:landscape) and (max-height:520px) {
  #accueil { display:grid; grid-template-columns:minmax(0, 1fr) auto; grid-template-areas:'lancement heros' 'donjons donjons' 'quetes quetes'; gap:14px 24px; padding-bottom:20px; }
  .lancement { display:flex; gap:8px; } #djSur, #djNom, #djMeta, .lancement .jg { margin-top:0; } #choixDj { position:static; margin:6px 0 0; padding:0; background:none; }
  #heros { width:min(150px, 34vh); } .donjons, #apQuetes { margin-top:0; } #apQuetes { grid-template-columns:repeat(3, minmax(0, 1fr)); }
  #djFond { background-size:cover; background-position:center 35%; } #djFond::after { background:linear-gradient(0deg, var(--fond) 20%, rgba(11,11,12,.55)); }
}
/* tactile : pas de survol qui reste collé après un appui, mais un retour visible à l'appui */
@media (hover:none) {
  .dj:hover:not(.on), .cls:hover:not(.on), .lien:hover:not(.on) { background:none; }
  .b:active, .dj:active, .cls:active, .obj:active, button.emp:active, button.dof:active, .chip:active, .lien:active, .seg button:active, .choix-cls button:active, .teinte:active, .ib:active { transform:scale(.95); transition:transform .08s; }
}
@media (pointer:coarse) { #tchat #tcIn, .boite input, .champs input { font-size:16px; } #go kbd { display:none; } } /* 16 px : pas de zoom automatique sur iPhone */
@media (prefers-reduced-motion:reduce) { .a-pose, .a-fusion, .a-tenue, .tal.achat, .titre.r5 { animation:none; } #tchat, #menu { transition:none; } }
