/* Maquette DA v1b « Calme » (#1449) : papier, une seule chose principale par écran, phrases plutôt que chiffres. */
:root {
  --bg: #f4efe6;
  --surface: #fbf8f2;
  --sunk: #ece5d8;
  --ink: #1e1a16;
  --mute: #6e665b;
  --soft: #9a9184;
  --line: rgba(30, 26, 22, 0.1);
  --line-strong: rgba(30, 26, 22, 0.22);
  --accent: #8a2b3a;
  --accent-ink: #f8efe6;
  --accent-soft: #f1dfdc;
  --good: #4e7a5a;
  --good-soft: #e1eadc;
  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --r: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
a:hover, button:hover { text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; }
svg.lucide { width: 18px; height: 18px; stroke-width: 1.75; flex: none; }

/* Bandeau maquette */
.proto {
  display: flex; justify-content: center; gap: 16px; flex-wrap: wrap;
  padding: 7px 16px; font-size: 12.5px; color: var(--mute); border-bottom: 1px solid var(--line);
}
.proto a { color: var(--ink); font-weight: 500; transition: color 0.15s var(--ease); }
.proto a:hover { color: var(--accent); }

/* Structure */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: calc(100vh - 34px); }
.side { padding: 32px 20px; display: flex; flex-direction: column; gap: 32px; position: sticky; top: 0; height: calc(100vh - 34px); }
.logo { font: 500 26px/1 var(--serif); letter-spacing: -0.01em; padding-left: 12px; }
.logo i { color: var(--accent); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a, .nav > span {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px;
  color: var(--mute); font-size: 15px; transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.nav a { cursor: pointer; }
.nav a:hover { color: var(--ink); }
.nav a.on { color: var(--ink); background: var(--sunk); font-weight: 500; }
.nav > span { opacity: 0.55; cursor: default; }
.nav .badge { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--accent); }
.me { margin-top: auto; display: flex; align-items: center; gap: 12px; padding: 0 12px; font-size: 14px; }
.me .av { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.me small { display: block; color: var(--mute); font-size: 12.5px; }
.burger { display: none; }

.main { padding: 72px 64px 120px; max-width: 1040px; width: 100%; }
.hello { color: var(--mute); font-size: 16px; margin: 0 0 12px; }
h1, .h1 { font: 400 46px/1.12 var(--serif); letter-spacing: -0.015em; margin: 0; max-width: 24ch; }
h1 em, .h1 em { color: var(--accent); font-style: italic; }
h2 { font: 400 26px/1.25 var(--serif); margin: 0 0 8px; letter-spacing: -0.01em; }
.lead { color: var(--mute); font-size: 17px; max-width: 56ch; margin: 16px 0 0; }
.gap-xl { height: 88px; }
.gap-l { height: 56px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px;
  font-weight: 500; font-size: 15px; transition: background 0.15s var(--ease), color 0.15s var(--ease), transform 0.12s var(--ease), border-color 0.15s var(--ease);
}
.btn:active { transform: scale(0.985); }
.btn-main { background: var(--accent); color: var(--accent-ink); }
.btn-main:hover { background: #73202e; }
.btn-ghost { color: var(--ink); border: 1px solid var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-text { color: var(--mute); padding: 12px 8px; }
.btn-text:hover { color: var(--ink); }
.link { color: var(--accent); font-weight: 500; cursor: pointer; transition: color 0.15s var(--ease); }
.link:hover { color: var(--ink); }

/* Aujourd'hui : la carte principale */
.focus {
  margin-top: 48px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 40px 44px; max-width: 720px;
}
.focus .who { display: flex; align-items: center; gap: 14px; color: var(--mute); font-size: 14.5px; }
.focus .who .av { width: 44px; height: 44px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 600; font-size: 15px; }
.focus .who b { color: var(--ink); font-weight: 600; display: block; font-size: 16px; }
.focus blockquote { font: 400 30px/1.3 var(--serif); margin: 28px 0 0; letter-spacing: -0.01em; }
.draft { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 24px; }
.draft p { margin: 0 0 10px; color: var(--mute); font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.draft textarea {
  width: 100%; min-height: 84px; resize: vertical; border: 1px solid var(--line-strong); border-radius: var(--r);
  background: var(--bg); padding: 14px 16px; font-size: 16px; line-height: 1.5; transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.draft textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.focus .acts { display: flex; align-items: center; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.focus .step { margin-left: auto; color: var(--soft); font-size: 14px; }
.done { text-align: left; }
.done .h1 { font-size: 36px; }

.after { margin-top: 28px; max-width: 720px; }
.after h3 { font-size: 15px; font-weight: 500; color: var(--mute); margin: 0 0 8px; }
.after ul { list-style: none; margin: 0; padding: 0; }
.after li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 16px; }
.after li .link { margin-left: auto; font-size: 15px; white-space: nowrap; }
.after li svg { color: var(--mute); }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; max-width: 880px; }
.calm p { margin: 0; color: var(--mute); font-size: 16.5px; max-width: 40ch; }
.calm .big { font: 400 64px/1 var(--serif); color: var(--ink); margin: 6px 0 10px; display: flex; align-items: baseline; gap: 14px; }
.calm .big small { font: 400 18px/1.3 var(--sans); color: var(--mute); }
.calm .state { display: flex; align-items: center; gap: 10px; font-weight: 500; margin-bottom: 10px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px var(--good-soft); }
.dot.off { background: var(--soft); box-shadow: 0 0 0 4px var(--sunk); }
.calm .btn { margin-top: 20px; }
.up { color: var(--good); font-weight: 500; }

/* Campagnes */
.tip {
  margin-top: 48px; display: flex; gap: 24px; align-items: center; padding: 28px 32px; border-radius: 20px;
  background: var(--accent-soft); max-width: 880px; flex-wrap: wrap;
}
.tip p { margin: 0; flex: 1 1 360px; font: 400 23px/1.35 var(--serif); }
.tip p span { display: block; font: 400 15.5px/1.5 var(--sans); color: var(--mute); margin-top: 6px; }
.bar { display: flex; align-items: center; gap: 16px; margin: 56px 0 8px; flex-wrap: wrap; max-width: 880px; }
.pills { display: flex; gap: 4px; background: var(--sunk); padding: 4px; border-radius: 999px; }
.pills button { padding: 7px 16px; border-radius: 999px; font-size: 14.5px; color: var(--mute); transition: color 0.15s var(--ease), background 0.15s var(--ease); }
.pills button:hover { color: var(--ink); }
.pills button.on { background: var(--surface); color: var(--ink); font-weight: 500; }
.search { margin-left: auto; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line-strong); padding: 6px 2px; color: var(--mute); transition: border-color 0.15s var(--ease); }
.search:focus-within { border-color: var(--ink); }
.search input { border: 0; background: none; outline: none; width: 200px; font-size: 15px; color: var(--ink); }
.rows { list-style: none; margin: 0; padding: 0; max-width: 880px; }
.row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 32px; align-items: center; padding: 22px 8px;
  border-bottom: 1px solid var(--line); cursor: pointer; transition: background 0.15s var(--ease);
}
.row:hover { background: rgba(30, 26, 22, 0.025); }
.row .name { font-size: 17px; font-weight: 500; }
.row .src { color: var(--mute); font-size: 14.5px; margin-top: 2px; }
.row .res { font-size: 15.5px; text-align: right; min-width: 150px; }
.row .res small { display: block; color: var(--mute); font-size: 13.5px; }
.row.paused .name, .row.paused .res { color: var(--mute); }
.empty { padding: 48px 8px; color: var(--mute); }

.switch { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--mute); min-width: 112px; }
.switch .tr { width: 38px; height: 22px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background 0.18s var(--ease); }
.switch .tr::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); transition: transform 0.18s var(--ease); }
.switch[aria-checked='true'] .tr { background: var(--good); }
.switch[aria-checked='true'] .tr::after { transform: translateX(16px); }
.switch[aria-checked='true'] { color: var(--ink); }

/* Posts */
.tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line); margin-top: 8px; }
.tabs button, .tabs span { padding: 12px 0; font-size: 15px; color: var(--mute); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color 0.15s var(--ease), border-color 0.15s var(--ease); }
.tabs button:hover { color: var(--ink); }
.tabs .on { color: var(--ink); border-color: var(--ink); font-weight: 500; }
.tabs span { opacity: 0.55; cursor: default; }
.next { margin-top: 48px; display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; max-width: 940px; }
.li-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px 26px; }
.li-card .who { display: flex; gap: 12px; align-items: center; font-size: 14px; color: var(--mute); margin-bottom: 16px; }
.li-card .who .av { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-size: 13px; font-weight: 600; }
.li-card .who b { color: var(--ink); display: block; font-weight: 600; }
.li-card p { margin: 0; font-size: 16px; line-height: 1.55; }
.li-card p + p { margin-top: 12px; color: var(--mute); }
.view { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 64px; flex-wrap: wrap; max-width: 940px; }
.plist { list-style: none; margin: 0; padding: 0; max-width: 940px; }
.plist li { display: grid; grid-template-columns: 150px 1fr auto; gap: 28px; padding: 22px 4px; border-bottom: 1px solid var(--line); align-items: baseline; }
.plist .when { color: var(--mute); font-size: 14.5px; white-space: nowrap; }
.plist .hook { font-size: 16.5px; }
.plist .seen { color: var(--mute); font-size: 14.5px; white-space: nowrap; }
.plist .link { font-size: 14.5px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; margin-top: 24px; max-width: 940px; }
.day { min-height: 200px; border-top: 2px solid var(--line-strong); padding-top: 12px; }
.day.today { border-color: var(--accent); }
.day h4 { margin: 0 0 12px; font-size: 14px; font-weight: 500; color: var(--mute); }
.day.today h4 { color: var(--accent); }
.chip { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; line-height: 1.4; margin-bottom: 8px; cursor: pointer; transition: border-color 0.15s var(--ease), transform 0.15s var(--ease); }
.chip:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.chip small { display: block; color: var(--mute); margin-bottom: 4px; }
.chip.pub small { color: var(--good); }

/* Panneau et modale */
.veil { position: fixed; inset: 0; background: rgba(30, 26, 22, 0.28); opacity: 0; transition: opacity 0.2s var(--ease); z-index: 40; }
.veil.in { opacity: 1; }
.panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100%); background: var(--surface); z-index: 41;
  padding: 40px 40px 48px; overflow-y: auto; transform: translateX(24px); opacity: 0; transition: transform 0.22s var(--ease), opacity 0.22s var(--ease);
}
.panel.in { transform: none; opacity: 1; }
.modal {
  position: fixed; left: 50%; top: 50%; width: min(600px, calc(100% - 32px)); max-height: calc(100dvh - 48px); overflow-y: auto;
  background: var(--surface); border-radius: 20px; z-index: 41; padding: 36px 36px 32px;
  transform: translate(-50%, -48%) scale(0.98); opacity: 0; transition: transform 0.22s var(--ease), opacity 0.22s var(--ease);
}
.modal.in { transform: translate(-50%, -50%); opacity: 1; }
.x { position: absolute; top: 20px; right: 20px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--mute); transition: color 0.15s var(--ease), background 0.15s var(--ease); }
.x:hover { color: var(--ink); background: var(--sunk); }
.panel .say { font: 400 21px/1.45 var(--serif); margin: 20px 0 0; }
.panel .say b { font-weight: 500; }
.panel h3, .modal h3 { font-size: 15px; font-weight: 500; color: var(--mute); margin: 36px 0 8px; }
.steps { list-style: none; padding: 0; margin: 0; }
.steps li { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.steps li i { font-style: normal; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; font-size: 13px; color: var(--mute); flex: none; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.choice { text-align: left; border: 1px solid var(--line-strong); border-radius: 14px; padding: 18px 18px 16px; transition: border-color 0.15s var(--ease), background 0.15s var(--ease), transform 0.15s var(--ease); }
.choice:hover { border-color: var(--ink); transform: translateY(-1px); }
.choice.on { border-color: var(--accent); background: var(--accent-soft); }
.choice b { display: block; font-weight: 600; margin: 10px 0 2px; }
.choice span { color: var(--mute); font-size: 14px; }
.compare { display: grid; gap: 12px; margin-top: 20px; }
.compare div { border-radius: 12px; padding: 16px 18px; font-size: 15.5px; background: var(--bg); }
.compare div.new { background: var(--good-soft); }
.compare small { display: block; color: var(--mute); font-size: 13px; margin-bottom: 6px; }
.field { margin-top: 20px; }
.field label { display: block; font-size: 14px; color: var(--mute); margin-bottom: 8px; }
.field textarea, .field select { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--bg); padding: 12px 14px; font-size: 15.5px; transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease); }
.field textarea { min-height: 140px; resize: vertical; }
.field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 28px; }

/* Apparitions */
.enter { animation: rise 0.25s var(--ease); }
.leave { animation: fall 0.2s var(--ease) forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fall { to { opacity: 0; transform: translateY(-8px); } }

/* Responsive */
@media (max-width: 1100px) {
  .main { padding: 56px 40px 96px; }
  .two { gap: 40px; }
  .next { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; padding: 16px 20px; flex-direction: row; align-items: center; justify-content: space-between; }
  .side .nav, .side .me { display: none; }
  .side.open { flex-wrap: wrap; }
  .side.open .nav { display: flex; width: 100%; }
  .burger { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; }
  .burger:hover { background: var(--sunk); }
  .main { padding: 24px 20px 80px; }
  h1, .h1 { font-size: 34px; }
  .focus { padding: 28px 22px; margin-top: 32px; border-radius: 16px; }
  .focus blockquote { font-size: 24px; }
  .focus .step { margin-left: 0; width: 100%; }
  .gap-xl { height: 56px; }
  .two { grid-template-columns: 1fr; gap: 48px; }
  .calm .big { font-size: 52px; }
  .tip { padding: 24px; }
  .tip p { font-size: 20px; }
  .search { margin-left: 0; width: 100%; }
  .search input { width: 100%; }
  .row { grid-template-columns: 1fr auto; gap: 12px 16px; }
  .row .res { grid-column: 1; text-align: left; }
  .row .switch { grid-row: 1; grid-column: 2; min-width: 0; }
  .row .switch .lbl { display: none; }
  .plist li { grid-template-columns: 1fr; gap: 4px; }
  .week { grid-template-columns: 1fr; gap: 0; }
  .day { min-height: 0; padding: 12px 0; }
  .choices { grid-template-columns: 1fr; }
  .panel, .modal { padding: 32px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.focus .who .av, .li-card .who .av { flex: none; }
@media (max-width: 820px) {
  .after li { flex-wrap: wrap; }
  .after li > svg { display: none; }
  .after li .link { margin-left: 0; width: 100%; }
}
