/* Plasseo'Pause - v1.0 - bulle de petits jeux de detente pour plasseo.eu
   Toutes les regles sont prefixees "pp-" pour ne pas toucher au reste du site. */

.pp-racine {
  --pp-navy: #1b2a4a;
  --pp-navy-2: #26385f;
  --pp-jaune: #e6da38;
  --pp-jaune-doux: #fcf6c2;
  --pp-jaune-pale: #fdfaee;
  --pp-fond: #f6f8fc;
  --pp-ligne: #e1e6ee;
  --pp-encre: #1a1a1a;
  --pp-doux: #5e6670;
  font-family: Montserrat, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  color: var(--pp-encre);
}
.pp-racine *, .pp-racine *::before, .pp-racine *::after { box-sizing: border-box; }
.pp-racine button { font: inherit; color: inherit; cursor: pointer; margin: 0; -webkit-tap-highlight-color: transparent; }
.pp-racine svg { display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pp-racine p { margin: 0; }

/* ---------- Bulle flottante ---------- */
.pp-coin { position: fixed; right: 20px; bottom: 20px; z-index: 9990; }
.pp-bulle {
  position: relative; width: 60px; height: 60px; border-radius: 50%; border: 0; padding: 0;
  background: var(--pp-navy); color: var(--pp-jaune);
  box-shadow: 0 6px 18px rgba(27, 42, 74, .28), inset 0 -4px 0 rgba(0, 0, 0, .12);
  display: grid; place-items: center;
  opacity: 0; transform: scale(.4) translateY(20px); pointer-events: none;
  transition: opacity .5s ease, transform .5s cubic-bezier(.2, 1.4, .4, 1);
}
.pp-bulle svg { width: 34px; height: 34px; }
.pp-bulle .pp-reflet { stroke: #fff; opacity: .7; }
.pp-visible .pp-bulle { opacity: 1; transform: none; pointer-events: auto; animation: pp-flotte 4.5s ease-in-out infinite; }
.pp-visible .pp-bulle:hover { transform: scale(1.07); }
.pp-bulle:focus-visible { outline: 3px solid var(--pp-jaune); outline-offset: 3px; }
@keyframes pp-flotte { 0%, 100% { translate: 0 0; } 50% { translate: 0 -4px; } }


.pp-info {
  position: absolute; right: 72px; bottom: 12px; white-space: nowrap;
  background: #fff; color: var(--pp-navy); font-weight: 600; font-size: 14px;
  padding: 9px 14px; border-radius: 14px; border: 0;
  box-shadow: 0 6px 18px rgba(27, 42, 74, .18);
  opacity: 0; transform: translateX(8px); pointer-events: none;
  transition: opacity .4s ease, transform .4s ease;
}
.pp-info.pp-montre { opacity: 1; transform: none; pointer-events: auto; }
.pp-ouvert .pp-info { opacity: 0; pointer-events: none; }

/* ---------- Fenetre ---------- */
.pp-fenetre {
  position: fixed; right: 20px; bottom: 92px; z-index: 9991;
  width: 380px; height: min(600px, calc(100vh - 112px));
  background: #fff; border-radius: 18px; overflow: hidden;
  box-shadow: 0 18px 50px rgba(27, 42, 74, .25), 0 0 0 1px rgba(27, 42, 74, .06);
  display: flex; flex-direction: column;
  opacity: 0; transform: translateY(12px) scale(.98); transform-origin: bottom right;
  transition: opacity .2s ease, transform .2s ease;
}
.pp-fenetre[hidden] { display: none; }
.pp-fenetre.pp-ouverte { opacity: 1; transform: none; }

.pp-entete {
  display: flex; align-items: center; gap: 2px; min-height: 58px;
  padding: 9px 8px 9px 16px; background: var(--pp-navy); color: #fff; flex: none;
}
.pp-entete.pp-avec-retour { padding-left: 6px; }
.pp-titre { flex: 1; font-weight: 700; font-size: 17px; letter-spacing: .01em; outline: none; }
.pp-titre b { color: var(--pp-jaune); font-weight: 700; }
.pp-icone {
  width: 42px; height: 42px; border: 0; border-radius: 10px; padding: 0;
  background: transparent; color: #fff; display: grid; place-items: center; flex: none;
}
.pp-icone[hidden] { display: none; }
.pp-icone svg { width: 22px; height: 22px; }
.pp-icone:hover { background: rgba(255, 255, 255, .1); }
.pp-icone:focus-visible { outline: 2px solid var(--pp-jaune); outline-offset: -2px; }
.pp-son[aria-pressed="false"] { color: #9aa5bd; }

.pp-zone {
  flex: 1; overflow: auto; padding: 16px; background: var(--pp-fond);
  display: flex; flex-direction: column;
}
.pp-zone.pp-plein { padding: 0; overflow: hidden; }

/* ---------- Menu ---------- */
.pp-intro { margin: 2px 0 14px; color: var(--pp-doux); font-size: 14.5px; }
.pp-menu { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.pp-carte-jeu {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left;
  padding: 14px; min-height: 150px; border: 1px solid var(--pp-ligne); border-radius: 14px; background: #fff;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.pp-carte-jeu:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(27, 42, 74, .1); border-color: var(--pp-jaune); }
.pp-carte-jeu:focus-visible { outline: 3px solid var(--pp-jaune); outline-offset: 2px; }
.pp-ico {
  width: 46px; height: 46px; border-radius: 12px; background: var(--pp-jaune-doux); color: var(--pp-navy);
  display: grid; place-items: center;
}
.pp-ico svg { width: 30px; height: 30px; }
.pp-carte-jeu strong { font-size: 15px; color: var(--pp-navy); line-height: 1.25; }
.pp-desc { font-size: 13px; color: var(--pp-doux); line-height: 1.35; }

/* ---------- Elements communs ---------- */
.pp-barre { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.pp-choix { display: inline-flex; background: #fff; border: 1px solid var(--pp-ligne); border-radius: 999px; padding: 3px; }
.pp-choix button {
  border: 0; background: transparent; padding: 7px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--pp-doux); white-space: nowrap;
}
.pp-choix button[aria-pressed="true"] { background: var(--pp-navy); color: #fff; }
.pp-choix button:focus-visible { outline: 2px solid var(--pp-jaune); outline-offset: 1px; }
.pp-compteur { font-size: 13px; color: var(--pp-doux); font-weight: 600; white-space: nowrap; }
.pp-btn {
  align-self: center; border: 0; border-radius: 999px; background: var(--pp-jaune); color: var(--pp-navy);
  font-weight: 700; font-size: 15px; padding: 12px 28px; min-height: 44px;
  box-shadow: 0 3px 0 rgba(27, 42, 74, .18); transition: transform .1s ease;
}
.pp-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(27, 42, 74, .18); }
.pp-btn:focus-visible { outline: 3px solid var(--pp-navy); outline-offset: 2px; }
.pp-message { margin-top: 14px; text-align: center; font-weight: 600; color: var(--pp-navy); min-height: 1.4em; }
.pp-fin { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 14px; }
.pp-fin[hidden] { display: none; }

/* ---------- Respiration ---------- */
.pp-resp { display: flex; flex-direction: column; align-items: center; gap: 14px; flex: 1; }
.pp-resp-scene { position: relative; width: min(250px, 68vw); aspect-ratio: 1; display: grid; place-items: center; margin: 4px 0; flex: none; }
.pp-resp-halo { position: absolute; inset: 0; border-radius: 50%; border: 2px dashed rgba(27, 42, 74, .16); }
.pp-resp-cercle {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fffbe0 0%, #f4ec95 32%, #e6da38 70%, #d6c82c 100%);
  box-shadow: 0 10px 40px rgba(230, 218, 56, .45), inset 0 -10px 24px rgba(27, 42, 74, .08);
  transform: scale(.5);
  transition-property: transform; transition-timing-function: ease-in-out; transition-duration: 1s;
}
.pp-resp-texte { position: relative; text-align: center; color: var(--pp-navy); display: flex; flex-direction: column; }
.pp-resp-phase { font-size: 20px; font-weight: 700; }
.pp-resp-compte { font-size: 30px; font-weight: 500; min-height: 1.2em; line-height: 1.2; }
.pp-resp-aide { text-align: center; font-size: 13.5px; color: var(--pp-doux); max-width: 300px; }
.pp-resp-cycles { font-size: 13px; color: var(--pp-doux); font-weight: 600; min-height: 1.3em; }

/* ---------- Paires ---------- */
.pp-grille { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pp-carte { position: relative; aspect-ratio: 4 / 5; border: 0; padding: 0; background: transparent; perspective: 600px; }
.pp-grille.pp-n16 .pp-carte { aspect-ratio: 1; }
.pp-carte-int { position: absolute; inset: 0; transition: transform .4s ease; transform-style: preserve-3d; }
.pp-carte.pp-retournee .pp-carte-int, .pp-carte.pp-trouvee .pp-carte-int { transform: rotateY(180deg); }
.pp-face {
  position: absolute; inset: 0; border-radius: 10px; display: grid; place-items: center;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.pp-dos {
  background-color: var(--pp-navy);
  background-image: radial-gradient(rgba(230, 218, 56, .55) 1.2px, transparent 1.7px);
  background-size: 12px 12px; background-position: 6px 6px;
  box-shadow: inset 0 0 0 4px var(--pp-navy), inset 0 0 0 5px rgba(230, 218, 56, .35), 0 2px 6px rgba(27, 42, 74, .15);
}
.pp-avant { background: #fff; transform: rotateY(180deg); border: 1px solid var(--pp-ligne); box-shadow: 0 2px 6px rgba(27, 42, 74, .08); }
.pp-avant svg { width: 56%; height: 56%; fill: currentColor; stroke: none; }
.pp-trouvee .pp-avant { background: var(--pp-jaune-doux); border-color: var(--pp-jaune); }
.pp-carte:focus-visible { outline: 3px solid var(--pp-jaune); outline-offset: 2px; border-radius: 10px; }

/* ---------- Taquin ---------- */
.pp-taquin {
  position: relative; width: 100%; max-width: 320px; align-self: center; flex: none;
  background: #dfe5ef; border-radius: 14px; padding: 5px; transition: background-color .4s;
}
.pp-taquin-in { position: relative; width: 100%; aspect-ratio: 1; }
.pp-tuile { position: absolute; left: 0; top: 0; border: 0; background: transparent; padding: 3px; transition: transform .16s ease; }
.pp-tuile:focus-visible { outline: none; }
.pp-tuile:focus-visible .pp-tuile-in { outline: 3px solid var(--pp-jaune); outline-offset: -1px; }
.pp-tuile-in {
  position: relative; display: grid; place-items: center; width: 100%; height: 100%; border-radius: 9px;
  background: #fff; color: var(--pp-navy); font-weight: 700; font-size: 28px;
  box-shadow: 0 2px 0 rgba(27, 42, 74, .15);
}
.pp-t4 .pp-tuile-in { font-size: 22px; border-radius: 7px; }
.pp-chiffres .pp-tuile.pp-place .pp-tuile-in { box-shadow: 0 2px 0 var(--pp-jaune); }
.pp-motif .pp-tuile-in {
  place-items: start; padding: 4px;
  background-image:
    radial-gradient(circle at 70% 28%, #f7ee8a 0 9%, var(--pp-jaune) 9.5% 13%, transparent 13.5%),
    radial-gradient(circle at 70% 28%, rgba(230, 218, 56, .25) 0 22%, transparent 22.5%),
    radial-gradient(ellipse 70% 40% at 22% 105%, #5d9a68 0 60%, transparent 61%),
    radial-gradient(ellipse 80% 45% at 88% 112%, #3f7752 0 60%, transparent 61%),
    radial-gradient(ellipse 120% 30% at 50% 100%, #7fb3b5 0 50%, transparent 51%),
    linear-gradient(170deg, #1b2a4a 0%, #2f5d7c 55%, #8fc0c2 100%);
}
.pp-motif .pp-tuile-in span {
  font-size: 11px; line-height: 1; padding: 3px 5px; border-radius: 6px;
  background: rgba(255, 255, 255, .8); color: var(--pp-navy);
}
.pp-taquin.pp-gagne { background: var(--pp-jaune); }

/* ---------- Eclate-bulles ---------- */
.pp-bulles { position: relative; flex: 1; min-height: 300px; overflow: hidden;
  background: linear-gradient(180deg, #eaf2fb 0%, #f6f9fd 55%, var(--pp-jaune-pale) 100%); }
.pp-bulles canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: manipulation; cursor: pointer; }
.pp-bulles-aide {
  position: absolute; left: 16px; right: 16px; top: 16px; text-align: center;
  font-size: 14px; color: var(--pp-doux); pointer-events: none; transition: opacity 1.2s ease;
}

/* ---------- Telephone ---------- */
@media (max-width: 520px) {
  .pp-coin { right: 14px; bottom: 14px; }
  .pp-fenetre { inset: 0; width: auto; height: auto; border-radius: 0; }
  .pp-ouvert .pp-coin { display: none; }
  .pp-info { font-size: 13px; }
}
html.pp-verrou { overflow: hidden; }

/* ---------- Mouvement reduit ---------- */
@media (prefers-reduced-motion: reduce) {
  .pp-visible .pp-bulle { animation: none; }
  .pp-carte-int, .pp-tuile, .pp-fenetre, .pp-carte-jeu { transition: none; }
}
