/* ===================================================================
   Le mot de la semaine — design chaleureux, 1 écran. Accent = couleur
   de la personne (--accent).
   =================================================================== */
:root {
  --accent: #7c3aed;
  --bg: #f5f3ef;
  --card: #ffffff;
  --ink: #25262b;
  --muted: #74747f;
  --line: #e9e7e2;
  --radius: 20px;
  --shadow: 0 8px 26px rgba(30, 25, 50, 0.09);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--ink);
  padding: 0 16px calc(28px + env(safe-area-inset-bottom));
}
#app { max-width: 560px; margin: 0 auto; }

/* En-tête */
.head { padding-top: 22px; }
.kicker { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.title { font-size: 26px; font-weight: 800; margin: 4px 0 8px; letter-spacing: -0.02em; }
.whoami { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.whoami .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); }
.switch { margin-left: auto; border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 10px; padding: 5px 10px; font-size: 12px; cursor: pointer; }

/* État « fait » */
.state { display: flex; align-items: center; gap: 10px; margin: 16px 0; padding: 12px 15px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--muted); }
.state-ic { font-size: 18px; }
.state.done { color: #fff; background: var(--accent); border-color: var(--accent); }

/* Zone d'enregistrement */
.rec { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 18px; box-shadow: var(--shadow); text-align: center; }
.rec-btn { width: 100%; border: 0; border-radius: 16px; padding: 22px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; color: #fff; font-weight: 700; }
.rec-btn.idle { background: var(--accent); }
.rec-btn.idle:active { transform: scale(0.98); }
.rec-ic { font-size: 34px; }
.rec-lbl { font-size: 16px; }
.rec-btn.recording { background: #dc2626; animation: pulse 1.3s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(220,38,38,0.5); } 50% { box-shadow: 0 0 0 14px rgba(220,38,38,0); } }
.rec-timer { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rec-hint { font-size: 13px; opacity: 0.85; font-weight: 600; }
.rec-msg { color: var(--muted); font-size: 14px; line-height: 1.4; }
.player { width: 100%; margin-bottom: 14px; }
.rec-actions { display: flex; gap: 10px; }
.btn { flex: 1; border: 0; border-radius: 13px; padding: 14px; font-size: 15px; font-weight: 700; cursor: pointer; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.ghost { background: #efede9; color: var(--ink); }
.btn:disabled { opacity: 0.55; }

/* Liste des mémos */
.h2 { font-size: 15px; font-weight: 700; margin: 22px 4px 10px; }
.memos { display: flex; flex-direction: column; gap: 9px; }
.memo { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 13px; }
.memo-play { border: 0; background: color-mix(in srgb, var(--accent) 14%, white); color: var(--accent); width: 40px; height: 40px; border-radius: 50%; font-size: 15px; cursor: pointer; }
.memo-mid { flex: 1; }
.memo-when { font-size: 14px; font-weight: 600; }
.memo-dur { font-size: 12.5px; color: var(--muted); }
.memo-del { border: 0; background: none; color: #c0c0cc; font-size: 17px; cursor: pointer; }

.foot { color: var(--muted); font-size: 12.5px; line-height: 1.45; margin: 22px 4px 0; text-align: center; }

/* Sélecteur de profil */
.picker { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: flex; flex-direction: column; justify-content: center; padding: 24px; gap: 18px; }
.picker-title { font-size: 24px; font-weight: 800; text-align: center; }
.picker-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; max-width: 420px; margin: 0 auto; width: 100%; }
.picker-tile { border: 0; border-radius: 18px; padding: 26px 10px; font-size: 18px; font-weight: 800; color: #fff; cursor: pointer; background: var(--c); box-shadow: var(--shadow); }
.picker-tile:active { transform: scale(0.97); }
.picker-cancel { border: 0; background: none; color: var(--muted); font-size: 14px; cursor: pointer; }

/* Bannière push */
.push-banner { position: fixed; left: 14px; right: 14px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 40; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 13px 15px; box-shadow: 0 12px 32px rgba(0,0,0,0.16); display: flex; align-items: center; gap: 12px; max-width: 540px; margin: 0 auto; }
.push-tx { flex: 1; font-size: 14px; font-weight: 600; }
.push-actions { display: flex; gap: 8px; }
.push-btn { border: 0; border-radius: 11px; padding: 9px 13px; font-size: 13px; font-weight: 700; cursor: pointer; }
.push-btn.ghost { background: #efede9; color: var(--muted); }
.push-btn.primary { background: var(--accent); color: #fff; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none; background: #25262b; color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; transition: all 0.25s ease; z-index: 60; max-width: 90%; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.loader { text-align: center; color: var(--muted); padding: 60px 0; }
.loader.hidden { display: none; }

@media (prefers-color-scheme: dark) {
  :root { --bg: #16161d; --card: #20212b; --ink: #ececf2; --muted: #9a9aab; --line: #2d2d3a; --shadow: 0 8px 26px rgba(0,0,0,0.4); }
  .btn.ghost, .push-btn.ghost { background: #2c2c38; }
  .memo-del { color: #55556a; }
}
