/* 🌸 Thème pastel inspiré de Sofini Design pour le Mini Chat de Mariam */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

:root {
  --bg:#eaf4f2;
  --cream:#fff6fa;
  --pink-50:#ffe7f1;
  --pink-100:#ffd3e7;
  --pink-300:#ffa6cc;
  --pink-500:#ff6fa7;
  --violet:#7e5bef;
  --text:#3f2c2c;
  --muted:#7d6c6c;
  --card:#ffffff;
  --shadow:0 10px 30px rgba(0,0,0,.08);
  --radius:20px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* ─── HEADER ─────────────────────────────────────────── */
.sitebar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255,255,255,.8);
  backdrop-filter: saturate(120%) blur(8px);
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.nav {
  max-width: 980px;
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
  color: var(--text);
}

.logo {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, var(--pink-300), var(--violet));
}

.actions a {
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  background: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  border: 2px solid var(--pink-100);
  box-shadow: var(--shadow);
  transition: all .2s ease;
}

.actions a:hover { transform: translateY(-1px); }

.actions a.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--pink-500), var(--violet));
  border: 0;
}

/* ─── HERO SECTION ───────────────────────────────────── */
.hero {
  --c1: #f1e9ff;
  --c2: #fde8ef;
  background:
    linear-gradient(90deg, var(--c1) 50%, transparent 0) 0 0/120px 120px,
    linear-gradient(0, var(--c1) 50%, var(--c2) 0) 0 0/120px 120px;
}

.hero-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 80px 18px 60px;
  text-align: center;
}

h1 {
  margin: 16px 0 6px;
  font-size: 44px;
  line-height: 1.15;
  font-weight: 800;
}

.lead {
  color: #6b4b3e;
  max-width: 700px;
  margin: 0 auto 20px;
}

.cta {
  display: inline-block;
  margin-top: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, var(--pink-500), var(--violet));
  box-shadow: var(--shadow);
  transition: transform .2s ease;
}

.cta:hover { transform: scale(1.05); }

/* ─── VAGUE DE SÉPARATION ───────────────────────────── */
.wave {
  position: relative;
  height: 44px;
  background: transparent;
  margin-top: -1px;
}

.wave::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--cream);
  --w: radial-gradient(22px at 22px 22px, transparent 22px, var(--bg) 23px);
  -webkit-mask: var(--w) 0 0/44px 44px repeat-x, linear-gradient(#000,#000);
  mask: var(--w) 0 0/44px 44px repeat-x, linear-gradient(#000,#000);
}

/* ─── CONTENU ────────────────────────────────────────── */
.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 30px 18px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.btn {
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 999px;
  border: 2px solid var(--pink-100);
  background: #fff;
  font-weight: 700;
  box-shadow: var(--shadow);
}

/* ─── MESSAGES ───────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.msg {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  box-shadow: var(--shadow);
}

.meta {
  font-size: 12px;
  color: var(--muted);
}

.content {
  white-space: pre-wrap;
  margin-top: 6px;
}

/* ─── FORMULAIRE ─────────────────────────────────────── */
.composer {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-top: 22px;
}

textarea {
  width: 100%;
  min-height: 90px;
  border: 2px solid var(--pink-100);
  border-radius: 14px;
  padding: 12px;
  font: inherit;
  background: #fff;
}

.send {
  margin-top: 10px;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--pink-500), var(--violet));
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 800;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.hint { color: var(--muted); }

/* ─── FOOTER ─────────────────────────────────────────── */
footer {
  background: #ffdfe9;
  color: #6b4b3e;
  text-align: center;
  padding: 20px;
  margin-top: 30px;
  font-weight: 700;
}

/* --- Logo MZ --- */
.logo-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-right: 10px;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  color: white;
  background: var(--pink-300);
  border-radius: 50%;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, background 0.3s;
}
.logo-circle:hover { transform: rotate(-5deg) scale(1.05); background: var(--pink-500); }

.brand-text { font-weight: 600; font-size: 18px; color: var(--text); }
.highlight { color: var(--pink-500); }

/* ======== Auth / Register ======== */
/* Carte centrée, largeur maîtrisée */
.auth-card{
  background:#fff;
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:22px;
  display:flex;
  flex-direction:column;
  max-width:560px;      /* ← largeur de la carte */
  margin:0 auto;        /* ← centre horizontalement */
}

@media (max-width:620px){
  .auth-card{ max-width:100%; }
}

.auth-form{display:flex; flex-direction:column; gap:12px}
.auth-title{margin:0 0 4px; font-size:26px; font-weight:800}

.field{display:flex; flex-direction:column; gap:6px}
.field input{
  border:2px solid var(--pink-100); border-radius:14px; padding:12px 14px; font:inherit; background:#fff;
}
.field input:focus{outline:none; border-color:var(--pink-300)}

.row{display:flex; align-items:center; gap:8px; margin-top:6px}
.helper{color:var(--muted); font-size:14px}

.chip-error{
  background:#ffe5ea;
  border:2px dashed #ff8aa9;
  color:#8b2b48;
  padding:8px 12px; border-radius:999px; display:inline-block; margin-right:6px; margin-bottom:6px; font-weight:700;
}
.alert{margin-bottom:12px}
