/* Recap — fenêtre « Contributeurs »
   Même identité que la fenêtre du développeur (carte « post-it » : rubans adhésifs,
   polaroïd, surlignage manuscrit). Utilise uniquement les variables du site
   (--card, --ink, --gold, --teal, --pink, --text, --muted) : clair / sombre automatiques. */

.cb-modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto;
  padding: 64px 16px calc(20px + env(safe-area-inset-bottom, 0px)); box-sizing: border-box; direction: ltr; text-align: left;
  font-family: "Tajawal", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.cb-modal[hidden] { display: none; }
.cb-modal .cb-scrim { position: fixed; inset: 0; background: rgba(5, 8, 20, .5); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }

.cb-card { position: relative; width: min(100%, 350px); margin: auto 0; box-sizing: border-box; padding: 0 20px 18px; text-align: center;
  background: var(--card); color: var(--text); border: 2.5px solid var(--ink); border-radius: 20px 48px 24px 42px / 42px 20px 48px 24px;
  box-shadow: 4px 6px 0 color-mix(in srgb, var(--ink) 28%, transparent), 0 22px 44px rgba(0, 0, 0, .3);
  animation: cbIn .42s cubic-bezier(.34, 1.45, .64, 1) both; }
.cb-modal.closing .cb-card { animation: cbOut .16s ease forwards; }
@keyframes cbIn { from { opacity: 0; transform: translateY(34px) scale(.94) rotate(-2deg); } to { opacity: 1; transform: none; } }
@keyframes cbOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(18px) scale(.96); } }
@keyframes cbTwinkle { 0%, 100% { opacity: .55; scale: .8; } 50% { opacity: 1; scale: 1.15; } }
@keyframes cbBeat { 0%, 60%, 100% { scale: 1; } 15% { scale: 1.16; } 30% { scale: 1; } 42% { scale: 1.1; } }
@keyframes cbPop { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }

/* rubans adhésifs du coin */
.cb-tape { position: absolute; top: -9px; left: 24px; width: 46px; height: 15px; rotate: -8deg; background: color-mix(in srgb, var(--teal) 62%, transparent); box-shadow: 0 2px 3px rgba(0, 0, 0, .2); }
.cb-tape.t2 { left: auto; right: 46px; width: 34px; rotate: 7deg; background: color-mix(in srgb, var(--gold) 62%, transparent); }

/* polaroïd + icône (à la place de la photo) */
.cb-photo { position: relative; width: 116px; margin: -44px auto 14px; padding: 6px; box-sizing: border-box; rotate: -4deg; background: #fff; border-radius: 6px; box-shadow: 0 12px 22px rgba(0, 0, 0, .32); }
.cb-photo .pic { position: relative; width: 104px; height: 104px; display: grid; place-items: center; border-radius: 3px; overflow: hidden;
  background: radial-gradient(circle at 30% 25%, #fff3c4, transparent 55%), linear-gradient(145deg, #ffd6e6, #e6dcff); }
.cb-photo .pic svg.heart { width: 58px; height: 58px; animation: cbBeat 2.4s ease-in-out infinite; transform-origin: 50% 60%; filter: drop-shadow(0 3px 4px rgba(194, 59, 120, .35)); }
.cb-photo .pic i { position: absolute; width: 11px; height: 11px; background: #e8467c; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: cbTwinkle 2.6s ease-in-out infinite; }
.cb-photo .pic i:nth-child(1) { top: 10px; right: 12px; }
.cb-photo .pic i:nth-child(2) { bottom: 12px; left: 10px; background: var(--gold); animation-delay: .9s; width: 9px; height: 9px; }
.cb-photo .pic i:nth-child(3) { top: 22px; left: 14px; background: #7c5cd6; animation-delay: 1.6s; width: 8px; height: 8px; }
.cb-photo::before { content: ""; position: absolute; top: -10px; left: 50%; width: 52px; height: 17px; margin-left: -26px; rotate: 3deg; background: color-mix(in srgb, var(--gold) 60%, transparent); box-shadow: 0 2px 3px rgba(0, 0, 0, .22); }
.cb-photo::after { content: ""; position: absolute; right: -12px; bottom: -10px; width: 22px; height: 22px; background: var(--teal);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: cbTwinkle 2.4s ease-in-out infinite; }

/* titre manuscrit surligné */
.cb-title { margin: 0; font-size: 2.1rem; line-height: 1.05; color: var(--ink); font-family: "Caveat", "Segoe Print", "Bradley Hand", cursive; font-weight: 700; }
.cb-title span { padding: 0 8px; background: linear-gradient(transparent 58%, color-mix(in srgb, var(--gold) 42%, transparent) 58% 92%, transparent 92%); }
.cb-lead { margin: 10px 0 0; font-size: .86rem; line-height: 1.65; color: var(--text); }

.cb-hr { margin: 16px 4px 12px; border: 0; border-top: 1.5px dashed color-mix(in srgb, var(--muted) 45%, transparent); }
.cb-h { margin: 0 0 8px; display: flex; align-items: center; justify-content: center; gap: 7px; font-family: "Caveat", "Segoe Print", cursive; font-size: 1.45rem; font-weight: 700; color: var(--ink); }
.cb-h svg { width: 19px; height: 19px; fill: none; stroke: var(--ink); stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }

/* ===== contributeurs : carte d'identité organisée (en-tête + lignes étiquetées) ===== */
.cb-people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; text-align: start; }
.cb-id { position: relative; overflow: hidden; border: 2px solid var(--c); border-radius: 16px; background: var(--card);
  box-shadow: 3px 4px 0 color-mix(in srgb, var(--c) 26%, transparent);
  animation: cbPop .45s cubic-bezier(.2, .9, .3, 1) both; animation-delay: calc(var(--i, 0) * 90ms + 150ms); }
.cb-id .hd { display: flex; align-items: center; gap: 14px; padding: 13px 16px; background: color-mix(in srgb, var(--c) 12%, var(--card)); }
.cb-id .av { flex: none; width: 50px; height: 50px; box-sizing: border-box; display: grid; place-items: center; padding-bottom: 4px; border-radius: 50%;
  font-family: "Caveat", "Segoe Print", cursive; font-size: 2rem; font-weight: 700; line-height: 1; color: var(--on); background: var(--c);
  box-shadow: 0 0 0 3px var(--card), 0 0 0 5px color-mix(in srgb, var(--c) 55%, transparent); }
.cb-id .who { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.cb-id .nm { margin: 0; font-family: "Caveat", "Segoe Print", cursive; font-size: 1.75rem; font-weight: 700; line-height: 1.05; color: var(--text); }
.cb-id .nm span { padding: 0 3px; -webkit-box-decoration-break: clone; box-decoration-break: clone;
  background: linear-gradient(transparent 64%, color-mix(in srgb, var(--c) 28%, transparent) 64% 94%, transparent 94%); }
.cb-subj { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px 3px 9px; border-radius: 999px; font-size: .78rem; font-weight: 800; color: var(--c);
  background: color-mix(in srgb, var(--c) 15%, transparent); border: 1.5px solid color-mix(in srgb, var(--c) 55%, transparent); }
.cb-subj svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ===== « Merci beaucoup » : bannière ruban ===== */
.cb-end { margin: 20px 0 0; text-align: center; }
.cb-hearts { display: flex; justify-content: center; align-items: flex-end; gap: 7px; height: 22px; }
.cb-hearts svg { width: 14px; height: 14px; fill: var(--pink); animation: cbBeat 2.4s ease-in-out infinite; transform-origin: 50% 60%; }
.cb-hearts svg:nth-child(2) { width: 22px; height: 22px; animation-delay: .25s; }
.cb-hearts svg:nth-child(1), .cb-hearts svg:nth-child(3) { opacity: .75; animation-delay: .5s; }
.cb-banner { position: relative; display: inline-block; margin-top: 6px; }
.cb-banner .rb { position: relative; z-index: 2; display: block; padding: 8px 22px 10px; color: #fff; font-family: "Caveat", "Segoe Print", cursive; font-size: 1.85rem; font-weight: 700; line-height: 1.05; letter-spacing: .01em; text-shadow: 0 1px 0 rgba(0, 0, 0, .18);
  background: linear-gradient(180deg, color-mix(in srgb, var(--pink) 88%, #fff), var(--pink)); box-shadow: 0 5px 0 color-mix(in srgb, var(--pink) 55%, #000); border-radius: 4px; }
.cb-banner::before, .cb-banner::after { content: ""; position: absolute; z-index: 1; top: 11px; width: 38px; height: 100%; background: color-mix(in srgb, var(--pink) 70%, #000);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 26% 50%); }
.cb-banner::before { left: -24px; }
.cb-banner::after { right: -24px; scale: -1 1; }
.cb-card .pwa-go { width: 100%; box-sizing: border-box; margin-top: 16px; }

@media (prefers-reduced-motion: reduce) {
  .cb-card, .cb-modal.closing .cb-card, .cb-id, .cb-hearts svg, .cb-photo::after, .cb-photo .pic svg.heart, .cb-photo .pic i { animation: none; }
}
