@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500..800&family=Instrument+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #08211c;
  --bg-deep: #051814;
  --card: #124433;
  --card-solid: #103b2d;
  --green: #0a3a2e;
  --teal: #1f8a78;
  --gold: #f2c230;
  --gold-glow: #f2c23033;
  --cream: #f7f1e3;
  --cream-dim: #d9e8df;
  --ink: #102b24;
  --line: #2c735e;
  --line-light: #448d76;
  --pink: #ff4f9a;
  --blue: #38bdf8;
  --success: #10b981;
}

.hidden {
  display: none !important;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--cream);
  background: var(--bg);
  font: 16px/1.45 'Instrument Sans', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
}

h1, h2, h3, .brand strong, .font-display {
  font-family: 'Bricolage Grotesque', Arial, sans-serif;
}

button, input, select, textarea {
  font: inherit;
}
button { cursor: pointer; }

/* Top navigation bar */
.studio-nav {
  height: 64px;
  background: #061914;
  border-bottom: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px #0006;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-brand .knight {
  width: 38px;
  height: 38px;
  background: var(--green);
  border: 1px solid var(--gold);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 24px;
  color: var(--gold);
}
.nav-brand .titles {
  display: flex;
  flex-direction: column;
}
.nav-brand strong {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--cream);
  line-height: 1.1;
}
.nav-brand small {
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  color: var(--gold);
  font-weight: 800;
}

.nav-modes {
  display: flex;
  align-items: center;
  background: #092a21;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  gap: 4px;
}
.mode-btn {
  border: 0;
  background: transparent;
  color: var(--cream-dim);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mode-btn:hover {
  color: var(--cream);
}
.mode-btn.active {
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 2px 8px #f2c23044;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.save-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: #8be0bf;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-btn {
  border: 1px solid var(--line);
  background: #0f3d30;
  color: var(--cream);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
}
.nav-btn:hover {
  background: #165342;
  border-color: var(--gold);
}

/* Views wrapper */
.view-container {
  display: none;
}
.view-container.active {
  display: block;
}

/* ==================== VUE CLIENT (CALENDRIER) ==================== */
.calendar-view header, .calendar-view main {
  max-width: 1320px;
  margin: auto;
  padding: 24px;
}
.calendar-view header {
  padding-bottom: 24px;
}
.eyebrow {
  color: var(--gold);
  font-weight: 800;
  letter-spacing: .12em;
  font-size: .75rem;
  margin: 0 0 8px;
  text-transform: uppercase;
}
.calendar-view h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.05;
  letter-spacing: -.03em;
}
.sub {
  margin-top: 12px;
  max-width: 750px;
  color: var(--cream-dim);
  font-size: 0.95rem;
}
.bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.chip {
  background: #124433;
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
}
.chip.gold {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
  font-weight: 800;
}
.actions-row {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.btn-gold {
  border: 0;
  border-radius: 9px;
  padding: 9px 16px;
  background: var(--gold);
  color: var(--ink);
  font: 800 .82rem/1 'Instrument Sans', system-ui;
  cursor: pointer;
}
.btn-gold:hover { filter: brightness(1.05); }
.btn-ghost {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 16px;
  background: #124433;
  color: var(--cream);
  font: 700 .82rem/1 'Instrument Sans', system-ui;
  cursor: pointer;
}
.btn-ghost:hover { background: #185c45; }

.filters-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 20px;
}
.cal-filter {
  border: 1px solid var(--line);
  background: #0f3a2c;
  color: var(--cream-dim);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 800;
  cursor: pointer;
}
.cal-filter.active {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}

.status-summary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.stat-pill {
  background: #124433;
  border: 1px solid var(--line);
  padding: 7px 14px;
  border-radius: 10px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--cream-dim);
}
.stat-pill b {
  color: var(--gold);
}

/* Grille de cartes du calendrier */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
}
.cal-card {
  background: var(--card-solid);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 36px #0006;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.cal-card:hover {
  border-color: var(--line-light);
}
.cal-card.has-feedback {
  border-color: var(--gold);
  box-shadow: 0 12px 36px #f2c23022;
}

/* Visuel de la carte */
.cal-card-media {
  position: relative;
  height: 250px;
  background: #071d18;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cal-card-media img,
.cal-card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cal-card-media .media-badge-date {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--gold);
  color: var(--ink);
  font: 900 0.72rem/1 'Instrument Sans', system-ui;
  padding: 5px 9px;
  border-radius: 6px;
  box-shadow: 0 4px 12px #0007;
  z-index: 2;
}
.cal-card-media .media-badge-kind {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #061914dd;
  color: var(--cream);
  border: 1px solid var(--line);
  font: 800 0.72rem/1 'Instrument Sans', system-ui;
  padding: 5px 9px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
  z-index: 2;
}
.cal-card-media .media-preview-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: #061914ee;
  color: var(--gold);
  border: 1px solid var(--gold);
  font: 800 0.72rem/1 'Instrument Sans', system-ui;
  padding: 5px 10px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
  z-index: 2;
  cursor: pointer;
}

/* Corps de la carte */
.cal-card-body {
  padding: 18px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.cal-card-body h2 {
  font-size: 1.3rem;
  margin: 0 0 6px;
  line-height: 1.15;
  color: var(--cream);
}
.cal-card-category {
  font-size: 0.76rem;
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.cal-caption-box {
  background: #09281f;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
}
.cal-caption-box .cal-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #8be0bf;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.cal-caption-box p {
  margin: 0;
  color: var(--cream-dim);
  font-size: 0.88rem;
  line-height: 1.48;
  white-space: pre-line;
  max-height: 180px;
  overflow-y: auto;
}

.cal-story-box {
  background: #071f18;
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.cal-story-box .cal-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 4px;
  text-transform: uppercase;
}
.cal-story-box p {
  margin: 0;
  color: #c9ded5;
  font-size: 0.82rem;
  line-height: 1.4;
  white-space: pre-line;
}

/* Zone Fabien (validation & retours) */
.fabien-box {
  margin-top: auto;
  background: #0b3024;
  border: 1.5px solid var(--gold);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 4px 16px #0004;
}
.fabien-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.fabien-box-head .fabien-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 5px;
}
.fabien-status-btns {
  display: flex;
  gap: 6px;
}
.fabien-btn-status {
  border: 1px solid var(--line);
  background: #07231a;
  color: var(--cream-dim);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
}
.fabien-btn-status.valid.active {
  background: #10b981;
  color: #fff;
  border-color: #10b981;
}
.fabien-btn-status.modif.active {
  background: var(--pink);
  color: #fff;
  border-color: var(--pink);
}

.fabien-input-row {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.fabien-input-row textarea {
  flex: 1;
  background: #061e16;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--cream);
  font-size: 0.82rem;
  resize: vertical;
  min-height: 48px;
}
.fabien-input-row button {
  border: 0;
  background: var(--gold);
  color: var(--ink);
  font-weight: 800;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 0.78rem;
}

.fabien-saved-badge {
  background: #061914;
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--cream);
}
.fabien-saved-badge b {
  color: var(--gold);
}

/* Pied de carte avec raccourci studio */
.cal-card-footer {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cal-card-tag {
  font-size: .72rem;
  font-weight: 800;
  padding: 5px 9px;
  border: 1px solid #448d76;
  border-radius: 5px;
  color: #a9ddc8;
}
.cal-card-tag.validated { background: #0f4a3a; color: #a9ddc8; border-color: var(--gold); }
.cal-card-tag.retour { background: var(--pink); color: #fff; border-color: var(--pink); }
.cal-card-tag.programme { background: var(--teal); color: #fff; border-color: var(--teal); }
.cal-card-tag.publie {
  background: linear-gradient(135deg, #6b21a8, #9333ea);
  color: #fff;
  border-color: #c084fc;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

.fabien-published-badge {
  background: rgba(147, 51, 234, 0.15);
  border: 1px solid #a855f7;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f3e8ff;
}
.fabien-published-badge .icon {
  font-size: 1.4rem;
}
.fabien-published-badge strong {
  display: block;
  color: #fff;
  font-size: 0.88rem;
}
.fabien-published-badge small {
  font-size: 0.74rem;
  color: #d8b4fe;
}

.btn-sync-live {
  background: rgba(242, 194, 48, 0.15) !important;
  color: var(--gold) !important;
  border-color: var(--gold) !important;
  font-weight: 700;
}
.btn-sync-live:hover {
  background: var(--gold) !important;
  color: var(--ink) !important;
}

.sync-badge {
  background: rgba(147, 51, 234, 0.2) !important;
  color: #d8b4fe !important;
  border-color: #9333ea !important;
}

.stat-pill.published {
  background: rgba(147, 51, 234, 0.2);
  color: #d8b4fe;
  border-color: #a855f7;
}

.postiz-published-box {
  background: rgba(147, 51, 234, 0.15);
  border: 1px solid #a855f7;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
}
.postiz-published-box .badge-published {
  display: inline-block;
  background: #9333ea;
  color: #fff;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 4px;
}

.manual-publish-hint {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  text-align: center;
}
.btn-link-subtle {
  background: none;
  border: none;
  color: var(--cream-dim);
  font-size: 0.76rem;
  text-decoration: underline;
  cursor: pointer;
  opacity: 0.7;
  padding: 4px 8px;
  transition: all 0.2s;
}
.btn-link-subtle:hover {
  opacity: 1;
  color: var(--gold);
}

.preview-cta-badge {
  margin-top: 10px;
  background: rgba(242, 194, 48, 0.08);
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.8rem;
  color: var(--cream);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.preview-cta-badge span {
  font-size: 0.68rem;
  color: var(--gold);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.preview-cta-badge strong {
  color: #fff;
  font-size: 0.84rem;
}

.cal-btn-to-studio {
  border: 0;
  background: var(--gold);
  color: var(--ink);
  padding: 7px 12px;
  border-radius: 7px;
  font-size: 0.76rem;
  font-weight: 800;
}
.cal-btn-to-studio:hover { filter: brightness(1.1); }

/* ==================== VUE STUDIO (ÉDITION COMPLÈTE) ==================== */
.studio-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: calc(100vh - 64px);
  background: #0a251e;
}

.studio-sidebar {
  background: #08211b;
  border-right: 1px solid var(--line);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 64px);
  position: sticky;
  top: 64px;
}
.studio-side-head h2 {
  font-size: 1.5rem;
  margin: 4px 0 6px;
  line-height: 1.1;
  color: var(--cream);
}
.studio-side-head p {
  font-size: 0.8rem;
  color: var(--cream-dim);
  margin: 0 0 16px;
}
.studio-filters {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 8px;
}
.studio-filters button {
  border: 1px solid var(--line);
  background: #0c3329;
  color: var(--cream-dim);
  border-radius: 20px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.studio-filters button.active {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}
.studio-item-list {
  overflow-y: auto;
  flex: 1;
  padding-right: 4px;
}
.studio-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid #164638;
  background: #0d3025;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 6px;
  color: var(--cream);
  transition: all 0.15s ease;
}
.studio-item:hover {
  background: #113d2f;
  border-color: var(--line-light);
}
.studio-item.active {
  border-color: var(--gold);
  background: #164a39;
  box-shadow: 0 2px 10px #0004;
}
.studio-item.has-feedback {
  border-left: 4px solid var(--gold);
}
.studio-item-top {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--gold);
  margin-bottom: 4px;
}
.studio-item strong {
  display: block;
  font-size: 13.5px;
  line-height: 1.25;
  margin-bottom: 4px;
  color: var(--cream);
}
.studio-item small {
  color: #a5d3c1;
  font-size: 11px;
}
.btn-new-item {
  border: 1px dashed var(--gold);
  background: #0f3d3044;
  color: var(--gold);
  border-radius: 8px;
  padding: 10px;
  margin-top: 10px;
  font-weight: 800;
  font-size: 0.82rem;
  width: 100%;
}
.btn-new-item:hover {
  background: #0f3d3088;
}

/* Studio workspace */
.studio-workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.studio-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px 0;
  border-bottom: 1px solid var(--line);
  background: #071f19;
}
.studio-tabs button {
  border: 0;
  background: transparent;
  padding: 10px 16px 12px;
  color: var(--cream-dim);
  font-weight: 800;
  font-size: 0.88rem;
  border-bottom: 3px solid transparent;
}
.studio-tabs button.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}
.workspace-state {
  margin-left: auto;
  font-size: 0.78rem;
  color: #8be0bf;
  font-weight: 700;
}

.studio-panel {
  padding: 24px;
}
.studio-panel.hidden {
  display: none !important;
}

/* Encart retour de Fabien dans le studio */
.fabien-studio-alert {
  background: linear-gradient(135deg, #1b4d3a, #0b2f22);
  border: 2px solid var(--gold);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 18px;
  box-shadow: 0 4px 18px #0004;
}
.fabien-studio-alert.hidden {
  display: none;
}
.fabien-studio-alert .alert-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.fabien-studio-alert .alert-title {
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.fabien-studio-alert .alert-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--gold);
  color: var(--ink);
}
.fabien-studio-alert p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--cream);
  font-weight: 600;
  line-height: 1.4;
}

/* Editor layout: 2 columns */
.editor-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 480px);
  gap: 24px;
  max-width: 1440px;
  margin: 0 auto;
}

.editor-card {
  background: #0c3327;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 6px 24px #0004;
}
.editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #1a4f3f;
}
.editor-head select {
  background: #08211b;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-weight: 800;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.82rem;
}

.editor-form label {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  margin: 0 0 12px;
  color: #a5d3c1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.editor-form input,
.editor-form select,
.editor-form textarea {
  display: block;
  width: 100%;
  margin-top: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--cream);
  background: #07231c;
  outline: none;
  font-size: 0.88rem;
}
.editor-form input:focus,
.editor-form select:focus,
.editor-form textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px #f2c23033;
}
.editor-form textarea {
  resize: vertical;
  line-height: 1.45;
  white-space: pre-wrap;
}
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.editor-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.editor-actions .btn-gold {
  flex: 1;
  padding: 11px;
}
.editor-actions .btn-ghost {
  flex: 1;
  padding: 11px;
}

/* Preview column */
.preview-col {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.preview-card {
  background: #0c3327;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 6px 24px #0004;
}
.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.preview-head h2 {
  font-size: 1.25rem;
  margin: 0;
  color: var(--cream);
}
.badge-kind {
  background: #164c3e;
  border: 1px solid var(--line-light);
  border-radius: 999px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
}

.variant-chooser {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.variant-btn {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #08211b;
  color: var(--cream-dim);
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
}
.variant-btn.active {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}

.visual-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/5;
  background: #071d18;
  border-radius: 12px;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  max-height: 520px;
  margin: 0 auto;
  box-shadow: 0 10px 25px #0006;
}
.visual-box.story, .visual-box.reel {
  aspect-ratio: 9/16;
  max-width: 320px;
}
.visual-box img, .visual-box canvas, .visual-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.visual-box .pending-label {
  position: absolute;
  inset: auto 0 0 0;
  background: #08211bee;
  color: var(--gold);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 12px;
  text-align: center;
}

.visual-text-editor {
  margin-top: 12px;
  padding: 12px;
  background: #07231c;
  border: 1px solid var(--gold);
  border-radius: 10px;
}
.visual-text-editor label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 6px;
  text-transform: uppercase;
}
.visual-text-row {
  display: flex;
  gap: 6px;
}
.visual-text-row input {
  flex: 1;
  background: #0a2f26;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--cream);
  font-size: 0.85rem;
}
.visual-text-row button {
  border: 0;
  background: var(--gold);
  color: var(--ink);
  font-weight: 800;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.8rem;
}
.visual-note {
  font-size: 11px;
  color: var(--cream-dim);
  margin: 8px 0 0;
  line-height: 1.4;
}

.story-creator-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--teal);
  background: #0f3d30;
  color: var(--cream);
  font-weight: 800;
  border-radius: 8px;
  font-size: 0.82rem;
}
.story-creator-btn:hover { background: #165342; border-color: var(--gold); }

.reference-box {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  background: #07231c;
  font-size: 12px;
  color: var(--cream-dim);
}
.reference-box summary {
  cursor: pointer;
  font-weight: 800;
  color: #a5d3c1;
}
.reference-box img, .reference-box video {
  display: block;
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
  margin: 8px auto 0;
  border-radius: 6px;
}

/* Instagram caption mockup */
.caption-preview-box {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #08211b;
  padding: 14px;
}
.social-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
}
.social-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green);
  border: 1px solid var(--gold);
  color: var(--gold);
  display: grid;
  place-items: center;
  font-size: 16px;
}
.social-status {
  color: #a5d3c1;
  font-size: 11px;
  font-weight: 500;
}
.caption-text {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--cream);
  white-space: pre-wrap;
  margin: 10px 0 0;
  max-height: 220px;
  overflow-y: auto;
}

/* Approval box / Postiz integration */
.approval-box {
  margin-top: 16px;
  padding: 16px;
  border: 1.5px solid var(--gold);
  border-radius: 12px;
  background: #092e24;
}
.approval-box h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: var(--gold);
}
.approval-box p {
  font-size: 12px;
  color: var(--cream-dim);
  margin: 0 0 10px;
}
.approval-box label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: #a5d3c1;
  margin-bottom: 4px;
}
.approval-box input {
  display: block;
  width: 100%;
  background: #061e18;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  color: var(--cream);
  font-size: 0.85rem;
  margin-bottom: 12px;
}
.approval-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.approval-state-msg {
  font-size: 11px;
  font-weight: 700;
  margin: 8px 0 0;
  color: var(--gold);
  min-height: 16px;
}

/* Feedback comments */
.feedback-box {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.feedback-box h3 {
  font-size: 0.95rem;
  margin: 0 0 10px;
  color: var(--cream);
}
.comment-item {
  background: #07231c;
  border: 1px solid #14493a;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  margin-bottom: 6px;
}
.comment-item small {
  display: block;
  font-size: 10px;
  color: #8be0bf;
  margin-bottom: 2px;
}
.comment-add-row {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.comment-add-row input {
  flex: 1;
  background: #08211b;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
  color: var(--cream);
  font-size: 0.85rem;
}
.comment-add-row button {
  border: 0;
  background: var(--gold);
  color: var(--ink);
  font-weight: 800;
  border-radius: 6px;
  padding: 0 12px;
  font-size: 0.8rem;
}

/* Analysis prose panel */
.prose-panel {
  max-width: 960px;
  margin: 0 auto;
  background: #0c3327;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  line-height: 1.6;
}
.prose-panel h2 {
  font-size: 2rem;
  margin: 0 0 16px;
  color: var(--cream);
}
.prose-panel h3 {
  font-size: 1.3rem;
  margin: 28px 0 12px;
  color: var(--gold);
}
.prose-panel p, .prose-panel li {
  font-size: 0.92rem;
  color: var(--cream-dim);
}
.prose-panel table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 0.88rem;
}
.prose-panel th, .prose-panel td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
}
.prose-panel th {
  background: #08211b;
  color: var(--gold);
}

/* Templates grid panel */
.templates-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.template-card {
  background: #0c3327;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
}
.template-card h3 {
  margin: 4px 0 8px;
  font-size: 1.2rem;
  color: var(--cream);
}
.template-card p {
  font-size: 0.85rem;
  color: var(--cream-dim);
  margin: 0 0 10px;
}
.template-sample {
  background: #07231c;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--gold);
  margin: auto 0 12px;
}
.template-card button {
  border: 0;
  background: var(--gold);
  color: var(--ink);
  font-weight: 800;
  border-radius: 8px;
  padding: 9px;
  font-size: 0.82rem;
}

/* Modals */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #04130dee;
  overflow-y: auto;
  padding: 24px;
}
.modal-overlay.active {
  display: grid;
  place-items: center;
}
.modal-dialog {
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  border: 1px solid var(--line-light);
  border-radius: 18px;
  background: #0c3327;
  padding: 26px;
  box-shadow: 0 20px 60px #000;
}
.modal-close-btn {
  float: right;
  background: transparent;
  border: 0;
  color: var(--cream);
  font-size: 1.6rem;
  line-height: 1;
  padding: 0;
}

/* Responsive */
@media (max-width: 1024px) {
  .editor-layout {
    grid-template-columns: 1fr;
  }
  .preview-col {
    position: static;
  }
}
@media (max-width: 768px) {
  .studio-layout {
    grid-template-columns: 1fr;
  }
  .studio-sidebar {
    position: static;
    max-height: none;
  }
  .studio-item-list {
    display: flex;
    overflow-x: auto;
    gap: 8px;
  }
  .studio-item {
    min-width: 220px;
    margin-bottom: 0;
  }
  .studio-nav {
    padding: 0 12px;
  }
  .nav-brand small {
    display: none;
  }
  .form-row-2 {
    grid-template-columns: 1fr;
  }
  .cards-grid {
    grid-template-columns: 1fr;
  }
}

/* ==============================================================
   NOUVEAUX STYLES : MULTI-CANAL (LINKEDIN/INSTA), FILTRES ET ARCHIVES
   ============================================================== */

/* Sélecteur de canal dans la barre haute */
.channel-switcher {
  display: flex;
  align-items: center;
  background: #071f18;
  padding: 4px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  gap: 4px;
}
.channel-btn {
  border: 0;
  background: transparent;
  color: var(--cream-dim);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}
.channel-btn:hover {
  color: var(--cream);
  background: #0d382c;
}
.channel-btn.active {
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 2px 10px rgba(242, 194, 48, 0.35);
}
.channel-btn.active[data-channel="linkedin"] {
  background: #0a66c2;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(10, 102, 194, 0.4);
}
.channel-count {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  font-weight: 800;
}
.channel-btn.active .channel-count {
  background: rgba(0, 0, 0, 0.3);
  color: inherit;
}

/* Carte de filtres thématiques et d'activités */
.filter-group-card {
  background: #0b3024;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 16px 20px;
  margin-top: 20px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
.filter-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.filter-group-title {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--gold);
  text-transform: uppercase;
}
.filter-group-hint {
  font-size: 0.74rem;
  color: var(--cream-dim);
  font-style: italic;
}
.filter-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-chip {
  border: 1px solid var(--line);
  background: #07221a;
  color: var(--cream-dim);
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.filter-chip:hover {
  background: #0f4434;
  color: var(--cream);
  border-color: var(--gold);
  transform: translateY(-1px);
}
.filter-chip.active {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
  box-shadow: 0 2px 8px rgba(242, 194, 48, 0.4);
  font-weight: 800;
}
.filter-chip.reset-chip {
  background: #3b1111;
  color: #fca5a5;
  border-color: #ef4444;
}
.filter-chip.reset-chip:hover {
  background: #ef4444;
  color: #fff;
}

/* Barre de filtres et bascule pour masquer les déjà envoyés */
.filters-bar-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: #061e17;
  border: 1px solid var(--line);
  padding: 12px 16px;
  border-radius: 14px;
  margin: 16px 0 20px;
}
.filters-bar-wrapper .filters-bar {
  margin: 0;
  flex: 1;
}
.cal-filter-archive {
  border-color: #a855f7 !important;
  color: #d8b4fe !important;
}
.cal-filter-archive.active {
  background: #7e22ce !important;
  color: #ffffff !important;
}

/* Toggle Switch pour masquer les publications déjà envoyées */
.archive-toggle-box {
  display: flex;
  align-items: center;
}
.toggle-control {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--cream);
  background: #092c21;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  transition: border-color 0.15s ease;
}
.toggle-control:hover {
  border-color: var(--gold);
}
.toggle-control.mini {
  padding: 5px 9px;
  font-size: 0.74rem;
}
.toggle-control input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 20px;
  background-color: #051612;
  border: 1.5px solid var(--line);
  border-radius: 20px;
  transition: .2s ease;
}
.toggle-slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 3px;
  bottom: 2.5px;
  background-color: var(--cream-dim);
  border-radius: 50%;
  transition: .2s ease;
}
.toggle-control input:checked + .toggle-slider {
  background-color: var(--gold);
  border-color: var(--gold);
}
.toggle-control input:checked + .toggle-slider:before {
  transform: translateX(14px);
  background-color: var(--ink);
}

/* Alert bandeau filtre actif */
.filter-alert-box {
  background: #0b3427;
  border: 1px solid var(--gold);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.84rem;
}
.filter-alert-box span {
  color: var(--cream);
}
.btn-clear-filters {
  background: transparent;
  border: 0;
  color: var(--gold);
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
}

/* Badges de canaux sur les cartes du calendrier */
.media-badge-channel {
  position: absolute;
  top: 12px;
  left: 12px;
  font: 900 0.72rem/1 'Instrument Sans', system-ui;
  padding: 5px 9px;
  border-radius: 6px;
  box-shadow: 0 4px 12px #0007;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 5px;
}
.media-badge-channel.instagram {
  background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af);
  color: #fff;
}
.media-badge-channel.linkedin {
  background: #0a66c2;
  color: #fff;
}
.cal-card-media .media-badge-date {
  left: auto;
  right: 12px;
  top: 12px;
}
.cal-card-media .media-badge-kind {
  top: 42px;
  right: 12px;
}

/* Variations de carte pour LinkedIn */
.cal-card.linkedin-card {
  border-color: #1d5f8a;
}
.cal-card.linkedin-card:hover {
  border-color: #38bdf8;
}

/* Contrôleur de carrousel intégré à la carte */
.card-slide-nav {
  position: absolute;
  bottom: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(6, 25, 20, 0.92);
  border: 1px solid var(--line);
  padding: 4px 8px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
  z-index: 3;
}
.card-slide-btn {
  background: #0f4434;
  border: 0;
  color: var(--cream);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}
.card-slide-btn:hover {
  background: var(--gold);
  color: var(--ink);
}
.card-slide-counter {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--gold);
}

/* En-tête social dans la carte client pour LinkedIn */
.social-card-author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.social-author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0a66c2;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 0.78rem;
  border: 1px solid #38bdf8;
}
.social-author-avatar.insta {
  background: #0a3a2e;
  border-color: var(--gold);
  color: var(--gold);
}
.social-author-text strong {
  display: block;
  font-size: 0.84rem;
  color: var(--cream);
  line-height: 1.1;
}
.social-author-text small {
  font-size: 0.7rem;
  color: var(--cream-dim);
}

/* Bouton d'archivage sur les cartes */
.btn-card-archive {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--cream-dim);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-card-archive:hover {
  border-color: #ef4444;
  color: #fca5a5;
  background: #2b1111;
}

/* Studio : onglets de canaux dans la barre latérale */
.studio-channel-tabs {
  display: flex;
  background: #07221a;
  padding: 4px;
  border-radius: 8px;
  border: 1px solid var(--line);
  margin-bottom: 10px;
  gap: 4px;
}
.studio-channel-tabs button {
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--cream-dim);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
}
.studio-channel-tabs button:hover {
  color: var(--cream);
}
.studio-channel-tabs button.active {
  background: var(--gold);
  color: var(--ink);
}
.studio-channel-tabs button.active[data-studio-channel="linkedin"] {
  background: #0a66c2;
  color: #fff;
}
.studio-archive-toggle-row {
  margin-bottom: 12px;
}

/* Visionneuse carrousel dans la colonne d'aperçu du studio */
.carousel-slide-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #07221a;
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 8px;
  margin-bottom: 10px;
}
.btn-slide-nav {
  background: #0f4434;
  border: 1px solid var(--line);
  color: var(--cream);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.btn-slide-nav:hover {
  background: var(--gold);
  color: var(--ink);
}
.slide-indicator {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--gold);
}

/* Social Header dynamique LinkedIn vs Instagram */
.social-header.linkedin-header {
  border-left: 3px solid #0a66c2;
}
.social-avatar-li {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0a66c2;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.75rem;
}
.channel-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 5px;
  background: #0a3a2e;
  border: 1px solid var(--line);
  color: var(--gold);
}

.btn-link-gold {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-link-gold:hover {
  background: var(--gold);
  color: var(--ink);
}
