/* Recherche T11 — styles propres à la page #t12 (référence : arbre de l'Académie de guerre). */

/* Page : même fond, même titre centré que les autres modules. */
/* Fond de page : brun-rouge de l'Académie, éclairé par une lumière chaude placée derrière la case Hélios
#t12{position:relative;isolation:isolate;overflow:hidden;padding:42px 22px 80px;color:#fff;background:#331b26}
/* Fond sur toute la largeur et la hauteur de l'écran ; le contenu reste dans la colonne centrale de 1240 px
   (les côtés accueilleront les bandeaux publicitaires verticaux). */
#t12.view{max-width:none;margin:0;min-height:calc(100svh - 76px);padding-inline:max(22px,calc((100% - 1240px) / 2 + 22px))}
#t12 .section-head{max-width:900px;margin:0 auto 22px;text-align:center}
#t12 .section-head>div{max-width:760px;margin-inline:auto}
#t12 .section-head h1{margin:0 0 12px;font-size:32px;color:#fff}
#t12 .section-head p{margin:0;font-size:16px;color:#d4efff}

/* Onglets de troupe. */
#t12 .t12-tabs{display:flex;justify-content:center;gap:6px;max-width:420px;margin:0 auto 18px;padding:5px;border:2px solid rgba(240,170,120,.42);border-radius:18px;background:rgba(42,14,12,.55)}
#t12 .t12-tabs button{flex:1;padding:10px 8px;border:0;border-radius:13px;background:transparent;color:#f3d2bb;font:inherit;font-size:16px;cursor:pointer}
#t12 .t12-tabs button:hover{color:#fff;background:rgba(255,190,140,.12)}
#t12 .t12-tabs button.active{color:#fff;background:linear-gradient(180deg,#b5603d,#8c4129);box-shadow:inset 0 1px rgba(255,220,190,.3),0 3px 8px rgba(30,6,6,.4)}

#t12 .t12-board{max-width:900px;margin:0 auto 22px;padding:22px 16px 30px;background:transparent}

/* Interrupteur « Remettre à zéro » : même composant que les autres pages, en tons bruns. */
#t12 .t12-actions{display:flex;justify-content:flex-start;max-width:900px;margin:-6px auto 18px}
#t12 .t12-actions .charm-bulk-select{margin:0;border-color:rgba(240,170,120,.42);background:rgba(42,14,12,.72);box-shadow:inset 0 1px rgba(255,220,190,.12),0 5px 14px rgba(20,4,4,.3);color:#fff}
#t12 .t12-actions .bulk-toggle{border-color:rgba(240,180,140,.5);background:linear-gradient(180deg,#6a3326,#4a2119);box-shadow:inset 0 2px 5px rgba(20,4,4,.45),0 1px rgba(255,220,190,.14)}
#t12 .t12-actions .bulk-toggle i{background:linear-gradient(180deg,#fff,#f3dccd)}
#t12 .t12-actions input:checked+.bulk-toggle{border-color:#ffc79c;background:linear-gradient(180deg,#d9804f,#a8502f);box-shadow:inset 0 1px rgba(255,255,255,.35),0 0 9px rgba(240,140,80,.45)}

/* Coût de recherche : mêmes cases que la page Chaudière. */
#t12 .t12-result{max-width:900px;margin:0 auto;padding:14px 18px 20px;border:2px solid rgba(240,170,120,.42);border-radius:26px;background:rgba(42,14,12,.72);box-shadow:inset 0 1px rgba(255,220,190,.14),0 14px 35px rgba(20,4,4,.4)}
#t12 .t12-result h2{margin:0 0 16px;padding:9px;border-radius:16px;font-size:20px;text-align:center;color:#fff;background:linear-gradient(180deg,#b5603d,#8c4129)}
/* Coûts sur 2 lignes centrées : 4 puis 3. */
#t12 .t12-cost-grid{display:flex;flex-wrap:wrap;justify-content:center;gap:16px 28px;max-width:calc(4 * 76px + 3 * 28px);margin:0 auto}
#t12 .t12-cost{position:relative;display:grid;justify-items:center;align-content:start;gap:6px;width:76px;outline:none}
#t12 .t12-cost-tile{display:grid;place-items:center;width:76px;height:76px;border:3px solid #76afee;border-radius:17px;background:linear-gradient(180deg,#365894,#a7d4f2);box-shadow:0 6px 12px rgba(0,15,39,.35)}
#t12 .t12-cost-shard .t12-cost-tile{border-color:#eba16e;background:linear-gradient(180deg,#935b2d,#f2ceaf)}
/* Ressources de base : cases vertes, comme sur la page Chaudière. */
#t12 :is(.t12-cost-meat,.t12-cost-wood,.t12-cost-coal,.t12-cost-iron) .t12-cost-tile{border-color:#6fc96a;background:linear-gradient(180deg,#2c7a2a,#a9e09c)}
/* Accélérateurs : même case bleue et même taille de pictogramme que la page Chaudière. */
#t12 .t12-cost-time .t12-cost-tile{border-color:#76afee;background:linear-gradient(180deg,#365894,#a7d4f2)}
#t12 .t12-cost-time .t12-cost-tile img{width:92%;height:92%}
/* Acier : pictogramme agrandi (l'image comporte des marges transparentes). */
#t12 .t12-cost-steel .t12-cost-tile img{width:100%;height:100%}
#t12 .t12-cost-tile img{width:82%;height:82%;object-fit:contain;filter:drop-shadow(0 4px 4px rgba(3,35,61,.32))}
#t12 .t12-cost strong{font-size:18px;color:#fff}

/* Fenêtre de réglage d'une recherche : couleurs des fenêtres d'information du jeu
   (fond rose pâle, rebord rosé, titre bordeaux, zone grisée, voile sombre flouté). */
#t12Picker{width:min(92vw,440px);padding:0;border:0;border-radius:22px;color:#665454;background:#f6e2e2;box-shadow:0 5px 0 #e4a2a2,0 24px 60px rgba(0,0,0,.55)}
#t12Picker::backdrop{background:rgba(24,12,15,.78);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
#t12Picker form{position:relative;display:grid;gap:14px;padding:20px 20px 22px;font-family:var(--site-font)}
#t12Picker .t12-close{position:absolute;top:12px;right:12px;width:32px;height:32px;border:1px solid #dec6c0;border-radius:50%;color:#843030;background:#fbeeee;font:inherit;font-size:20px;line-height:1;cursor:pointer}
#t12Picker .t12-picker-head{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:14px;padding:0 34px 14px 0;border-bottom:2px solid #dec6c0}
#t12Picker .t12-eyebrow{margin:0 0 2px;font-size:12px;letter-spacing:.12em;color:#b47e7e}
#t12Picker h2{margin:0 0 4px;font-size:22px;line-height:1.1;color:#843030}
#t12Picker .t12-picker-desc{margin:0;font-size:13px;line-height:1.3;color:#b47e7e}
#t12Picker .t12-steppers{display:flex;align-items:center;justify-content:center;gap:10px;padding:14px 12px;border-radius:12px;background:#e0c5c5}
#t12Picker .t12-stepper{display:grid;justify-items:center;gap:7px}
#t12Picker .t12-stepper small{font-size:13px;letter-spacing:.08em;color:#a84e4e}
#t12Picker .t12-stepper>div{display:flex;align-items:center;gap:6px}
#t12Picker .t12-stepper output{min-width:54px;text-align:center;font-size:22px;color:#665454}
#t12Picker .t12-stepper button,#t12Picker .t12-max{border:1px solid #c99a9a;color:#843030;background:#fbeeee;font:inherit;cursor:pointer;box-shadow:0 2px 0 #c99a9a}
#t12Picker .t12-stepper [data-t12-step]{width:36px;height:36px;border-radius:11px;font-size:20px;line-height:1}
#t12Picker .t12-max{padding:5px 14px;border-radius:10px;font-size:13px}
#t12Picker button:disabled{opacity:.4;cursor:default}
#t12Picker .t12-reqs{display:grid;gap:4px;margin:0;padding:10px 12px;border-radius:12px;background:#efd6d4;font-size:14px}
#t12Picker .t12-reqs[hidden]{display:none}
#t12Picker .t12-reqs small{font-size:12px;letter-spacing:.08em;color:#a84e4e}
#t12Picker .t12-reqs .ok{color:#3f7a3a}
#t12Picker .t12-reqs .missing{color:#a83a32}
#t12Picker .t12-apply{justify-self:center;margin-top:2px;padding:11px 34px;border:0;border-radius:14px;color:#fff;background:linear-gradient(180deg,#b5603d,#8c4129);font:inherit;font-size:17px;cursor:pointer;box-shadow:0 4px 0 #6a2e1d}

@media(max-width:600px){
  #t12.view{padding:26px 6px 60px}
  #t12 .section-head h1{font-size:28px}
  #t12 .section-head p{font-size:14px}
  #t12 .t12-board{padding:14px 0 20px}
  #t12 .t12-tabs,#t12 .t12-actions,#t12 .t12-result,#t12 .section-head{margin-inline:8px}
  #t12 .t12-cost-tile{width:58px;height:58px;border-radius:13px}
  #t12 .t12-cost{width:58px}
  #t12 .t12-cost-grid{gap:14px 16px;max-width:calc(4 * 58px + 3 * 16px)}
  #t12 .t12-cost strong{font-size:15px}
}

@media(max-width:600px){
  #t12Picker form{padding:18px 14px 20px}
  #t12Picker .t12-picker-head{gap:12px}
  #t12Picker h2{font-size:19px}
  #t12Picker .t12-steppers{gap:4px;padding:12px 6px}
  #t12Picker .t12-stepper>div{gap:4px}
  #t12Picker .t12-stepper [data-t12-step]{width:30px;height:30px;border-radius:9px;font-size:18px}
  #t12Picker .t12-stepper output{min-width:46px;font-size:19px}
}

/* Pictogrammes des ressources : dessin visible à 73 % de la case, comme sur la page Talismans
   (tailles calculées d'après les marges transparentes de chaque image ; léger recentrage du dessin). */
#t12 .t12-cost-shard .t12-cost-tile img{width:80.2%!important;height:80.2%!important;max-width:none}
#t12 .t12-cost-steel .t12-cost-tile img{width:106.5%!important;height:106.5%!important;max-width:none;transform:translate(-2.8%,-0.5%)}
#t12 .t12-cost-meat .t12-cost-tile img{width:107.1%!important;height:107.1%!important;max-width:none;transform:translate(-2.1%,-0.2%)}
#t12 .t12-cost-wood .t12-cost-tile img{width:118%!important;height:118%!important;max-width:none;transform:translate(-0.4%,-0.8%)}
#t12 .t12-cost-coal .t12-cost-tile img{width:124.5%!important;height:124.5%!important;max-width:none;transform:translate(-2.1%,-1.4%)}
#t12 .t12-cost-iron .t12-cost-tile img{width:114.3%!important;height:114.3%!important;max-width:none;transform:translate(-3.4%,0.8%)}
#t12 .t12-cost-time .t12-cost-tile img{width:112.1%!important;height:112.1%!important;max-width:none;transform:translate(-0.8%,0.2%)}

/* ---------- Propre au T12 ---------- */
/* Fond : bordeaux de l'Académie, lumière chaude en haut de l'arbre (unité glorifiée). */
#t12{background:radial-gradient(ellipse 90% 60% at 50% 22%,#8f4a3d 0,#6e3934 30%,#4a2830 62%,#331b26 100%)}
#t12 .t12-board{max-width:900px;margin:0 auto 22px;padding:10px 16px 26px;background:transparent}
#t12 .t12-tree{position:relative;width:min(100%,520px);aspect-ratio:1000/1300;margin:0 auto;container-type:inline-size}

/* Sous-onglets Déblocage / Arbre : plus discrets que les onglets de troupe (soulignés). */
#t12 .t12-subtabs{display:flex;justify-content:center;gap:28px;max-width:420px;margin:0 auto 14px;border-bottom:2px solid rgba(240,170,120,.25)}
#t12 .t12-subtabs button{position:relative;padding:8px 6px 10px;border:0;background:transparent;color:#e3bfa6;font:inherit;font-size:16px;cursor:pointer}
#t12 .t12-subtabs button::after{content:"";position:absolute;left:0;right:0;bottom:-2px;height:3px;border-radius:3px;background:transparent}
#t12 .t12-subtabs button.active{color:#fff}
#t12 .t12-subtabs button.active::after{background:linear-gradient(90deg,#f7c766,#e08a3a)}
#t12 .t12-subtab-state{margin-left:4px;padding:1px 6px;border-radius:8px;font-size:12px;color:#2a1410;background:#f2c06b}
#t12 .t12-banner{max-width:520px;margin:0 auto 10px;padding:8px 14px;border:1px solid rgba(240,170,120,.42);border-radius:12px;background:rgba(42,14,12,.72);text-align:center;font-size:14px;color:#f6dcc8}
#t12 .t12-banner[hidden]{display:none}

/* Chemins dorés (toutes les troupes), à angles droits comme dans le jeu. */
#t12 .t12-links{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
#t12 .t12-links path{fill:none;stroke-linejoin:miter;stroke-linecap:square;vector-effect:non-scaling-stroke}
#t12 .t12-link-off path{stroke:#2a1311;stroke-width:7px}
#t12 .t12-link-glow path{stroke:rgba(255,186,64,.6);stroke-width:14px;filter:blur(5px)}
#t12 .t12-link-core path{stroke:#f6b23c;stroke-width:6px}
#t12 .t12-link-light path{stroke:#fff1b8;stroke-width:1.8px}

/* Médaillons : bordure dorée vissée, anneau de la couleur de la troupe, illustration ronde. */
#t12 .t12-tree,#t12Picker .t12-node-preview{--t12-ring:#3fbf3a;--t12-ring-dark:#1d6e19}
#t12 .t12-tree[data-troop="lancer"],#t12Picker .t12-node-preview[data-troop="lancer"]{--t12-ring:#3a7fe0;--t12-ring-dark:#1b3f8a}
#t12 .t12-tree[data-troop="marksman"],#t12Picker .t12-node-preview[data-troop="marksman"]{--t12-ring:#f0a024;--t12-ring-dark:#9a5410}
/* Médaillons de l'arbre : cadres du jeu (assets/visuals/t12/frames, tools/make-t12-frames.py) posés sur l'icône.
   Recherches : anneau extérieur de la couleur de la troupe et 4 plots ; unité et élite : anneau doré à 8 rivets. */
:is(#t12,#t12Picker) .t12-node{position:absolute;z-index:1;aspect-ratio:1;padding:0;border:0;border-radius:50%;transform:translate(-50%,-50%);cursor:pointer;
  background:radial-gradient(circle closest-side,var(--t12-ring-dark) 0 70%,transparent 71%);filter:drop-shadow(0 4px 4px rgba(20,4,4,.55));transition:transform .15s ease}
:is(#t12,#t12Picker) .t12-node::after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;background:var(--frame) center/100% 100% no-repeat}
:is(#t12 .t12-tree,#t12Picker .t12-node-preview)[data-troop="infantry"]{--frame:url(../assets/visuals/t12/frames/small-infantry.webp);--frame-big:url(../assets/visuals/t12/frames/big-infantry.webp)}
:is(#t12 .t12-tree,#t12Picker .t12-node-preview)[data-troop="lancer"]{--frame:url(../assets/visuals/t12/frames/small-lancer.webp);--frame-big:url(../assets/visuals/t12/frames/big-lancer.webp)}
:is(#t12 .t12-tree,#t12Picker .t12-node-preview)[data-troop="marksman"]{--frame:url(../assets/visuals/t12/frames/small-marksman.webp);--frame-big:url(../assets/visuals/t12/frames/big-marksman.webp)}
:is(#t12,#t12Picker) .t12-node.t12-big::after{background-image:var(--frame-big)}
#t12 .t12-node:hover{transform:translate(-50%,-50%) scale(1.05)}
#t12 .t12-node:focus-visible{outline:3px solid #fff;outline-offset:4px}
:is(#t12,#t12Picker) .t12-ico{position:absolute;inset:14.5%;width:71%;height:71%;border-radius:50%;object-fit:cover;pointer-events:none;user-select:none}
#t12 .t12-badge{position:absolute;z-index:2;left:50%;bottom:16%;transform:translateX(-50%);font-size:clamp(9px,3.6cqi,19px);line-height:1;color:#fff;white-space:nowrap;-webkit-text-stroke:3px #2a1410;paint-order:stroke fill}
#t12 .t12-target{position:absolute;z-index:2;top:-4%;right:-14%;padding:2px 5px;border-radius:8px;font-size:clamp(8px,2.7cqi,13px);line-height:1.1;color:#2a1410;background:#ffd98a;box-shadow:0 2px 4px rgba(20,4,4,.5),0 0 8px rgba(255,190,80,.8)}
#t12 .t12-node.planned{box-shadow:0 4px 8px rgba(20,4,4,.55),0 0 14px 4px rgba(255,190,80,.6)}
#t12 .t12-node.locked{filter:grayscale(.6) brightness(.55) drop-shadow(0 4px 4px rgba(20,4,4,.55))}
#t12 .t12-unit{cursor:default}
#t12 .t12-unit:hover{transform:translate(-50%,-50%)}
#t12 .t12-label{position:absolute;z-index:1;width:40%;transform:translateX(-50%);text-align:center;font-size:clamp(10px,3.4cqi,17px);line-height:1.15;color:#ecdcdc;-webkit-text-stroke:3px #3a1712;paint-order:stroke fill;pointer-events:none}

/* Coût : cristaux en orange (comme la Chaudière). */
#t12 :is(.t12-cost-fc,.t12-cost-rfc,.t12-cost-shard) .t12-cost-tile{border-color:#eba16e;background:linear-gradient(180deg,#935b2d,#f2ceaf)}
#t12 .t12-cost-fc .t12-cost-tile img{width:100.9%!important;height:100.9%!important;max-width:none;transform:translate(-0.6%,-1.7%)}
#t12 .t12-cost-rfc .t12-cost-tile img{width:82.8%!important;height:82.8%!important;max-width:none}

/* Fenêtre : ±10 pour les recherches longues (20 à 50 niveaux) ; réglages l'un sous l'autre. */
#t12Picker .t12-steppers{display:grid;gap:12px}
#t12Picker .t12-stepper{grid-template-columns:76px 1fr auto;align-items:center;justify-items:stretch}
#t12Picker .t12-stepper small{text-align:right}
#t12Picker .t12-stepper>div{justify-content:center}
#t12Picker .t12-step10{display:none}
#t12Picker.t12-long .t12-step10{display:inline-block;width:auto!important;padding:0 8px;font-size:14px!important}
#t12Picker .t12-node.t12-node-preview{position:relative;display:block;width:82px;transform:none;cursor:default}

/* ---------- Déblocage : écran de forge (même mise en forme que le jeu) ---------- */
/* Écran de forge plus large que l'arbre : les médaillons gardent leur taille, le tuyau prend de la place entre eux. */
#t12 .t12-tree.t12-forge-host{aspect-ratio:auto!important;width:min(100%,680px)}
#t12 .t12-forge{--copper:#c07a45;--copper-dark:#5a2a16;overflow:hidden;border:2px solid #6b3523;border-radius:22px;background:#3a1916;box-shadow:0 14px 35px rgba(20,4,4,.45)}
/* Pièce détourée sur le fond de l'atelier : nuit bleutée, faisceau et halo bleus sous la pièce. */
#t12 .t12-forge-stage{position:relative;display:grid;grid-template-rows:minmax(0,1fr);place-items:center;box-sizing:border-box;aspect-ratio:720/486;padding-bottom:40px;overflow:hidden;
  background:radial-gradient(ellipse 34% 12% at 50% 86%,rgba(120,140,255,.55),transparent 70%),radial-gradient(ellipse 60% 70% at 50% 55%,#2a2a5c 0,#16163a 55%,#0b0b20 100%)}
#t12 .t12-forge-stage::before{content:"";position:absolute;left:50%;top:0;bottom:12%;width:30%;transform:translateX(-50%);background:linear-gradient(180deg,rgba(110,130,255,.0),rgba(110,130,255,.16) 60%,rgba(130,150,255,.3));filter:blur(8px)}
/* Pièce un peu en retrait, avec une lueur rouge douce qui en émane (respiration lente). */
#t12 .t12-forge-art{position:relative;max-width:58%;max-height:66%;object-fit:contain;
  filter:drop-shadow(0 0 5px rgba(255,60,35,.55)) drop-shadow(0 0 18px rgba(255,40,20,.4)) drop-shadow(0 10px 12px rgba(0,0,0,.5));animation:t12-glow 3.2s ease-in-out infinite alternate}
@keyframes t12-glow{to{filter:drop-shadow(0 0 7px rgba(255,70,40,.7)) drop-shadow(0 0 26px rgba(255,45,20,.55)) drop-shadow(0 10px 12px rgba(0,0,0,.5))}}
@media (prefers-reduced-motion:reduce){#t12 .t12-forge-art{animation:none}}
#t12 .t12-forge-stage::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,transparent 78%,rgba(58,25,22,.9))}
#t12 .t12-forge-unit{position:absolute;z-index:1;left:12px;top:10px;padding:4px 10px;border:1px solid rgba(240,170,120,.45);border-radius:10px;font-size:13px;color:#f6dcc8;background:rgba(42,14,12,.78)}

/* Rangée des 5 pièces reliées par un tuyau épais (comme dans le jeu) : orange à cœur jaune une fois la pièce
   précédente terminée, bleu nuit sinon ; bague de cuivre à chaque raccord ; coudes qui sortent du panneau aux extrémités. */
#t12 .t12-forge-row{position:relative;display:flex;align-items:center;margin-top:-40px;padding:44px 2% 26px;border-bottom:2px solid rgba(240,170,120,.16)}
#t12 .t12-forge-pipe{position:relative;flex:1;height:min(4.4cqi,23px);margin:0 -1px;
  background:linear-gradient(180deg,#0e1528 0,#1f2c4a 18%,#2e4068 34%,#45598a 50%,#2e4068 66%,#1f2c4a 82%,#0e1528 100%)}
#t12 .t12-forge-pipe.lit{background:linear-gradient(180deg,#a03a10 0,#f07228 18%,#ffb840 34%,#ffe680 50%,#ffb840 66%,#f07228 82%,#a03a10 100%);box-shadow:0 0 10px 2px rgba(255,140,30,.7),0 0 22px 4px rgba(255,110,20,.35)}
/* bagues de cuivre aux deux raccords */
#t12 .t12-forge-pipe::before,#t12 .t12-forge-pipe::after{content:"";position:absolute;top:max(-.5cqi,-3px);bottom:max(-.5cqi,-3px);width:min(1.1cqi,6px);border-radius:2px;
  background:linear-gradient(180deg,#4a2414 0,#9a5634 30%,#c98258 50%,#9a5634 70%,#4a2414 100%);box-shadow:0 1px 2px rgba(0,0,0,.5)}
#t12 .t12-forge-pipe::before{left:0}
#t12 .t12-forge-pipe::after{right:0}
#t12 .t12-forge-elbow{position:relative;flex:0 0 min(6cqi,31px);align-self:stretch}
#t12 .t12-forge-elbow svg{position:absolute;left:0;top:calc(50% - min(2.2cqi,11.5px));width:min(6cqi,31px);height:min(10cqi,52px);overflow:visible}
#t12 .t12-forge-elbow g{filter:blur(.35px)}
#t12 .t12-forge-elbow.lit g{filter:blur(.35px) drop-shadow(0 0 5px rgba(255,140,30,.75)) drop-shadow(0 0 12px rgba(255,110,20,.4))}
#t12 .t12-socket{fill:#1a0b08;stroke:#5a2c1a;stroke-width:4}
#t12 .t12-forge-inlet{margin-right:-1px}
#t12 .t12-forge-outlet{margin-left:-1px}
/* Médaillon en hublot (capture du jeu) : large anneau de cuivre en 4 segments, 4 rivets, liseré clair autour de la vitre. */
#t12 .t12-forge-piece{position:relative;z-index:2;flex:none;width:min(13.2cqi,68px);aspect-ratio:1;padding:0;border:0;border-radius:50%;cursor:pointer;--ring-d:#5e2e14;--ring:#a0592e;--ring-hi:#c87a46;
  background:radial-gradient(circle closest-side,transparent 0 69%,#140806 70% 71.5%,var(--ring-line,#d8955e) 72.5% 74%,#2a1008 75% 76%,var(--ring) 78%,var(--ring-hi) 86%,var(--ring) 94%,var(--ring-d) 98.5%,transparent 100%);
  box-shadow:0 3px 7px rgba(10,2,2,.6);transition:transform .15s}
#t12 .t12-forge-piece::before{content:"";position:absolute;inset:0;border-radius:50%;pointer-events:none;
  background:radial-gradient(circle at 30.0% 12.5%,#e2a070 0 2%,#7a3e1c 3%,transparent 3.6%),radial-gradient(circle at 70.0% 12.5%,#e2a070 0 2%,#7a3e1c 3%,transparent 3.6%),radial-gradient(circle at 70.0% 87.5%,#e2a070 0 2%,#7a3e1c 3%,transparent 3.6%),radial-gradient(circle at 30.0% 87.5%,#e2a070 0 2%,#7a3e1c 3%,transparent 3.6%),repeating-conic-gradient(from 44deg,#2a1008 0 2.5deg,transparent 2.5deg 90deg);
  -webkit-mask:radial-gradient(circle closest-side,transparent 76%,#000 77% 99%,transparent 100%);mask:radial-gradient(circle closest-side,transparent 76%,#000 77% 99%,transparent 100%)}
/* simple ombre intérieure au bord de la vitre (plus de reflet blanc : il voilait l'icône) */
#t12 .t12-forge-disc::after{content:"";position:absolute;inset:0;border-radius:50%;pointer-events:none;background:radial-gradient(circle closest-side,transparent 86%,rgba(0,0,0,.4) 100%)}
#t12 .t12-forge-piece:hover{transform:scale(1.05)}
#t12 .t12-forge-piece:focus-visible{outline:3px solid #fff;outline-offset:3px}
#t12 .t12-forge-piece.sel{width:min(20.5cqi,106px)}
/* médaillons non sélectionnés : bord cuivré un peu plus sombre que celui de la pièce choisie */
#t12 .t12-forge-piece:not(.sel){--ring-d:#3d1d0c;--ring:#6e3c1f;--ring-hi:#8a5430;--ring-line:#9a6842}
#t12 .t12-forge-piece:not(.sel)::before{filter:brightness(.78)}
/* Fond du médaillon : icône détourée sur bleu nuit tant que la pièce n'est pas terminée (tools/cutout-t12-piece-icons.py),
   icône d'origine du jeu (fond rouge et jaune) une fois terminée. */
#t12 .t12-forge-disc{position:absolute;inset:15%;overflow:hidden;border-radius:50%;background:radial-gradient(circle at 50% 40%,#2e3358,#171a33 72%,#10122a)}
#t12 .t12-forge-disc img{width:100%;height:100%;object-fit:cover;pointer-events:none;image-rendering:-webkit-optimize-contrast}
#t12 .t12-forge-piece.locked .t12-forge-disc img{filter:grayscale(.7) brightness(.32)}
#t12 .t12-forge-lock{position:absolute;inset:0;display:grid;place-items:center}
#t12 .t12-forge-lock .t12-lock{width:46%;height:auto;filter:drop-shadow(0 2px 2px rgba(0,0,0,.6))}
#t12 .t12-lock .l-shackle-o{fill:none;stroke:#3a2418;stroke-width:5;stroke-linecap:round}
#t12 .t12-lock .l-shackle{fill:none;stroke:#f3e6cf;stroke-width:3;stroke-linecap:round}
#t12 .t12-lock .l-body{fill:#f6ecd8;stroke:#3a2418;stroke-width:1.2}
#t12 .t12-lock .l-hole{fill:#3a2418}
#t12 .t12-forge-unit .t12-lock{width:12px;height:auto;vertical-align:-2px}
#t12 .t12-forge-piece .t12-target{top:-12%;right:-22%}
#t12 .t12-forge-piece.sel .t12-target{display:none}
/* Jauge des 5 niveaux : arc cuivré de 5 cases jointives qui se remplit (orange = atteint, clair = objectif). */
#t12 .t12-forge-gauge{position:absolute;left:-50%;top:-50%;width:200%;max-width:none;height:200%;overflow:visible;pointer-events:none}
/* Jauge (capture du jeu) : cadre orange lumineux, cases sombres translucides, cases atteintes jaune vif, sans halo autour du cadre. */
#t12 .t12-gauge-frame{fill:url(#t12Frame);stroke:#d8955e;stroke-width:1.5;stroke-linejoin:round}
#t12 .t12-gauge-cell{fill:#3a2410;fill-opacity:.85;stroke:#d9ac6c;stroke-width:2.2}
#t12 .t12-gauge-cell.plan{fill:#7d5428}
/* remplissage = fond rouge-orangé des médaillons terminés (capture du jeu) ; la dernière case remplie, plus jaune et lumineuse */
#t12 .t12-gauge-cell.on{fill:url(#t12Lava);fill-opacity:1;stroke:#2a1208;stroke-width:1.2}
#t12 .t12-gauge-cell.on.front{fill:url(#t12LavaFront)}
#t12 .t12-gauge-lava{filter:drop-shadow(0 0 calc(var(--lava) * 4px) rgba(255,96,24,calc(var(--lava) * .7)))}
#t12 .t12-gauge-cell.front{animation:t12-lava 1.6s ease-in-out infinite alternate}
@keyframes t12-lava{to{fill-opacity:.8}}
#t12 .t12-gauge-shine path{fill:url(#t12Shine);mix-blend-mode:screen;pointer-events:none}
/* Pièce en cours : vraie surbrillance dorée (anneau doré, halo or qui respire, jauge cerclée d'or) ;
   les autres médaillons sont légèrement atténués pour la faire ressortir. */
/* pièce choisie : pas de surbrillance, seulement plus grande que les autres */
/* pas de halo sous l'arc : vide net entre la jauge et le médaillon */
#t12 .t12-forge-gauge{-webkit-mask:radial-gradient(circle closest-side,transparent 52.2%,#000 52.5%);mask:radial-gradient(circle closest-side,transparent 52.2%,#000 52.5%)}
#t12 .t12-gauge-frame{stroke:#d8955e;stroke-width:2.2}  /* liseré clair des médaillons */
@media (prefers-reduced-motion:reduce){#t12 .t12-gauge-cell.front,#t12 .t12-forge-piece.sel{animation:none}#t12 .t12-gauge-shine{display:none}}
/* Panneau de la pièce : nom, niveau, bonus, ressources requises, réglage. */
#t12 .t12-forge-panel{padding:12px 4% 16px}
#t12 .t12-forge-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:8px}
#t12 .t12-forge-head h3{margin:0;font-size:clamp(17px,4.4cqi,22px);color:#fff}
#t12 .t12-forge-lv{flex:none;font-size:clamp(16px,4.2cqi,21px);color:#fff}
#t12 .t12-forge-lv i{margin:0 6px;font-style:normal;color:#4cd64c}
#t12 .t12-forge-stats{display:grid;gap:2px;padding:6px 12px;border-radius:12px;background:#2a110f}
#t12 .t12-forge-stats div{display:flex;justify-content:space-between;gap:10px;padding:5px 0;font-size:14px;color:#d8c2bd}
#t12 .t12-forge-stats b{font-weight:inherit;color:#fff;white-space:nowrap}
#t12 .t12-forge-stats em{font-style:normal;color:#4cd64c}
#t12 .t12-forge-set{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:14px}
#t12 .t12-forge-box{display:grid;justify-items:center;gap:9px;padding:10px 8px 12px;border:1px solid rgba(240,170,120,.28);border-radius:14px;background:#2a110f}
#t12 .t12-forge-box>small{font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:#e3bfa6}
#t12 .t12-forge-step{display:flex;align-items:center;gap:6px}
#t12 .t12-forge-step output{min-width:22px;text-align:center;font-size:20px;color:#fff}
/* boutons au style cuivré de la page (onglets, titres) */
#t12 .t12-forge-step button{min-width:36px;height:36px;padding:0 8px;border:1px solid #e3a06e;border-radius:11px;font:inherit;font-size:18px;color:#fff;cursor:pointer;
  background:linear-gradient(180deg,#c26a3e,#8c4129);box-shadow:inset 0 1px rgba(255,230,190,.45),0 3px 0 #4e1d10;text-shadow:0 1px 0 rgba(60,15,5,.6);transition:filter .15s,transform .1s}
#t12 .t12-forge-step button:not(:disabled):hover{filter:brightness(1.12)}
#t12 .t12-forge-step button:not(:disabled):active{transform:translateY(2px);box-shadow:inset 0 1px rgba(255,230,190,.45),0 1px 0 #4e1d10}
#t12 .t12-forge-step .t12-forge-max{border-color:#ffd27a;background:linear-gradient(180deg,#d98a3e,#a0521f)}
#t12 .t12-forge-step .t12-forge-max{font-size:14px;letter-spacing:.03em}
#t12 .t12-forge-step button:disabled{opacity:.35;filter:saturate(.5);cursor:default}
@media (max-width:520px){
  #t12 .t12-forge-set{gap:8px}
  #t12 .t12-forge-box{padding:8px 4px 10px;gap:7px}
  #t12 .t12-forge-step{gap:4px}
  #t12 .t12-forge-step button{min-width:28px;height:30px;padding:0 5px;border-radius:9px;font-size:16px}
  #t12 .t12-forge-step .t12-forge-max{font-size:12px}
  #t12 .t12-forge-step output{min-width:16px;font-size:18px}
  #t12 .t12-forge-all{padding:5px 8px;font-size:12px;gap:6px}
}
}

/* Unité débloquée : le personnage glorifié remplace la pièce, avec un liseré rouge et des éclairs. */
#t12 .t12-forge-stage.unit{padding:70px 0 0;background:radial-gradient(ellipse 40% 14% at 50% 88%,rgba(255,60,30,.35),transparent 70%),radial-gradient(ellipse 60% 70% at 50% 55%,#2a1a30 0,#18132a 55%,#0b0a1a 100%)}
/* fondu du bas du personnage vers les médaillons (calque, pas de masque : la lueur n'est pas coupée en rectangle) */
#t12 .t12-forge-stage.unit::after{z-index:1;background:linear-gradient(180deg,transparent 66%,rgba(58,25,22,.75) 84%,#3a1916 96%)}
#t12 .t12-forge-stage.unit::before{display:none}
/* éclairs (captures du jeu) : rouge-orange, cœur jaune, lueur rouge ; visibles par éclats brefs */
/* éclairs calés sur l'image du personnage (points de départ sur sa silhouette), débordant librement autour */
#t12 .t12-unit-bolts{position:absolute;inset:0;width:100%;max-width:none;height:100%;overflow:visible;pointer-events:none}
#t12 .t12-unit-bolts g{opacity:0;animation:t12-bolt 2s steps(1,end) infinite}
#t12 .t12-unit-bolts path{fill:none;vector-effect:non-scaling-stroke;stroke-linejoin:miter;stroke-miterlimit:8;stroke-linecap:round}
#t12 .t12-unit-bolts .b-glow{stroke:#ff2a10;stroke-width:7;opacity:.55;filter:blur(4px)}
#t12 .t12-unit-bolts .b-mid{stroke:#ff6a1a;stroke-width:3.4}
#t12 .t12-unit-bolts .b-core{stroke:#ffe46a;stroke-width:1.3}
@keyframes t12-bolt{0%{opacity:0}8%{opacity:1}12%{opacity:.25}16%{opacity:1}24%,100%{opacity:0}}
/* même hauteur pour les 3 personnages (référence : le Tireur), posés bas derrière les médaillons ; liseré rouge comme les éclairs */
/* Personnage : posé par les pieds au même niveau pour les 3 troupes (enfoncé derrière les médaillons),
   hauteur commune (référence : le Tireur) corrigée par --unit-scale ; liseré rouge comme les éclairs */
#t12 .t12-unit-figure{--zone:calc(100cqi / 1.4815 - var(--unit-top,70px));position:absolute;left:50%;bottom:calc(var(--zone) * var(--unit-sink,.1) * -1);
  height:calc(var(--zone) * .95 * var(--unit-scale,1) * var(--unit-zoom,1));transform:translateX(-50%)}
#t12 .t12-forge-art.t12-unit-art{position:relative;display:block;height:100%;width:auto;max-width:none;max-height:none;
  animation:t12-unit-in .9s ease-out both,t12-unit-glow 2.6s ease-in-out .9s infinite alternate;
  filter:drop-shadow(0 0 3px rgba(255,50,20,.95)) drop-shadow(0 0 12px rgba(255,40,16,.55)) drop-shadow(0 10px 12px rgba(0,0,0,.5))}
@keyframes t12-unit-in{from{opacity:0;transform:translateY(12px) scale(.9)}to{opacity:1;transform:none}}
@keyframes t12-unit-glow{to{filter:drop-shadow(0 0 5px rgba(255,70,30,1)) drop-shadow(0 0 20px rgba(255,40,16,.7)) drop-shadow(0 10px 12px rgba(0,0,0,.5))}}
/* bandeau de déblocage, au style des titres de la page */
#t12 .t12-unit-banner{position:absolute;z-index:2;left:50%;top:12px;display:grid;justify-items:center;gap:0;min-width:56%;padding:4px 18px 5px;transform:translateX(-50%);
  border:2px solid #ffd27a;border-radius:16px;background:linear-gradient(180deg,#c26a3e,#8c4129);box-shadow:0 0 0 3px rgba(60,20,10,.55),0 0 18px rgba(255,190,70,.6),inset 0 1px rgba(255,230,190,.45);
  text-align:center;animation:t12-banner-in .7s cubic-bezier(.2,1.4,.4,1) .2s both}
#t12 .t12-unit-banner b{display:flex;align-items:center;gap:8px;font-size:clamp(16px,3.6cqi,22px);font-weight:inherit;color:#fff;text-shadow:0 2px 0 rgba(60,15,5,.6)}
/* cadenas ouvert doré : l'anse se relève à l'apparition, puis il brille doucement */
#t12 .t12-unit-banner .t12-lock{width:1.15em;height:auto;overflow:visible;filter:drop-shadow(0 0 4px rgba(255,220,110,.9)) drop-shadow(0 2px 0 rgba(60,15,5,.6));animation:t12-lock-glow 1.8s ease-in-out 1.4s infinite alternate}
#t12 .t12-unit-banner .t12-lock .l-body{fill:#ffd65e;stroke:#7a4a10}
#t12 .t12-unit-banner .t12-lock .l-shackle{stroke:#ffe48a}
#t12 .t12-unit-banner .t12-lock .l-shackle-o{stroke:#7a4a10}
#t12 .t12-unit-banner .t12-lock .l-hole{fill:#7a4a10}
#t12 .t12-unit-banner .t12-lock :is(.l-shackle,.l-shackle-o){animation:t12-unlock .5s cubic-bezier(.3,1.6,.5,1) .8s both}
@keyframes t12-unlock{from{transform:translateY(4px)}to{transform:none}}
@keyframes t12-lock-glow{to{filter:drop-shadow(0 0 9px rgba(255,225,120,1)) drop-shadow(0 2px 0 rgba(60,15,5,.6))}}
#t12 .t12-unit-banner small{font-size:12px;color:#ffe2b8}
@keyframes t12-banner-in{from{opacity:0;transform:translateX(-50%) translateY(-14px) scale(.8)}to{opacity:1;transform:translateX(-50%)}}
@media (prefers-reduced-motion:reduce){#t12 .t12-unit-banner .t12-lock,#t12 .t12-unit-banner .t12-lock :is(.l-shackle,.l-shackle-o),#t12 .t12-unit-bolts g,#t12 .t12-forge-art.t12-unit-art,#t12 .t12-unit-banner{animation:none}#t12 .t12-unit-bolts g{opacity:.6}}

/* même place visuelle pour les 3 personnages : l'Infanterie (trapue) un peu réduite, le Lancier (fin) un peu agrandi */
#t12 .t12-tree[data-troop="infantry"] .t12-unit-figure{--unit-scale:.84}
#t12 .t12-tree[data-troop="lancer"] .t12-unit-figure{--unit-scale:1.2}
/* « Tout au max » de chaque encadré : même interrupteur que la page */
#t12 .t12-forge-all{margin:0;border-color:rgba(240,170,120,.42);background:rgba(42,14,12,.72);box-shadow:inset 0 1px rgba(255,220,190,.12);color:#fff}
#t12 .t12-forge-all .bulk-toggle{border-color:rgba(240,180,140,.5);background:linear-gradient(180deg,#6a3326,#4a2119);box-shadow:inset 0 2px 5px rgba(20,4,4,.45),0 1px rgba(255,220,190,.14)}
#t12 .t12-forge-all .bulk-toggle i{background:linear-gradient(180deg,#fff,#f3dccd)}
#t12 .t12-forge-all input:checked+.bulk-toggle{border-color:#ffc79c;background:linear-gradient(180deg,#d9804f,#a8502f);box-shadow:inset 0 1px rgba(255,255,255,.35),0 0 9px rgba(240,140,80,.45)}
#t12 .t12-actions[hidden]{display:none}

/* Mobile : bandeau élargi (2 lignes), personnage plus grand qui descend davantage derrière les médaillons */
@media (max-width:600px){
  #t12 .t12-forge-stage.unit{padding-top:58px}
  #t12 .t12-unit-banner{top:8px;width:calc(100% - 20px);min-width:0;padding:4px 10px 5px;box-sizing:border-box}
  #t12 .t12-unit-banner b{white-space:nowrap;font-size:17px}
  #t12 .t12-unit-banner small{white-space:nowrap;font-size:11px}
  #t12 .t12-unit-figure{--unit-top:58px;--unit-zoom:1.3;--unit-sink:.22}
  #t12 .t12-tree[data-troop="marksman"] .t12-unit-figure{--unit-sink:.3}
  /* pièce rouge : la rangée ne masque presque rien sur mobile, on recentre dans la zone sombre */
  #t12 .t12-forge-stage:not(.unit){padding:26px 0 0}
}

/* Coût total intégré à l'encadrement de la forge : même titre sur fond cuivré, sans second cadre */
#t12 .t12-forge .t12-result{max-width:none;margin:0;padding:6px 4% 18px;border:0;border-radius:0;background:transparent;box-shadow:none}

/* pas d'ancrage de défilement automatique : la forge est redessinée à chaque réglage */
#t12{overflow-anchor:none}

/* Encadrement de l'arbre, aussi large que le cadre de coût (l'arbre garde sa taille, centré) */
#t12 .t12-board:not(:has(.t12-forge-host)){max-width:900px;box-sizing:border-box;border:2px solid rgba(240,170,120,.42);border-radius:26px;background:rgba(42,14,12,.45);box-shadow:inset 0 1px rgba(255,220,190,.14),0 14px 35px rgba(20,4,4,.4)}
@media(max-width:600px){#t12 .t12-board:not(:has(.t12-forge-host)){margin-inline:8px;padding-inline:6px}}
/* Fond de l'arbre (comme dans le jeu) : lueur chaude au centre et quadrillage en losanges qui suit cette lumière
   (mélange doux, fondu vers les bords) ; un losange ≈ les deux tiers d'un petit médaillon */
#t12 .t12-board:not(:has(.t12-forge-host)){position:relative;background:radial-gradient(ellipse 70% 55% at 50% 35%,rgba(150,62,52,.42),transparent 75%),rgba(42,14,12,.45)}
#t12 .t12-board:not(:has(.t12-forge-host))::before{content:"";position:absolute;inset:0;z-index:0;border-radius:inherit;pointer-events:none;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='54' height='62'%3E%3Cpath d='M27.0 0L54 31.0L27.0 62L0 31.0Z' fill='none' stroke='white' stroke-width='1'/%3E%3C/svg%3E") 0 0/54px 62px;opacity:.11;mix-blend-mode:soft-light;
  -webkit-mask:radial-gradient(ellipse 75% 65% at 50% 38%,#000 20%,transparent 85%);mask:radial-gradient(ellipse 75% 65% at 50% 38%,#000 20%,transparent 85%)}
@media(max-width:600px){#t12 .t12-board:not(:has(.t12-forge-host))::before{background-size:36px 41px}}
#t12 .t12-board>.t12-tree{z-index:1}  /* l'arbre au-dessus du quadrillage */

/* Fenêtre de réglage de l'arbre : cadre à engrenages du jeu (3 morceaux : haut, milieu étirable, bas).
   Le haut et le bas gardent leurs proportions (engrenages non déformés), le milieu suit la hauteur du contenu.
   Repères en % de la largeur d'origine (1077 px) : haut 365, bas 110, intérieur 154 / 55 / 109. */
#t12Picker{width:min(96vw,500px);overflow:visible;background:transparent;box-shadow:none;border-radius:0;container-type:inline-size;filter:drop-shadow(0 18px 30px rgba(0,0,0,.55))}
#t12Picker form{z-index:0;padding:calc(14.3cqi + 16px) calc(5.1cqi + 12px) calc(10.1cqi + 18px)}
#t12Picker form>*{min-width:0}
#t12Picker form::before,#t12Picker form::after{content:"";position:absolute;pointer-events:none}
/* panneau rose intérieur */
#t12Picker form::after{z-index:-2;inset:calc(14.3cqi - 2px) calc(5.1cqi - 2px) calc(10.1cqi - 2px);border-radius:12px;background:#f6e2e2}
/* cadre */
#t12Picker form::before{z-index:-1;inset:0;
  background:url(../assets/visuals/t12/picker/top.webp) top center/100% auto no-repeat,
    url(../assets/visuals/t12/picker/bottom.webp) bottom center/100% auto no-repeat,
    url(../assets/visuals/t12/picker/middle.webp) 0 33.89cqi/100% calc(100% - 33.89cqi - 10.21cqi) no-repeat}
#t12Picker .t12-close{top:calc(14.3cqi + 10px);right:calc(5.1cqi + 10px)}
@media(max-width:600px){#t12Picker form{padding-inline:calc(5.1cqi + 8px)}
  /* libellé au-dessus des boutons : la ligne complète ne tient pas dans le cadre */
  #t12Picker .t12-stepper{grid-template-columns:1fr auto;row-gap:6px}
  #t12Picker .t12-stepper small{grid-column:1/-1;text-align:center}}

/* Ressources : une seule ligne quand le cadre de coût est assez large (8 cases), sinon disposition actuelle */
#t12 .t12-result{container-type:inline-size}
@container (min-width:844px){#t12 .t12-cost-grid{max-width:none;flex-wrap:nowrap}}

/* Tireur : le fusil élargit l'image vers la droite ; on centre sur le corps (≈ 37 % de la largeur), éclairs compris */
#t12 .t12-tree[data-troop="marksman"] .t12-unit-figure{transform:translateX(-37%)}
/* Ordinateur : Infanterie et Lancier un peu moins enfoncés derrière les médaillons */
@media(min-width:601px){#t12 .t12-tree:is([data-troop="infantry"],[data-troop="lancer"]) .t12-unit-figure{--unit-sink:.03}}
/* haut du casque aligné sur celui du Tireur (mesuré à l'écran) */
#t12 .t12-tree[data-troop="infantry"] .t12-unit-figure{translate:0 -26px}
#t12 .t12-tree[data-troop="lancer"] .t12-unit-figure{translate:0 -13px}
@media(max-width:600px){
  #t12 .t12-tree[data-troop="infantry"] .t12-unit-figure{translate:0 -16px}
  #t12 .t12-tree[data-troop="lancer"] .t12-unit-figure{translate:0 -9px}
}
/* ordinateur : pièce d'armure un peu plus bas dans la zone sombre */
@media(min-width:601px){#t12 .t12-forge-stage:not(.unit) .t12-forge-art{translate:0 18px}}
/* niveau sur l'icône de la fenêtre de réglage */
#t12Picker .t12-node-preview .t12-badge{position:absolute;z-index:2;left:50%;bottom:16%;transform:translateX(-50%);font-size:14px;line-height:1;color:#fff;white-space:nowrap;-webkit-text-stroke:3px #2a1410;paint-order:stroke fill}
/* bas de l'icône assombri derrière le niveau : fond la zone retouchée où était le badge du jeu */
#t12Picker .t12-node-preview .t12-ico{-webkit-mask:none;mask:none}
#t12Picker .t12-node-preview::before{content:"";position:absolute;inset:14.5%;z-index:1;border-radius:50%;pointer-events:none;background:linear-gradient(180deg,transparent 45%,rgba(20,8,6,.55) 72%,rgba(15,5,4,.85) 100%)}

/* Chemins allumés de l'arbre (capture du jeu) : trait fin jaune or lumineux, halo orangé doux qui éclaire le fond */
#t12 .t12-link-glow{filter:drop-shadow(0 0 8px rgba(255,170,40,.75)) drop-shadow(0 0 20px rgba(255,140,30,.4))}
#t12 .t12-link-glow path{stroke:rgba(255,190,60,.7);stroke-width:9px;filter:blur(3px)}
#t12 .t12-link-core path{stroke:#ffd257;stroke-width:4px}
#t12 .t12-link-light path{stroke:#fff6c8;stroke-width:1.6px;opacity:.9}
/* chemins éteints de la même épaisseur que les chemins allumés */
#t12 .t12-link-off path{stroke-width:4px}
/* chemins encore affinés (gros plan du jeu), coins arrondis : jointures rondes */
#t12 .t12-links path{stroke-linejoin:round;stroke-linecap:round}
#t12 .t12-link-off path{stroke-width:3px}
#t12 .t12-link-glow path{stroke-width:7px}
#t12 .t12-link-core path{stroke-width:3px}
#t12 .t12-link-light path{stroke-width:1.2px}

/* Lave qui circule dans les chemins allumés (du parent vers l'enfant) : fond orange-rouge, traînées jaunes en mouvement,
   lueur discrète au lieu de la brillance */
#t12 .t12-link-glow{filter:none}
#t12 .t12-link-glow path{stroke:rgba(255,90,20,.55);stroke-width:6px;filter:blur(2.5px)}
#t12 .t12-link-core path{stroke:#e9531a;stroke-width:3px}
#t12 .t12-link-light path{stroke:#ffe04a;stroke-width:2px;opacity:1;stroke-dasharray:14 22;animation:t12-lava-flow 1.4s linear infinite}
@keyframes t12-lava-flow{to{stroke-dashoffset:-36}}
@media (prefers-reduced-motion:reduce){#t12 .t12-link-light path{animation:none}}
/* Lave jaune uniforme : de rares petites nuances orangées qui glissent lentement (plus de traînées « snake ») */
#t12 .t12-link-glow path{stroke:rgba(255,200,60,.45);stroke-width:6px;filter:blur(2.5px)}
#t12 .t12-link-core path{stroke:#ffcc33;stroke-width:3px}
#t12 .t12-link-light path{stroke:#ff9a2a;stroke-width:2px;opacity:.55;stroke-dasharray:3 90;animation:t12-lava-flow 4.5s linear infinite}
@keyframes t12-lava-flow{to{stroke-dashoffset:-93}}
/* Lave (gros plan du jeu) : jaune vif, filaments irréguliers orangés le long des bords (alternés haut/bas, gauche/droite)
   et filaments plus clairs au centre, fins, de longueurs variées, qui glissent lentement à des vitesses différentes */
#t12 .t12-link-core path{stroke:#ffcf2e;stroke-width:3.4px}
#t12 .t12-link-edge path{stroke:#ff8a1a;stroke-width:1px;opacity:.8;fill:none}
#t12 .t12-edge-a{transform:translate(-2px,-2px)}
#t12 .t12-edge-b{transform:translate(2px,2px)}
#t12 .t12-edge-a path{stroke-dasharray:7 13 22 9 3 31 14 6 5 24;animation:t12-lava-flow-a 7s linear infinite}
#t12 .t12-edge-b path{stroke-dasharray:11 27 4 8 18 15 6 34 9 12;animation:t12-lava-flow-b 9s linear infinite}
#t12 .t12-link-light path{stroke:#fff3a8;stroke-width:1px;opacity:.85;stroke-dasharray:16 9 5 21 28 7 3 14;animation:t12-lava-flow 6s linear infinite}
@keyframes t12-lava-flow-a{to{stroke-dashoffset:-134}}
@keyframes t12-lava-flow-b{to{stroke-dashoffset:-144}}
@keyframes t12-lava-flow{to{stroke-dashoffset:-103}}
@media (prefers-reduced-motion:reduce){#t12 .t12-link-edge path,#t12 .t12-link-light path{animation:none}}

/* lave texturée (capture du jeu) */
#t12 .t12-link-lava path{fill:none;stroke-width:3.4px;stroke-linecap:butt;vector-effect:non-scaling-stroke}
#t12 .t12-link-lava-corner path{fill:none;stroke:#f9d75a;stroke-width:3.4px;stroke-linecap:butt;vector-effect:non-scaling-stroke}

/* Interrupteurs de l'arbre : même encadré que ceux de la Chaudière (cadre unique, deux interrupteurs empilés), couleurs de la page */
#t12 .t12-toggles{display:flex;flex-direction:column;align-items:stretch;gap:0;width:max-content;max-width:calc(100% - 24px);padding:9px 13px;border:1px solid rgba(240,170,120,.42);border-radius:11px;background:rgba(42,14,12,.72);box-shadow:inset 0 1px rgba(255,220,190,.12),0 5px 14px rgba(20,4,4,.3)}
#t12 .t12-toggles .charm-bulk-select{width:auto;max-width:100%;margin:0;padding:0;background:transparent;border:0;border-radius:0;box-shadow:none}
