:root {
  --primary: #e8567a;
  --accent: #4f8ff7;
  --bg: #0f1220;
  --bg-soft: #171b2e;
  --card: #1d2238;
  --card-2: #262c47;
  --text: #eef1f8;
  --muted: #9aa3c0;
  --good: #37d399;
  --bad: #ff6b6b;
  --warn: #ffb454;
  --radius: 20px;
  --shadow: 0 18px 50px rgba(0,0,0,.45);
  --glass: rgba(255,255,255,.06);
  --hairline: rgba(255,255,255,.08);
  --appbar-h: 58px;
  --ease: cubic-bezier(.22,.61,.36,1);
  --spring: cubic-bezier(.34,1.56,.64,1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* Un élément [hidden] doit TOUJOURS être masqué, même si une règle lui donne un display. */
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; background: var(--bg); }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Comportement « app » : aucune sélection de texte / loupe iOS par défaut. */
  -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
/* On réautorise la saisie/sélection uniquement là où c'est utile. */
input, textarea, [contenteditable], [contenteditable] *, .selectable, .selectable * {
  -webkit-user-select: text; -moz-user-select: text; -ms-user-select: text; user-select: text;
  -webkit-touch-callout: default;
}

/* ---- Animated ambient background ---- */
.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-orbs span {
  position: absolute; width: 55vmax; height: 55vmax; border-radius: 50%;
  filter: blur(70px); opacity: .40; will-change: transform;
}
.bg-orbs span:nth-child(1) { background: var(--primary); top: -20vmax; left: -10vmax; animation: drift1 22s var(--ease) infinite alternate; }
.bg-orbs span:nth-child(2) { background: var(--accent);  bottom: -25vmax; right: -15vmax; animation: drift2 26s var(--ease) infinite alternate; }
.bg-orbs span:nth-child(3) { background: #7b4dff; top: 30vmax; right: -20vmax; opacity: .25; animation: drift3 30s var(--ease) infinite alternate; }
@keyframes drift1 { to { transform: translate3d(12vmax, 14vmax, 0) scale(1.15); } }
@keyframes drift2 { to { transform: translate3d(-14vmax, -10vmax, 0) scale(1.1); } }
@keyframes drift3 { to { transform: translate3d(-10vmax, 12vmax, 0) scale(1.2); } }

.app {
  max-width: 580px;
  margin: 0 auto;
  padding: calc(var(--appbar-h) + max(10px, env(safe-area-inset-top))) 16px calc(30px + env(safe-area-inset-bottom));
  min-height: 100dvh;
}
.loader { text-align: center; padding: 40vh 0; color: var(--muted); font-size: 24px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---- App bar (fixed, glass) ---- */
.appbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  height: calc(var(--appbar-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 14px 0;
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(180deg, rgba(15,18,32,.82), rgba(15,18,32,.35));
  backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--hairline);
  animation: fadeDown .5s var(--ease) both;
}
@keyframes fadeDown { from { opacity: 0; transform: translateY(-12px); } }

/* ---- Language switch (segmented) ---- */
.lang-switch {
  display: inline-flex; gap: 2px; padding: 4px;
  background: var(--glass); border: 1px solid var(--hairline); border-radius: 999px;
}
.lang-switch button {
  position: relative; background: transparent; color: var(--muted);
  border: 0; border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 800; cursor: pointer;
  transition: color .25s var(--ease), transform .2s var(--spring);
}
.lang-switch button.active { color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent)); box-shadow: 0 4px 14px rgba(232,86,122,.45); transform: scale(1.03); }

/* ---- Profile button in appbar ---- */
.avatar-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.25);
  background: linear-gradient(135deg, var(--primary), var(--accent)); background-size: cover; background-position: center;
  color: #fff; font-weight: 800; font-size: 16px; cursor: pointer; overflow: hidden;
  display: grid; place-items: center; transition: transform .25s var(--spring), box-shadow .25s var(--ease);
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
}
.avatar-btn:active { transform: scale(.9); }
.avatar-btn:hover { box-shadow: 0 6px 22px rgba(79,143,247,.5); }

/* ---- Cloche + badge de notifications ---- */
.appbar-right { display: inline-flex; align-items: center; gap: 6px; }
.notif-btn { position: relative; }
.notif-btn:active { transform: scale(.9); }
.notif-badge {
  position: absolute; top: -1px; right: -1px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: #ff3b30; color: #fff; font-size: 10.5px; font-weight: 800;
  line-height: 17px; text-align: center; box-shadow: 0 0 0 2px var(--bg);
  animation: badgePop .3s var(--spring);
}
@keyframes badgePop { from { transform: scale(0); } }

/* ---- Centre de notifications ---- */
.notif-head { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 12px; }
.notif-list { display: flex; flex-direction: column; gap: 8px; }
.notif-item {
  position: relative; display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 40px 12px 14px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--hairline); cursor: pointer;
  animation: rise .35s var(--ease) both;
  transition: background .2s var(--ease);
}
.notif-item:active { background: var(--card-2); }
.notif-item.unseen { border-color: color-mix(in srgb, var(--primary) 55%, transparent); }
.notif-item.unseen::before {
  content: ''; position: absolute; left: 5px; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: 50%; background: var(--primary);
}
.notif-ic { font-size: 22px; line-height: 1.2; flex: 0 0 auto; }
.notif-body { flex: 1 1 auto; min-width: 0; }
.notif-t { font-weight: 700; font-size: 14.5px; }
.notif-b { color: var(--muted); font-size: 13px; margin-top: 2px; word-break: break-word; }
.notif-time { color: var(--muted); font-size: 11.5px; margin-top: 4px; opacity: .8; }
.notif-del {
  position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border: 0; border-radius: 50%;
  background: var(--card-2); color: var(--muted); font-size: 13px; cursor: pointer; line-height: 1;
}
.notif-del:active { transform: scale(.85); background: var(--bad, #e5484d); color: #fff; }

/* ---- View entrance (staggered rise) ---- */
.app > * { animation: rise .55s var(--ease) both; }
.app > *:nth-child(2) { animation-delay: .05s; }
.app > *:nth-child(3) { animation-delay: .10s; }
.app > *:nth-child(4) { animation-delay: .15s; }
.app > *:nth-child(5) { animation-delay: .20s; }
.app > *:nth-child(n+6) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

/* ---- Typography ---- */
h1 { font-size: 28px; margin: 0 0 4px; letter-spacing: -.4px; font-weight: 800; }
h2 { font-size: 19px; margin: 22px 0 12px; letter-spacing: -.2px; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---- Cards (glass) ---- */
.card {
  background: linear-gradient(180deg, rgba(38,44,71,.55), rgba(29,34,56,.75));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow); border: 1px solid var(--hairline);
  margin-bottom: 14px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.card.tap { cursor: pointer; }
.card.tap:active { transform: scale(.985); }

/* ---- Buttons ---- */
.btn {
  position: relative; display: block; width: 100%; border: 0; border-radius: 15px;
  padding: 16px; font-size: 16px; font-weight: 700; cursor: pointer; overflow: hidden;
  background: var(--card-2); color: var(--text);
  transition: transform .18s var(--spring), box-shadow .3s var(--ease), opacity .2s, filter .2s;
}
.btn:active { transform: scale(.96); }
.btn.primary { background: linear-gradient(135deg, var(--primary), #c23f63); color: #fff; box-shadow: 0 10px 26px rgba(232,86,122,.4); }
.btn.accent { background: linear-gradient(135deg, var(--accent), #2f6fd8); color: #fff; box-shadow: 0 10px 26px rgba(79,143,247,.4); }
.btn.primary:hover, .btn.accent:hover { filter: brightness(1.06); }
.btn.ghost { background: var(--glass); border: 1px solid rgba(255,255,255,.15); box-shadow: none; }
.btn.danger { background: linear-gradient(135deg, #ff6b6b, #c23f3f); color: #fff; box-shadow: 0 10px 26px rgba(255,107,107,.35); }
.btn:disabled { opacity: .5; cursor: default; transform: none; box-shadow: none; }
.btn.small { padding: 10px 14px; font-size: 14px; width: auto; }
/* sheen sweep on primary buttons */
.btn.primary::after, .btn.accent::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-18deg); animation: sheen 4.5s ease-in-out infinite;
}
@keyframes sheen { 0%,55% { left: -60%; } 80%,100% { left: 130%; } }

/* ---- Forms ---- */
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; font-weight: 600; }
input, select, textarea {
  width: 100%; padding: 14px; border-radius: 13px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(23,27,46,.7); color: var(--text); font-size: 16px; font-family: inherit;
  transition: border-color .2s var(--ease), box-shadow .25s var(--ease), background .2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(79,143,247,.18); background: rgba(23,27,46,.95); }

/* ---- Login ---- */
.login-wrap { padding-top: 10vh; }
.heart { font-size: 50px; text-align: center; animation: beat 1.8s var(--spring) infinite; }
@keyframes beat { 0%,100% { transform: scale(1); } 15% { transform: scale(1.18); } 30% { transform: scale(1); } 45% { transform: scale(1.1); } }
.brand { text-align: center; margin-bottom: 22px; }
.error-msg { color: var(--bad); font-size: 14px; margin-top: 10px; min-height: 18px; }

/* ---- Chips / segmented ---- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid rgba(255,255,255,.14); background: var(--glass); color: var(--text);
  padding: 10px 15px; border-radius: 999px; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: transform .2s var(--spring), background .25s var(--ease), border-color .25s var(--ease), color .2s;
}
.chip:active { transform: scale(.94); }
.chip.active { background: linear-gradient(135deg, var(--primary), var(--accent)); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(232,86,122,.35); transform: scale(1.04); }

/* ---- Header row ---- */
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.avatar {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(135deg, var(--primary), var(--accent)); background-size: cover; background-position: center;
  font-weight: 800; color: #fff;
}

/* ---- Pending banner ---- */
.banner {
  background: linear-gradient(135deg, rgba(58,33,64,.85), rgba(42,35,80,.85));
  backdrop-filter: blur(12px); border: 1px solid var(--primary);
  border-radius: var(--radius); padding: 16px; margin-bottom: 14px;
  box-shadow: 0 10px 30px rgba(232,86,122,.2);
}

/* ---- Quiz ---- */
.progress { height: 9px; background: rgba(255,255,255,.08); border-radius: 99px; overflow: hidden; margin: 8px 0 18px; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--primary)); transition: width .4s var(--ease); border-radius: 99px; }
.qimg { width: 100%; max-height: 240px; object-fit: contain; border-radius: 14px; margin-bottom: 12px; background: #000; }
.option {
  display: block; width: 100%; text-align: left; margin-bottom: 11px;
  padding: 16px; border-radius: 15px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(23,27,46,.6); color: var(--text); font-size: 16px; cursor: pointer;
  transition: transform .18s var(--spring), border-color .25s var(--ease), background .25s var(--ease);
}
.option:active { transform: scale(.98); }
.option.selected { border-color: var(--accent); background: rgba(79,143,247,.18); transform: scale(1.01); }
.option.correct { border-color: var(--good); background: rgba(55,211,153,.18); animation: pop .4s var(--spring); }
.option.wrong { border-color: var(--bad); background: rgba(255,107,107,.18); animation: shake .4s ease; }
.option:disabled { cursor: default; }
@keyframes pop { 0% { transform: scale(1); } 50% { transform: scale(1.04); } 100% { transform: scale(1); } }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* ---- Bilingual text ---- */
.bi { display: block; }
.bi-1 { display: block; }
.bi-2 { display: block; font-style: italic; color: var(--muted); font-size: .86em; margin-top: 3px; font-weight: 500; }
.option .bi-1 { font-weight: 600; }

.hint-box { background: var(--card-2); border-radius: 13px; padding: 12px; margin: 10px 0; font-size: 15px; animation: rise .35s var(--ease); }

/* ---- Result ---- */
.score-big { font-size: 58px; font-weight: 800; text-align: center; margin: 6px 0; letter-spacing: -1px; animation: pop .5s var(--spring); }
.vs { display: flex; gap: 12px; }
.vs > div { flex: 1; text-align: center; background: var(--card-2); border-radius: 15px; padding: 14px; }

/* ---- Lists / stats ---- */
.row { display: flex; justify-content: space-between; align-items: center; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.row:last-child { border-bottom: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { background: var(--card-2); border-radius: 15px; padding: 16px; text-align: center; }
.stat b { font-size: 26px; display: block; }
.pill { font-size: 12px; padding: 3px 10px; border-radius: 99px; background: var(--card-2); color: var(--muted); }

/* ---- Profile page ---- */
.profile-hero { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 0 4px; }
.avatar-xl {
  width: 108px; height: 108px; border-radius: 50%; overflow: hidden; position: relative;
  background: linear-gradient(135deg, var(--primary), var(--accent)); background-size: cover; background-position: center;
  display: grid; place-items: center; font-size: 42px; font-weight: 800; color: #fff;
  box-shadow: 0 12px 34px rgba(0,0,0,.45); border: 3px solid rgba(255,255,255,.14);
}
.avatar-xl .cam { position: absolute; bottom: 0; left: 0; right: 0; padding: 6px 0; font-size: 15px;
  background: rgba(0,0,0,.45); text-align: center; }
.seg { display: flex; gap: 6px; background: var(--glass); border: 1px solid var(--hairline); border-radius: 14px; padding: 5px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1 0 auto; white-space: nowrap; border: 0; background: transparent; color: var(--muted);
  padding: 9px 14px; border-radius: 10px; font-weight: 700; font-size: 14px; cursor: pointer;
  transition: color .2s, background .25s var(--ease); }
.seg button.active { color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent)); box-shadow: 0 6px 16px rgba(232,86,122,.35); }

/* ---- Admin tabs ---- */
.admin-tabs {
  flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
  margin: 4px -16px 14px; padding: 0 16px 4px; scrollbar-width: none;
}
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tabs .chip { flex: 0 0 auto; }
input[type="color"] { height: 48px; padding: 4px; cursor: pointer; }
input[type="file"] { font-size: 13px; color: var(--muted); padding: 8px; }
input[type="radio"] { width: auto; accent-color: var(--good); }

/* ---- Overlay ---- */
.overlay {
  position: fixed; inset: 0; background: rgba(8,10,20,.7); backdrop-filter: blur(8px);
  display: grid; place-items: center; padding: 20px; z-index: 100; animation: fade .3s ease;
}
.overlay .card { width: 100%; max-width: 340px; animation: pop .4s var(--spring); }
@keyframes fade { from { opacity: 0; } }

/* ---- Aperçu caméra « Notre instant » (cadrage + déclenchement manuel) ---- */
.cam-overlay { padding: 0; background: #000; place-items: stretch; }
.cam-frame { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; }
.cam-title {
  position: absolute; top: calc(12px + env(safe-area-inset-top)); left: 0; right: 0; z-index: 2;
  text-align: center; color: #fff; font-weight: 700; font-size: 15px; padding: 0 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
}
.cam-video { flex: 1; width: 100%; height: 100%; object-fit: cover; background: #000; }
.cam-count {
  position: absolute; inset: 0; z-index: 3; display: grid; place-items: center;
  font-size: 22vh; font-weight: 800; color: #fff; text-shadow: 0 6px 30px rgba(0,0,0,.6);
  animation: pop .3s var(--spring);
}
.cam-controls {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 26px calc(24px + env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgba(0,0,0,.55), transparent);
}
.cam-controls .link { color: #fff; opacity: .92; }
.cam-shutter {
  width: 76px; height: 76px; border-radius: 50%; border: 5px solid rgba(255,255,255,.9);
  background: #fff; box-shadow: 0 0 0 4px rgba(0,0,0,.25); cursor: pointer; padding: 0;
  transition: transform .12s var(--ease);
}
.cam-shutter:active { transform: scale(.92); }
.cam-timer { min-width: 64px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; }
.cam-timer.on { background: var(--primary); color: #fff; border-color: transparent; }

.spacer { height: 8px; }
.link { color: var(--accent); background: none; border: 0; cursor: pointer; font-size: 14px; padding: 8px; font-weight: 600; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--card-2); color: var(--text); padding: 12px 18px; border-radius: 14px; z-index: 200;
  box-shadow: var(--shadow); border: 1px solid var(--hairline); animation: toastIn .4s var(--spring); font-weight: 600; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 20px); } }

/* ================= BIOMÉTRIE (séparateur) ================= */
.or-sep { text-align: center; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em;
  margin: 16px 0 12px; position: relative; text-transform: uppercase; }
.or-sep::before, .or-sep::after { content: ''; position: absolute; top: 50%; width: 36%; height: 1px; background: var(--hairline); }
.or-sep::before { left: 0; } .or-sep::after { right: 0; }

/* ================= MESSAGERIE ================= */
.chat {
  display: flex; flex-direction: column; gap: 8px; padding: 8px 2px;
  min-height: 48vh; max-height: calc(100dvh - var(--appbar-h) - 150px); overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /* Seul le fil scrolle : pas de rebond de la page derrière (façon WhatsApp). */
  overscroll-behavior: contain;
}

/* Vue messagerie : colonne pleine hauteur (en-tête / messages / saisie) — responsive tous écrans */
.app.chat-mode {
  display: flex; flex-direction: column;
  /* Fixé au viewport VISIBLE (piloté en JS via visualViewport : height + translateY(offsetTop)).
     iOS ignore interactive-widget → sans ça, le clavier pousse l'en-tête hors écran et laisse
     une bande noire. On fixe UNIQUEMENT .app.chat-mode (jamais body/html → cf. Lot 17 raté). */
  position: fixed; top: 0; left: 0; right: 0;
  height: 100dvh; overflow: hidden; will-change: height, transform;
  /* la barre globale FR/ES/EN est masquée en chat → on ne réserve que l'encoche */
  padding: max(8px, env(safe-area-inset-top)) 12px 0;
  background: var(--bg); /* fond opaque du thème : aucune zone noire possible derrière le chat */
}
.app.chat-mode .topbar { flex: 0 0 auto; }
.app.chat-mode .chat {
  flex: 1 1 auto; min-height: 0; max-height: none;
  justify-content: flex-end; /* messages ancrés en bas (façon WhatsApp), plus d'espace mort */
  padding: 8px 2px 4px;
}
.app.chat-mode .chat-input {
  position: relative; flex: 0 0 auto; margin: 0 -12px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
}
/* En-tête de conversation façon WhatsApp : retour · nom · actions, sur une seule ligne. */
.chat-topbar { display: flex; align-items: center; gap: 6px; }
.chat-topbar .chat-title { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 18px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-topbar .chat-back { flex: 0 0 auto; margin-left: -6px; }
.chat-topbar .chat-tb-actions { flex: 0 0 auto; }
.chat-topbar .icon-btn.danger { color: var(--bad); }
.chat-topbar.sel { animation: rise .18s var(--ease); }
.chat-topbar #sel-close { font-size: 20px; line-height: 1; }
/* Mode sélection multiple : les lignes se décalent pour laisser un rond à cocher à droite. */
.chat.select-mode .msg-row { position: relative; padding-right: 40px; cursor: pointer;
  transition: padding-right .18s var(--ease); }
.sel-check { position: absolute; right: 2px; top: 50%; transform: translateY(-50%) scale(.6);
  width: 24px; height: 24px; border-radius: 50%; box-sizing: border-box;
  border: 2px solid var(--muted); background: transparent; color: transparent;
  display: flex; align-items: center; justify-content: center; opacity: 0;
  transition: transform .18s var(--spring), opacity .18s var(--ease), background .16s, border-color .16s; }
.chat.select-mode .sel-check { opacity: 1; transform: translateY(-50%) scale(1); }
.sel-check .ic-svg { width: 15px; height: 15px; }
.msg-row.selected .sel-check { border-color: var(--primary); background: var(--primary); color: #fff; }
.chat.select-mode .msg-row.selected { background: rgba(232,86,122,.12); border-radius: 14px; }
.bubble {
  max-width: 80%; padding: 10px 13px; border-radius: 17px; font-size: 15px;
  word-break: break-word; box-shadow: 0 4px 12px rgba(0,0,0,.22);
}
/* Aucune sélection de texte / loupe iOS sur le fil (appui long = feuille d'actions). */
.chat, .chat .msg-row, .chat .bubble, .chat .bubble * {
  -webkit-user-select: none !important; -moz-user-select: none !important;
  -ms-user-select: none !important; user-select: none !important;
  -webkit-touch-callout: none !important;
}
.bubble .bd { display: block; }
.bubble .bt { display: block; font-size: 10px; opacity: .55; text-align: right; margin-top: 3px; }
.bubble.me { align-self: flex-end; background: linear-gradient(135deg, var(--primary), #c23f63); color: #fff; border-bottom-right-radius: 5px; }
.bubble.them { align-self: flex-start; background: var(--card-2); border-bottom-left-radius: 5px; }
.chat-input { display: flex; gap: 7px; align-items: center; position: relative;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  background: var(--card); border-top: 1px solid var(--hairline); }
.chat-input #msg-text { flex: 1; min-width: 0; border-radius: 20px; padding: 11px 15px;
  line-height: 1.35; max-height: 120px; min-height: 44px; overflow-y: auto;
  font-family: inherit; font-size: 15px; box-sizing: border-box;
  background: var(--bg-soft, var(--card-2)); border: 1px solid var(--hairline); color: var(--text);
  white-space: pre-wrap; word-break: break-word; -webkit-user-select: text; user-select: text; }
.msg-input:empty:before { content: attr(data-ph); color: var(--muted); pointer-events: none; }
.msg-input:focus { outline: none; border-color: var(--primary); }
.chat-input .btn { width: 44px; height: 44px; padding: 0; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 19px; align-self: flex-end; }
.chat-input .msg-gif { width: auto; min-width: 40px; padding: 0 8px; border-radius: 14px;
  font-size: 12px; font-weight: 800; letter-spacing: .5px; color: var(--muted); }
.chat-input .msg-gif:active { color: var(--text); }
.chat-input .msg-attach { font-size: 21px; }
.chat-input .btn.ghost { background: transparent; }
.chat-input .btn:active { transform: scale(.88); }
.chat-input .ic-svg { width: 23px; height: 23px; }
.msg-mic { color: var(--muted); transition: color .2s, background .2s, transform .12s var(--spring); }
.msg-mic.holding { color: #fff; background: linear-gradient(135deg, #e33b3b, #c22); transform: scale(1.12); box-shadow: 0 0 0 6px rgba(233,59,59,.18); }
/* Bouton icône (topbar médias) */
.icon-btn { background: none; border: 0; cursor: pointer; color: var(--text); padding: 6px; display: grid; place-items: center; border-radius: 12px; }
.icon-btn .ic-svg { width: 24px; height: 24px; }
.icon-btn:active { transform: scale(.9); background: var(--glass); }
.ic-svg { display: block; }

/* Rangée message + réactions */
.msg-row { display: flex; flex-direction: column; margin-bottom: 6px; }
.msg-row.me { align-items: flex-end; }
.msg-row.them { align-items: flex-start; }
.bubble { cursor: pointer; transform-origin: bottom; }
/* Entrée d'un nouveau message : glisse depuis le bas + petit rebond (façon WhatsApp) */
.msg-row.enter .bubble { animation: msgIn .34s var(--spring) both; }
.msg-row.me.enter .bubble { transform-origin: bottom right; }
.msg-row.them.enter .bubble { transform-origin: bottom left; }
.msg-row.enter .msg-reacts { animation: fadeIn .3s ease both; }
@keyframes msgIn { from { opacity: 0; transform: translateY(16px) scale(.85); } }
@keyframes fadeIn { from { opacity: 0; } }
/* Sortie (suppression) */
.msg-row.leaving { animation: msgOut .22s var(--ease) forwards; overflow: hidden; }
@keyframes msgOut { to { opacity: 0; transform: scale(.85); max-height: 0; margin-bottom: 0; } }
/* Réponse citée dans une bulle */
.bubble-reply { border-left: 3px solid rgba(255,255,255,.5); padding: 4px 8px; margin-bottom: 5px;
  background: rgba(0,0,0,.18); border-radius: 8px; font-size: 12.5px; opacity: .9; }
.bubble.them .bubble-reply { border-left-color: var(--accent); }
/* Média dans une bulle */
.bubble-media { display: block; max-width: 220px; max-height: 300px; width: 100%; border-radius: 12px; margin-bottom: 4px; cursor: zoom-in; }
/* Réactions sous la bulle */
.msg-reacts { display: flex; gap: 3px; margin: 2px 6px 0; }
.msg-reacts .react { font-size: 14px; background: var(--card-2); border: 1px solid var(--hairline);
  border-radius: 999px; padding: 1px 6px; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.msg-reacts .react.mine { border-color: var(--primary); }
/* Bouton traduire + traduction sous un message reçu */
.msg-tr-btn { align-self: flex-start; margin: 3px 4px 0; padding: 2px 4px; background: none; border: 0;
  color: var(--accent); font-size: 12px; font-weight: 700; cursor: pointer; opacity: .85; }
.msg-tr-btn:active { opacity: .5; }
.msg-tr { align-self: flex-start; max-width: 80%; margin: 3px 4px 0; padding: 8px 12px;
  background: rgba(79,143,247,.12); border: 1px solid rgba(79,143,247,.3); border-radius: 14px;
  font-size: 14.5px; font-style: italic; animation: rise .25s var(--ease) both; }

/* Barre de réponse au-dessus de la saisie */
.reply-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; margin-bottom: 6px;
  background: var(--card-2); border-radius: 12px; border-left: 3px solid var(--accent); animation: rise .2s var(--ease); }
.reply-bar .rb-body { flex: 1; font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-bar .rb-x { background: none; border: 0; color: var(--muted); font-size: 16px; cursor: pointer; }

/* Bulle maintenue (appui long) */
.bubble.held { transform: scale(1.05); filter: brightness(1.12); transition: transform .16s var(--spring), filter .16s var(--ease); }
/* Lecteur audio custom (façon WhatsApp) */
.aud { display: flex; align-items: center; gap: 10px; width: 240px; max-width: 62vw; padding: 2px 2px 2px 0; }
.aud.light { width: auto; flex: 1; }
.aud-play { width: 38px; height: 38px; flex: 0 0 auto; border: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; background: rgba(255,255,255,.22); color: #fff; }
.bubble.them .aud-play { background: var(--primary); color: #fff; }
.aud.light .aud-play { background: var(--primary); color: #fff; }
.aud-play .ic-svg { width: 20px; height: 20px; }
.aud-play:active { transform: scale(.9); }
.aud-bar { flex: 1; height: 5px; border-radius: 3px; background: rgba(255,255,255,.3); position: relative; cursor: pointer; }
.bubble.them .aud-bar, .aud.light .aud-bar { background: rgba(255,255,255,.16); }
.aud.light .aud-bar { background: var(--hairline); }
.aud-prog { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 3px; background: #fff; }
.bubble.them .aud-prog, .aud.light .aud-prog { background: var(--primary); }
.aud-time { font-size: 12px; font-variant-numeric: tabular-nums; opacity: .85; min-width: 34px; text-align: right; }

/* Barre d'enregistrement / aperçu vocal */
.chat-input.recording > *:not(#rec-bar), .chat-input.previewing > *:not(#rec-bar) { display: none !important; }
.rec-bar { display: flex; align-items: center; gap: 10px; width: 100%; padding: 3px 2px; }
.rec-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; font-size: 19px;
  display: grid; place-items: center; flex: 0 0 auto; }
.rec-btn.cancel { background: var(--card-2); color: var(--text); }
.rec-btn.send { background: linear-gradient(135deg, var(--primary), #c23f63); color: #fff; }
.rec-btn:active { transform: scale(.9); }
.rec-time { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 16px; flex: 0 0 auto; }
.rec-hint { flex: 1; font-size: 13px; color: var(--muted); text-align: right; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: #e33b3b; animation: recPulse 1s infinite; flex: 0 0 auto; }
@keyframes recPulse { 50% { opacity: .25; } }

/* Onglet médias de la conversation */
.overlay.chat-media { align-items: flex-start; }
.cm-panel { width: 100%; max-width: 560px; margin: 0 auto; background: var(--card); border: 1px solid var(--hairline);
  border-radius: 0 0 22px 22px; padding: 12px 14px calc(16px + env(safe-area-inset-bottom));
  max-height: 100dvh; overflow-y: auto; box-shadow: var(--shadow); animation: sheetUp .3s var(--spring); }
.cm-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px;
  padding-top: max(6px, env(safe-area-inset-top)); }
.cm-close { background: none; border: 0; color: var(--muted); font-size: 20px; cursor: pointer; }
.cm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cm-cell { position: relative; aspect-ratio: 1; border: 0; padding: 0; border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--card-2); }
.cm-cell img, .cm-cell video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cm-audio { grid-column: span 3; background: var(--glass); border: 1px solid var(--hairline); border-radius: 12px; padding: 8px 12px; }

/* Actions de la topbar messagerie */
.chat-tb-actions { display: flex; align-items: center; gap: 2px; }

/* Sélecteur de GIF (GIPHY) */
.overlay.gif-pick { align-items: flex-end; }
.gp-panel { width: 100%; max-width: 560px; margin: 0 auto; background: var(--card); border: 1px solid var(--hairline);
  border-radius: 22px 22px 0 0; padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
  max-height: 72dvh; display: flex; flex-direction: column; box-shadow: 0 -12px 40px rgba(0,0,0,.5); animation: sheetUp .3s var(--spring); }
.gp-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.gp-head #gp-input { flex: 1; min-width: 0; border-radius: 12px; padding: 10px 12px; }
.gp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.gp-cell { border: 0; padding: 0; background: var(--card-2); border-radius: 10px; overflow: hidden; cursor: pointer; aspect-ratio: 1; }
.gp-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gp-cell:active { transform: scale(.94); }
.gp-credit { text-align: center; font-size: 10px; color: var(--muted); margin-top: 6px; letter-spacing: 1.5px; }

/* Barre de recherche dans la conversation */
.chat-search { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; padding: 6px 8px;
  background: var(--card-2); border: 1px solid var(--hairline); border-radius: 14px; animation: rise .2s var(--ease) both; }
.chat-search[hidden] { display: none; }
.chat-search #cs-input { flex: 1; min-width: 0; border-radius: 10px; padding: 9px 12px; }
.chat-search .cs-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 30px; text-align: center; }
.chat-search .icon-btn { padding: 6px; font-size: 15px; }
.msg-row.search-hit .bubble { box-shadow: 0 0 0 2px var(--accent), 0 4px 12px rgba(0,0,0,.22); }
.msg-row.current-hit .bubble { box-shadow: 0 0 0 3px var(--primary), 0 4px 14px rgba(0,0,0,.3); }

/* Menu contextuel « qui découle de la bulle » (popover) */
.overlay.msg-pop { background: rgba(6,8,16,.45); backdrop-filter: blur(2px); animation: fade .16s ease; }
.overlay.msg-pop.closing { animation: fadeOut .15s ease forwards; }
.mp-menu { position: absolute; width: min(280px, 82vw); background: var(--card); border: 1px solid var(--hairline);
  border-radius: 18px; padding: 8px; box-shadow: 0 16px 44px rgba(0,0,0,.5); animation: mpIn .18s var(--spring); }
@keyframes mpIn { from { transform: scale(.6); opacity: 0; } }
.mp-menu .react-row { margin: 0 2px 8px; }
.mp-actions { display: flex; flex-direction: column; }
.mp-actions .sheet-item { padding: 12px 12px; }

/* Icône messagerie verte (WhatsApp-like) + galerie (Apple Photos) */
.hi .wa-ic { width: 1.15em; height: 1.15em; display: block; }
.hi .photos-ic { width: 1.3em; height: 1.3em; display: block; filter: drop-shadow(0 2px 3px rgba(0,0,0,.2)); }

/* Feuille d'actions message (façon WhatsApp) */
.msg-sheet { align-items: flex-end; animation: fade .2s ease; }
.msg-sheet.closing { animation: fadeOut .18s ease forwards; }
@keyframes fadeOut { to { opacity: 0; } }
.msg-sheet .sheet { width: 100%; max-width: 520px; background: var(--card); border: 1px solid var(--hairline);
  border-radius: 22px 22px 0 0; padding: 12px 12px calc(16px + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 40px rgba(0,0,0,.5); animation: sheetUp .32s var(--spring); }
.msg-sheet.closing .sheet { animation: sheetDown .18s var(--ease) forwards; }
@keyframes sheetUp { from { transform: translateY(100%); } }
@keyframes sheetDown { to { transform: translateY(100%); } }
/* Rangée de réactions en pilule */
.react-row { display: flex; justify-content: space-between; gap: 4px; margin: 2px 4px 12px;
  background: var(--bg-soft); border: 1px solid var(--hairline); border-radius: 999px; padding: 6px 8px; }
.react-btn { font-size: 27px; background: none; border: 0; cursor: pointer; padding: 5px; border-radius: 50%;
  line-height: 1; transition: transform .18s var(--spring), background .2s; }
.react-btn:active { transform: scale(1.35); }
.react-btn.on { background: linear-gradient(135deg, var(--primary), var(--accent)); box-shadow: 0 4px 12px rgba(232,86,122,.4); }
.sheet-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: transparent; border: 0;
  border-radius: 13px; padding: 14px 14px; color: var(--text); font-size: 16px; font-weight: 600; cursor: pointer;
  transition: background .18s var(--ease); }
.sheet-item + .sheet-item { border-top: 1px solid var(--hairline); }
.sheet-item.danger { color: var(--bad); }
.sheet-item:active { background: var(--glass); }

/* ================= LOCALISATION ================= */
.map-frame { width: 100%; height: 240px; border: 0; border-radius: 14px; background: #10131f; display: block; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; color: var(--good);
  text-transform: uppercase; letter-spacing: .05em; }
.live-dot::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--good);
  box-shadow: 0 0 0 0 rgba(55,211,153,.6); animation: livePulse 1.6s infinite; }
@keyframes livePulse { 70%,100% { box-shadow: 0 0 0 8px rgba(55,211,153,0); } }
/* Interrupteur */
.switch { position: relative; display: inline-block; width: 50px; height: 30px; flex: 0 0 auto; }
.switch input { display: none; }
.switch .sl { position: absolute; inset: 0; background: var(--card-2); border: 1px solid var(--hairline);
  border-radius: 999px; transition: background .25s var(--ease); cursor: pointer; }
.switch .sl::before { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; transition: transform .25s var(--spring); box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.switch input:checked + .sl { background: linear-gradient(135deg, var(--good), #2fb37f); border-color: transparent; }
.switch input:checked + .sl::before { transform: translateX(20px); }

/* ================= GALERIE ================= */
.gal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 4px; }
/* Regroupement par jour façon iOS Photos (en-têtes de date collants) */
.gal-days { margin-top: 10px; }
.gal-day { margin-bottom: 16px; }
.gal-day-h {
  position: sticky; top: calc(var(--appbar-h) + env(safe-area-inset-top)); z-index: 5;
  margin: 0 0 6px; padding: 6px 2px; font-size: 15px; font-weight: 800; letter-spacing: .2px;
  background: linear-gradient(180deg, var(--bg) 62%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.gal-cell { position: relative; aspect-ratio: 1; border: 0; padding: 0; border-radius: 12px; overflow: hidden;
  cursor: pointer; background: var(--card-2); }
.gal-cell img, .gal-cell video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s var(--ease); }
.gal-cell:active img, .gal-cell:active video { transform: scale(.95); }
.gal-play { position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; color: #fff;
  background: rgba(0,0,0,.28); text-shadow: 0 2px 8px rgba(0,0,0,.6); pointer-events: none; }
.gal-toolbar { display: flex; gap: 8px; margin: 4px 0 10px; }
.gal-toolbar .btn.small { flex: 1 1 0; min-height: 42px; box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center; margin: 0; }
.gal-days.select-mode .gal-cell.selected { outline: 3px solid var(--primary); outline-offset: -3px; }
.gal-days.select-mode .gal-cell.selected img, .gal-days.select-mode .gal-cell.selected video { transform: scale(.9); }
.gal-check { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%;
  display: none; place-items: center; font-size: 14px; font-weight: 800; color: #fff;
  background: rgba(0,0,0,.4); border: 2px solid #fff; }
.gal-days.select-mode .gal-check { display: grid; }
.gal-cell.selected .gal-check { background: linear-gradient(135deg, var(--primary), var(--accent)); }
.gal-fav { position: absolute; bottom: 5px; right: 6px; font-size: 13px; color: #ff4d6d;
  text-shadow: 0 1px 3px rgba(0,0,0,.6); pointer-events: none; }

/* Favori + émotions + note dans la visionneuse */
.lb-fav { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: rgba(0,0,0,.4); font-size: 18px; cursor: pointer; line-height: 1; }
.lb-fav:active { transform: scale(.88); }
.lb-emotions { display: flex; justify-content: center; gap: 6px; margin: 8px 0 6px; }
.lb-emo { width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; font-size: 20px;
  background: rgba(255,255,255,.1); transition: transform .15s var(--spring), background .2s; }
.lb-emo:active { transform: scale(1.2); }
.lb-emo.on { background: rgba(255,255,255,.28); box-shadow: 0 0 0 2px rgba(255,255,255,.5); transform: scale(1.12); }
.lb-note { width: 100%; max-width: 340px; box-sizing: border-box; margin: 2px auto 12px; display: block;
  border-radius: 12px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.1);
  color: #fff; padding: 9px 12px; font: inherit; font-size: 14px; text-align: center; }
.lb-note::placeholder { color: rgba(255,255,255,.5); }

/* Overlay d'envoi avec anneau de progression */
.up-ov { display: grid; place-items: center; }
.up-card { background: var(--card); border: 1px solid var(--hairline); border-radius: 20px;
  padding: 22px 26px; text-align: center; box-shadow: var(--shadow); animation: toastIn .3s var(--spring); }
.up-ring { position: relative; width: 88px; height: 88px; margin: 0 auto 10px; }
.up-ring svg { width: 88px; height: 88px; transform: rotate(-90deg); }
.up-ring .up-bg { fill: none; stroke: var(--hairline); stroke-width: 4; }
.up-ring .up-arc { fill: none; stroke: var(--primary); stroke-width: 4;
  stroke-linecap: round; transition: stroke-dashoffset .25s var(--ease); }
.up-pct { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 18px; }
.up-title { font-weight: 700; }
.up-card.up-err .up-arc { stroke: var(--bad, #e5484d); }
.up-card.up-err .up-pct { color: var(--bad, #e5484d); }
.gal-actionbar { position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 90; width: min(92%, 520px);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--hairline);
  box-shadow: var(--shadow); animation: toastIn .3s var(--spring); font-weight: 700; font-size: 14px; }
.gal-actions { display: flex; gap: 8px; }
.gal-actions .btn.small { width: auto; }

/* Lightbox slider */
.overlay.lb { padding: 0; }
.lb .lb-inner { max-width: 560px; width: 100%; text-align: center; padding: 0 16px; }
.lb-media { max-width: 100%; max-height: 70vh; border-radius: 14px; display: block; margin: 0 auto; box-shadow: var(--shadow); }
.lb-cap { margin: 10px 0 2px; font-weight: 600; }
.lb-exif { font-size: 12.5px; line-height: 1.5; margin: 6px 0 2px; color: rgba(255,255,255,.82); font-weight: 600; }
.lb-meta { font-size: 13px; margin: 4px 0 12px; }
.lb-btns { display: flex; gap: 10px; justify-content: center; }
.lb-act { display: inline-flex; flex-direction: column; align-items: center; gap: 4px;
  min-width: 72px; padding: 10px 8px; border: 0; border-radius: 16px; cursor: pointer;
  background: rgba(255,255,255,.12); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  color: #fff; font-size: 12px; font-weight: 600; text-decoration: none;
  transition: transform .15s var(--ease), background .2s; }
.lb-act svg { width: 24px; height: 24px; }
.lb-act:active { transform: scale(.92); background: rgba(255,255,255,.22); }
.lb-act.danger { color: #ff6b6b; }
/* Barre supérieure façon iOS Photos : date en titre, heure + lieu en sous-titre */
.lb-topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 110;
  display: flex; align-items: center; gap: 10px;
  padding: calc(8px + env(safe-area-inset-top)) 12px 10px;
  background: linear-gradient(180deg, rgba(0,0,0,.6), transparent); }
.lb-head { flex: 1 1 auto; min-width: 0; text-align: center; color: #fff; }
.lb-date { font-size: 15px; font-weight: 800; }
.lb-sub { font-size: 12px; opacity: .85; margin-top: 1px; }
.lb-count { flex: 0 0 auto; color: rgba(255,255,255,.85); font-size: 12.5px; font-weight: 700; min-width: 34px; text-align: right; }
.lb-close { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: rgba(0,0,0,.4); color: #fff; cursor: pointer; display: grid; place-items: center; }
.lb-close svg { width: 22px; height: 22px; }
.lb-close:active { transform: scale(.9); }
.lb-nav { position: fixed; top: 50%; transform: translateY(-50%); z-index: 105;
  width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(0,0,0,.45); color: #fff;
  font-size: 30px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.lb-nav.prev { left: 10px; } .lb-nav.next { right: 10px; }
.lb-nav:active { transform: translateY(-50%) scale(.9); }

/* ================= NOTRE INSTANT (défi photo) ================= */
.ch-photos { display: grid; gap: 14px; margin-top: 12px; }
.ch-photo { margin: 0; animation: rise .4s var(--ease) both; }
.ch-photo img { width: 100%; border-radius: 18px; display: block; box-shadow: var(--shadow); }
.ch-photo figcaption { text-align: center; color: var(--muted); font-size: 13.5px; margin-top: 7px; font-weight: 700; }

/* ================= HUB PORTAIL ================= */
.hub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 6px 0 14px; }
.hub-tile {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  border: 1px solid var(--hairline); border-radius: var(--radius); padding: 18px 16px; cursor: pointer;
  background: linear-gradient(180deg, rgba(38,44,71,.55), rgba(29,34,56,.75));
  backdrop-filter: blur(14px); box-shadow: var(--shadow); color: var(--text); text-align: left;
  transition: transform .18s var(--spring), box-shadow .3s var(--ease); min-height: 104px;
}
.hub-tile:active { transform: scale(.96); }
.hub-tile:hover { box-shadow: 0 14px 34px rgba(79,143,247,.28); }
.hub-tile .hi { font-size: 32px; line-height: 1; }
.hub-tile .ht { font-weight: 800; font-size: 16px; margin-top: 4px; }
.hub-tile .hs { font-size: 12.5px; color: var(--muted); }
.hbadge {
  position: absolute; top: 10px; right: 10px; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; background: linear-gradient(135deg, var(--primary), #c23f63); color: #fff;
  font-size: 12px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(232,86,122,.5);
}
.hub-tile:first-child { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 14px; min-height: 0; }
.hub-tile:first-child .hi { font-size: 34px; }
.hub-tile:first-child .ht { margin-top: 0; }

/* ================= PERROQUET INSÉPARABLE ================= */
.pet-stage {
  position: relative; display: grid; place-items: center;
  padding: 18px 0 6px; overflow: hidden; border-radius: var(--radius);
}
.pet-aura {
  position: absolute; width: 260px; height: 260px; border-radius: 50%;
  filter: blur(38px); opacity: .5; z-index: 0; animation: auraPulse 4s var(--ease) infinite;
}
@keyframes auraPulse { 50% { transform: scale(1.12); opacity: .72; } }
.parrot-wrap { position: relative; z-index: 1; width: 210px; height: 232px; }
.parrot { width: 100%; height: 100%; transform-origin: 50% 90%; animation: petBob 3.2s var(--ease) infinite; }
@keyframes petBob { 0%,100% { transform: translateY(0) rotate(-1.2deg); } 50% { transform: translateY(-9px) rotate(1.2deg); } }
.parrot.sick { animation-duration: 5s; filter: saturate(.55) brightness(.92); }
.parrot.sad  { animation-duration: 4.4s; }
.p-eye { transform-box: fill-box; transform-origin: center; animation: petBlink 4.5s infinite; }
@keyframes petBlink { 0%,92%,100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
.p-wing { transform-box: fill-box; transform-origin: 82% 30%; animation: petFlap 3.2s var(--ease) infinite; }
@keyframes petFlap { 0%,72%,100% { transform: rotate(0); } 84% { transform: rotate(-13deg); } }
.pet-accessory {
  position: absolute; top: 6px; right: 20px; font-size: 30px; z-index: 3;
  animation: floatEmoji 2.6s var(--ease) infinite; filter: drop-shadow(0 3px 6px rgba(0,0,0,.4));
}
@keyframes floatEmoji { 0%,100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-8px) rotate(6deg); } }
.pet-bubble {
  position: relative; margin: 2px auto 12px; max-width: 300px; text-align: center;
  background: var(--card-2); border: 1px solid var(--hairline); border-radius: 16px;
  padding: 11px 14px; font-weight: 600; box-shadow: var(--shadow); animation: rise .4s var(--ease) both;
}
.pet-bubble::after { content: ''; position: absolute; top: -8px; left: 50%; transform: translateX(-50%) rotate(45deg);
  width: 14px; height: 14px; background: var(--card-2); border-left: 1px solid var(--hairline); border-top: 1px solid var(--hairline); }
.pet-name { font-size: 22px; font-weight: 800; text-align: center; letter-spacing: -.3px; }
.pet-name button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 15px; }

.statgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 6px 0 4px; }
.statline .lab { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; font-weight: 600; }
.statline .bar { height: 10px; border-radius: 99px; background: rgba(255,255,255,.09); overflow: hidden; }
.statline .bar > span { display: block; height: 100%; border-radius: 99px; transition: width .6s var(--ease); }
.bar.food > span { background: linear-gradient(90deg,#ffb454,#ff8a3d); }
.bar.clean > span { background: linear-gradient(90deg,#4fd0f7,#4f8ff7); }
.bar.happy > span { background: linear-gradient(90deg,#ff6f91,#e8567a); }
.bar.water > span { background: linear-gradient(90deg,#5ee0c8,#37d399); }
.bar.low > span { background: linear-gradient(90deg,#ff6b6b,#c23f3f) !important; }

.pet-actions { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin: 4px 0; }
.pet-act { position: relative; border: 1px solid var(--hairline); background: var(--glass); border-radius: 15px;
  padding: 12px 4px 8px; text-align: center; cursor: pointer; transition: transform .18s var(--spring), background .2s; }
.pet-act:active { transform: scale(.93); }
.pet-act .ic { font-size: 26px; display: block; }
.pet-act .lb { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.pet-act.cool { opacity: .5; }
.pet-act .cd { font-size: 10px; color: var(--warn); font-weight: 700; }

.pet-particle { position: absolute; z-index: 5; font-size: 24px; pointer-events: none; will-change: transform, opacity;
  animation: petParticle 1.1s ease-out forwards; }
@keyframes petParticle { to { transform: translateY(-90px) scale(1.3) rotate(var(--r,20deg)); opacity: 0; } }

.pet-feed-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.pet-feed-item:last-child { border-bottom: 0; }
.pet-feed-item .pic { font-size: 20px; }
.pet-feed-item .note { color: var(--muted); font-style: italic; font-size: 13.5px; margin-top: 2px; }

/* Carte perroquet sur l'accueil */
.pet-home { display: flex; align-items: center; gap: 14px; }
.pet-home .mini { font-size: 40px; animation: petBob 3.2s var(--ease) infinite; }

/* ---- Connexion / hors-ligne ---- */
.conn-pill {
  position: fixed; left: 50%; transform: translateX(-50%);
  top: calc(var(--appbar-h) + env(safe-area-inset-top) + 8px); z-index: 55;
  padding: 7px 15px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  box-shadow: var(--shadow); animation: toastIn .35s var(--spring); white-space: nowrap;
}
.conn-pill.off { background: rgba(58,35,48,.95); color: #ffd0d9; border: 1px solid var(--bad); }
.conn-pill.sync { background: rgba(34,49,79,.95); color: #cfe0ff; border: 1px solid var(--accent); }

/* ---- Countdown big number ---- */
.count-num { font-size: 78px; font-weight: 800; animation: pop .5s var(--spring); }

/* ---- Bouton retour (appbar, en haut à gauche) ---- */
.appbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto; padding: 0;
  display: grid; place-items: center; cursor: pointer; color: var(--text);
  background: var(--glass); border: 1px solid var(--hairline);
  transition: transform .2s var(--spring), background .2s var(--ease);
  animation: fadeInLeft .3s var(--ease);
}
.icon-btn:active { transform: scale(.88); }
.icon-btn:hover { background: rgba(255,255,255,.12); }
@keyframes fadeInLeft { from { opacity: 0; transform: translateX(-8px); } }
/* Le bouton retour de l'appbar remplace les anciens liens texte « retour menu ». */
#back-hub, #back, #loc-back, #gal-back, #ch-back,
#chh-back, #msg-back, #pet-back, #p-back { display: none !important; }

/* ---- « Je pense à toi » ---- */
.think-btn {
  background: linear-gradient(135deg, #ff7eb3, #e8567a); color: #fff;
  box-shadow: 0 10px 26px rgba(232,86,122,.4); margin: 2px 0 6px;
}
.think-btn:hover { filter: brightness(1.06); }
.heart-burst { position: fixed; inset: 0; z-index: 190; pointer-events: none; overflow: hidden; }
.heart-burst span {
  position: absolute; bottom: -50px; will-change: transform, opacity;
  animation: heartFloat 2.6s var(--ease) forwards;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.3));
}
@keyframes heartFloat {
  0% { transform: translateY(0) scale(.5) rotate(0); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translateY(-112vh) scale(1.15) rotate(24deg); opacity: 0; }
}

/* ---- Compte à rebours des retrouvailles ---- */
.reunion { margin-top: 6px; }
.reunion-empty {
  width: 100%; padding: 15px; border-radius: 15px; cursor: pointer; font-weight: 700; font-size: 15px;
  color: var(--text); background: var(--glass); border: 1px dashed rgba(255,255,255,.22);
  transition: transform .18s var(--spring), background .2s;
}
.reunion-empty:active { transform: scale(.97); }
.reunion-card-in {
  text-align: center; padding: 18px 16px; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(58,33,64,.7), rgba(42,35,80,.7));
  border: 1px solid var(--hairline); box-shadow: var(--shadow); backdrop-filter: blur(12px);
}
.reunion-lab { font-size: 13px; color: var(--muted); font-weight: 700; margin-bottom: 10px; }
.reunion-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.reunion-grid .rc { background: rgba(0,0,0,.22); border-radius: 13px; padding: 10px 4px; }
.reunion-grid .rc b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.reunion-grid .rc span { font-size: 11px; color: var(--muted); font-weight: 700; }
.reunion-big { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.reunion-city { margin-top: 10px; font-size: 14px; font-weight: 700; color: var(--text); }
.reunion-card-in .link { margin-top: 6px; }

/* ---- QCM : explication / retour immédiat ---- */
.exp-box { margin-top: 14px; padding: 13px 15px; border-radius: 14px; font-size: 14.5px;
  border: 1px solid var(--hairline); animation: rise .3s var(--ease) both; }
.exp-box.good { background: rgba(55,211,153,.12); border-color: rgba(55,211,153,.42); }
.exp-box.bad { background: rgba(255,107,107,.12); border-color: rgba(255,107,107,.42); }
.exp-box .exp-head { font-weight: 800; margin-bottom: 4px; }
.exp-box.good .exp-head { color: var(--good); }
.exp-box.bad .exp-head { color: var(--bad); }
.exp-box .exp-txt { color: var(--text); font-weight: 500; line-height: 1.4; }

/* ---- Bucket list commune ---- */
.bucket-item { display: flex; align-items: flex-start; gap: 10px; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.bucket-item:last-child { border-bottom: 0; }
.bucket-item.done .bk-title { text-decoration: line-through; opacity: .55; }
.bk-check { flex: 0 0 auto; background: none; border: 0; font-size: 22px; cursor: pointer; padding: 0; line-height: 1;
  transition: transform .18s var(--spring); }
.bk-check:active { transform: scale(.8); }
.bk-body { flex: 1 1 auto; min-width: 0; }
.bk-title { font-weight: 700; font-size: 15px; word-break: break-word; }
.bk-note { color: var(--muted); font-size: 13px; margin-top: 2px; word-break: break-word; }
.bk-new { display: inline-block; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent)); padding: 2px 7px; border-radius: 999px; vertical-align: middle; }
.bk-del { flex: 0 0 auto; background: none; border: 0; color: var(--muted); font-size: 15px; cursor: pointer; padding: 2px 4px; }
.bk-del:hover { color: var(--bad); }

/* ---- Mood tracker ---- */
.mood-head { display: flex; justify-content: space-between; align-items: baseline; }
.mood-head span { font-size: 12px; }
.mood-emoji-big { font-size: 66px; text-align: center; margin: 6px 0; animation: pop .5s var(--spring); }
.mood-bar { height: 12px; border-radius: 99px; background: rgba(255,255,255,.09); overflow: hidden; margin: 6px 0 4px; }
.mood-bar > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--good)); transition: width .5s var(--ease); }
.mood-photo { width: 100%; border-radius: 14px; margin-top: 10px; display: block; box-shadow: var(--shadow); }
.mood-note { font-style: italic; color: var(--text); text-align: center; margin: 10px 0 0; }
.mood-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 6px; }
.mood-opt { font-size: 30px; padding: 8px 0; border-radius: 14px; cursor: pointer;
  background: var(--glass); border: 1px solid var(--hairline); transition: transform .18s var(--spring), border-color .2s, background .2s; }
.mood-opt:active { transform: scale(.9); }
.mood-opt.active { border-color: var(--primary); background: rgba(232,86,122,.18); transform: scale(1.06); box-shadow: 0 6px 16px rgba(232,86,122,.3); }
.mood-range { -webkit-appearance: none; appearance: none; height: 10px; border-radius: 99px; padding: 0;
  background: linear-gradient(90deg, var(--accent), var(--good)); }
.mood-range::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; box-shadow: 0 3px 10px rgba(0,0,0,.5); cursor: pointer; }
.mood-range::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 3px 10px rgba(0,0,0,.5); cursor: pointer; }
.mood-photo-row #mood-photo-prev { margin-top: 8px; }

/* ---- Jeux à deux ---- */
.games-intro { margin: 0 2px 14px; }
.game-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.game-tile { position: relative; overflow: hidden; border: 0; cursor: pointer; color: #fff;
  border-radius: var(--radius); padding: 18px 14px 16px; min-height: 132px; text-align: left;
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  box-shadow: 0 8px 22px rgba(0,0,0,.35); transition: transform .18s var(--spring), box-shadow .2s; }
.game-tile:active { transform: scale(.96); box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.gt-shine { position: absolute; inset: 0; background: radial-gradient(120% 80% at 85% -10%, rgba(255,255,255,.35), transparent 60%); pointer-events: none; }
.gt-icon { font-size: 40px; line-height: 1; filter: drop-shadow(0 3px 6px rgba(0,0,0,.3)); }
.gt-name { font-size: 18px; font-weight: 800; margin-top: 6px; }
.gt-sub { font-size: 12.5px; font-weight: 600; opacity: .9; }
.gt-solo { margin-top: auto; font-size: 11px; font-weight: 700; background: rgba(255,255,255,.22);
  padding: 3px 9px; border-radius: 999px; align-self: flex-start; backdrop-filter: blur(2px); }
.gt-morpion { background: linear-gradient(150deg, #7c5cff, #5b3ee8); }
.gt-p4 { background: linear-gradient(150deg, #ff8a5b, #e33b6d); }
.gt-uno { background: linear-gradient(150deg, #2fbf71, #1f9d8f); }
.gt-picto { background: linear-gradient(150deg, #ffb454, #f5825b); }
.logout-btn { color: var(--bad); border-color: rgba(233,59,59,.35); }
.logout-btn:active { background: rgba(233,59,59,.12); }

/* Tuile duels (historique des gains) dans la section QCM */
.score-tile { padding: 14px 16px; }
.sc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.sc-title { font-weight: 800; font-size: 15px; }
.sc-tally { font-size: 14px; font-weight: 600; }
.sc-tally .sc-n { display: inline-block; min-width: 20px; text-align: center; font-weight: 800; }
.sc-leader { margin: 6px 0 8px; font-size: 13px; font-weight: 700; color: var(--accent); }
.sc-list { display: flex; flex-direction: column; gap: 4px; }
.sc-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 10px; background: var(--glass); border: 1px solid var(--hairline); font-size: 13.5px; }
.sc-row.win { border-color: rgba(55,211,153,.4); background: rgba(55,211,153,.10); }
.sc-row.loss { border-color: rgba(233,59,59,.30); background: rgba(233,59,59,.08); }
.sc-row .sc-th { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-row .sc-sc { font-variant-numeric: tabular-nums; font-weight: 700; opacity: .85; }
.sc-toggle { display: block; margin: 8px auto 0; font-size: 13px; }
.game-players { display: flex; gap: 10px; margin-bottom: 10px; }
.game-players .gp { flex: 1; text-align: center; padding: 10px; border-radius: 14px; font-weight: 700;
  background: var(--card-2); border: 1px solid var(--hairline); transition: border-color .25s, box-shadow .25s; }
.game-players .gp.active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(232,86,122,.18); }
.game-banner { text-align: center; font-weight: 800; font-size: 17px; margin-bottom: 14px;
  padding: 10px; border-radius: 13px; background: var(--glass); border: 1px solid var(--hairline); animation: pop .4s var(--spring); }
.game-banner.good { color: var(--good); border-color: rgba(55,211,153,.4); background: rgba(55,211,153,.12); }

/* Morpion */
.mp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 340px; margin: 0 auto; }
.mp-cell { aspect-ratio: 1; border-radius: 18px; border: 1px solid var(--hairline);
  background: linear-gradient(180deg, rgba(38,44,71,.6), rgba(29,34,56,.8));
  font-size: 46px; line-height: 1; cursor: pointer; display: grid; place-items: center;
  transition: transform .15s var(--spring), background .2s, box-shadow .25s; }
.mp-cell:not(:disabled):hover { background: rgba(79,143,247,.16); }
.mp-cell:not(:disabled):active { transform: scale(.94); }
.mp-cell:disabled { cursor: default; }
.mp-cell.win { background: rgba(55,211,153,.22); border-color: var(--good); box-shadow: 0 0 0 3px rgba(55,211,153,.3); animation: pop .5s var(--spring); }

/* Puissance 4 */
.p4 { max-width: 380px; margin: 0 auto; }
.p4-cols { display: grid; gap: 6px; margin-bottom: 6px; }
.p4-drop { padding: 6px 0; border-radius: 10px; border: 0; cursor: pointer; font-size: 18px; font-weight: 800;
  background: var(--card-2); color: var(--accent); transition: transform .15s var(--spring), background .2s; }
.p4-drop:not(:disabled):hover { background: rgba(79,143,247,.2); }
.p4-drop:not(:disabled):active { transform: translateY(2px); }
.p4-drop:disabled { opacity: .3; cursor: default; }
.p4-grid { display: grid; gap: 6px; padding: 10px; border-radius: 18px;
  background: linear-gradient(180deg, #2f5fd8, #274db0); box-shadow: var(--shadow); }
.p4-cell { aspect-ratio: 1; border-radius: 50%; background: rgba(10,12,22,.55); display: grid; place-items: center; cursor: pointer; transition: background .15s var(--ease); }
.p4-cell:active { background: rgba(79,143,247,.25); }
.p4-cell.win { box-shadow: 0 0 0 3px var(--good), 0 0 14px rgba(55,211,153,.6); }
.p4-disc { width: 84%; height: 84%; border-radius: 50%; display: block; transition: transform .2s var(--spring); }
.p4-disc.empty { background: transparent; box-shadow: inset 0 2px 6px rgba(0,0,0,.4); }
.p4-disc.s0 { background: radial-gradient(circle at 35% 30%, #ff8a8a, #e33b3b); box-shadow: inset 0 -3px 6px rgba(0,0,0,.35); }
.p4-disc.s1 { background: radial-gradient(circle at 35% 30%, #ffe07a, #f5c518); box-shadow: inset 0 -3px 6px rgba(0,0,0,.35); }
/* Chute du jeton dans la colonne choisie (distance = nb de cases via --drop). */
.p4-disc.dropping { animation: p4drop .42s cubic-bezier(.34,.6,.4,1); }
@keyframes p4drop {
  0% { transform: translateY(calc(var(--drop, 1) * -128%)); }
  72% { transform: translateY(0); }
  84% { transform: translateY(-9%); }
  100% { transform: translateY(0); }
}
/* Apparition du symbole morpion sur la case jouée. */
.mp-mark { display: inline-block; }
.mp-mark.pop { animation: mpPop .32s var(--spring); }
@keyframes mpPop { 0% { transform: scale(0) rotate(-35deg); opacity: 0; } 60% { transform: scale(1.18) rotate(4deg); } 100% { transform: scale(1) rotate(0); opacity: 1; } }

/* ---- Pictionary ---- */
.picto-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.picto-sc { font-size: 13px; font-weight: 600; }
.picto-word { text-align: center; font-size: 16px; font-weight: 700; margin-bottom: 10px;
  padding: 10px; border-radius: 13px; background: var(--glass); border: 1px solid var(--hairline); }
.picto-word b { color: var(--primary); letter-spacing: .3px; }
.picto-canvas { width: 100%; aspect-ratio: 4 / 3; background: #fff; border-radius: 16px;
  box-shadow: var(--shadow); border: 1px solid var(--hairline); touch-action: none; display: block; cursor: crosshair; }
.picto-tools { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 12px 0; flex-wrap: wrap; }
.pt-color { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); cursor: pointer;
  transition: transform .18s var(--spring); padding: 0; }
.pt-color.active { transform: scale(1.22); border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.25); }
.pt-btn { min-width: 44px; height: 40px; border-radius: 12px; border: 1px solid var(--hairline);
  background: var(--card-2); color: var(--text); font-size: 18px; cursor: pointer; padding: 0 10px;
  transition: transform .15s var(--spring), background .2s; }
.pt-btn:active { transform: scale(.9); }
.pt-btn.active { background: var(--primary); color: #fff; border-color: transparent; }
.picto-guessbar { position: static; margin: 12px 0; padding: 0; background: none; }
.picto-log { display: flex; flex-direction: column; gap: 4px; max-height: 140px; overflow-y: auto; margin: 6px 0 12px; }
.pg-line { font-size: 14px; padding: 6px 10px; border-radius: 10px; background: var(--glass); border: 1px solid var(--hairline); }
.pg-line.ok { background: rgba(55,211,153,.16); border-color: rgba(55,211,153,.4); font-weight: 700; }

/* ---- UNO ---- */
.uno-opp { text-align: center; margin-bottom: 10px; }
.uno-opp-name { display: inline-block; font-weight: 700; padding: 6px 12px; border-radius: 12px;
  background: var(--card-2); border: 1px solid var(--hairline); transition: border-color .25s, box-shadow .25s; }
.uno-opp-name.active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(232,86,122,.18); }
.uno-hand-back { display: flex; justify-content: center; gap: -14px; margin-top: 8px; min-height: 40px; }
.uno-hand-back .uno-back { width: 26px; height: 40px; margin-left: -12px; }
.uno-back { border-radius: 6px; background: repeating-linear-gradient(45deg, #2b2b3a, #2b2b3a 4px, #3a3a4f 4px, #3a3a4f 8px);
  border: 1.5px solid rgba(255,255,255,.5); box-shadow: var(--shadow); }
.uno-back.big { width: 46px; height: 70px; border-radius: 9px; }
.uno-mid { display: flex; align-items: center; justify-content: center; gap: 20px; margin: 6px 0 12px; }
.uno-pile { position: relative; }
.uno-active-dot { position: absolute; right: -6px; top: -6px; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid #fff; box-shadow: var(--shadow); }
.uno-draw { display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: 0;
  cursor: pointer; color: var(--text); font-weight: 700; transition: transform .15s var(--spring); }
.uno-draw:not(:disabled):active { transform: scale(.92); }
.uno-draw:disabled { opacity: .4; cursor: default; }
.uno-hand-label { text-align: center; font-size: 13px; font-weight: 700; color: var(--muted); margin: 6px 0; }
.uno-hand { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; padding: 4px 0 8px; }
.uno-card { width: 46px; height: 70px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(150deg, color-mix(in srgb, var(--uc) 88%, #fff 12%), var(--uc));
  border: 2px solid rgba(255,255,255,.85); box-shadow: 0 3px 8px rgba(0,0,0,.35);
  position: relative; transition: transform .15s var(--spring), box-shadow .2s; }
.uno-card::before { content: ''; position: absolute; inset: 5px; border-radius: 50%/34%;
  background: rgba(255,255,255,.22); }
.uno-card.c-w { background: conic-gradient(#e33b3b 0 25%, #f5b60a 0 50%, #37b24d 0 75%, #3b7de3 0 100%); }
.uno-val { position: relative; z-index: 1; font-size: 24px; font-weight: 900; color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.45); }
.uno-card.small { width: 34px; height: 52px; }
.uno-card.small .uno-val { font-size: 18px; }
.uno-hand .uno-card { cursor: default; }
.uno-hand .uno-card.playable { cursor: pointer; box-shadow: 0 0 0 3px var(--good), 0 4px 10px rgba(0,0,0,.4); transform: translateY(-4px); }
.uno-hand .uno-card.playable:active { transform: translateY(-4px) scale(.94); }
.uno-hand .uno-card.disabled { opacity: .5; }
.uno-picker { position: fixed; inset: 0; background: rgba(6,8,16,.6); display: grid; place-items: center; z-index: 60;
  backdrop-filter: blur(3px); animation: fadeIn .2s; }
.uno-picker[hidden] { display: none; }
.uno-picker-box { background: var(--card); border: 1px solid var(--hairline); border-radius: 18px; padding: 18px;
  text-align: center; box-shadow: var(--shadow); animation: pop .3s var(--spring); }
.uno-picker-box p { margin: 0 0 12px; font-weight: 700; }
.uno-picker-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.uno-pc { padding: 14px 18px; border-radius: 12px; border: 2px solid rgba(255,255,255,.4); color: #fff;
  font-weight: 800; cursor: pointer; transition: transform .15s var(--spring); }
.uno-pc:active { transform: scale(.93); }

/* ---- Météo & ambiance croisées ---- */
.wx-widget:empty { display: none; }
.wx-widget { margin: 2px 0 12px; }
.wx-cross { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---- Widget Question du jour ---- */
.qotd-widget:empty { display: none; }
.qotd-widget {
  margin: 2px 0 12px; padding: 14px 16px; border-radius: 18px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 20%, var(--card)), var(--card));
  border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent); box-shadow: var(--shadow);
}
.qotd-top { font-weight: 800; font-size: 12.5px; letter-spacing: .3px; text-transform: uppercase; color: var(--primary); }
.qotd-q { font-size: 16px; font-weight: 700; line-height: 1.35; margin: 6px 0 10px; }
.qotd-input {
  width: 100%; box-sizing: border-box; resize: none; border-radius: 12px;
  border: 1px solid var(--hairline); background: var(--bg); color: var(--text);
  padding: 10px 12px; font: inherit; font-size: 14px; margin-bottom: 8px;
}
.qotd-widget .btn.small { width: 100%; }
.qotd-ans { background: var(--card-2); border-radius: 12px; padding: 8px 12px; margin-bottom: 8px; }
.qotd-ans p { margin: 3px 0 0; font-size: 14px; line-height: 1.4; word-break: break-word; }
.qotd-who { font-size: 11.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
.qotd-ans.partner { border-left: 3px solid var(--primary); }
.qotd-reveal { animation: rise .4s var(--ease) both; }
.qotd-wait { font-size: 13px; color: var(--muted); margin: 4px 0 2px; }
.qotd-edit { font-size: 12.5px; }

/* ---- Widget actus du jour (FR + ES) ---- */
.news-widget:empty { display: none; }
.news-widget {
  margin: 2px 0 14px; padding: 12px 14px; border-radius: 18px;
  background: var(--card); border: 1px solid var(--hairline); box-shadow: var(--shadow);
}
.news-top { font-weight: 800; font-size: 13px; letter-spacing: .2px; color: var(--muted); margin-bottom: 8px; }
.news-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 430px) { .news-cols { grid-template-columns: 1fr; gap: 10px; } }
.news-h { font-weight: 800; font-size: 13px; margin-bottom: 6px; }
.news-item {
  display: block; font-size: 12.8px; line-height: 1.35; color: var(--text);
  text-decoration: none; padding: 6px 0; border-top: 1px solid var(--hairline);
}
.news-col .news-item:first-of-type { border-top: 0; }
.news-item:active { color: var(--primary); }

/* ---- Onglets segmentés (Nos envies) ---- */
.seg-tabs {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 12px;
  background: var(--glass); border: 1px solid var(--hairline); border-radius: 14px;
}
.seg-tabs button {
  flex: 1 1 0; border: 0; border-radius: 11px; padding: 9px 6px; cursor: pointer;
  background: transparent; color: var(--muted); font-weight: 700; font-size: 13px;
  transition: color .2s var(--ease), background .25s var(--spring);
}
.seg-tabs button.active { color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent)); box-shadow: 0 4px 14px rgba(232,86,122,.4); }

/* ---- Watchlist (style Netflix) ---- */
.watch-search { display: flex; gap: 8px; margin-bottom: 12px; }
.watch-q {
  flex: 1 1 auto; box-sizing: border-box; border-radius: 12px; border: 1px solid var(--hairline);
  background: var(--card); color: var(--text); padding: 11px 14px; font: inherit; font-size: 14px;
}
.watch-search .btn.small { flex: 0 0 auto; width: auto; padding: 0 16px; }
.watch-nokey { font-size: 13px; margin: 4px 0 12px; }
.watch-sec { font-size: 14px; margin: 16px 0 8px; color: var(--muted); }
.watch-grid { display: flex; flex-direction: column; gap: 12px; }
.watch-grid.dim .watch-card { opacity: .72; }
.watch-card {
  display: flex; gap: 12px; padding: 10px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--hairline); box-shadow: var(--shadow);
  animation: rise .35s var(--ease) both;
}
.watch-poster {
  position: relative; flex: 0 0 92px; width: 92px; aspect-ratio: 2/3; border-radius: 10px; overflow: hidden;
  background: var(--card-2); display: grid; place-items: center;
}
.watch-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.watch-noimg { font-size: 30px; }
.watch-rate {
  position: absolute; bottom: 4px; left: 4px; font-size: 10.5px; font-weight: 800; color: #fff;
  background: rgba(0,0,0,.6); padding: 1px 6px; border-radius: 999px;
}
.watch-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.watch-title { font-weight: 800; font-size: 15px; line-height: 1.25; }
.watch-year { color: var(--muted); font-weight: 600; font-size: 13px; }
.watch-ov {
  font-size: 12.5px; color: var(--muted); line-height: 1.4; margin: 4px 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.watch-meta { font-size: 11.5px; color: var(--muted); margin-top: auto; }
.watch-stars { display: flex; gap: 3px; margin: 6px 0; font-size: 18px; line-height: 1; }
.watch-stars .ws { color: var(--hairline); cursor: pointer; transition: transform .15s var(--spring); }
.watch-stars .ws.on { color: #f5b301; }
.watch-stars .ws:active { transform: scale(1.3); }
.watch-actions { display: flex; gap: 8px; }
.watch-actions .btn.small { width: auto; flex: 1 1 auto; }
.watch-actions .btn.small.danger { flex: 0 0 auto; }

/* Résultats de recherche TMDB */
.wr-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.wr-card {
  display: flex; gap: 10px; padding: 8px; border-radius: 14px;
  background: var(--card-2); border: 1px solid var(--hairline); animation: rise .3s var(--ease) both;
}
.wr-poster {
  flex: 0 0 62px; width: 62px; aspect-ratio: 2/3; border-radius: 8px; overflow: hidden;
  background: var(--card); display: grid; place-items: center; font-size: 22px;
}
.wr-poster img { width: 100%; height: 100%; object-fit: cover; }
.wr-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.wr-info .btn.small { width: auto; align-self: flex-start; margin-top: 2px; }
.wr-kind { font-size: 12px; }
.wr-close { display: block; margin: 2px auto 8px; }

/* ---- Carte des souvenirs (photos géolocalisées, style Apple Plans) ---- */
.photo-map { height: calc(100dvh - 210px); min-height: 300px; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.map-status { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  min-height: 26px; margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.ms-dist { color: var(--text); }
.ms-live { color: var(--muted); font-weight: 700; }
.ms-live.on { color: var(--good, #37d399); }
.map-live { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 10px 2px 0; font-size: 14px; font-weight: 600; }
/* Marqueurs de position (moi / partenaire) */
.loc-pin-wrap { background: none !important; border: 0 !important; }
.loc-pin { width: 38px; height: 38px; border-radius: 50%; border: 3px solid #fff; overflow: hidden;
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,.4); background: var(--accent); }
.loc-pin img { width: 100%; height: 100%; object-fit: cover; }
.loc-pin.me { background: linear-gradient(135deg, var(--accent), #4f8ff7); }
.loc-pin.partner { background: linear-gradient(135deg, var(--primary), #e8567a); animation: locPulse 2s ease-in-out infinite; }
@keyframes locPulse { 0%,100% { box-shadow: 0 4px 12px rgba(0,0,0,.4), 0 0 0 0 rgba(232,86,122,.5); } 50% { box-shadow: 0 4px 12px rgba(0,0,0,.4), 0 0 0 10px rgba(232,86,122,0); } }
.photo-map .leaflet-container { background: var(--card-2); font: inherit; }
.photo-map .leaflet-control-attribution { font-size: 9px; background: rgba(255,255,255,.7); }
.photo-pin-wrap { background: none !important; border: 0 !important; }
.photo-pin { position: relative; width: 52px; height: 52px; }
.pp-thumb { width: 52px; height: 52px; box-sizing: border-box; border-radius: 15px; overflow: hidden;
  border: 3px solid #fff; box-shadow: 0 5px 14px rgba(0,0,0,.45); background: var(--card-2); }
.pp-thumb img, .pp-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-pin::after { content: ''; position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%);
  width: 0; height: 0; border: 7px solid transparent; border-top-color: #fff; filter: drop-shadow(0 2px 1px rgba(0,0,0,.25)); }
.pin-count { position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 800;
  line-height: 20px; text-align: center; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.photo-pin-wrap:active .pp-thumb { transform: scale(.92); }

/* Petite fenêtre « photos de ce lieu » */
.pp-sheet { display: grid; place-items: end center; }
.pp-card { width: 100%; max-width: 520px; max-height: 78vh; overflow-y: auto;
  background: var(--card); border: 1px solid var(--hairline); border-radius: 22px 22px 0 0;
  padding: 14px 14px calc(16px + env(safe-area-inset-bottom)); box-shadow: 0 -12px 40px rgba(0,0,0,.5);
  animation: sheetUp .32s var(--spring); }
.pp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.pp-title { font-weight: 800; font-size: 17px; line-height: 1.2; }
.pp-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.pp-close { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; border: 0;
  background: var(--card-2); color: var(--muted); font-size: 14px; cursor: pointer; }
.pp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pp-cell { position: relative; aspect-ratio: 1; border: 0; padding: 0; border-radius: 12px; overflow: hidden;
  cursor: pointer; background: var(--card-2); }
.pp-cell img, .pp-cell video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-cell:active { transform: scale(.95); }

/* Restaurants / bars */
.place-emoji {
  flex: 0 0 92px; width: 92px; aspect-ratio: 2/3; border-radius: 10px;
  display: grid; place-items: center; font-size: 40px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--card-2)), var(--card-2));
}
.place-emoji-sm { font-size: 26px; }
.place-cat { font-size: 12px; color: var(--muted); text-transform: capitalize; margin-top: 1px; }
.place-photo { position: relative; flex: 0 0 92px; width: 92px; aspect-ratio: 2/3; border-radius: 10px;
  overflow: hidden; background: var(--card-2); }
.place-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.place-badge { position: absolute; bottom: 4px; left: 4px; font-size: 15px; line-height: 1;
  background: rgba(0,0,0,.55); border-radius: 8px; padding: 3px 5px; }
.wx-panel {
  position: relative; overflow: hidden; border-radius: var(--radius); padding: 14px 12px;
  min-height: 132px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 1px solid var(--hairline); box-shadow: var(--shadow); color: #fff; text-align: center;
}
.wx-head { position: absolute; top: 10px; left: 0; right: 0; padding: 0 12px; display: flex;
  flex-direction: column; align-items: center; gap: 1px; z-index: 2; }
.wx-name { font-weight: 800; font-size: 14px; text-shadow: 0 1px 4px rgba(0,0,0,.4); }
.wx-city { font-size: 11px; opacity: .85; text-shadow: 0 1px 4px rgba(0,0,0,.4); }
.wx-emoji { font-size: 42px; line-height: 1; margin-top: 14px; z-index: 2; filter: drop-shadow(0 3px 6px rgba(0,0,0,.3)); }
.wx-temp { font-size: 30px; font-weight: 800; letter-spacing: -1px; z-index: 2; text-shadow: 0 2px 6px rgba(0,0,0,.35); }
.wx-desc { font-size: 12px; font-weight: 600; opacity: .95; z-index: 2; text-shadow: 0 1px 4px rgba(0,0,0,.4); }
/* Ciels */
.sky-clear-day   { background: linear-gradient(160deg, #4aa3ff 0%, #7ec8ff 60%, #bfe4ff 100%); }
.sky-clear-night { background: linear-gradient(160deg, #0b1638 0%, #1c2a5e 70%, #2a3a75 100%); }
.sky-cloud       { background: linear-gradient(160deg, #6b7590 0%, #8b93ab 100%); }
.sky-rain        { background: linear-gradient(160deg, #3a4a63 0%, #55637d 100%); }
.sky-snow        { background: linear-gradient(160deg, #8aa0c0 0%, #c3d3e8 100%); color: #16233c; }
.sky-snow .wx-name, .sky-snow .wx-city, .sky-snow .wx-temp, .sky-snow .wx-desc { text-shadow: none; }
.sky-fog         { background: linear-gradient(160deg, #7d8798 0%, #a7afbd 100%); }
.sky-thunder     { background: linear-gradient(160deg, #2a2540 0%, #4a3f6b 100%); }
/* Soleil rayonnant (jour dégagé) */
.sky-clear-day::before { content: ''; position: absolute; top: -30px; right: -30px; width: 110px; height: 110px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255,241,170,.95), rgba(255,241,170,0) 70%); }
/* Effets pluie / étoiles */
.wx-fx { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.wx-rain { background-image:
  repeating-linear-gradient(115deg, transparent 0 7px, rgba(255,255,255,.28) 7px 8px);
  background-size: 26px 26px; animation: wxRain .6s linear infinite; opacity: .6; }
@keyframes wxRain { to { background-position: -13px 26px; } }
.wx-stars { background-image:
  radial-gradient(1.4px 1.4px at 20% 30%, #fff, transparent),
  radial-gradient(1.4px 1.4px at 70% 25%, #fff, transparent),
  radial-gradient(1.2px 1.2px at 45% 60%, #fff, transparent),
  radial-gradient(1.2px 1.2px at 82% 55%, #fff, transparent),
  radial-gradient(1.2px 1.2px at 30% 75%, #fff, transparent);
  animation: wxTwinkle 3s ease-in-out infinite; }
@keyframes wxTwinkle { 50% { opacity: .5; } }

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::after, *::before { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .05s !important; }
  .bg-orbs span { animation: none; }
}

/* ======================= MUSIQUE 🎵 ======================= */
.music-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.music-together { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.music-peer { min-height: 20px; font-size: 13px; margin: 2px 2px 10px; }
.mu-live { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.mu-live.on { color: var(--good); font-weight: 600; }
.yt-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; margin-bottom: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.yt-wrap.hidden { display: none; }
.yt-wrap iframe, .yt-wrap #yt-player { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-now { min-height: 20px; font-size: 14px; margin: 0 2px 10px; }
.music-add { margin: 6px 0 10px; }
.music-add input { width: 100%; box-sizing: border-box; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line, rgba(128,128,128,.25)); background: var(--card); color: var(--text); font-size: 15px; }
.music-add-btns { display: flex; gap: 8px; margin-top: 8px; }
.music-add-btns .btn { flex: 1; }
.music-sec { margin: 14px 2px 8px; font-size: 15px; }
.music-results { display: flex; flex-direction: column; gap: 6px; }
.music-res-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 2px; font-size: 13px; }
.mu-res, .mu-row { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 14px; padding: 8px; }
.mu-res .mu-add { flex: 0 0 auto; }
.music-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.mu-row { justify-content: space-between; }
.mu-row.playing { outline: 2px solid var(--primary); }
.mu-main { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; cursor: pointer; }
.mu-thumb { position: relative; width: 64px; height: 44px; flex: 0 0 auto; border-radius: 8px; overflow: hidden; background: #0002; }
.mu-thumb img, .mu-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.mu-eq { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.35); color: #fff; font-size: 18px; }
.mu-meta { min-width: 0; flex: 1; }
.mu-title { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mu-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mu-del { flex: 0 0 auto; background: none; border: 0; font-size: 16px; padding: 6px; cursor: pointer; opacity: .7; }
.mu-del:active { opacity: 1; }

/* Spotify « en écoute en direct » */
.spotify-block { margin: 2px 0 10px; }
.sp-card { background: linear-gradient(135deg, rgba(29,185,84,.14), rgba(29,185,84,.04)); border: 1px solid rgba(29,185,84,.3); border-radius: 16px; padding: 12px; }
.sp-now { min-height: 44px; display: flex; align-items: center; }
.sp-track { display: flex; align-items: center; gap: 12px; width: 100%; }
.sp-cover { width: 52px; height: 52px; flex: 0 0 auto; border-radius: 8px; object-fit: cover; background: #0002; }
.sp-meta { min-width: 0; flex: 1; }
.sp-head { font-size: 12px; }
.sp-title { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-artist { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-open { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #1DB954; color: #fff; text-decoration: none; font-size: 14px; }
.sp-foot { margin-top: 8px; text-align: center; font-size: 13px; }
.sp-btn { background: #1DB954 !important; color: #fff !important; border: 0 !important; }

/* Première connexion sécurisée */
.setup-wrap { max-width: 440px; margin: 0 auto; padding: 18px 14px 40px; }
.setup-wrap .heart { text-align: center; font-size: 44px; }
.setup-step { background: var(--card); border-radius: 16px; padding: 14px; margin: 12px 0; border: 1px solid var(--line, rgba(128,128,128,.2)); }
.setup-step.done { border-color: var(--good); background: linear-gradient(180deg, rgba(60,190,120,.08), transparent); }
.ss-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 15px; }
.ss-num { width: 26px; height: 26px; flex: 0 0 auto; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.setup-step.done .ss-num { background: var(--good); }
.setup-step input { width: 100%; box-sizing: border-box; padding: 12px 14px; margin: 6px 0; border-radius: 12px; border: 1px solid var(--line, rgba(128,128,128,.25)); background: var(--bg); color: var(--text); font-size: 15px; }
.pw-rules { list-style: none; padding: 0; margin: 8px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; font-size: 12.5px; }
.pw-rules li.ok { color: var(--good); }
.pw-rules li.ko { color: var(--muted); }
.btn.big { width: 100%; padding: 14px; font-size: 16px; margin-top: 6px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
