/* Système de CT (20/11/2026) : disques, cartes, Antres du Départ, calendrier, boutique de Kecleon, roulette du coffre jaune.
   Pixel art : images en image-rendering: pixelated, liserés nets (pas de flou ni de dégradé), animations en steps(). */
.ct-disque { width: 32px; height: 32px; image-rendering: pixelated; vertical-align: middle; flex: none; }
.ct-disque.gros { width: 48px; height: 48px; }
.ct-disque.tourne { animation: ctTourne 1.6s steps(8) infinite; }
@keyframes ctTourne { 0%, 100% { transform: scaleX(1); } 25% { transform: scaleX(.35); } 50% { transform: scaleX(-1); } 75% { transform: scaleX(-.35); } }
.chip .ct-disque, .btn .ct-disque, h3 .ct-disque, .sac-l .ct-disque { width: 24px; height: 24px; }
.ct-frag-ico { width: 22px; height: 22px; image-rendering: pixelated; vertical-align: middle; }
.ct-frag-ico.sac { width: 32px; height: 32px; }
.ct-chip-frag { color: #bfe8ff; box-shadow: 0 0 0 2px #3a2c6e inset; }
.ct-type { display: inline-block; padding: 0 6px; font-size: 15px; color: #101018; background: var(--tc); box-shadow: 0 0 0 2px #101018; margin-right: 4px; text-shadow: none; } /* (26/11 soir, bug de Louh « types écrits 2 fois ») texte foncé : l'ombre noire héritée des cadres se lisait comme une 2e copie */
.ct-rar { display: inline-block; padding: 0 6px; font-size: 15px; box-shadow: 0 0 0 2px currentColor inset; }
.ct-r-commun { color: #c8d0dc; } .ct-r-peu { color: #7ee08a; } .ct-r-rare { color: #5fb4ff; } .ct-r-tres { color: #c77dff; } .ct-r-leg { color: #ffcb3d; }
.ct-n { color: #ffe27a; font-size: 16px; }
.ct-invite { color: #ffb0c8; }

/* Cartes de CT (liste d'un Antre, mes CT, recyclage) : liseré de la couleur de la rareté */
.ct-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; max-height: min(52vh, 520px); overflow: auto; padding: 4px; }
.ct-carte { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: #141a33; box-shadow: 0 0 0 2px #2a3a66; text-align: left; color: inherit; font: inherit; border: 0; cursor: pointer; }
.ct-carte b { display: block; font-size: 17px; line-height: 1.1; }
.ct-carte.ct-c-peu { box-shadow: 0 0 0 2px #3f8a4a; } .ct-carte.ct-c-rare { box-shadow: 0 0 0 2px #2f6fae; }
.ct-carte.ct-c-tres { box-shadow: 0 0 0 2px #8a4fc0; } .ct-carte.ct-c-leg { box-shadow: 0 0 0 3px #d9a31f; animation: ctLeg 1.2s steps(2) infinite; }
@keyframes ctLeg { 50% { box-shadow: 0 0 0 3px #ffe27a; } }
.ct-carte:hover, .ct-carte.sel { background: #1f2850; }
.ct-carte.sel { outline: 2px solid #ffe27a; outline-offset: 2px; }
.ct-carte.pas-vue { filter: grayscale(1) brightness(.6); }
.ct-carte.pas-vue b { color: #8a90a6; }
.ct-carte .btn.mini { font-size: 14px; white-space: normal; max-width: 120px; line-height: 1.1; }
.ct-grille-liste .ct-carte { cursor: default; }
.ct-liste-aide { font-size: 16px; margin: 6px 0; }
.ct-liste-aide .ct-rar { font-size: 14px; }

/* Départ : les Antres du jour */
.ct-dep-titre { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ct-dep-titre .btn.mini { margin-left: auto; font-size: 15px; }
.ct-dep-aide { font-size: 16px; margin: 0 0 6px; color: #ffb0c8; }
.ct-dungeons .dg.ct-dg { box-shadow: 0 0 0 2px var(--tc) inset; }
.ct-dungeons .dg.ct-dg.sel { box-shadow: 0 0 0 3px #ffe27a inset; }
.ct-dg-tete { display: flex; align-items: center; gap: 6px; }
.ct-dg-tete .ct-disque.gros { width: 36px; height: 36px; animation: ctFlotte 1.8s steps(4) infinite; }
@keyframes ctFlotte { 50% { transform: translateY(-2px); } }
.ct-mosa-disques .ct-disque { width: 22px; height: 22px; margin-right: -6px; }
.ct-dg.ct-mosa { --tc: #ffd93d; }
.ct-dep-demain { font-size: 16px; margin: 4px 2px 0; }

/* Calendrier de la semaine */
.ct-modal-semaine .box { width: min(980px, 96vw) !important; }
.ct-semaine { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.ct-jour { background: #141a33; box-shadow: 0 0 0 2px #2a3a66; padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ct-jour > b { font-size: 17px; }
.ct-jour.auj { box-shadow: 0 0 0 3px #ffe27a; background: #232a10; }
.ct-jour.passe { opacity: .55; }
.ct-auj { color: #ffe27a; font-size: 14px; }
.ct-jour-t { display: flex; align-items: center; gap: 4px; font-size: 15px; box-shadow: inset 3px 0 0 var(--tc, #ffd93d); padding-left: 4px; }
.ct-jour-t .ct-disque { width: 24px; height: 24px; }
.ct-mosa-l { flex-wrap: wrap; }
.ct-mosa-l .ct-disque { width: 18px; height: 18px; margin-right: -4px; }
.ct-mosa-l span { width: 100%; }
@media (max-width: 760px) { .ct-semaine { grid-template-columns: repeat(2, 1fr); } }

/* Mes CT */
.ct-modal-mes .box, .ct-modal-liste .box, .ct-modal-pk .box { width: min(980px, 96vw) !important; max-height: 92vh; overflow: auto; }
.ct-filtres { flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.ct-filtres .btn.mini { font-size: 14px; }
.ct-f { box-shadow: inset 0 -3px 0 var(--tc); }
.ct-mes { display: grid; grid-template-columns: minmax(240px, 1fr) 1.4fr; gap: 10px; align-items: start; }
.ct-mes .ct-grille { grid-template-columns: 1fr; max-height: min(64vh, 640px); }
.ct-vide { grid-column: 1 / -1; font-size: 17px; display: flex; align-items: center; gap: 10px; }
.ct-detail { background: #10152b; box-shadow: 0 0 0 2px var(--tc); padding: 8px; min-width: 0; }
.ct-detail-tete { gap: 10px; align-items: center; }
.ct-fiche { margin: 6px 0; }
@media (max-width: 760px) { .ct-mes { grid-template-columns: 1fr; } }

/* Pokémon qui peuvent apprendre une CT */
.ct-pk-t { margin: 8px 0 4px; font-size: 18px; }
.ct-pk-zone { max-height: min(46vh, 460px); overflow: auto; }
.ct-modal-pk .ct-pk-zone { max-height: min(64vh, 620px); }
.ct-pk-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.ct-pk { display: flex; align-items: center; gap: 6px; padding: 4px 6px; background: #141a33; box-shadow: 0 0 0 2px #2a3a66; font-size: 16px; }
.ct-pk b { font-size: 16px; }
.ct-pk-por { width: 40px; height: 40px; image-rendering: pixelated; box-shadow: 0 0 0 2px #101018; }
.ct-pk.sait { box-shadow: 0 0 0 2px #3f8a4a; }
.ct-sait { color: #7ee08a; font-size: 15px; }
.ct-pk.pas-a-moi { opacity: .6; }
.ct-pk.pas-a-moi .ct-pk-por { filter: grayscale(1); }
.ct-pk-dex .ct-pk { padding: 2px 6px; }
.ct-pk-dex .ct-pk-por { width: 32px; height: 32px; }
.ct-plus { margin: 6px auto; display: flex; }
.ct-pk.ct-envoi { animation: ctEnvoi .5s steps(4) infinite; }
@keyframes ctEnvoi { 50% { background: #2b3566; } }
.ct-pk-titre { display: flex; align-items: center; gap: 8px; }

/* Avertissement avant d'utiliser une CT */
.ct-modal-avert h2 { display: flex; align-items: center; gap: 8px; }
.ct-modal-avert.fort .box { box-shadow: 0 0 0 3px #ffcb3d; }
.ct-avert-fort { color: #ffcb3d; }
.ct-case { display: flex; gap: 8px; align-items: center; font-size: 16px; color: #c8d0dc; cursor: pointer; }

/* Le disque qui plonge dans le portrait (apprentissage) */
.ct-vol { position: fixed; z-index: 9999; pointer-events: none; transform: translate(-50%, -50%); }
.ct-vol .ct-disque { position: absolute; left: -24px; top: -24px; animation: ctVol 1.1s steps(11) forwards; }
@keyframes ctVol { 0% { transform: translateY(-70px) scale(1.4) rotate(0); } 60% { transform: translateY(-10px) scale(1) rotate(540deg); } 100% { transform: translateY(0) scale(.2) rotate(720deg); opacity: 0; } }
.ct-vol-anneau { position: absolute; left: -30px; top: -30px; width: 60px; height: 60px; border: 3px solid #ffe27a; border-radius: 50%; opacity: 0; animation: ctAnneau .5s steps(5) .65s forwards; }
.ct-vol-anneau.a2 { border-color: #b89cff; animation-delay: .8s; }
@keyframes ctAnneau { 0% { transform: scale(.3); opacity: 1; } 100% { transform: scale(1.8); opacity: 0; } }

/* Kecleon : onglet CT */
.ct-onglet img { width: 22px; height: 22px; }
.ct-kec-haut { gap: 10px; align-items: center; margin: 4px 0 8px; }
.pc-shop .shop-grille.ct-kec-grille { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 6px; }
.pc-shop .ct-kec-grille .shop-carte.ct-kec { display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; padding: 6px 6px 8px; border-image-source: url('assets/ui/cadres/cadre1_blue_translucide.png'); }
.pc-shop .ct-kec-grille .ct-kec.ct-c-peu { border-image-source: url('assets/ui/cadres/cadre1_green_translucide.png'); }
.pc-shop .ct-kec-grille .ct-kec.ct-c-tres { border-image-source: url('assets/ui/cadres/cadre1_pink_translucide.png'); }
.pc-shop .ct-kec-grille .ct-kec.ct-c-leg { border-image-source: url('assets/ui/cadres/cadre1_yellow_translucide.png'); }
.ct-kec b { font-size: 16px; line-height: 1.1; }
.ct-kec .btn { font-size: 16px; padding-top: 0; padding-bottom: 0; }
.ct-kec-grille .ct-kec.ct-c-leg { animation: ctLegIn 1.2s steps(2) infinite; }
@keyframes ctLegIn { 50% { filter: brightness(1.25); } }
.pc-shop .ct-kec-grille .ct-kec.epuise { filter: grayscale(.8) brightness(.6); animation: none; }
.ct-kec .ct-voir { font-size: 14px; }
.ct-rec-t { margin-top: 12px; }
.ct-grille-rec { max-height: 260px; }
.ct-attente::after { content: '…'; animation: ctPoints 1s steps(3) infinite; }
@keyframes ctPoints { 0% { content: '.'; } 50% { content: '..'; } 100% { content: '...'; } }

/* Sac */
.sac-l.ct-sac { width: 100%; border: 0; font: inherit; color: inherit; cursor: pointer; background: #1b2347; box-shadow: 0 0 0 2px #6a44b8; }
.sac-l.ct-sac:hover { filter: brightness(1.2); }

/* Fin d'expédition */
.chip.ct-chip { box-shadow: 0 0 0 2px #2a3a66 inset; }
.chip.ct-chip.ct-c-rare { box-shadow: 0 0 0 2px #2f6fae inset; } .chip.ct-chip.ct-c-tres { box-shadow: 0 0 0 2px #8a4fc0 inset; } .chip.ct-chip.ct-c-leg { box-shadow: 0 0 0 2px #d9a31f inset; color: #ffe27a; }

/* Roulette du coffre jaune (en donjon, ne bloque pas le jeu) */
.ct-roul { position: fixed; left: 50%; top: 12vh; transform: translateX(-50%); z-index: 60; pointer-events: none; animation: ctRoulIn .35s steps(4); }
@keyframes ctRoulIn { from { transform: translateX(-50%) translateY(-40px); opacity: 0; } }
.ct-roul.part { animation: ctRoulOut .5s steps(5) forwards; }
@keyframes ctRoulOut { to { transform: translateX(-50%) translateY(-30px); opacity: 0; } }
.ct-roul-boite { background: #101428; box-shadow: 0 0 0 3px #101018, 0 0 0 6px #ffd93d, 0 0 0 9px #6a44b8; padding: 8px 10px; width: min(560px, 92vw); }
.ct-roul-titre { display: flex; align-items: center; justify-content: center; gap: 8px; color: #ffe45c; font-size: 20px; margin-bottom: 6px; }
.ct-roul-titre img { width: 32px; height: 32px; image-rendering: pixelated; }
.ct-roul-boite { width: min(380px, 92vw); }
/* La roue en camembert (20/11, Kiko) : une part par rareté (taille = sa chance), nom et % écrits dessus, clous au bord. */
.ct-roue-cadre { position: relative; width: 290px; height: 290px; margin: 0 auto; }
.ct-roue { width: 100%; height: 100%; display: block; overflow: visible; }
.ct-roue-fond { fill: #101018; stroke: #ffd93d; stroke-width: 4; }
.ct-roue-tourne path { stroke: #101018; stroke-width: 3; stroke-linejoin: round; }
.ct-sep { stroke: #101018; stroke-width: 3; }
.ct-clou { fill: #fff8c8; stroke: #101018; stroke-width: 1; }
.ct-part text { text-anchor: middle; dominant-baseline: middle; fill: #101018; font-family: inherit; paint-order: stroke; stroke: rgba(255, 255, 255, .35); stroke-width: 2px; }
.ct-part-pc { font-weight: bold; }
.ct-part-leg path { animation: ctPartLeg .5s steps(2) infinite; }
@keyframes ctPartLeg { 50% { fill: #fff3a8; } }
.ct-roul.fini .ct-part:not(.gagne) { opacity: .35; }
.ct-part.gagne path { animation: ctPartGagne .3s steps(2) 6; }
@keyframes ctPartGagne { 50% { fill: #ffffff; } }
.ct-roue-moyeu { fill: #6a44b8; stroke: #101018; stroke-width: 3; }
.ct-roue-disque { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; image-rendering: pixelated; }
.ct-roul.fini .ct-roue-disque { animation: ctPop .3s steps(3); }
/* La flèche, en haut : elle saute à chaque clou */
.ct-roue-fleche { position: absolute; left: 50%; top: -10px; width: 0; height: 0; margin-left: -11px; border: 11px solid transparent; border-top: 22px solid #ffe45c; border-bottom: 0; filter: drop-shadow(0 0 0 #101018) drop-shadow(2px 2px 0 #101018); transform-origin: 50% 0; }
.ct-roue-fleche.saute { animation: ctFleche .12s steps(2); }
@keyframes ctFleche { 50% { transform: rotate(-18deg); } }
.ct-roul.fini .ct-roue-cadre { animation: ctFlashRoue .6s steps(3); }
@keyframes ctFlashRoue { 33% { filter: brightness(1.6); } }
.ct-roul.ct-fini-leg .ct-roul-boite { animation: ctLegBoite .4s steps(2) 6; }
@keyframes ctLegBoite { 50% { box-shadow: 0 0 0 3px #101018, 0 0 0 6px #fff8c8, 0 0 0 9px #ffcb3d; } }
.ct-roul-res { min-height: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 6px; }
.ct-roul-rar { font-size: 22px; animation: ctPop .3s steps(3); }
@keyframes ctPop { from { transform: scale(1.8); } }
.ct-roul-gain { display: flex; align-items: center; gap: 6px; font-size: 17px; animation: ctPop .3s steps(3) backwards; }
.ct-roul-gain:nth-child(3) { animation-delay: .15s; } .ct-roul-gain:nth-child(4) { animation-delay: .3s; } .ct-roul-gain:nth-child(5) { animation-delay: .45s; }
.ct-roul-gain.moi b { color: #ffe27a; }
.ct-roul-gain .ct-disque { width: 28px; height: 28px; }
.cap-ct { font-style: normal; color: #101018; background: #b89cff; padding: 0 4px; box-shadow: 0 0 0 1px #101018; }
/* (20/11) curseur de la manette sur une carte de CT et sur la ligne CT du Sac */
.ct-carte.focus, button.ct-sac.focus { outline: 3px solid #ffe45c; outline-offset: 2px; filter: brightness(1.15); }

/* Mon équipe → Capacités → « CT apprenables » (20/11) : une ligne par CT (liseré de rareté), où la trouver dessous. */
.cap-sous { gap: 6px; margin: 2px 0 6px; flex-wrap: wrap; }
.cap-sous .btn.mini { font-size: 15px; position: relative; }
.cap-sous .ct-disque { width: 20px; height: 20px; }
.cap-sous-ct .ct-n { margin-left: 2px; }
.cap-sous-ct { position: relative; }
.cap-sous-ct:has(.cap-sous-pastille) { padding-right: 16px; } /* la place du « ! » : il ne couvre jamais le nombre */
/* (24/11, bug Discord « double nombre ») un seul nombre dans le bouton (le total) : la pastille des CT du sac devient un
   « ! » dans le coin, hors du texte (le nombre du sac est écrit en clair juste en dessous, « N déjà dans ton sac ») */
.cap-sous-pastille { position: absolute; top: -8px; right: -8px; width: 15px; height: 15px; font-size: 12px; line-height: 15px; text-align: center; color: #101018; background: #ffe27a; box-shadow: 0 0 0 2px #101018; pointer-events: none; animation: ctPastille 1s steps(2) infinite; }
@keyframes ctPastille { 50% { transform: translateY(-2px); } }
.ct-app-aide { margin: 0 0 4px; font-size: 15px; line-height: 1.25; }
.ct-app-total, .ct-app-amoi { color: #ffe27a; }
.ct-app-chiffres { display: block; color: #e8ecf8; font-size: 16px; }
.ct-app-verrou { color: #ffb0c8; }
.ct-app-f { margin: 3px 0; }
.ct-app-f .btn.mini { min-height: 40px; }
.ct-app-f .ct-f-ico { padding-left: 4px; padding-right: 4px; gap: 4px; }
.ct-fr { box-shadow: inset 0 -3px 0 currentColor; }
.ct-app-liste { display: flex; flex-direction: column; gap: 8px; padding: 4px; }
.ct-carte.ct-app-l { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 8px; cursor: default; flex: none; }
.ct-carte.ct-app-l.a-moi { background: #1c2244; }
.ct-carte.ct-app-l.connue { filter: saturate(.55); }
.ct-carte.ct-app-l.connue .ct-app-voir b { color: #a8b0c6; }
.ct-app-voir { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 0; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ct-app-voir:hover b { color: #ffe27a; }
.ct-app-voir.focus { outline: 3px solid #ffe45c; outline-offset: 3px; }
.ct-app-puces { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 2px; }
.ct-app-a { color: #ffe27a; font-size: 15px; display: inline-flex; align-items: center; gap: 3px; padding: 0 5px; box-shadow: 0 0 0 2px #ffe27a inset; }
.ct-disque.mini { width: 16px; height: 16px; }
.ct-app-btn { grid-column: 2; grid-row: 1; align-self: center; }
.ct-app-voir { grid-column: 1; grid-row: 1; }
.ct-app-l .ct-app-btn { animation: ctAppBtn 1.4s steps(2) infinite; }
@keyframes ctAppBtn { 50% { filter: brightness(1.25); } }
.ct-app-lieux { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 10px; padding-left: 40px; font-size: 15px; }
.ct-lieu { display: inline-flex; align-items: center; gap: 4px; color: #c8d0dc; }
.ct-lieu .ct-disque { width: 18px; height: 18px; }
.ct-lieu-laby .ct-disque + .ct-disque { margin-left: -10px; }
.ct-lieu-sep { color: #5a6488; }
.ct-lieu.auj { color: #fff; }
.ct-app-auj { color: #7ee08a; animation: ctAuj 1s steps(2) infinite; }
@keyframes ctAuj { 50% { color: #c8ffd0; } }
.ct-app-proch { color: #8a90a6; }
.ct-kec-ico { width: 20px; height: 20px; image-rendering: pixelated; }
.ct-lieu-kec.auj { color: #ffe27a; }
.ct-app-deja { font-size: 14px; }
.ct-app-fiche { grid-column: 1 / -1; margin: 4px 0 0; }
.ct-app-note { font-size: 14px; margin: 6px 0 0; }
body.is-touch .ct-app-lieux { padding-left: 0; }
/* Téléphone : les deux boutons côte à côte, chaque rangée de filtres sur une seule ligne qui défile au doigt
   (#detail : passe devant « body.is-touch #detail .row { flex-wrap: wrap } » de telephone.css) */
body.is-touch #detail .row.cap-sous { flex-wrap: nowrap; }
body.is-touch #detail .cap-sous .btn.mini { flex: 1 1 auto; min-width: 0; padding-left: 8px; padding-right: 8px; white-space: nowrap; font-size: 14px; gap: 4px; }
body.is-touch #detail .row.ct-app-f { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding-bottom: 2px; }
body.is-touch #detail .ct-app-f .btn.mini { flex: none; }

/* (20/11, Chef) relances et ristourne de la boutique CT */
.ct-kec-haut .kec-de { flex: none; }
.ct-remise { display: block; font-size: 14px; color: #7ee08a; font-weight: 700; margin: 2px 0 -2px; }
.ct-remise s { color: #9aa3b5; font-weight: 400; margin-left: 4px; }
/* (2/12, bug Discord de Redalia) Téléphone couché : la roue (290 px) dépassait sous l'écran. Roue à gauche, gains à droite,
   le tout à la hauteur de l'écran. */
@media (max-height: 520px) {
  .ct-roul { top: 6px; }
  .ct-roul-boite { width: min(600px, 94vw); display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: center; padding: 4px 10px 6px; }
  .ct-roul-titre { grid-column: 1 / -1; font-size: 17px; margin-bottom: 2px; }
  .ct-roul-titre img { width: 24px; height: 24px; }
  .ct-roue-cadre { width: min(290px, calc(100vh - 64px)); height: min(290px, calc(100vh - 64px)); margin: 0; }
  .ct-roul-res { margin-top: 0; align-items: flex-start; min-width: 0; }
  .ct-roul-gain { font-size: 15px; min-width: 0; }
}
/* Téléphone debout étroit : la roue ne dépasse jamais la largeur */
@media (max-width: 340px) { .ct-roue-cadre { width: 84vw; height: 84vw; } }
