/* ---------- Typographies ---------- */
body {
  font-family: 'Asap', 'Lato', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-weight: 400;
  background: #1a1a1a;
  color: #e7e7e7;
  margin: 0;
  padding: 16px;
}
h1 {
  font-family: 'Changa One', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  color: rgba(0,161,166,1);
  font-size: clamp(40px, 4vw, 36px);
  margin-top: 0px;
  margin-bottom: 10px;
}
h2 {
  font-family: 'Asap', 'Lato', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  color: #1d6b59;
  font-size: clamp(30px, 3vw, 30px);
  margin-top: 0px;
  margin-bottom: 10px;
}
h3 {
  font-family: 'Asap', 'Lato', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-weight: 900;
  line-height: 1;
  color: #27856f;
  margin-bottom: 4px;
}
p, li, span, input, button {
  font-family: 'Asap', 'Lato', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-weight: inherit;
}

/* ---------- Reset / Global ---------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
.app-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
header h1 { margin: 0 0 12px; font-size: 44px; color: rgba(0,161,166,1);}
header h2 { margin: 0 0 12px; font-size: 22px; font-weight: 600; color: rgb(240, 240, 240);}
header h3 { margin: 0 0 12px; font-size: 24px; }
/* Thème clair */
body.light { background: #f4f4f4; color: #222; }
body.light header h1 { color: rgba(0,161,166,1); }
body.light header h2 { color: #27856f; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.logo img {
  height: 80px;
  transition: transform 0.25s ease, filter 0.25s ease;
  width: auto;
}

.logo:hover img {
  transform: scale(1.04);
}

/* Par défaut = dark */
.logo-light { display: none; }
.logo-dark { display: block; }

/* Light override */
body.light .logo-light { display: block; }
body.light .logo-dark { display: none; }

/* ---------- Barre de score ---------- */
.score-bar {
  text-align: center;
  margin-bottom: 8px;
  color: inherit;
  font-weight: 600;
}

:root{
  /* Couleurs & pas du quadrillage (≈ 14–18px = “1 cm” visuel) */
  --mat-base: #1d6b59;      /* vert mat sombre */
  --mat-light: #1d6b59;     /* variante thème clair */
  --grid-step: 16px;        /* taille d’un carreau (ajuster si besoin) */
  --grid-thin: rgba(0,161,166,.3);
  --grid-bold: rgba(0,161,166,.7);
  --btn-size: 40px;   /* diamètre des boutons */
  --btn-gap: 12px;    /* écart régulier entre boutons */
  --btn-left: 20px;   /* marge gauche du 1er bouton */
  --btn-top: 20px;    /* marge haute commune */
  --moon-shift: 10px;    /* “morsure” décalée → croissant visible */
  --rays-op: 0;          /* rayons éteints */
  --rays-rot: -25deg;
  --rays-scale: .85;
}
/* -------- Plateau = planche de découpe -------- */
/* 🌗 Éclairage de bureau – ambiance tamisée (respiration visible) */
#desk-light {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 30;

  background:
    radial-gradient(
      ellipse at center,
      rgba(255, 255, 240, 0.10) 0%,
      rgba(255, 255, 240, 0.07) 30%,
      rgba(0, 0, 0, 0.10) 65%,
      rgba(0, 0, 0, 0.15) 100%
    ),
    radial-gradient(
      ellipse at center,
      rgba(0, 0, 0, 0) 40%,
      rgba(0, 0, 0, 0.15) 100%
    );

  animation: deskBreath 12s ease-in-out infinite;
}

@keyframes deskBreath {
  0% { opacity: 1;  }
  50% { opacity: 0.92;  }
  100% { opacity: 1;  }
}


.board{
  position: relative;
  width: 100%;
  height: 80vh;
  border-radius: 14px;
  overflow: hidden;
  touch-action: manipulation;
  isolation: isolate;
  /* fond vert + quadrillage (2 fins + 2 forts) */
  background-color: var(--mat-base);
  background-image:
    /* lignes fines horizontales */
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent calc(var(--grid-step) - 1px),
      var(--grid-thin) calc(var(--grid-step) - 1px),
      var(--grid-thin) var(--grid-step)
    ),
    /* lignes fines verticales */
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent calc(var(--grid-step) - 1px),
      var(--grid-thin) calc(var(--grid-step) - 1px),
      var(--grid-thin) var(--grid-step)
    ),
    /* lignes fortes horizontales (tous les 5) */
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent calc(var(--grid-step)*5 - 1px),
      var(--grid-bold) calc(var(--grid-step)*5 - 1px),
      var(--grid-bold) calc(var(--grid-step)*5)
    ),
    /* lignes fortes verticales (tous les 5) */
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent calc(var(--grid-step)*5 - 1px),
      var(--grid-bold) calc(var(--grid-step)*5 - 1px),
      var(--grid-bold) calc(var(--grid-step)*5)
    );
  border: 2px solid rgba(0,0,0,.35);            /* liseré extérieur plus sombre */
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.06);
  transition: background .28s ease, border-color .28s ease;
}

/* Thème clair : variante de vert + contrastes ajustés */
body.light .board{
  background-color: var(--mat-light);
  border-color: rgba(0,0,0,.25);
}
#board { transition: height 0.25s ease; }

/* ---------- Zones familles ---------- */
.dropzones {
  position: absolute;
  inset: 0;
  z-index: 1; /* sous les cartes et sous la pioche */
  pointer-events: none;
}
.dropzone{
  position:absolute;
  width:50%; height:50%;
  border: 1px dashed rgba(255,255,255,.5);
  background: transparent;                 /* on voit la planche */
  color: rgba(255,255,255,.75);
  display:flex; align-items:flex-end; justify-content:flex-start;
  padding: 10px 14px;
  transition: border-color .25s, background .25s, color .25s;
}
body.light .dropzone{
  border-color: rgba(255,255,255,.5);
  color: rgba(255,255,255,.75);
}

/* Feedback drop */
.dropzone.good{ background: rgba(0, 209, 105, 0.50); border-color: rgba(0, 209, 105,.50); }
.dropzone.bad { background: rgba(228, 85, 85,.50); border-color: rgba(228, 85, 85,.50); }

/* “Objet” et “Mode” alignés à droite (tu l'avais déjà) */
.dropzone[data-famille="Objet"],
.dropzone[data-famille="Mode"]{
  justify-content:flex-end;
  text-align:right;
  padding:10px 14px;
}
/* Quadrillage des 4 zones familles (positions) */
.dropzone[data-famille="Graphisme"] { top: 0;    left: 0; }
.dropzone[data-famille="Objet"]     { top: 0;    right: 0; }
.dropzone[data-famille="Espace"]    { bottom: 0; left: 0; }
.dropzone[data-famille="Mode"]      { bottom: 0; right: 0; }

/* Calque des étiquettes (au-dessus des cartes, mais non cliquable) */
#zoneLabels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4000;
}

/* Style des cartouches */
.zone-label {
  position: absolute;
  padding: 6px 10px;
  border-radius: 999px;         /* gélule */
  font: 700 13px/1.1 'Asap', 'Lato', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  letter-spacing: .1px;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,.35);
  background: #1a1a1a;  /* thème sombre par défaut */
  color: #fff;
}

/* Thème clair */
body.light .zone-label{
  background: #f0f0f0;
  color: #1f1f1f;
  border-color: rgba(0,0,0,.15);
}

/* ----- Zone de pioche (neutre, petite, centrée) ----- */
.draw-zone{
  position:absolute;
  top:50%; left:50%;
  transform:translate(-50%,-50%);
  width:clamp(180px, 14vw, 200px);
  height:clamp(250px, 20vw, 280px);
  border-radius:14px;
  border:1px solid rgba(255,255,255,.5);
  background: rgba(0,0,0,.18);            /* translucide sur la planche */
  backdrop-filter: blur(1px);
  display:flex; align-items:center; justify-content:center;
  color:rgba(255,255,255,.9);
  z-index:2;
  pointer-events:none;
}
body.light .draw-zone{
  border-color: rgba(0,0,0,.5);
  background: rgba(255,255,255,.25);
  color:#1f1f1f;
}

/* Logo centré dans la plaque */
.draw-zone::after{
  content:"";
  position:absolute;
  left:50%; top:50%;
  translate:-50% -50%;
  width:clamp(140px, 12vw, 170px);
  height:clamp(200px, 18vw, 250px);
  aspect-ratio: 1 / 1;
  background: center / contain no-repeat url("assets/ui/icon-dsgngssr.svg");
  opacity: .80;
  background-blend-mode: multiply;
  pointer-events: none;
}
.card.dragging ~ .draw-zone::after,
.card.dragging ~ .draw-zone::before{
  opacity:.4;
}

/* Variante thème clair */
body.light .draw-zone::before{
  background:#1d6b59;
}


/* Petites corrections d’alpha (syntaxiques) */
.card{ box-shadow: 4px 4px 0px rgba(0,0,0,.30); }
.card.dragging{ box-shadow: 20px 20px 0px rgba(0,0,0,.30); }
.zoom-backdrop{ background:rgba(0,0,0,.6); backdrop-filter: blur(3px);}
.zoom-card{ box-shadow: 10px 10px 0px rgba(0,0,0,.3); }

/* ---------- Cartes ---------- */
.card {
  position: absolute;
  width: 135px;
  height: 207px;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 2px 2px 0px rgba(0,0,0,.20);
  cursor: grab;
  user-select: none;
  transform: rotate(var(--rand-rot, 0deg));
  z-index: 10;
  transition: transform .15s ease, box-shadow .15s ease;
  border: 3px solid rgba(255,255,255,0.9); /* liseré blanc */
}
.card.dragging {
  cursor: grabbing;
  transform: scale(1.12) rotate(var(--rand-rot, 0deg));
  box-shadow: 20px 20px 0px rgba(0,0,0,.20);
  z-index: 1200;
}
.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
}

.mini-dots{
  position: absolute;
  left: 5px;
  top: 5px;
  display: flex;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.6);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 20;
  pointer-events: none;
}
.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(0,161,166,1);
}
.dot.found { background: rgba(0,161,166,1); border-color: rgb(255, 255, 255); }

/* Voyant famille */
.family-indicator {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: rgb(255,255,255);
  border: 1px solid rgba(0,161,166,1);
}
.family-indicator.good { background: rgb(0, 209, 105); border-color: rgb(255, 255, 255); }
.family-indicator.bad  { background: rgb(228, 85, 85); border-color: rgb(255, 255, 255); }

/* Fin filet intérieur pour carte complétée */
.card.completed{
  border: 4px solid rgba(0, 209, 105, 0.80);
}
.card.completed.dragging{
  border: 4px solid rgba(0, 209, 105, 0.80);
}
/* Pastille "drag & click" sur chaque carte */
.card .action-hint{
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0,161,166,1);          /* bleu */
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;                    /* purement décoratif */
  z-index: 20;                             /* au-dessus de l'image */
}

/* Icône blanche dans la pastille (via mask, aucune balise <svg> nécessaire) */
.card .action-hint::before{
  content: "";
  width: 18px;
  height: 18px;
  background: #fff;                        /* couleur de l'icône */
  -webkit-mask: url('data:image/svg+xml;utf8,<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20.5 20.5"><path fill="%23fff" d="M9.7,16c-1.6,0-3-.7-4.1-1.9s-1.7-2.5-1.7-4.2.6-3.1,1.8-4.3,2.6-1.8,4.3-1.8,3,.6,4.2,1.7,1.8,2.5,1.9,4.1l-2.1-.6c-.2-.9-.7-1.6-1.4-2.2s-1.6-.9-2.5-.9-2,.4-2.8,1.2-1.2,1.7-1.2,2.8.3,1.8.9,2.5,1.3,1.2,2.2,1.4l.6,2.1ZM10.9,20c-.2,0-.3,0-.5,0h-.5c-1.4,0-2.7-.3-3.9-.8s-2.3-1.2-3.2-2.1-1.6-2-2.1-3.2-.8-2.5-.8-3.9.3-2.7.8-3.9,1.2-2.3,2.1-3.2,2-1.6,3.2-2.1,2.5-.8,3.9-.8,2.7.3,3.9.8,2.3,1.2,3.2,2.1,1.6,2,2.1,3.2.8,2.5.8,3.9v.5c0,.2,0,.3,0,.5l-2-.6v-.3c0-2.2-.8-4.1-2.3-5.7s-3.4-2.3-5.7-2.3-4.1.8-5.7,2.3-2.3,3.4-2.3,5.7.8,4.1,2.3,5.7,3.4,2.3,5.7,2.3h.3l.6,2ZM18.5,20.5l-4.3-4.3-1.3,3.8-3-10,10,3-3.8,1.3,4.3,4.3-2,2Z"/></svg>') center / contain no-repeat;
          mask: url('data:image/svg+xml;utf8,<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20.5 20.5"><path fill="%23fff" d="M9.7,16c-1.6,0-3-.7-4.1-1.9s-1.7-2.5-1.7-4.2.6-3.1,1.8-4.3,2.6-1.8,4.3-1.8,3,.6,4.2,1.7,1.8,2.5,1.9,4.1l-2.1-.6c-.2-.9-.7-1.6-1.4-2.2s-1.6-.9-2.5-.9-2,.4-2.8,1.2-1.2,1.7-1.2,2.8.3,1.8.9,2.5,1.3,1.2,2.2,1.4l.6,2.1ZM10.9,20c-.2,0-.3,0-.5,0h-.5c-1.4,0-2.7-.3-3.9-.8s-2.3-1.2-3.2-2.1-1.6-2-2.1-3.2-.8-2.5-.8-3.9.3-2.7.8-3.9,1.2-2.3,2.1-3.2,2-1.6,3.2-2.1,2.5-.8,3.9-.8,2.7.3,3.9.8,2.3,1.2,3.2,2.1,1.6,2,2.1,3.2.8,2.5.8,3.9v.5c0,.2,0,.3,0,.5l-2-.6v-.3c0-2.2-.8-4.1-2.3-5.7s-3.4-2.3-5.7-2.3-4.1.8-5.7,2.3-2.3,3.4-2.3,5.7.8,4.1,2.3,5.7,3.4,2.3,5.7,2.3h.3l.6,2ZM18.5,20.5l-4.3-4.3-1.3,3.8-3-10,10,3-3.8,1.3,4.3,4.3-2,2Z"/></svg>') center / contain no-repeat;
}

/* ---------- Zoom ---------- */
.zoom.hidden { display: none; }
.zoom {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
}
.zoom-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(29,107,89,0.6);
  backdrop-filter: blur(3px);
}
.zoom-card {
  position: relative;
  width: 60vw;
  max-width: 420px;
  background: #f8f8f8;
  border-radius: 16px;
  padding: 10px;
  z-index: 80;
  box-shadow: 6px 6px 0px rgba(0,0,0,.3);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
body.light .zoom-card { background: #fff; }
/* =========================
   INDICES & RÉPONSES (ZOOM)
   ========================= */
/* Bouton révélation totale */
#giveUpBtn {
  position: relative;
  overflow: hidden;
}

#giveUpBtn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.25);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--hold-duration, 600ms) linear;
  pointer-events: none;
}

/* Mode révélation */
#giveUpBtn.reveal-all::after {
  background: rgba(0,0,0,0.15);
}

/* Appui long actif */
#giveUpBtn.holding::after {
  transform: scaleX(1);
}

#giveUpBtn.reveal-all {
  background-color: #b85c38; /* orangé / avertissement */
}
#giveUpBtn.holding {
  filter: brightness(0.9);
  transform: scale(0.97);
}

#giveUpBtn.reveal-all:hover {
  background-color: #a14e2f;
}

   #foundHints {
  font-style: italic;
  opacity: 0.6;
}

#foundAnswers {
  font-style: normal;
}
/* Bouton fermer */
.close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(0,161,166,1);
  color: #fff;
  border: none;
  font-size: 22px;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.close:hover { background: rgba(0,161,166,0.8); }

.zoom-image-wrap {
  position: relative;
  aspect-ratio: 600/926;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #f0f0f0;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.zoom-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ✅ Points de progression dans le zoom (en bas à droite) */
.progress-row {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  z-index: 150;
/* Fond lisible derrière les points de progression (vue zoom) */
  background: rgba(255,255,255,.6);
  backdrop-filter: blur(4px);            /* floute légèrement l’image derrière */
  -webkit-backdrop-filter: blur(4px);
  border-radius: 999px;                  /* pastille */
  padding: 6px 8px;
}
/* Ajuste un peu le rendu des points sur la pastille */
.progress-row .dot{
  box-shadow: 0 0 0 1px rgba(0,0,0,.05); /* bord net sur fond clair/sombre */
}
body.light .progress-row .dot{
  box-shadow: 0 0 0 1px rgba(0,0,0,.08);
}

.progress-row .dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(0,161,166,1);
}
.progress-row .dot.found { background: rgba(0,161,166,1); border: 1px solid rgb(255, 255, 255); }

.found-info {
  display:flex;
  flex-direction: column;
  gap: 8px;
  position: absolute;
  bottom: 14px;
  left: 14px;
  right: 14px;

  background: rgba(255,255,255,.95);
  color: #222;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 16px;
  line-height: 1.5;

  box-shadow: 3px 3px 0px rgba(0,0,0,.15);
  border: 1px solid #fff;

  transition:
    transform 0.4s ease,
    opacity 0.4s ease;
}

/* Masquer automatiquement les blocs vides */
#foundHints:empty,
#foundAnswers:empty {
  display: none;
}

.found-info.hidden {
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
}
.zoom-image-wrap {
  cursor: zoom-in; /* fallback */
}

.zoom-image-wrap:hover {
  cursor: pointer;
}

/* Curseur œil moderne */
.zoom-image-wrap:hover {
  cursor: url("data:image/svg+xml;utf8,\
  <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'>\
  <path d='M12 5c-7 0-11 7-11 7s4 7 11 7 11-7 11-7-4-7-11-7zm0 11a4 4 0 1 1 0-8 4 4 0 0 1 0 8z'/>\
  </svg>") 12 12, pointer;
}

body.light .found-info { background: rgba(255,255,255,0.98); color: #222; }

input.wrong {
  border-color: #cc3333 !important;
  animation: shake 380ms ease;
}
@keyframes shake {
  0%{transform:translateX(0)}
  20%{transform:translateX(-6px)}
  40%{transform:translateX(6px)}
  60%{transform:translateX(-4px)}
  80%{transform:translateX(4px)}
  100%{transform:translateX(0)}
}
input.wrong::placeholder { color: #c33; }

/* ---------- Barre de progression ---------- */
.progress-wrapper {
  width: 90%;
  max-width: 480px;
  height: 10px;
  margin: 12px auto 12px;
  background: rgba(255,255,255,0.15);
  border-radius: 8px;
  overflow: hidden;
}
body.light .progress-wrapper { background: rgba(0,0,0,0.1); }
.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, rgba(0, 209, 105, .6) 0%, rgba(0, 209, 105, 1) 100%);
  border-radius: 8px;
  transition: width 0.4s ease;
}

/* ---------- Progression par famille ---------- */
.family-progress {
  width: 90%;
  max-width: 580px;
  margin: 0 auto 4px;
  text-align: center;
  font-size: 15px;
  color: rgba(255,255,255,0.9);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}
body.light .family-progress { color: #222; }
.family-progress span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ---------- Champs et boutons ---------- */
.input-bar { display: flex; flex-direction: column; gap: 10px; }
.input-bar input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 30px;
  border: 1px solid rgb(0,161,166);
  font-size: 14px;
  outline: none;
  transition: border .2s;
}
.input-bar input:focus { border-color: rgba(0,161,166,.7); }
.input-actions { display: flex; gap: 10px; justify-content: center; }
#validateBtn {
  flex: 1;
  background: #2e7d32;
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}
#validateBtn:hover { background: #3fa043; }

/* ===============================
   GÉLULE D'ÉTAT (résolu / épuisé)
   =============================== */

.action-pill {
  height: 44px;
  width: 100%;               /* ⬅️ même largeur que les boutons */
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.action-pill.solved {
  background: #2e7d32;
  color: white;
}

.action-pill.lost {
  background: #e0e0e0;
  color: #555;
}

/* ===============================
   ZONE ACTIONS DU ZOOM
   =============================== */

.zoom-actions {
  width: 100%;
  min-height: 56px;
}

/* État (gélule) */
.zoom-state {
  width: 100%;
}

.zoom-state.hidden,
.zoom-buttons.hidden {
  display: none;
}

/* ===============================
   BOUTONS DU ZOOM (RESTAURATION)
   =============================== */

.zoom-actions .input-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}

.zoom-actions .input-actions button {
  width: 100%;
  height: 44px;
}

@keyframes unlock {
  0%   { transform: scale(0.9); opacity: 0; }
  60%  { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

.found-hint.unlock {
  animation: unlock 0.35s ease-out;
}

.help-btn {
  flex: 1;
  background: rgba(0,161,166,1);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}
.help-btn:hover { background: rgba(0,161,166,.8); }

/* Bouton "Ma langue au chat" avec cooldown visible */
.help-btn {
  position: relative;
  overflow: hidden; /* pour que la jauge reste dans le bouton */
}

/* Barre de cooldown qui recouvre le bouton et se rétracte */
.help-btn .cooldown-bar {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.25);  /* voile sombre */
  transform-origin: left;
  transform: scaleX(0);
  pointer-events: none;
}

/* Quand le cooldown est actif, on lance l’animation */
.help-btn.cooldown .cooldown-bar {
  transform: scaleX(1);
  animation: helpCooldown var(--cd-duration, 2000ms) linear forwards;
}

@keyframes helpCooldown {
  from { transform: scaleX(1); }  /* bouton presque “éteint” */
  to   { transform: scaleX(0); }  /* voile disparu = bouton disponible */
}

/* effet visuel pendant l'appui long sur le bouton reset */
#resetBtn.reset-hold {
  transform: scale(0.97);
  filter: brightness(0.8);
  transition: transform 0.1s, filter 0.1s;
}

.hint-note {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-bottom: 6px;
  font-style: italic;
  text-decoration: underline;
}

/* Anneau de progression autour du bouton reset pendant l'appui long */
#resetBtn {
  --hold: 0;         /* 0 → 0%, 100 → 100% */
  --holding: 0;      /* 0/1 pour afficher/masquer l’anneau */
}

#resetBtn::after{
  content: "";
  position: absolute;
  inset: -4px;                 /* épaisseur + débord léger */
  border-radius: 999px;
  pointer-events: none;
  /* Anneau = conic-gradient + trou au centre (mask) */
  background: conic-gradient(#fff calc(var(--hold) * 1%), rgba(255,255,255,0.12) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 0px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 0px));
  opacity: var(--holding);
  transition: opacity .15s;
}

/* Style commun */
.info-btn,
.reset-btn,
.sound-btn{
  position: absolute;
  top: var(--btn-top);
  left: 0; /* sera recalculé pour chaque bouton ci-dessous */
  width: var(--btn-size);
  height: var(--btn-size);
  border-radius: 50%;
  border: none;
  background: rgba(0,161,166,1);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, transform .2s;
  z-index: 59;
}
/* COOP */
.coop-btn {
  background: #00aaff;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
  display: none;
}
.coop-btn:hover {
  background: #0088cc;
}
.coop-btn.active {
  background: #d9534f; /* rouge doux pour le "quitter" */
}

/* Placements réguliers : 1er, 2e, 3e */
.info-btn  { left: calc(var(--btn-left) + (var(--btn-size) + var(--btn-gap)) * 0); }
.reset-btn { left: calc(var(--btn-left) + (var(--btn-size) + var(--btn-gap)) * 1); }
.sound-btn { left: calc(var(--btn-left) + (var(--btn-size) + var(--btn-gap)) * 2); }

/* Effets hover spécifiques (on conserve leur personnalité) */
.info-btn:hover  { background: rgba(0,161,166,.85); transform: scale(1.05); }
.reset-btn:hover { background: rgba(0,161,166,.8);  transform: rotate(15deg); }
.sound-btn:hover { background: rgba(0,161,166,.85); transform: scale(1.05); }

/* Icônes (inchangé) */
.reset-btn svg { width: 36px; height: 36px; pointer-events: none; }
.reset-btn .cls-1 { fill: #fff; }

.info-btn svg { width: 100%; height: 100%; display: block; padding: 2px; box-sizing: border-box; }
.info-btn path { fill: #fff; }
.sound-btn svg{ width: 28px; height: 28px; display: block; }

/* ---------- Switch ---------- */

.score-toggle {
  position: absolute;
  right: 110px;
  top: 2px;
  width: var(--btn-size);
  height: var(--btn-size);
  border-radius: 50%;
  border: none;
  background: rgba(0,161,166,1);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 59;
  transition: background .2s, transform .2s;
}

.score-toggle:hover {
  background: rgba(0,161,166,.85);
  transform: scale(1.05);
}

.theme-toggle {
  position: absolute;
  right: 58px;
  top: 2px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: inherit;
  cursor: pointer;
  z-index: 59;
}
.theme-toggle svg { width: 100%; height: 100%; display: block; pointer-events: none; padding: 2px; }

/* Transitions globales utiles au switch */
.theme-toggle,
.theme-toggle svg,
.theme-toggle .tt-rays,
#tt-cut { transition: all .55s cubic-bezier(.2,.7,0,1); }

/* Bouton : couleurs qui s'inversent par thème */
.theme-toggle {
  background: rgba(240,220,46,1);            /* dark par défaut */
  color: #1f1f1f;                 /* le SVG a fill="currentColor" */
  border: 1px solid rgba(0,0,0,.15);
}
body.light .theme-toggle {
  background: #1f1f1f;
  color: #ffffff;
  border-color: rgba(0,0,0,.30);
}
.theme-toggle:hover {
  transform: scale(1.05);
  background: rgba(240,220,46,.85);
}

/* Clair = soleil (disque quasi plein, rayons ON) */
body.light{
  --moon-shift: 20px;   /* “morsure” part à gauche → disque plein */
  --rays-op: 1;
  --rays-rot: 0deg;
  --rays-scale: 1;
}

/* Le cercle noir du mask se décale pour creuser le disque */
#tt-cut { transform: translateX(var(--moon-shift)); }

/* Rayons/étoiles */
.theme-toggle .tt-rays{
  opacity: var(--rays-op);
  transform-origin: 16px 16px;
  transform: rotate(var(--rays-rot)) scale(var(--rays-scale));
}

/* Micro-rotation de l’icône pour la vie */
.theme-toggle__expand { transform: rotate(-6deg); }
body.light .theme-toggle__expand { transform: rotate(0deg); }

.credits-toggle {
  position: absolute;
  right: 6px; /* score = 58px, theme = 6px → on décale proprement */
  top: 2px;
  width: var(--btn-size);
  height: var(--btn-size);
  border-radius: 50%;
  border: none;
  background: rgba(29,107,89,1);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 59;
  transition: background .2s, transform .2s;
}

.credits-toggle:hover {
  background: rgba(29,107,89,0.85);
  transform: scale(1.05);
}

.share-toggle {
  position: absolute;
  right: 162px; /* à gauche de scoreToggle (110px) */
  top: 2px;
  width: var(--btn-size);
  height: var(--btn-size);
  border-radius: 50%;
  border: none;
  background: rgba(0,161,166,1);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 59;
  transition: background .2s, transform .2s;
}

.share-toggle:hover {
  background: rgba(0,161,166,.85);
  transform: scale(1.05);
}

#cancelShare {
  background: #ffffff;
  color: rgba(0, 161, 166, 1);

  border: 2px solid rgba(0, 161, 166, 1);
  box-shadow: none;

  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Hover Annuler */
#cancelShare:hover {
  background: #eaf3ef;
}

/* Bouton principal : Télécharger */
#confirmShare {
  background: rgba(0, 161, 166, 1);
  color: #ffffff;
  border: 2px solid rgba(0, 161, 166, 1);
}

/* Hover principal (optionnel) */
#confirmShare:hover {
  background: rgba(0, 161, 166, 0.8);
}

/* ---------- Feedback textuel “Familles” ---------- */
#familyMsgContainer { position: fixed; inset: 0; pointer-events: none; z-index: 2000; }
.family-msg {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.85);
  color: #fff;
  padding: 10px 16px;
  border-radius: 30px;
  font-weight: 700;
  opacity: 0;
  animation: fadeInOut 1.2s ease forwards;
  box-shadow: 0 6px 14px rgba(0,0,0,.25);
}
.family-msg.good { background: rgb(0, 209, 105); }
.family-msg.bad  { background: rgba(228, 85, 85); }
@keyframes fadeInOut {
  0% { opacity: 0; transform: translate(-50%, -60%); }
  15% { opacity: 1; transform: translate(-50%, -50%); }
  85% { opacity: 1; transform: translate(-50%, -50%); }
  100% { opacity: 0; transform: translate(-50%, -40%); }
}

/* ---- Thème : transitions douces sur les éléments clés ---- */
body,
.board,
.dropzone,
.draw-zone,
.zoom-card,
.theme-toggle,
.theme-toggle svg {
  transition:
    background-color .28s ease,
    color .28s ease,
    border-color .28s ease,
    fill .28s ease,
    background .28s ease; /* pour les dégradés / zones */
}

/* (Optionnel) Rendre la pioche cohérente avec le thème + animable */
.draw-zone {
  background: #1d6b59;
  border-color: rgba(255,255,255,.8);
}
body.light .draw-zone {
  background: #1d6b59;
  border-color: rgba(255,255,255,.8);
}

/* (Optionnel) Si tu veux aussi animer le fond du plateau */
.board { transition: background .28s ease; }

/* ---------- Modal d’introduction, boutons info, responsive ---------- */
.intro-modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(29,107,89,0.6); z-index: 9000; backdrop-filter: blur(3px); }
.intro-modal:not(.hidden) { display: flex; }
.intro-content { position: relative; background: #fff; color: #222; padding: 24px 28px; border-radius: 18px; max-width: 600px; text-align: left; animation: popIn .4s ease; z-index: 9050; }
@keyframes popIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.start-btn { 
  background: rgba(0,161,166,1);
  color: rgba(245,245,245,1);
  border: none;
  border-radius: 30px;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: 600;
  margin-top: 4px;
  margin-bottom: 4px;
  cursor: pointer;
  transition: background .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: .5rem;
  line-height: 1;
  white-space: nowrap;
}
.start-btn:hover { background: rgba(0,161,166,0.8); }
.families-note { font-size: 15px; margin: 10px 0; }

/* 🔒 Verrouillage des interactions quand une modale est ouverte */
.modal-lock {
  pointer-events: none;
}
.modal-lock .intro-modal {
  pointer-events: auto;
}

/* 🔒 Désactivation totale du zoom pendant le tuto */
.intro-active #zoom {
  pointer-events: none;
  visibility: hidden;
}
/* La modale reste cliquable */
#introModal {
  pointer-events: auto;
}

/* ☕ KO-FI MODAL */

.kofi-modal {
  position: fixed;
  inset: 0;
  background: rgba(29,107,89,0.6);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9500;
}

.kofi-modal.hidden {
  display: none;
}

.kofi-content {
  background: #fff;
  color: #222;
  padding: 28px;
  border-radius: 18px;
  max-width: 420px;
  text-align: center;
  box-shadow: 6px 6px 0px rgba(0,0,0,.3);
  animation: popIn .3s ease;
}

.kofi-content h2 {
  margin-top: 0;
}

.kofi-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.kofi-btn {
  background: rgba(0,161,166,1);
  color: white;
  padding: 10px 16px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.kofi-btn:hover {
  background: #1d6b59;
  color: #ffffff;
}

.kofi-later {
  background: transparent;
  border: none;
  color: #666;
  cursor: pointer;
}

/* ☕ KO-FI BUTTON CREDITS PANEL */

.kofi-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  margin-top: 14px;
  padding: 10px 18px;

  border-radius: 30px;
  background-color: rgba(0,161,166,1);

  color: #ffffff;

  font-weight: 600;
  font-size: 14px;
  text-decoration: none;

  transition: all 0.2s ease;
}

/* Hover → inversion douce */
.kofi-pill:hover {
  background: #1d6b59;
  color: #ffffff;
}

/* RESPONSIVE */

@media (max-width: 600px) {
  .zoom-card { width: 92vw; max-width: none; padding: 10px; }
  .zoom-image-wrap { margin-bottom: 8px; }
  .found-info { font-size: 14px; bottom: 10px; left: 10px; right: 10px; }
  .input-bar button { width: 100%; font-size: 16px; }
  .help-btn { font-size: 20px; }
  .card { width: 100px; height: 150px; border-radius: 6px; }
  .info-btn { top: 20px; right: 20px; width: 36px; height: 36px; }
  .info-btn svg { padding: 1px; }
}

/* ===== Gate mobile ===== */
.mobile-gate {
  position: fixed;
  inset: 0;
  background: #0f2d2e;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* affichage mobile uniquement */
@media (max-width: 640px) {
  .mobile-gate {
    display: flex;
  }

  body > *:not(#mobileGate) {
    display: none;
  }
}

/* contenu centré */
.mobile-gate {
  padding: 20px;
}

.mobile-content {
  width: 100%;
  height: 100%;
  display: flex;
  padding: 20px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

/* logo */
.mobile-logo {
  width: 70vw;
  animation: fadeInUp 0.8s ease;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* baseline */
.tagline {
  font-size: 5vw;
  text-align: center;
}
.mobile-message {
  font-size: 3vw;
  text-align: center;
}
.mobile-sub {
  font-size: 3vw;
  text-align: center;
  opacity: 0.65;;
}

body.light .tagline {
  color:#e7e7e7 ;
}
body.light .mobile-message {
  color:#e7e7e7 ;
}
body.light .mobile-sub {
  color:#e7e7e7 ;
}

/* ====== Coachmarks / Tutoriel ====== */
.coach-overlay {
  position: fixed; inset: 0;
  z-index: 9999;
  pointer-events: auto;
  background: rgba(255,0,0,0.04);
}

.coach-spot {
  position: absolute;
  border-radius: 14px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.65); /* masque le reste */
  transition: all .25s ease;
  pointer-events: none;
}

.coach-tip {
  position: absolute;
  max-width: 320px;
  background: #fff;
  color: #222;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
  font-size: 14px;
  line-height: 1.35;
  z-index: 10000;
  pointer-events: auto;   /* clics OK sur les boutons */
}

.coach-tip h4 { margin: 0 0 6px; font-size: 16px; }
.coach-actions { display: flex; gap: 8px; margin-top: 10px; }
.coach-btn {
  background: rgba(49,83,151,1);
  color: #fff; border: 0; border-radius: 999px;
  padding: 8px 12px; font-weight: 700; cursor: pointer;
}
.coach-btn.secondary { background: #e0e0e0; color: #222; }
.coach-prog { opacity: .75; font-size: 12px; margin-left: auto; align-self: center; }

/* Petite flèche */
.coach-tip::after {
  content:""; position: absolute; width: 12px; height: 12px;
  background: #fff; transform: rotate(45deg);
}
.coach-tip[data-pos="top"]::after    { bottom: -6px; left: 20px; }
.coach-tip[data-pos="bottom"]::after { top: -6px; left: 20px; }
.coach-tip[data-pos="left"]::after   { right: -6px; top: 20px; }
.coach-tip[data-pos="right"]::after  { left: -6px; top: 20px; }

/* Pulse sur les cartes de la pioche */
.card.pulse {
  animation: pulseRing 1.2s ease-in-out infinite;
  outline: 2px solid #fff;
  outline-offset: 0;
}
@keyframes pulseRing {
  0%   { box-shadow: 0 0 0 0 rgba(255,255,255,.45); }
  100% { box-shadow: 0 0 0 12px rgba(255,255,255,0); }
}

/* Thème clair pour la bulle */
body.light .coach-tip { background:#fff; color:#222; }

/* Masquage de l'UI quand le gate est actif (classe posée par JS) */
body.mobile-block header,
body.mobile-block main,
body.mobile-block #infoBtn,
body.mobile-block .reset-btn,
body.mobile-block .intro-modal { display: none !important; }
body.mobile-block { overflow: hidden; }
body.mobile-block .mobile-gate{ display: flex; }

/* Media queries de secours (CSS-only) : en dessous de 900px OU pointeur tactile */
@media (max-width: 900px), (pointer: coarse) {
  header, main, #infoBtn, .reset-btn, .intro-modal { display: none !important; }
  .mobile-gate { display: flex; }
  body { overflow: hidden; }
}

/* --- Barre coop + présence (en haut à droite) --- */
#coopBar {
  position: fixed;
  top: 24px;
  right: 72px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 59;
}
/* COOP */
/* Pastille joueurs connectés */
#presence-pill {
  padding: 6px 12px;
  background: rgba(0, 161, 166, 1);
  color: #f7f7f7;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: auto !important;
  width: auto !important;
  display: none;
}

#presence-pill span {
  font-weight: 600;
}

/* =========================
   PANNEAU SCORE & SUCCÈS
   ========================= */

.score-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 360px;
  max-width: 90vw;
  height: 100vh;
  background: var(--bg-panel, #ffffff);
  color: #222;
  transform: translateX(100%);
  transition: transform 0.35s ease;
  z-index: 5001;
  display: flex;
  border-radius: 18px 0px 0px 18px;
}

.score-panel.open {
  transform: translateX(0);
}

.score-panel-content {
  padding: 24px;
  overflow-y: auto;
}

.score-panel h2 {
  margin: 0 0 24px;
  font-size: 1.6rem;
}

.score-section {
  margin-bottom: 24px;
}

.score-section h3 {
  margin-bottom: 6px;
}

/* === SCORES === */

.score-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: #e9f3ef; /* vert très clair */
  border-radius: 14px;
  padding: 14px;
  margin-top: 10px;
}

.score-card {
  text-align: center;
}

.score-value {
  font-size: 2rem;
  font-weight: 800;
  color: #1d6b59; /* vert principal */
  line-height: 1.1;
}

.score-label {
  font-size: 0.8rem;
  color: #1d6b59;
  opacity: 0.85;
  margin-top: 4px;
}

.score-value {
  transition: transform 0.2s ease;
}

.score-value.bump {
  transform: scale(1.15);
}

/* === SUCCÈS === */
.achievement-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 10px;
}

.achievement {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 10px;
}

.achievement .icon {
  font-size: 1.4rem;
  line-height: 1;
}

.achievement .txt strong {
  display: block;
  font-size: 0.95rem;
}

.achievement .txt small {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* =========================
   SCORE PANEL – PROGRESSION
   ========================= */

.progress-line {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: #e9f3ef;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00d169, #00a1a6);
  transition: width 0.4s ease;
}

.family-progress-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.family-progress-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 6px 0px;
  font-size: 0.9rem;
}

/* =========================
   EVENT NOTIFICATIONS
   ========================= */

.event-notifications {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column-reverse; /* nouvelles en bas */
  gap: 10px;
  z-index: 9000;
  pointer-events: none;
  align-items: center;
}

.event-notif {
  min-width: 260px;
  max-width: 340px;
  padding: 12px 14px;
  border-radius: 24px;
  color: #fff;
  opacity: 0;
  background: rgba(0,0,0,.75);
  font-size: 0.9rem;
  line-height: 1.35;
  box-shadow: 3px 3px 0px rgba(0,0,0,.15);
  transform: translateY(16px);
  transition:
    opacity .25s ease,
    transform .25s ease;
}

.event-notif.show {
  opacity: 1;
  transform: translateY(0);
}

/* Variantes */
.event-notif.points {
  background: rgba(26,26,26,1);
}

.event-notif.success {
  border: 1px solid rgba(240, 221, 46);
  background: rgba(29, 107, 89,1);
}

.event-notif.family-good {
  background: rgba(0,209,105,1);
}

.event-notif.family-bad {
  background: rgba(228,85,85,1);
  animation: shake .35s ease;
}

/* Shake */
@keyframes shake {
  0%   { transform: translateX(0); }
  25%  { transform: translateX(-4px); }
  50%  { transform: translateX(4px); }
  75%  { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}

/*-----------------------*/

/* Overlay */
.score-overlay {
  position: fixed;
  inset: 0;
  background: rgba(29,107,89,0.6);
  z-index: 5000;
  backdrop-filter: blur(3px);
}

/* Bouton Coop — même style que la pastille */
.coop-btn {
  background: rgba(29, 107, 89, 1);
  color: #f7f7f7;
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.coop-btn:hover {
  background: rgba(29, 107, 89, 0.8);
}

.coop-btn.active {
  background: rgba(237, 109, 99, 1);
}
.coop-btn.active:hover {
  background: rgba(237, 109, 99, 0.8);
}
/* état "plein" du bouton coop */
.coop-btn.full,
.coop-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* petite animation quand le serveur est plein */
.coop-btn.shake {
  animation: coop-shake 0.4s ease;
}

@keyframes coop-shake {
  0%   { transform: translateX(0); }
  20%  { transform: translateX(-3px); }
  40%  { transform: translateX(3px); }
  60%  { transform: translateX(-2px); }
  80%  { transform: translateX(2px); }
  100% { transform: translateX(0); }
}
#presence-pill {
  min-width: 120px;
  text-align: center;
}