@font-face{font-family:ProjectPixel;src:url('/dex-pixel-font.ttf') format('truetype');font-weight:400 700;font-display:swap}
.device{position:relative;display:block;width:100%;aspect-ratio:1;isolation:isolate;line-height:normal}
.device-frame{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;image-rendering:pixelated;z-index:2;pointer-events:none}
.device-screen{position:absolute;left:24%;top:30.6%;width:50%;height:43.8%;overflow:hidden;background:#092536;z-index:1;display:flex;align-items:center;justify-content:center;clip-path:polygon(4% 0,96% 0,100% 5%,100% 95%,96% 100%,4% 100%,0 95%,0 5%)}
.device-pve .device-screen,.device-pvp .device-screen{left:26%;top:24.5%;width:47%;height:39%}
.device-eye{position:absolute;z-index:3;top:16.2%;width:9.4%;height:11.3%;background:#ff483b;clip-path:polygon(36% 0,64% 0,100% 35%,100% 72%,65% 100%,30% 100%,0 65%,0 30%);opacity:0;animation:device-blink 10s steps(1,end) infinite;pointer-events:none}
.device-eye.left{left:33.5%}.device-eye.right{left:55.4%}.device-eye:after{content:'';position:absolute;left:10%;top:49%;width:80%;height:8%;background:#05132b;box-shadow:0 2px #b72528}
.device-pve .device-eye,.device-pvp .device-eye{top:8.4%;height:12%;width:9.6%}.device-pve .device-eye.left,.device-pvp .device-eye.left{left:32.6%}.device-pve .device-eye.right,.device-pvp .device-eye.right{left:56.5%}
.device-home .device-screen{left:32%;top:25.5%;width:35.5%;height:54%;background:#092536}
.device-home .device-eye{top:13.2%;width:8%;height:9.2%}
.device-home .device-eye.left{left:36.4%}.device-home .device-eye.right{left:55.2%}
.device-chat{display:flex;flex-direction:column;justify-content:flex-end;gap:3px;width:100%;height:100%;padding:4%;overflow:hidden;text-align:left;color:#eaf2ff;font:7px/1.15 ProjectPixel,monospace;overflow-wrap:anywhere}
.device-chat-line{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;flex-shrink:0}
.device-chat-line strong{color:#77e1e0}
.device-chat-empty{margin:auto;text-align:center;white-space:pre-line;font-size:8px;color:#b5d8de}
.device-notification{position:absolute;left:60%;top:19%;width:30%;height:30%;object-fit:contain;image-rendering:pixelated;z-index:4;pointer-events:none;transform-origin:50% 20%;animation:chat-bell .6s ease-in-out infinite}
@keyframes chat-bell{0%,100%{transform:rotate(0)}25%{transform:rotate(-12deg)}75%{transform:rotate(12deg)}}
@keyframes device-blink{0%,96%,99.5%,100%{opacity:0}97%,99%{opacity:1}}
.device-slide{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;animation:device-slide 10s linear both;padding:4%}
.device-screen .device-pokemon{width:85%;height:72%;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 2px 0 #001421)}
.device-name{display:block;text-align:center;color:#effff6;font:600 clamp(7px,1vw,14px)/1.05 ProjectPixel,monospace;width:100%;overflow-wrap:anywhere;text-shadow:1px 1px #000;max-height:30%}
@keyframes device-slide{0%{transform:translateX(105%)}7%,93%{transform:translateX(0)}100%{transform:translateX(-105%)}}
.device-tower{display:flex;align-items:center;justify-content:center;width:100%;height:100%;animation:tower-show 10s steps(1,end) both}.device-screen .device-tower img{width:100%;height:auto;image-rendering:pixelated}
.device-outcome{position:absolute;inset:0;display:grid;place-items:center;text-align:center;color:#ffe780;text-shadow:2px 2px #9c321c;font:700 clamp(10px,2vw,26px)/1 ProjectPixel,monospace;background:#092536;animation:outcome-show 10s steps(1,end) both}
@keyframes tower-show{0%{opacity:1}60%,100%{opacity:0}}@keyframes outcome-show{0%{opacity:0}60%,100%{opacity:1}}
.device-battle{position:absolute;inset:0;width:100%;height:100%;border-radius:0;pointer-events:none}
.home-actions .art-button.wide[data-device]{flex-basis:15rem}.home-side [data-device]{width:100%;max-width:17rem;align-self:center}
#pokedex-view{--dex-cyan:#77e1e0;--dex-line:#326077;--dex-card:#152f43;--dex-paper:#f4efd2;--dex-red:#fa6757;font:20px/1.4 ProjectPixel,monospace;padding:1.3rem;background:linear-gradient(90deg,#ffffff03 1px,transparent 1px),linear-gradient(#ffffff03 1px,transparent 1px),#0b2132;background-size:16px 16px;border:3px solid var(--dex-line);color:#e6f6ef;box-shadow:inset 0 0 0 5px #091725;min-height:80vh}
#pokedex-view button,#pokedex-view input,#pokedex-view select{font:inherit}#pokedex-view h1{font:700 clamp(34px,5vw,58px)/1 ProjectPixel,monospace;color:var(--dex-paper)}#pokedex-view h2{font:700 28px/1.2 ProjectPixel,monospace}#pokedex-view h3{font:700 24px/1.2 ProjectPixel,monospace}#pokedex-view p{margin:.4rem 0}
.dex-kicker{font-size:15px;letter-spacing:2px;color:var(--dex-cyan)}.dex-welcome{display:grid;grid-template-columns:1fr 180px;align-items:center;gap:24px;max-width:1000px;margin:auto auto 24px}.dex-welcome h1{margin:8px 0!important}.dex-welcome p:last-child{color:#accccd;max-width:650px}
.dex-category-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;max-width:1120px;margin:auto}
#pokedex-view .dex-category{background:var(--dex-card);border:2px solid var(--dex-line);border-radius:0;box-shadow:4px 4px #041423;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:16px 8px;color:var(--dex-paper);text-align:center;min-width:0;transition:transform .12s,border-color .12s}
#pokedex-view button.dex-category:hover{transform:translateY(-3px);border-color:var(--dex-cyan);background:#1b3b51}.dex-category-icon{display:block;width:96px;height:96px;object-fit:contain;image-rendering:pixelated}.dex-category-name{font-size:24px;font-weight:700;line-height:1.1}.dex-category small{font-size:16px;color:#a4c2c9}
.dex-category-nav{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin-bottom:18px}.dex-category-nav .dex-category{flex:0 1 128px;padding:8px!important;box-shadow:2px 2px #041423!important}.dex-category-nav .dex-category-icon{width:52px;height:52px}.dex-category-nav .dex-category-name{font-size:17px}.dex-category.active{border-color:var(--dex-red)!important;background:#3e313b!important}
.dex-category-heading{text-align:center;margin:24px 0}.dex-category-heading img{width:110px;height:110px;object-fit:contain;image-rendering:pixelated}.dex-category-heading h1{font-size:40px!important}.dex-heading-link{border:0;background:transparent!important;color:inherit;padding:0}.dex-back{border:0;background:transparent;color:var(--dex-cyan);padding:6px 0;margin-bottom:10px}
.dex-filters{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:12px 0}.dex-filters input{flex:1;min-width:180px;background:#f4efd2!important;color:#142e40!important;border-radius:0!important;border:2px solid #698890!important}.dex-filters select{width:auto!important;border-radius:0!important;min-width:160px}.dex-result-count{color:#b9d2d7;font-size:18px}
.dex-pokemon-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(165px,1fr));gap:12px}
#pokedex-view .dex-pokemon-card{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;background:var(--dex-card);border:2px solid var(--dex-line);color:var(--dex-paper);border-radius:0;padding:12px 8px;box-shadow:3px 3px #051827;min-width:0}
#pokedex-view .dex-pokemon-card:hover{background:#21455a;border-color:var(--dex-cyan)}.dex-pokemon-card strong{font-size:20px;line-height:1.15;text-align:center;min-height:46px;display:flex;align-items:center;overflow-wrap:anywhere}.dex-number{align-self:flex-start;color:#9eb6c6;font-size:14px!important}.dex-pokemon-sprite{width:120px;height:120px;image-rendering:pixelated;object-fit:contain}.dex-types{display:flex;gap:5px;flex-wrap:wrap;justify-content:center;align-items:center}.dex-type{display:inline-block;font:600 16px/1.1 ProjectPixel,monospace;border:1px solid #748ca2;padding:3px 7px;background:#465b71;color:white;white-space:nowrap;text-shadow:1px 1px #243346}
.dex-type[data-type=Fire]{background:#af462b}.dex-type[data-type=Water]{background:#286ba8}.dex-type[data-type=Grass]{background:#427b3b}.dex-type[data-type=Electric]{background:#946f08}.dex-type[data-type=Ghost]{background:#62476d}.dex-type[data-type=Dark]{background:#454049}.dex-type[data-type=Psychic]{background:#aa466d}.dex-type[data-type=Fairy]{background:#a95693}.dex-type[data-type=Poison]{background:#8246a0}.dex-type[data-type=Steel]{background:#526f7b}.dex-type[data-type=Dragon]{background:#3e59ae}.dex-type[data-type=Ground]{background:#916340}.dex-type[data-type=Rock]{background:#7d7141}.dex-type[data-type=Ice]{background:#36868a}.dex-type[data-type=Bug]{background:#687425}.dex-type[data-type=Fighting]{background:#98482e}.dex-type[data-type=Flying]{background:#727daf}
.dex-pagination{display:flex;justify-content:center;align-items:center;gap:16px;margin:20px 0}.dex-button,.dex-link-button{border:2px solid #5d8a9b;border-radius:0;background:#204457;color:#f4efd2;box-shadow:2px 2px #051a25}.dex-link-button{margin:8px 8px 0 0}.dex-pagination button:disabled{opacity:.4}
.dex-species-title{text-align:center;margin:8px 0 28px}.dex-species-title h2{font-size:40px!important;margin:5px 0 15px!important}.dex-profile-grid{display:grid;grid-template-columns:1fr 1.2fr;gap:20px;max-width:1100px;margin:auto}.dex-portrait,.dex-stat-block,.dex-panel{background:#132f42;border:2px solid #326077;padding:22px;box-shadow:4px 4px #041625}.dex-portrait{text-align:center}.dex-portrait>.dex-pokemon-sprite{width:220px;height:220px}.dex-measures{display:flex;justify-content:space-evenly;gap:12px;margin:0}.dex-measures dd{margin:0;font-size:26px;color:#f4efd2}.dex-measures small{display:block;font-size:14px;color:#adccd1;max-width:200px}.dex-measures dt{color:#91bec5}.dex-required{display:flex;justify-content:center;align-items:center;gap:6px}.dex-required img{width:32px;height:32px;image-rendering:pixelated}
.dex-stat{display:grid;grid-template-columns:100px 45px 1fr;gap:12px;align-items:center;margin:14px 0}.dex-stat strong{text-align:right}.dex-stat-rail{height:14px;background:#041a29;border:1px solid #426777;display:block}.dex-stat-rail i{display:block;height:100%;background:linear-gradient(#80e5c5 50%,#369d98 50%)}.dex-bst{text-align:right;color:#ffcd83;font-size:25px}.dex-panel{max-width:1100px;margin:22px auto}.dex-panel h2{color:#7ee0db;margin-bottom:12px!important}.dex-ability{padding:12px 0;border-bottom:1px solid #375065}.dex-panel details p{white-space:pre-line}.dex-panel details summary{color:#c8e2df}.dex-panel details{font-size:18px}.dex-rules{border-left:6px solid #f38c60}.dex-rules li{margin:6px 0}.dex-related{display:flex;gap:6px;flex-wrap:wrap}.dex-related h2{flex-basis:100%}
.dex-move{border:1px solid #456d7f;background:#11283b;margin:8px 0}.dex-move>summary{padding:12px 15px;display:flex;flex-direction:column;gap:8px;cursor:pointer}.dex-move>summary:before{content:'▶';float:left;font-size:13px;color:#ffce82}.dex-move[open]>summary:before{content:'▼'}.dex-move-title{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.dex-move-title strong{margin-right:auto;font-size:23px;color:#f6eacb}.dex-move-numbers{font-size:18px;color:#b5cdd1}.dex-move-info{border-top:1px solid #456d7f;padding:14px 18px;background:#183a4a;font-size:20px}.dex-secondary{color:#c6d9db;font-size:17px}.dex-signature{color:#ffd582;font-weight:700}
.dex-professor{display:flex;align-items:flex-end;justify-content:center;gap:20px;max-width:940px;margin:32px auto 12px;min-height:180px}.dex-prof-image{width:180px;height:180px;object-fit:contain;image-rendering:pixelated;flex:none}.dex-speech{position:relative;background:#f5eed5;border:4px solid #102534;outline:2px solid #7fc5c8;padding:20px 24px;box-shadow:5px 5px #020d17;color:#203b43;flex:1;max-width:640px;min-height:110px}.dex-speech:before{content:'';position:absolute;left:-20px;bottom:28px;border-top:12px solid transparent;border-bottom:12px solid transparent;border-right:18px solid #102534}.dex-speech strong{font-size:20px;color:#974c39}.dex-speech p{font-size:23px;line-height:1.2;min-height:55px}
.dex-bottom-nav{position:sticky;bottom:0;z-index:4;display:flex;justify-content:center;align-items:center;gap:18px;margin:0;padding:8px 14px;background:#09202def;border-top:3px solid #477384;backdrop-filter:blur(8px);flex-shrink:0}.dex-bottom-nav button{padding:0;border:0;background:transparent!important;width:130px;height:130px;min-width:0;flex:0 1 130px}.dex-bottom-nav .dex-home-button{height:auto;line-height:1}.dex-bottom-nav .dex-home-button img{width:100%;height:auto;image-rendering:pixelated}.dex-bottom-nav button:hover{filter:brightness(1.14)}.dex-bottom-nav .device-name{font-size:8px}.dex-bottom-nav .device-outcome{font-size:15px}
#site-navigation{margin:0}
#site-navigation .site-options-button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#f4efd2;font:24px/1 ProjectPixel,monospace}
.site-options-button img{width:55%;height:auto;image-rendering:pixelated}
@media(max-width:480px){#site-navigation{gap:4px;padding:6px}#site-navigation button{height:auto;min-height:44px;aspect-ratio:1}#site-navigation .site-options-button{font-size:17px}}
@media(max-width:800px){#pokedex-view{padding:14px}.dex-category-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.dex-category-icon{width:75px;height:75px}.dex-category-name{font-size:21px}.dex-welcome{grid-template-columns:1fr 130px}.dex-profile-grid{grid-template-columns:1fr}.dex-category-nav .dex-category{flex-basis:95px}.dex-bottom-nav{gap:8px;margin:20px -14px -14px}.dex-bottom-nav button{width:95px;height:95px;flex-basis:95px}.dex-prof-image{width:130px;height:150px}.dex-speech{padding:14px}.dex-speech p{font-size:20px}.dex-professor{gap:10px}}
@media(max-width:480px){.dex-category-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dex-welcome{grid-template-columns:1fr 90px;gap:8px}.dex-pokemon-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dex-prof-image{width:95px;height:130px}.dex-category-nav .dex-category{flex-basis:76px}.dex-category-nav .dex-category-name{font-size:15px}.dex-stat{grid-template-columns:86px 32px 1fr;gap:8px}.dex-portrait,.dex-stat-block,.dex-panel{padding:13px}.dex-pagination{gap:8px;font-size:16px}.dex-bottom-nav button{max-width:80px;height:80px}.dex-bottom-nav .device-name{font-size:6px}.dex-bottom-nav .device-outcome{font-size:12px}.dex-species-title h2{font-size:30px!important}}
@media(prefers-reduced-motion:reduce){.device-eye,.device-notification{animation:none}.device-slide{animation:none}.device-outcome{animation:none;display:none}.device-tower{animation:none}.dex-category{transition:none!important}}
:root[data-reduce-flashes=on] .device-eye{display:none}:root[data-reduce-flashes=on] .device-outcome{display:none}
/* Les noms de formes longs gardent leur texte entier dans les petits écrans. */
.device-long-name .device-pokemon{height:55%}
.device-long-name .device-name{font-size:clamp(6px,.7vw,10px);max-height:45%}
.dex-bottom-nav .device-long-name .device-name{font-size:6px}/* Crédit de l'image consultée, immédiatement sous le sprite de la fiche. */
#pokedex-view .dex-sprite-credit{margin:8px 0 20px;color:#c8e2df;font-size:18px;line-height:1.35;overflow-wrap:anywhere}
