/* Styles communs de LetsAddUp (appli et page publique). Couleurs neutres provisoires : la palette définitive
   sera choisie par Thibaut parmi des propositions. */
:root {
  --fond: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #efede8;
  --bord: #e2dfd8;
  --texte: #1d1c1a;
  --texte-2: #6b6862;
  --accent: #1d1c1a;
  --sur-accent: #ffffff;
  --danger: #b3261e;
  --succes: #2f7d4f;
  --rayon: 14px;
  --ombre: 0 1px 2px rgba(0, 0, 0, 0.06), 0 2px 10px rgba(0, 0, 0, 0.05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fond: #161615;
    --surface: #222120;
    --surface-2: #2c2b29;
    --bord: #3a3936;
    --texte: #f1efea;
    --texte-2: #a8a49c;
    --accent: #f1efea;
    --sur-accent: #161615;
    --danger: #f2b8b5;
    --succes: #8fd3a8;
    --ombre: none;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  background: var(--fond);
  color: var(--texte);
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}
button, input, textarea { font: inherit; color: inherit; }
.ic { width: 20px; height: 20px; flex: none; }

/* Icône de réseau : pastille ronde aux couleurs de la marque. */
.icr {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--marque); color: #fff;
}
.icr svg { width: 22px; height: 22px; fill: currentColor; }
.icr.neutre { background: var(--surface-2); color: var(--texte); }
.icr.neutre .ic { width: 20px; height: 20px; fill: none; }
/* Marques claires : logo foncé. */
.icr[style*="#FFFC00"], .icr[style*="#FFCD00"], .icr[style*="#53FC19"] { color: #111; }
/* Marques noires : un léger bord en mode sombre. */
@media (prefers-color-scheme: dark) {
  .icr[style*="#000000"], .icr[style*="#181717"], .icr[style*="#191C1F"] { box-shadow: inset 0 0 0 1px #555; }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 14px; border-radius: 12px; border: 0;
  background: var(--surface-2); color: var(--texte);
  font-weight: 600; cursor: pointer; text-decoration: none;
  transition: transform 0.12s ease, opacity 0.2s ease, background 0.2s ease;
  min-width: 0;
}
.btn > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn:active { transform: scale(0.97); }
.btn.principal { background: var(--accent); color: var(--sur-accent); }
.btn.danger { color: var(--danger); }
.btn.large { width: 100%; }
.btn.large > span { white-space: normal; text-align: center; padding: 6px 0; }
.btn:disabled { opacity: 0.5; }

.champ { display: flex; flex-direction: column; gap: 6px; }
.champ > span { font-size: 14px; color: var(--texte-2); font-weight: 600; }
.champ input, .champ textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--bord); background: var(--surface); outline: none;
  transition: border-color 0.2s ease;
}
.champ textarea { min-height: 96px; resize: vertical; }
.champ input:focus, .champ textarea:focus { border-color: var(--texte); }
.aide { font-size: 14px; color: var(--texte-2); margin: 0; }
.aide.erreur { color: var(--danger); }

.avatar {
  border-radius: 50%; background: var(--surface-2); color: var(--texte-2);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; overflow: hidden; flex: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
