/* Inspiré de bonjourdrink.co : crème, jaune soleil, contours noirs, boutons pilule. */
:root {
  --cream: #fffbd1;
  --cream-deep: #fbf3b4;
  --yellow: #ffe04f;
  --yellow-deep: #f6c700;
  --orange: #f7b23b;
  --pink: #f6a6c1;
  --blue: #8fcdf3;
  --ink: #111111;
  --muted: #5d5a45;
  --white: #ffffff;
  --danger: #c8321e;
  --ok: #1b8a4a;
  --border: 1.5px solid var(--ink);
  --pop: 4px 4px 0 var(--ink);
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 14px;
  --font-logo: "Bowlby One", "Arial Black", sans-serif;
  --font-title: "Raleway", system-ui, sans-serif;
  --font-btn: "Poppins", system-ui, sans-serif;
  --font-body: "Barlow", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

h1, h2, h3 { font-family: var(--font-title); font-weight: 800; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); text-transform: uppercase; letter-spacing: -.01em; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* ---------- Bandeau + en-tête ---------- */
.banner {
  background: var(--ink);
  color: var(--white);
  text-align: center;
  padding: 8px 16px;
  font-family: var(--font-btn);
  font-weight: 700;
  font-size: .9rem;
  line-height: 1.35;
  text-transform: uppercase;
}
.banner strong { color: var(--yellow); display: block; font-size: 1rem; }

.header {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.logo {
  font-family: var(--font-logo);
  font-size: 2rem;
  letter-spacing: .02em;
  text-decoration: none;
  line-height: 1;
}
.logo span { color: var(--yellow-deep); -webkit-text-stroke: 1.5px var(--ink); }
.nav { display: flex; gap: 6px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav a, .nav button {
  font-family: var(--font-btn);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  background: none;
  border: 1.5px solid transparent;
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex: none;
}
.nav a:hover, .nav button:hover { border-color: var(--ink); }
.nav a[aria-current="page"] { background: var(--yellow); border-color: var(--ink); }
.nav .who { font-family: var(--font-body); color: var(--muted); padding: 0 6px; }

.main { max-width: 1180px; margin: 0 auto; padding: 12px 20px 120px; }
.narrow { max-width: 640px; margin: 0 auto; }

/* ---------- Boutons ---------- */
.btn {
  font-family: var(--font-btn);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border: var(--border);
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  box-shadow: var(--pop);
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, background .12s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: var(--pop); }
.btn-block { width: 100%; }
.btn-lg { font-size: 1.2rem; padding: 16px 30px; }
.btn-sm { font-size: .9rem; padding: 7px 16px; box-shadow: 3px 3px 0 var(--ink); }
.btn-dark {
  background: radial-gradient(circle at 50% 50%, #3a3a3a 0%, #000 70%);
  color: var(--yellow);
}
.btn-white { background: var(--white); }
.btn-danger { background: var(--white); color: var(--danger); border-color: var(--danger); box-shadow: 3px 3px 0 var(--danger); }
.link {
  background: none;
  border: none;
  padding: 0;
  text-decoration: underline;
  cursor: pointer;
  color: var(--muted);
  font-family: var(--font-body);
}

/* Choix empilés façon quiz Bonjour */
.choices { display: grid; gap: 10px; max-width: 300px; margin: 0 auto; }
.choice {
  font-family: var(--font-btn);
  font-weight: 700;
  font-size: 1.02rem;
  padding: 14px 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.choice:hover { background: var(--yellow-deep); }
.choice[aria-pressed="true"] {
  background: radial-gradient(circle at 50% 50%, #3a3a3a 0%, #000 70%);
  color: var(--yellow);
}

/* ---------- Formulaires ---------- */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label, .label { font-family: var(--font-btn); font-weight: 600; font-size: .95rem; }
.field .hint { font-size: .85rem; color: var(--muted); }
.input {
  width: 100%;
  padding: 13px 18px;
  border: var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  font-size: 1rem;
  outline: none;
}
.input:focus { box-shadow: 0 0 0 3px var(--yellow); }
textarea.input { min-height: 110px; resize: vertical; }
.input-pill { border-radius: 999px; }
.error { color: var(--danger); font-weight: 600; font-size: .95rem; }
.success { color: var(--ok); font-weight: 600; }

/* ---------- Cartes ---------- */
.card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-xl);
  padding: 26px;
}
.card + .card { margin-top: 20px; }
.card-yellow { background: var(--yellow); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.section-title h2 { margin: 0; }

.checklist { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; color: #3b3a2e; }
.checklist li::before {
  content: "✓";
  flex: none;
  width: 19px;
  height: 19px;
  margin-top: 3px;
  border: 1.5px solid #8a6d00;
  border-radius: 50%;
  background: var(--yellow);
  font-size: 12px;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.checklist strong { color: var(--ink); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-family: var(--font-btn);
  font-weight: 600;
  font-size: .82rem;
  background: var(--white);
  white-space: nowrap;
}
.pill-yellow { background: var(--yellow); }
.pill-dark { background: var(--ink); color: var(--yellow); }
.pill-pink { background: var(--pink); }
.pill-blue { background: var(--blue); }

.hearts { color: #e0245e; letter-spacing: 1px; white-space: nowrap; }
.hearts .off { color: #d8d2a8; }

/* ---------- Accueil ---------- */
.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 20px 60px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-proof { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-weight: 600; }
.avatars { display: flex; }
.avatars span {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 2px solid var(--cream);
  display: grid; place-items: center;
  font-size: 1.15rem;
  margin-left: -10px;
}
.avatars span:first-child { margin-left: 0; }
.hero-art {
  background: linear-gradient(160deg, var(--orange) 0%, var(--yellow) 100%);
  border-radius: var(--radius-xl);
  aspect-ratio: 1 / 1.05;
  overflow: hidden;
  position: relative;
}
.hero-art svg { width: 100%; height: 100%; }
.trust { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; margin-top: 18px; font-size: .95rem; }
.trust span { display: inline-flex; gap: 6px; align-items: center; }
.login-form { display: grid; gap: 12px; max-width: 520px; }

/* ---------- Ma liste (proposeur) ---------- */
.ideas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.idea-card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform .12s, box-shadow .12s;
}
.idea-card:hover { transform: translate(-2px, -2px); box-shadow: var(--pop); }
.idea-card .cover { aspect-ratio: 4 / 3; }
.idea-card .body { padding: 14px 16px 16px; display: grid; gap: 4px; }
.idea-card .title { font-family: var(--font-btn); font-weight: 700; font-size: 1.02rem; line-height: 1.3; }
.idea-card .meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cover { width: 100%; object-fit: cover; background: var(--cream-deep); }
.cover-empty { display: grid; place-items: center; font-size: 3rem; background: repeating-linear-gradient(45deg, var(--yellow) 0 18px, #ffe76f 18px 36px); }
.fab {
  position: fixed;
  right: 20px;
  bottom: 22px;
  z-index: 20;
}
.empty {
  text-align: center;
  padding: 50px 20px;
  border: 2px dashed #c9bf7a;
  border-radius: var(--radius-xl);
}
.empty .emoji { font-size: 3rem; }

/* ---------- Formulaire d'idée ---------- */
.desire { display: flex; gap: 8px; }
.desire button {
  flex: 1;
  padding: 10px 6px;
  border: var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1.1;
  color: #e0245e;
}
.desire button small { color: var(--ink); display: block; font-size: .75rem; font-family: var(--font-btn); font-weight: 600; margin-top: 4px; }
.desire button[aria-pressed="true"] { background: var(--yellow); box-shadow: 3px 3px 0 var(--ink); }
.photos-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; }
.photo-tile {
  position: relative;
  aspect-ratio: 1;
  border: var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--cream-deep);
}
.photo-tile img { width: 100%; height: 100%; object-fit: cover; }
.photo-tile .badge { position: absolute; left: 6px; top: 6px; }
.photo-tile .tools { position: absolute; inset: auto 0 0 0; display: flex; justify-content: space-between; padding: 4px; gap: 4px; }
.icon-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  background: var(--white);
  cursor: pointer;
  display: grid; place-items: center;
  font-size: .9rem;
  line-height: 1;
  padding: 0;
}
.icon-btn:disabled { opacity: .35; cursor: default; }
.add-photo {
  aspect-ratio: 1;
  border: 2px dashed var(--ink);
  border-radius: var(--radius-md);
  display: grid; place-items: center;
  text-align: center;
  cursor: pointer;
  font-family: var(--font-btn);
  font-weight: 600;
  font-size: .85rem;
  background: var(--white);
}
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-top: 8px; }

/* ---------- Feed (consulteur) ---------- */
.feed { max-width: 600px; margin: 0 auto; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tabs button { flex: 1; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.chip {
  flex: none;
  font-family: var(--font-btn);
  font-weight: 600;
  padding: 7px 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
  cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--yellow); }
.toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; margin-bottom: 14px; }
.toggle input { width: 18px; height: 18px; accent-color: var(--ink); }
.post {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 26px;
}
.post-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
.avatar {
  width: 38px; height: 38px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  display: grid; place-items: center;
  font-family: var(--font-btn);
  font-weight: 800;
  background: var(--pink);
}
.post-head .name { font-family: var(--font-btn); font-weight: 700; }
.post-head .when { color: var(--muted); font-size: .85rem; }
.post-body { padding: 14px 18px 18px; display: grid; gap: 8px; }
.post-body .title { font-family: var(--font-btn); font-weight: 700; font-size: 1.15rem; line-height: 1.3; cursor: pointer; }
.post-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.price { font-family: var(--font-btn); font-weight: 700; }
.post.taken .carousel, .post.taken .post-body .title { filter: grayscale(1); opacity: .55; }
.post-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 4px; }

.carousel { position: relative; background: var(--cream-deep); cursor: pointer; }
.carousel .track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.carousel .track::-webkit-scrollbar { display: none; }
.carousel .track > * { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 1; object-fit: cover; }
.carousel .dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.carousel .dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .6); border: 1px solid var(--ink); }
.carousel .dots i.on { background: var(--yellow); }
.carousel .arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  background: var(--white);
  cursor: pointer;
}
.carousel .arrow.prev { left: 10px; }
.carousel .arrow.next { right: 10px; }
.carousel-lg .track > * { aspect-ratio: 4 / 3; object-fit: contain; background: #faf6d6; }

.sentinel { height: 1px; }
.loading { text-align: center; color: var(--muted); padding: 20px; }

/* ---------- Mes achats ---------- */
.purchase { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px dashed #c9bf7a; }
.purchase:last-of-type { border-bottom: none; }
.purchase .thumb { width: 64px; height: 64px; border-radius: 12px; border: 1px solid var(--ink); object-fit: cover; }
.purchase .thumb.cover-empty { font-size: 1.6rem; }
.purchase.removed .info .t { text-decoration: line-through; color: var(--muted); }
.purchase .info .t { font-family: var(--font-btn); font-weight: 700; }
.purchase .acts { display: grid; gap: 6px; justify-items: end; }
.total {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 16px; padding: 16px 20px;
  background: var(--yellow);
  border: var(--border);
  border-radius: 999px;
  font-family: var(--font-btn); font-weight: 800; font-size: 1.1rem;
}

/* ---------- Fenêtre de détail ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(17, 17, 17, .55);
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
}
.modal-box {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-xl);
  width: min(760px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  position: relative;
  box-shadow: 8px 8px 0 var(--ink);
}
.modal-close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 40px; height: 40px; font-size: 1.2rem; }
.modal-body { padding: 22px 26px 26px; display: grid; gap: 12px; }
.modal-body .desc { white-space: pre-wrap; }
body.no-scroll { overflow: hidden; }

/* ---------- Foyer ---------- */
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px dashed #c9bf7a; flex-wrap: wrap; }
.list li:last-child { border-bottom: none; }
.list .grow { flex: 1; min-width: 140px; }
.link-box { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.link-box .input { flex: 1; min-width: 200px; font-size: .9rem; }
.select { padding: 7px 12px; border: 1px solid var(--ink); border-radius: 999px; background: var(--white); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }

/* ---------- Centrage ---------- */
.center-page { max-width: 520px; margin: 0 auto; text-align: center; padding: 40px 20px 80px; }
.center-page .logo { display: inline-block; font-size: 1.4rem; margin-bottom: 20px; }
.center-page h1 { text-transform: none; font-family: var(--font-btn); font-weight: 700; font-size: clamp(1.5rem, 5vw, 2rem); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--yellow);
  padding: 12px 22px;
  border-radius: 999px;
  font-family: var(--font-btn);
  font-weight: 600;
  z-index: 100;
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.error { background: var(--danger); color: var(--white); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 30px; padding-top: 10px; }
  .hero-art { order: -1; aspect-ratio: 16 / 11; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .header { padding: 14px 16px; gap: 10px; }
  .logo { font-size: 1.6rem; }
  .nav { margin-left: 0; width: 100%; overflow-x: auto; flex-wrap: nowrap; gap: 2px; scrollbar-width: none; }
  .nav a, .nav button { padding: 6px 10px; font-size: .9rem; }
  .nav .who { display: none; }
  .main { padding: 8px 16px 110px; }
  .card { padding: 20px; border-radius: 26px; }
  .ideas-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .idea-card .body { padding: 10px 12px 12px; }
  .idea-card .title { font-size: .92rem; }
  .post { border-radius: 24px; }
  .modal { padding: 0; place-items: end center; }
  .modal-box { border-radius: 26px 26px 0 0; max-height: 92vh; }
  .modal-body { padding: 18px; }
  .purchase { grid-template-columns: 52px 1fr; }
  .purchase .thumb { width: 52px; height: 52px; }
  .purchase .acts { grid-column: 1 / -1; justify-items: start; grid-auto-flow: column; }
}
