:root {
  --primary: #1D9E75;
  --deep: #0F6E56;
  --mint: #9FE1CB;
  --mint-pale: #E1F5EE;
  --bg: #F4FBF8;
  --ink: #1a1a1a;
  --ink-soft: #4b4b47;
  --muted: #888780;
  --card: #ffffff;
  --border: #E1F5EE;
  --danger: #c0392b;
  --shadow: 0 4px 20px rgba(15, 110, 86, 0.08);
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Inter, system-ui, sans-serif; background: var(--bg); color: var(--ink); }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 14px; }
.error { color: var(--danger); font-size: 14px; }
button { font-family: inherit; cursor: pointer; border: none; border-radius: 999px; font-weight: 600; }

.login { position: fixed; inset: 0; display: grid; place-items: center;
  background: linear-gradient(155deg, var(--deep), var(--primary)); }
.login-card { background: #fff; padding: 40px; border-radius: var(--radius);
  width: 340px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.login-card input { padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; font-size: 15px; }
.login-card button { background: var(--primary); color: #fff; padding: 14px; font-size: 15px; }
.brand-mark { font-family: Fraunces, serif; font-weight: 600; font-size: 24px; color: var(--deep); }

.topbar { display: flex; justify-content: space-between; align-items: center;
  padding: 16px 28px; background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: 14px; }
.pill { font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 999px;
  background: var(--mint-pale); color: var(--deep); }
.pill.live { background: #ffe9e3; color: var(--danger); }
.actions { display: flex; align-items: center; gap: 10px; }
.btn-primary { background: var(--primary); color: #fff; padding: 11px 18px; font-size: 14px; }
.btn-primary:hover { background: var(--deep); }
.btn-ghost { background: var(--mint-pale); color: var(--deep); padding: 11px 18px; font-size: 14px; }
.btn-text { background: none; color: var(--muted); padding: 11px 8px; font-size: 14px; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
button:disabled { opacity: .55; cursor: progress; }

.tabs { display: flex; gap: 6px; padding: 14px 28px 0; background: #fff; border-bottom: 1px solid var(--border); }
.tab { background: none; color: var(--ink-soft); padding: 12px 18px; border-radius: 10px 10px 0 0; font-size: 14px; }
.tab.active { color: var(--deep); background: var(--bg); box-shadow: inset 0 -3px 0 var(--primary); }

.content { padding: 28px; max-width: 1200px; margin: 0 auto; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.panel-head h2 { font-family: Fraunces, serif; font-weight: 600; color: var(--deep); font-size: 26px; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 16px; font-size: 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { background: var(--bg); color: var(--ink-soft); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: none; }
td.actions-cell { white-space: nowrap; text-align: right; }
.row-actions button { margin-left: 6px; }

.badge { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.badge.a_faire { background: #eef0ee; color: #555; }
.badge.en_cours { background: #fff3d6; color: #946200; }
.badge.a_valider { background: #d8efff; color: #0a5a8a; }
.badge.approuve { background: var(--mint-pale); color: var(--deep); }
.badge.publie { background: var(--primary); color: #fff; }
.badge.erreur { background: #ffe0db; color: var(--danger); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; font-family: inherit; }
.field textarea { min-height: 90px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 18px; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 18px; }
.inline-form .field { margin-bottom: 0; }
.save-bar { margin-top: 18px; display: flex; gap: 10px; }

.drawer { position: fixed; inset: 0; z-index: 50; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(15,110,86,.25); }
.drawer-panel { position: absolute; right: 0; top: 0; height: 100%; width: min(560px, 94vw);
  background: #fff; box-shadow: -8px 0 30px rgba(0,0,0,.12); overflow-y: auto; padding: 28px; }
.drawer-panel h3 { font-family: Fraunces, serif; color: var(--deep); font-size: 22px; margin-bottom: 4px; }
.preview-block { margin-top: 18px; }
.preview-block h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 6px; }
.preview-block .txt { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 14px; font-size: 14px; white-space: pre-wrap; line-height: 1.55; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs img { width: 86px; height: 108px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.chip { display: inline-block; background: var(--mint-pale); color: var(--deep); border-radius: 999px; padding: 4px 10px; font-size: 12px; margin: 2px; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--deep); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 14px; box-shadow: var(--shadow); z-index: 100; }
.toast.err { background: var(--danger); }
.empty { padding: 40px; text-align: center; color: var(--muted); }
a { color: var(--primary); }
