/* Fontaine des évolutions (18/11/2026) : client/js/fontaine.js. Reprend la mise en page de l'atelier de Cradopaud (cr-*,
   cradopo.css) avec une teinte d'eau turquoise ; préfixe fo-. */
.fontaine-modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(3, 6, 18, .62); animation: bg-fondu .2s ease-out; }
.fontaine-modal .btn.cr-it { justify-content: flex-start; gap: 8px; padding: 2px 8px 2px 18px; text-align: left; border-width: 8px; flex: none; }
.fontaine-modal .btn.cr-it.sel { border-image-source: url('assets/ui/cadres/cadre1_yellow_fin.png'); filter: brightness(1.15); }
.fo-mini { width: 120px; height: 80px; flex: none; image-rendering: pixelated; filter: drop-shadow(0 0 8px rgba(127, 232, 255, .45)); }
.fo-tete .cr-titre { color: #bff8ff; text-shadow: 0 0 10px rgba(127, 232, 255, .55), 0 3px 0 #000; }
.fo-box .cr-liste-t { color: #8ff0ff; }
.fo-sec { font-size: 15px; margin: 4px 2px 0; display: flex; align-items: center; gap: 6px; }
.fo-sec.ok { color: var(--ok); }
.fo-it .fo-por { width: 40px; height: 40px; image-rendering: pixelated; border: 2px solid #0a1233; background: #0b1636; }
.fontaine-modal .btn.fo-it.fo-gris .fo-por, .fontaine-modal .btn.fo-it.fo-gris .cr-it-n { filter: grayscale(1) brightness(.62); }
.fontaine-modal .btn.fo-it.fo-gris.sel .fo-por { filter: grayscale(.7) brightness(.8); }
.fo-sh { color: #ffe27a; font-size: 14px; }
/* Panneau : Pokémon pas encore prêt */
.fo-attente { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 6px; }
.fo-grand { width: 112px; height: 112px; display: grid; place-items: center; position: relative; background: radial-gradient(circle, rgba(127, 232, 255, .18), transparent 66%); }
.fo-grand.lueur { background: radial-gradient(circle, rgba(127, 232, 255, .45), transparent 68%); animation: cr-pulse 2.2s ease-in-out infinite; }
.fo-big { width: 96px; height: 96px; image-rendering: pixelated; border: 3px solid #cfe0ff; box-shadow: 0 0 0 2px #000; background: #0b1636; }
.fo-attente .fo-big { filter: grayscale(.85) brightness(.75); }
.fo-niv { font-size: 22px; }
.fo-barre { width: min(320px, 90%); height: 16px; background: #0a1233; border: 2px solid #31508f; position: relative; }
.fo-barre i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(#bff8ff, #3fa7d9); }
.fo-barre-t { color: #8ff0ff; font-size: 18px; }
.fo-ombres { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 4px; }
.fo-ombre { position: relative; width: 48px; height: 48px; display: grid; place-items: center; border: 2px solid #4a5578; background: #0b1636; }
.fo-ombre img { width: 44px; height: 44px; image-rendering: pixelated; filter: brightness(0) drop-shadow(0 0 3px rgba(127, 232, 255, .7)); }
.fo-ombre b { position: absolute; font-size: 22px; color: #fff; text-shadow: 0 0 6px #7fe8ff, 0 2px 0 #000; }
.fo-astuce { font-size: 14px; max-width: 420px; }
/* Panneau : Pokémon prêt */
.fo-choix { display: flex; flex-direction: column; gap: 4px; }
.fo-choix-t { color: #8ff0ff; font-size: 16px; }
.fo-choix-l { display: flex; flex-wrap: wrap; gap: 4px; }
.fontaine-modal .btn.fo-c { flex-direction: column; gap: 0; padding: 2px 6px 2px 10px; border-width: 8px; font-size: 13px; line-height: 1; min-width: 70px; }
.fo-c img { width: 36px; height: 36px; image-rendering: pixelated; }
.fontaine-modal .btn.fo-c.on { border-image-source: url('assets/ui/cadres/cadre1_yellow_fin.png'); color: var(--gold); filter: brightness(1.15); }
.fo-duo .cr-carte { padding: 6px; }
.fo-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.fo-st { display: flex; flex-direction: column; align-items: center; padding: 2px 4px; background: rgba(0, 0, 0, .3); border: 2px solid rgba(127, 232, 255, .25); border-radius: 4px; font-size: 14px; }
.fo-st b { font-size: 18px; font-weight: normal; }
.fo-garde { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 15px; color: #d6e2ff; }
.fo-garde-t { color: var(--ok); }
.fo-garde span { display: inline-flex; align-items: center; gap: 4px; }
.fo-avert { display: flex; flex-direction: column; gap: 3px; padding: 6px 8px; font-size: 15px; line-height: 1.2; background: rgba(60, 40, 0, .35); border: 2px solid rgba(255, 211, 92, .5); border-radius: 5px; color: #ffe9b0; }
.fo-regle { font-size: 14px; }
.fontaine-modal .cr-go.fo-go { white-space: nowrap; }
/* Confirmation (une vraie fenêtre par-dessus) */
.modal.fo-conf { z-index: 70; }
.fo-conf-b { width: min(460px, calc(100vw - 40px)); }
.fo-conf-duo { display: flex; align-items: center; gap: 12px; }
.fo-conf-duo img { width: 72px; height: 72px; image-rendering: pixelated; border: 3px solid #cfe0ff; box-shadow: 0 0 0 2px #000; background: #0b1636; }
.fo-conf-t { font-size: 22px; line-height: 1.2; }
.fo-conf .fo-avert { text-align: left; font-size: 14px; }
.fo-conf-btns { justify-content: center; gap: 10px; }
/* Animation */
.modal.fo-anim { z-index: 70; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(3, 6, 18, .96); animation: bg-fondu .25s; }
.fo-anim canvas { width: min(480px, 92vw, calc((100vh - 170px) * 4 / 3)); aspect-ratio: 4 / 3; image-rendering: pixelated; border: 3px solid #7fe8ff; box-shadow: 0 0 0 2px #000, 0 0 24px rgba(127, 232, 255, .45); background: #060a1c; }
.fo-anim-t { min-height: 92px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.fo-anim-m { font-size: 26px; text-shadow: 0 3px 0 #000; animation: pop .35s cubic-bezier(.2,1.4,.4,1); }
.fo-anim-s { font-size: 15px; }
/* Téléphone debout */
@media (max-width: 820px) and (min-height: 561px) {
  .fo-mini { width: 72px; height: 48px; }
  .fo-stats { grid-template-columns: repeat(2, 1fr); }
  .fo-grand { width: 76px; height: 76px; } .fo-big { width: 64px; height: 64px; }
  .fo-regle { display: none; } .fo-garde { font-size: 13px; } .fo-avert { font-size: 13px; }
  .fontaine-modal .btn.fo-c { min-width: 58px; font-size: 11px; } .fo-c img { width: 30px; height: 30px; }
  .fo-anim-m { font-size: 20px; }
}
/* Téléphone couché */
@media (max-height: 560px) {
  .fo-mini { width: 54px; height: 36px; }
  .fo-it .fo-por { width: 26px; height: 26px; } .fo-sec { font-size: 12px; }
  .fo-grand { width: 52px; height: 52px; } .fo-big { width: 44px; height: 44px; }
  .fo-stats { gap: 2px; } .fo-st { font-size: 11px; padding: 0 2px; } .fo-st b { font-size: 13px; }
  .fo-garde { font-size: 11px; gap: 2px 8px; } .fo-avert { font-size: 11px; padding: 3px 6px; } .fo-regle { display: none; }
  .fo-choix-t { font-size: 12px; } .fontaine-modal .btn.fo-c { min-width: 50px; font-size: 10px; padding: 0 4px 0 8px; } .fo-c img { width: 24px; height: 24px; }
  .fo-niv { font-size: 16px; } .fo-barre-t { font-size: 14px; } .fo-astuce { font-size: 11px; } .fo-ombre { width: 34px; height: 34px; } .fo-ombre img { width: 30px; height: 30px; }
  .fo-conf-duo img { width: 48px; height: 48px; } .fo-conf-t { font-size: 16px; }
  .fo-anim { gap: 4px; } .fo-anim-t { min-height: 60px; } .fo-anim-m { font-size: 17px; }
}
.tuile .fo-tuile-ic { width: 42px; height: 28px; object-fit: contain; image-rendering: auto; filter: drop-shadow(0 0 3px rgba(127, 232, 255, .6)); }
