﻿:root {
  --bg:#f8f4ec;
  --card:#fffaf2;
  --text:#211914;
  --muted:#75695d;
  --primary:#8b5e34;
  --gold:#d8aa4f;
  --line:rgba(80,50,25,.16);
  --shadow:0 18px 45px rgba(60,35,15,.14);
}

body.dark {
  --bg:#12100d;
  --card:#1f1a14;
  --text:#f8efe2;
  --muted:#cbbda9;
  --primary:#d8aa4f;
  --gold:#f0cf80;
  --line:rgba(255,240,220,.16);
}

* { box-sizing:border-box; }

body {
  margin:0;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:radial-gradient(circle at top left,rgba(216,170,79,.25),transparent 35%),var(--bg);
  color:var(--text);
  line-height:1.65;
}

a { color:inherit; text-decoration:none; }

.header {
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(255,250,242,.86);
  backdrop-filter:blur(16px);
  border-bottom:1px solid var(--line);
}

body.dark .header { background:rgba(31,26,20,.86); }

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

.brand {
  font-weight:850;
  display:flex;
  align-items:center;
  gap:10px;
}

.logo {
  width:42px;
  height:42px;
  border-radius:16px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,var(--primary),var(--gold));
  color:white;
}

.links {
  display:flex;
  gap:8px;
  align-items:center;
}

.links a,
.links button,
.menu-btn {
  border:0;
  background:transparent;
  color:var(--muted);
  padding:9px 12px;
  border-radius:999px;
  cursor:pointer;
  font:inherit;
}

.links a:hover,
.links button:hover,
.links .active {
  background:rgba(139,94,52,.12);
  color:var(--text);
}

.menu-btn { display:none; border:1px solid var(--line); background:var(--card); color:var(--text); }

.hero,
.section,
.page {
  max-width:1100px;
  margin:auto;
  padding:52px 20px;
}

.hero {
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:28px;
  align-items:center;
}

h1 {
  font-size:clamp(2.4rem,6vw,5rem);
  line-height:.96;
  letter-spacing:-.055em;
  margin:14px 0;
}

h2 {
  font-size:clamp(1.7rem,4vw,3rem);
  line-height:1.05;
  letter-spacing:-.035em;
}

.lead {
  font-size:1.16rem;
  color:var(--muted);
  max-width:720px;
}

.card {
  background:var(--card);
  border:1px solid var(--line);
  border-radius:28px;
  padding:26px;
  box-shadow:var(--shadow);
}

.badge {
  display:inline-flex;
  padding:5px 10px;
  border-radius:999px;
  background:rgba(216,170,79,.18);
  color:var(--primary);
  font-weight:800;
  font-size:.82rem;
}

.btns {
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:24px;
}

.btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:12px 17px;
  border-radius:999px;
  border:1px solid var(--line);
  background:var(--card);
  font-weight:800;
}

.btn.primary {
  border:0;
  background:linear-gradient(135deg,var(--primary),var(--gold));
  color:white;
}

.grid {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px;
}

.prose {
  max-width:900px;
  margin:auto;
}

.prose p,
.prose li {
  color:var(--muted);
}

blockquote {
  margin:20px 0;
  padding:18px 20px;
  border-left:4px solid var(--gold);
  background:rgba(216,170,79,.12);
  border-radius:18px;
}

.choice {
  width:100%;
  text-align:left;
  border:1px solid var(--line);
  background:var(--card);
  color:var(--text);
  padding:18px;
  border-radius:20px;
  margin:10px 0;
  cursor:pointer;
}

.choice span {
  display:block;
  color:var(--muted);
}

.result {
  margin-top:20px;
  padding:20px;
  border-radius:22px;
  background:rgba(216,170,79,.14);
  border:1px solid var(--line);
}

.help {
  position:fixed;
  right:22px;
  bottom:22px;
  width:54px;
  height:54px;
  border-radius:999px;
  border:0;
  background:linear-gradient(135deg,var(--primary),var(--gold));
  color:white;
  font-size:1.35rem;
  box-shadow:var(--shadow);
  cursor:pointer;
}

.footer {
  max-width:1100px;
  margin:auto;
  padding:32px 20px 54px;
  color:var(--muted);
  border-top:1px solid var(--line);
}

.footer a {
  text-decoration:underline;
  text-underline-offset:4px;
  margin-right:12px;
}

@media(max-width:850px) {
  .hero { grid-template-columns:1fr; }
  .grid { grid-template-columns:1fr; }
  .menu-btn { display:block; }
  .links {
    display:none;
    position:absolute;
    left:16px;
    right:16px;
    top:72px;
    padding:14px;
    border-radius:22px;
    background:var(--card);
    border:1px solid var(--line);
    box-shadow:var(--shadow);
    flex-direction:column;
    align-items:stretch;
  }
  .links.open { display:flex; }
  .links a,
  .links button { text-align:left; border-radius:14px; }
}

/* V0.7 — Bibliothèque intelligente, filtres, partage */

.toolbar {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 12px;
  margin: 22px 0;
}

.search-input,
.filter-select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  border-radius: 999px;
  padding: 13px 16px;
  font: inherit;
  outline: none;
}

.search-input:focus,
.filter-select:focus {
  box-shadow: 0 0 0 4px rgba(216, 170, 79, 0.22);
}

.meditation-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 250px;
}

.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
}

.meta-pill {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(139, 94, 52, 0.10);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.copy-status {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 10px;
}

.empty-state {
  display: none;
  margin-top: 20px;
  padding: 20px;
  border-radius: 22px;
  border: 1px dashed var(--line);
  color: var(--muted);
  background: rgba(216, 170, 79, 0.10);
}

.empty-state.show {
  display: block;
}

code {
  background: rgba(139, 94, 52, 0.10);
  padding: 2px 6px;
  border-radius: 8px;
}

@media(max-width:850px) {
  .toolbar {
    grid-template-columns: 1fr;
  }
}
