:root{
  /* === SCRIBY MEDIA : THEME CLAIR (2026-01-05) === */

  /* Surfaces */
  --bg0: #f6f7ff;
  --bg1: #eef1ff;
  --surface: #ffffff;
  --surface2: #f7f8ff;

  /* Texte */
  --text: #0f172a;
  --muted: rgba(15,23,42,.62);

  /* Borders / separators */
  --line: rgba(15,23,42,.10);

  /* Brand (inspiration PJ : violet / dégradés doux) */
  --brand1: #7c3aed; /* violet */
  --brand2: #ec4899; /* pink */

  /* Sidebar (clair, comme la maquette) */
  --sidebar-bg: #ffffff;
  --sidebar-text: rgba(15,23,42,.92);
  --sidebar-muted: rgba(15,23,42,.55);
  --sidebar-line: rgba(15,23,42,.10);

  /* Topbar (violet) */
  --topbar-bg: linear-gradient(90deg, #7c3aed 0%, #6d28d9 45%, #7c3aed 100%);

  /* UI */
  --shadow: 0 14px 44px rgba(15,23,42,.12);
  --radius: 18px;
  --radius2: 14px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;

  --focus: rgba(124,58,237,.22);
  --hover: rgba(124,58,237,.08);
}

*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(900px 520px at 18% 18%, rgba(124,58,237,.14), transparent 60%),
    radial-gradient(900px 560px at 80% 20%, rgba(236,72,153,.10), transparent 62%),
    linear-gradient(180deg, var(--bg1), var(--bg0));
}

/* Auth */
body.auth{
  min-height:100vh;
  display:grid;
  grid-template-columns: 1fr 1fr;
  padding:0;
  overflow:hidden;
}
body.auth::before{
  content:"";
  grid-column: 2 / 3;
  background:
    radial-gradient(900px 520px at 30% 20%, rgba(255,255,255,.20), transparent 60%),
    radial-gradient(900px 560px at 70% 60%, rgba(255,255,255,.14), transparent 62%),
    linear-gradient(135deg, rgba(124,58,237,.92), rgba(79,70,229,.92));
}
.auth-card{
  grid-column: 1 / 2;
  width:min(520px, 100%);
  justify-self:center;
  align-self:center;
  background: var(--surface);
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:28px;
  margin: 24px;
}

.brand{display:flex;align-items:center;gap:12px;margin-bottom:8px}
.brand__logo{
  width:44px;height:44px;border-radius:14px;
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
  display:flex;align-items:center;justify-content:center;
  font-weight:900;
  color:#fff;
}
.brand__title{font-weight:900;font-size:18px}
.auth-card h1{margin:14px 0 16px 0;font-size:26px}

.field{display:block;margin:12px 0}
.field span,.field label{display:block;color:var(--muted);font-size:13px;margin-bottom:6px}

.field input,.field textarea,.field select,.switcher select{
  width:100%;
  background: var(--surface);
  border:1px solid rgba(15,23,42,.14);
  color: var(--text);
  padding:12px 12px;
  border-radius: 12px;
  outline:none;
  transition: box-shadow .15s ease, border-color .15s ease, background .15s ease;
}
.field input:focus,.field textarea:focus,.field select:focus,.switcher select:focus{
  border-color: rgba(124,58,237,.45);
  box-shadow: 0 0 0 4px var(--focus);
}
.field textarea{resize:vertical}

.btn{
  display:inline-flex;align-items:center;justify-content:center;
  padding:12px 14px;border-radius: 12px;border:1px solid rgba(15,23,42,.14);
  background: var(--surface);
  color: var(--text);
  cursor:pointer;
  text-decoration:none;
  font-weight:700;
  transition: transform .05s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn:hover{
  background: rgba(124,58,237,.06);
  border-color: rgba(124,58,237,.22);
}
.btn:active{transform: translateY(1px)}
.btn--primary{
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
  border-color: rgba(124,58,237,.18);
  color:#fff;
  box-shadow: 0 12px 30px rgba(124,58,237,.18);
}
.btn--primary:hover{filter:brightness(1.02)}
.btn--sm{
  padding:8px 10px;
  border-radius: 10px;
  font-size: 13px;
}
.actions{display:flex;gap:8px;flex-wrap:wrap}
.field-error{margin-top:6px;font-size:13px;color: rgba(220,38,38,.95)}
.auth-links{margin-top:12px;color:var(--muted);font-size:13px}
.auth-links a{color: rgba(124,58,237,.95);text-decoration:none}
.auth-links a:hover{text-decoration:underline}
.auth-links .dot{margin:0 8px;opacity:.6}

.alert{
  padding:10px 12px;border-radius:12px;border:1px solid var(--line);
  margin-bottom:12px;
  background: var(--surface);
}
.alert--error{background: rgba(220,38,38,.08);border-color: rgba(220,38,38,.22)}
.alert--notice{background: rgba(124,58,237,.08);
  background: color-mix(in srgb, var(--tag-color, var(--brand1)) 18%, white);
  border-color: color-mix(in srgb, var(--tag-color, var(--brand1)) 28%, rgba(15,23,42,.10));border-color: rgba(124,58,237,.22)}

/* App layout (header violet + sidebar clair) */
body.app{min-height:100vh;display:flex;flex-direction:column}

.app-topbar{
  height:74px;
  background: var(--topbar-bg);
  color: rgba(255,255,255,.96);
  display:flex;
  align-items:center;
  padding: 0 18px;
}

.app-shell{
  flex:1;
  display:grid;
  grid-template-columns: 290px 1fr;
  min-height:0;
}

.app-sidebar{
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-line);
  color: var(--sidebar-text);
  padding: 14px 12px;
  overflow:auto;
}

.app-main{min-height:0;overflow:auto}
.content{padding:18px 18px 24px}

/* Legacy aliases (old markup) */
.sidebar{width:270px;padding:18px 16px;border-right:1px solid var(--sidebar-line);background:var(--sidebar-bg);color:var(--sidebar-text)}
.topbar{height:70px;padding:14px 18px;border-bottom:1px solid var(--line);display:flex;align-items:center;background:rgba(255,255,255,.86);backdrop-filter:blur(10px)}
.main{flex:1;display:flex;flex-direction:column}

.sidebar__brand{display:flex;align-items:center;gap:12px;margin-bottom:18px}
.sidebar__brand .brand__logo{
  width:44px;height:44px;border-radius:14px;
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
  border: 1px solid rgba(124,58,237,.18);
}
.sidebar__title{font-weight:900;font-size:18px}
.sidebar__subtitle{color:var(--sidebar-muted);font-size:12px;margin-top:2px}

.nav{display:flex;flex-direction:column;gap:4px}
.nav__section{
  margin-top:14px;margin-bottom:6px;
  color: var(--sidebar-muted);
  font-size:12px;letter-spacing:.08em;text-transform:uppercase;
}
.nav__item{
  padding:10px 12px;border-radius: 12px;
  color: var(--sidebar-text);
  text-decoration:none;
  border:1px solid transparent;
  transition: background .15s ease, border-color .15s ease;
}
.nav__item:hover{
  background: rgba(124,58,237,.08);
  border-color: rgba(124,58,237,.18);
}
.nav__item.is-active{
  background: rgba(124,58,237,.12);
  border-color: rgba(124,58,237,.22);
}

.topbar__left{flex:1}
.topbar__crumb{color:var(--muted);font-size:14px}
.topbar__right{display:flex;align-items:center;gap:12px}
.topbar__meta{display:flex;flex-direction:column;align-items:flex-end;gap:2px}
.topbar__client{font-weight:800}
.topbar__role{color:var(--muted);font-size:12px}

.userpill{
  padding:10px 12px;border-radius: 12px;
  border:1px solid var(--line);
  background: var(--surface);
}
.userpill__email{font-size:13px;color: rgba(15,23,42,.82)}

.switcher select{
  max-width:260px;
  padding:10px 10px;
  background: var(--surface);
}

/* Topbar Gmail-like (logo + search + icons) */
.tb{width:100%;display:flex;align-items:center;gap:18px}
.tb__brand{display:flex;align-items:center;gap:12px;min-width:220px}
.tb__logo{width:40px;height:40px;border-radius:14px;background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.28);display:flex;align-items:center;justify-content:center;font-weight:900;color:#fff}
.tb__title{font-weight:900;line-height:1.05}
.tb__subtitle{font-size:12px;opacity:.88}
.tb__search{flex:1;max-width:720px}
.tb__search input{width:100%;border-radius:999px;border:1px solid rgba(255,255,255,.28);background:rgba(255,255,255,.14);color:#fff;padding:12px 16px;outline:none}
.tb__search input::placeholder{color:rgba(255,255,255,.78)}
.tb__search input:focus{box-shadow:0 0 0 4px rgba(255,255,255,.16)}
.tb__actions{display:flex;align-items:center;gap:10px}
.tb__icon{width:40px;height:40px;border-radius:12px;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.22);color:#fff;text-decoration:none}
.tb__icon:hover{filter:brightness(1.05)}
.tb__switch select{max-width:180px;padding:10px 10px;border-radius:12px;border:1px solid rgba(255,255,255,.22);background:rgba(255,255,255,.14);color:#fff;outline:none}
.tb__user{padding:10px 12px;border-radius:14px;border:1px solid rgba(255,255,255,.22);background:rgba(255,255,255,.14);min-width:180px}
.tb__email{font-weight:800;line-height:1.05}
.tb__role{font-size:12px;opacity:.85;margin-top:2px}

.flash{
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius: 14px;
  margin-bottom:16px;
  background: var(--surface);
}
.flash--success{border-color: rgba(16,185,129,.28); background: rgba(16,185,129,.08)}
.flash--error{border-color: rgba(220,38,38,.26); background: rgba(220,38,38,.08)}
.flash--notice{border-color: rgba(124,58,237,.24); background: rgba(124,58,237,.08)}

.card{
  background: var(--surface);
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:18px;
}
.head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:12px}
.head h1{margin:0;font-size:30px}
.muted{color:var(--muted)}

.code{
  background: var(--surface2);
  border:1px solid var(--line);
  border-radius: var(--radius2);
  padding:14px;
  overflow:auto;
}

.tablewrap{overflow:auto;border-radius: 14px;border:1px solid var(--line);background: var(--surface)}
.table{width:100%;border-collapse:collapse;min-width:860px}
.table th,.table td{
  padding:12px 12px;
  border-bottom:1px solid var(--line);
  text-align:left;
  font-size:14px;
}
.table th{
  color: rgba(15,23,42,.68);
  font-weight:800;
  background: var(--surface2);
}
.table tr:hover td{background: rgba(124,58,237,.05)}
.truncate{max-width:380px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.pager{display:flex;justify-content:space-between;align-items:center;margin-top:12px}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:10px}
.k{color:var(--muted);font-size:12px;margin-bottom:4px}
.v{font-weight:800}

.tabs{display:grid;grid-template-columns:1fr;gap:18px;margin-top:14px}
.tab{
  padding:14px;
  border:1px solid var(--line);
  border-radius: var(--radius2);
  background: var(--surface);
}
.tab h2{margin:0 0 10px 0;font-size:18px}

.details{margin-top:12px}
details summary{cursor:pointer;color: rgba(15,23,42,.82)}

.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-top:10px}
.error{margin-top:6px;font-size:13px;color:rgba(220,38,38,.95)}
.btn--danger{background:rgba(220,38,38,.08);border-color:rgba(220,38,38,.22)}
.btn--danger:hover{background:rgba(220,38,38,.12)}

@media (max-width: 980px){
  /* App */
  .sidebar{display:none}
  .table{min-width:720px}
  .grid2{grid-template-columns:1fr}
  .grid3{grid-template-columns:1fr}

  /* Auth */
  body.auth{
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px;
    grid-template-columns: 1fr;
  }
  body.auth::before{display:none}
  .auth-card{margin:0}
}

/* === SCRIBY MEDIA AJOUT DE 2026-01-08 (UI clusters: cards + bulk actions) === */

.clusters-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap:18px;
}
@media (max-width: 980px){
  .clusters-grid{grid-template-columns:1fr}
}

.cluster-card{
  position:relative;
  border:1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  overflow:hidden;
  box-shadow: 0 10px 28px rgba(15,23,42,.10);
  transition: transform .10s ease, box-shadow .15s ease, border-color .15s ease;
}
.cluster-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 44px rgba(15,23,42,.14);
  border-color: rgba(124,58,237,.22);
}

.cluster-card__media{
  height: 200px;
  background: linear-gradient(135deg, rgba(124,58,237,.18), rgba(236,72,153,.14));
  position:relative;
}
.cluster-card__media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.cluster-card__placeholder{
  width:100%;
  height:100%;
  opacity:.65;
}

.cluster-card__check{
  position:absolute;
  top:12px;
  left:12px;
  width:34px;
  height:34px;
  border-radius: 12px;
  border:1px solid rgba(255,255,255,.42);
  background: rgba(15,23,42,.18);
  backdrop-filter: blur(6px);
  display:flex;
  align-items:center;
  justify-content:center;
}
.cluster-card__check input{
  width:18px;
  height:18px;
  accent-color: var(--brand1);
}

.badge{
  font-size:12px;
  font-weight:900;
  padding:6px 10px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.32);
  color: rgba(255,255,255,.96);
  background: rgba(15,23,42,.22);
  backdrop-filter: blur(6px);
}
.badge--trend{background: rgba(236,72,153,.28); border-color: rgba(236,72,153,.48)}
.badge--muted{background: rgba(15,23,42,.20); border-color: rgba(255,255,255,.28)}

.cluster-card__body{padding:14px 14px 12px}
.cluster-card__title{
  font-size:18px;
  font-weight:950;
  margin:0 0 8px 0;
  line-height:1.25;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient: vertical;
  overflow:hidden;
}

.cluster-card__meta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:13px;
}

.cluster-card__desc{
  margin-top:8px;
  color:rgba(15,23,42,.78);
  font-size:13px;
  line-height:1.35;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient: vertical;
  overflow:hidden;
}

.cluster-card__tags{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:10px;
}
.tag-chip{
  padding:6px 10px;
  border-radius: 999px;
  font-size:12px;
  font-weight:900;
  border:1px solid var(--line);
  background: rgba(124,58,237,.08);
  background: color-mix(in srgb, var(--tag-color, var(--brand1)) 18%, white);
  border-color: color-mix(in srgb, var(--tag-color, var(--brand1)) 28%, rgba(15,23,42,.10));
}

.cluster-card__link{
  margin-top:10px;
}
.cluster-card__link a{
  font-size:13px;
  text-decoration:none;
  color: rgba(124,58,237,.96);
}
.cluster-card__link a:hover{text-decoration:underline}

.bulkbar{
  position: sticky;
  top: 86px;
  z-index: 40;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border:1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(15,23,42,.10);
  padding:10px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top: 14px;
}
.bulkbar__left{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.bulkbar__count{font-weight:950}
.bulkbar__right{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}

.modal-overlay{
  position:fixed;
  inset:0;
  background: rgba(15,23,42,.55);
  display:none;
  z-index: 100;
  padding: 24px;
}
.modal-overlay.is-open{display:flex;align-items:center;justify-content:center}
.modal{
  width: min(520px, 100%);
  background: var(--surface);
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.modal__head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.modal__head h2{margin:0;font-size:18px}

/* === SCRIBY MEDIA AJOUT DE 2026-01-09 (UI clusters: Gmail-like + sidebar) === */

/* Unified sidebar (Option B) */
.cside{display:flex;flex-direction:column;gap:12px}
.cside__brand{display:flex;align-items:center;gap:12px;margin-bottom:2px}
.cside__logo{width:44px;height:44px;border-radius:16px;background: linear-gradient(135deg, var(--brand1), var(--brand2));color:#fff;display:flex;align-items:center;justify-content:center;font-weight:950;box-shadow:0 12px 30px rgba(15,23,42,.12)}
.cside__title{font-weight:950;font-size:16px;line-height:1.1}
.cside__subtitle{font-size:12px;color:var(--sidebar-muted);margin-top:2px}

.cside__compose{
  display:flex;align-items:center;gap:10px;
  padding:12px 12px;border-radius:16px;
  text-decoration:none;
  color: rgba(255,255,255,.96);
  border:1px solid rgba(124,58,237,.18);
  background: linear-gradient(135deg, rgba(124,58,237,.92), rgba(109,40,217,.92));
  box-shadow: 0 12px 30px rgba(124,58,237,.18);
}
.cside__compose:hover{filter:brightness(1.03)}
.cside__composeIcon{width:28px;height:28px;border-radius:12px;background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.24);display:flex;align-items:center;justify-content:center}

.cside__section{padding-top:4px}
.cside__h{font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--sidebar-muted);margin:10px 4px 6px}
.cside__h--row{display:flex;align-items:center;justify-content:space-between;gap:10px}
.cside__plus{width:28px;height:28px;border-radius:12px;display:flex;align-items:center;justify-content:center;text-decoration:none;color:rgba(15,23,42,.70);border:1px solid var(--sidebar-line);background:rgba(124,58,237,.06)}
.cside__plus:hover{background:rgba(124,58,237,.10)}

.cside__item{display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:10px 12px;border-radius:14px;
  text-decoration:none;
  color: var(--sidebar-text);
  border:1px solid transparent;
  background: transparent;
}
.cside__item:hover{background:rgba(124,58,237,.08);border-color:rgba(124,58,237,.18)}
.cside__item.is-active{background:rgba(124,58,237,.12);border-color:rgba(124,58,237,.22)}
.cside__meta{font-size:12px;color:var(--sidebar-muted)}
.cside__empty{font-size:13px;color:var(--sidebar-muted);padding:6px 10px}

.cside__tags{display:flex;flex-wrap:wrap;gap:8px;padding:4px 6px}
.cside__tag{padding:8px 10px;border-radius:999px;font-size:12px;font-weight:900;
  text-decoration:none;color: rgba(15,23,42,.86);
  border:1px solid var(--sidebar-line);
  background: color-mix(in srgb, var(--tagc, var(--brand1)) 14%, white);
}
.cside__tag:hover{border-color:rgba(124,58,237,.26)}
.cside__tag.is-active{border-color:rgba(124,58,237,.32);box-shadow:0 0 0 4px rgba(124,58,237,.10)}
.cside__tag--more{background:rgba(15,23,42,.04)}

.cside__bottom{border-top:1px solid var(--sidebar-line);padding-top:10px;margin-top:4px;display:flex;flex-direction:column;gap:4px}
.cside__logout{margin-top:auto}

.cside__more{border-top:1px dashed rgba(15,23,42,.14);padding-top:8px;margin-top:2px}
.cside__more > summary{cursor:pointer;list-style:none;font-weight:900;color:rgba(15,23,42,.70);padding:10px 10px;border-radius:14px}
.cside__more > summary::-webkit-details-marker{display:none}
.cside__more[open] > summary{background:rgba(15,23,42,.04)}

/* Clusters page: Gmail-like layout */
.clu{
  display:grid;
  grid-template-columns: 520px minmax(420px,1fr);
  grid-template-areas: "list detail";
  gap:16px;
  align-items:stretch;
  min-height:0;
}
.clu__col--list{grid-area:list}
.clu__col--detail{grid-area:detail}

@media (max-width: 1400px){
  .clu{ grid-template-columns: 480px 1fr; }
}

@media (max-width: 980px){
  .clu{
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
      "list"
      "detail";
  }
}

.clu__col{background: rgba(255,255,255,.86);backdrop-filter: blur(10px);
  border:1px solid var(--line);border-radius: 18px;box-shadow: 0 12px 34px rgba(15,23,42,.10);
  overflow:hidden;min-height: 140px;
}

.clu__col--list{display:flex;flex-direction:column;min-height:0}
.clu__listTop{padding:14px 14px 10px;border-bottom:1px solid var(--line);background:rgba(255,255,255,.88)}
.clu__kicker{font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:900}
.clu__count{font-weight:950;font-size:14px;margin-top:2px}
.clu__listTools{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.clu__bulkForm{display:flex;flex-direction:column;min-height:0;flex:1}
.clu__listScroll{overflow:auto;min-height:0}
.clu__sentinel{height:1px}

.cluItem{display:flex;gap:10px;align-items:flex-start;padding:12px 12px;border-bottom:1px solid rgba(15,23,42,.06);cursor:pointer;background:transparent}
.cluItem:hover{background:rgba(124,58,237,.06)}
.cluItem.is-active{background:rgba(124,58,237,.12)}
.cluItem__check{padding-top:3px}
.cluItem__check input{width:16px;height:16px;accent-color: var(--brand1)}
.cluItem__thumb{width:44px;height:44px;border-radius:12px;overflow:hidden;flex:0 0 auto;background:rgba(15,23,42,.04);margin-top:1px}
.cluItem__thumb img{width:100%;height:100%;object-fit:cover;display:block}
.cluItem__thumbPh{width:100%;height:100%;background:linear-gradient(135deg, rgba(124,58,237,.18), rgba(14,165,233,.12))}
.cluItem__body{flex:1;min-width:0}
.cluItem__top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.cluItem__title{font-weight:950;font-size:14px;line-height:1.25;display:flex;align-items:flex-start;gap:8px;min-width:0}
.cluItem__titleText{min-width:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.cluItem__title .badge{flex:0 0 auto; align-self:flex-start; margin-top:1px}
.cluItem__date{font-size:12px;color:var(--muted);white-space:nowrap}
.cluItem__meta{margin-top:4px;font-size:12px;color:var(--muted);display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.cluItem__meta .sep{opacity:.6}
.cluItem__st{font-weight:900}
.cluItem__snippet{margin-top:6px;font-size:12px;color:rgba(15,23,42,.78);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

.clu__col--detail{padding:0;overflow:auto;min-height:0}
.cluD__hero{height:280px;background:rgba(15,23,42,.06)}
.cluD__hero img{width:100%;height:100%;object-fit:cover;display:block}
.cluD__heroPh{width:100%;height:100%;background:linear-gradient(135deg, rgba(124,58,237,.18), rgba(236,72,153,.14))}
.cluD__body{padding:16px 18px 18px}
.cluD__label{font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:900}
.cluD__title{margin:10px 0 8px;font-size:24px;line-height:1.1;font-weight:950}
.cluD__date{font-size:13px;color:var(--muted)}
.cluD__desc{margin:14px 0 0;color:rgba(15,23,42,.78);line-height:1.45}
.cluD__chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.chip{padding:7px 10px;border-radius:999px;font-size:12px;font-weight:900;border:1px solid var(--line);background: color-mix(in srgb, var(--tagc, var(--brand1)) 18%, white)}
.chip__ico{width:14px;height:14px;border-radius:3px;vertical-align:-2px;margin-right:6px;display:inline-block}

.cluD__treat{margin-top:18px;background: linear-gradient(135deg, rgba(124,58,237,.90), rgba(109,40,217,.92));border-radius: 18px;padding:16px 16px;border:1px solid rgba(255,255,255,.18)}
.cluD__treatTitle{color:#fff;font-weight:950;letter-spacing:.04em}
.cluD__treatActions{display:flex;gap:12px;margin-top:12px;flex-wrap:wrap}
.cluD__treatActions .btn{border-color:rgba(255,255,255,.22)}
.cluD__treatActions .btn[disabled]{opacity:.7;cursor:not-allowed}

.cluD__actions{margin-top:16px}
.cluD__actionsTitle{font-weight:950;margin-bottom:8px}
.actions{display:flex;gap:10px;flex-wrap:wrap}
.cluD__note{margin-top:10px;color:var(--muted);font-size:13px}

.cluEmpty{padding:18px}
.cluEmpty__title{font-weight:950;font-size:18px}
.cluEmpty__text{color:var(--muted);margin-top:8px}

/* Sources list is now embedded inside the detail panel (masonry + accordéon) */
.cluD__sourcesWrap{margin-top:16px}
.cluD__sourcesWrap .cluS{border:1px solid rgba(15,23,42,.10);border-radius:18px;overflow:hidden;background:rgba(255,255,255,.92)}
.cluS{display:flex;flex-direction:column}

/* Accordéon (compact <1200) */
.cluS__acc{display:block}
.cluS__acc > summary{list-style:none}
.cluS__acc > summary::-webkit-details-marker{display:none}
.cluS__acc > summary.cluS__head{cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:10px}
.cluS__acc > summary.cluS__head::after{content:"";width:10px;height:10px;border-right:2px solid rgba(15,23,42,.42);border-bottom:2px solid rgba(15,23,42,.42);transform:rotate(45deg);transition:transform .15s ease;margin-left:8px}
.cluS__acc[open] > summary.cluS__head::after{transform:rotate(-135deg)}
.cluS__acc.is-fixed-open > summary.cluS__head{cursor:default;pointer-events:none}
.cluS__acc.is-fixed-open > summary.cluS__head::after{display:none}

.cluS__head{padding:14px 14px 10px;border-bottom:1px solid rgba(15,23,42,.08);font-weight:950}

/* Défilement (hauteur fixe) */
.cluS__scroll{padding:12px;max-height:90vh;overflow:auto}
@media (max-width:1199px){
  .cluS__scroll{max-height:800px}
}

/* Masonry-like (CSS columns) */
.cluS__list{column-count:3;column-gap:12px}
@media (max-width:1599px){
  .cluS__list{column-count:2}
}
@media (max-width:900px){
  .cluS__list{column-count:1}
}
.cluS__card{break-inside:avoid;margin:0 0 12px}

/* Fullscreen clusters: keep scrolling inside list/detail panels (desktop) */
@media (min-width: 981px){
  body.clusters{height:100vh;overflow:hidden}
  body.clusters .app-shell{height: calc(100vh - 74px)}
  body.clusters .app-main{overflow:hidden}
  body.clusters .content{height:100%;overflow:hidden}
  body.clusters .clu{height:100%}
  body.clusters .clu__col{min-height:0}
  body.clusters .clu__col--list{height:100%}
  body.clusters .clu__listScroll{flex:1;height:auto}
}
.cluS__card{display:flex;flex-direction:column;gap:0;text-decoration:none;color:var(--text);border:1px solid rgba(15,23,42,.10);background:rgba(255,255,255,.95);border-radius:16px;overflow:hidden;box-shadow: 0 10px 26px rgba(15,23,42,.08)}
.cluS__card:hover{border-color:rgba(124,58,237,.22)}
.cluS__thumb{width:100%;height:140px;flex:0 0 auto;background:rgba(15,23,42,.06)}
.cluS__thumb img{width:100%;height:100%;object-fit:cover;display:block}
.cluS__thumbPh{width:100%;height:100%;background:linear-gradient(135deg, rgba(124,58,237,.14), rgba(236,72,153,.10))}
.cluS__meta{padding:12px 12px 12px;min-width:0;flex:1}
.cluS__title{font-weight:950;font-size:13px;line-height:1.25;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.cluS__sub{margin-top:6px;font-size:12px;color:var(--muted);display:flex;gap:8px;flex-wrap:wrap}
.cluS__src{font-weight:900;color:rgba(15,23,42,.72)}
.cluS__ico{width:14px;height:14px;border-radius:3px;vertical-align:-2px;margin-right:6px;display:inline-block}
.cluS--empty{padding:14px}
.cluS__empty{color:var(--muted);padding:10px}

/* === FIN SCRIBY MEDIA AJOUT DE 2026-01-09 (UI clusters: Gmail-like + sidebar) === */


/* === FIN SCRIBY MEDIA AJOUT DE 2026-01-08 (UI clusters: cards + bulk actions) === */


/* === SCRIBY MEDIA AJOUT DE 2026-01-09 (UI clusters: gmail-like layout) === */
.gm{
  display:grid;
  grid-template-columns: 260px minmax(420px, 1fr) 360px;
  gap:14px;
  min-height: calc(100vh - 220px);
  align-items:stretch;
}

.gm__col{
  background: var(--surface);
  border:1px solid var(--line);
  border-radius: var(--radius2);
  box-shadow: 0 10px 24px rgba(15,23,42,.06);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  min-height: 220px;
}

.gm__col--nav{position:sticky; top: 14px; height: calc(100vh - 160px)}
.gm__col--detail{position:sticky; top: 14px; height: calc(100vh - 160px)}

.gm-nav__section{padding:14px}
.gm-nav__title{font-size:12px; text-transform:uppercase; letter-spacing:.08em; color: var(--muted); margin:0 0 8px}
.gm-nav__links{display:flex; flex-direction:column; gap:6px}
.gm-nav__item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:9px 10px;
  border-radius: 12px;
  text-decoration:none;
  color: var(--text);
  border:1px solid transparent;
}
.gm-nav__item:hover{background: var(--hover); border-color: rgba(124,58,237,.14)}
.gm-nav__item.is-active{background: rgba(124,58,237,.12); border-color: rgba(124,58,237,.22)}
.gm-nav__count{font-size:12px; color: var(--muted)}

.gm-toolbar{
  padding:12px 14px;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  background: linear-gradient(180deg, rgba(124,58,237,.05), transparent);
}
.gm-toolbar__left{display:flex; align-items:center; gap:10px; flex-wrap:wrap}
.gm-toolbar__right{display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end}
.gm-search{display:flex; align-items:center; gap:8px}
.gm-search input{
  width: min(520px, 56vw);
  border:1px solid var(--line);
  border-radius: 999px;
  padding:10px 12px;
  background: var(--surface);
  outline:none;
}
.gm-search input:focus{box-shadow: 0 0 0 4px var(--focus); border-color: rgba(124,58,237,.28)}
.gm-chip{
  padding:6px 10px;
  border-radius: 999px;
  border:1px solid var(--line);
  font-size:12px;
  color: var(--muted);
  background: var(--surface2);
}

.gm-list{overflow:auto; padding:8px}
.gm-sentinel{padding:14px; text-align:center; color: var(--muted)}

.gm-row{
  display:flex;
  gap:10px;
  padding:10px;
  border-radius: 14px;
  border:1px solid transparent;
  cursor:pointer;
}
.gm-row:hover{background: rgba(124,58,237,.05); border-color: rgba(124,58,237,.12)}
.gm-row.is-selected{background: rgba(124,58,237,.10); border-color: rgba(124,58,237,.20)}
.gm-row__check{flex: 0 0 auto; padding-top: 3px}
.gm-row__check input{width:16px; height:16px}
.gm-row__main{flex:1 1 auto; min-width:0}
.gm-row__right{flex:0 0 auto; display:flex; align-items:flex-start}
.gm-row__title{display:flex; align-items:center; gap:8px; flex-wrap:wrap}
.gm-row__t{font-weight:900; line-height:1.1}
.gm-row__meta{margin-top:4px; font-size:12px; color: var(--muted)}
.gm-row__desc{margin-top:6px; font-size:13px; color: rgba(15,23,42,.72)}
.gm-row__tags{margin-top:8px; display:flex; gap:6px; flex-wrap:wrap}

.gm-badge{
  font-size:12px;
  padding:4px 8px;
  border-radius: 999px;
  border:1px solid var(--line);
  color: var(--text);
  background: var(--surface2);
}
.gm-badge--ok{border-color: rgba(16,185,129,.25); background: rgba(16,185,129,.10)}

.gm-pill{
  font-size:12px;
  padding:4px 8px;
  border-radius: 999px;
  border:1px solid var(--line);
  color: var(--muted);
  background: rgba(15,23,42,.03);
}

.gm-tagchip{
  font-size:12px;
  padding:4px 8px;
  border-radius: 999px;
  border:1px solid rgba(124,58,237,.18);
  background: rgba(124,58,237,.08);
  color: var(--text);
}
.gm-tagchip{ box-shadow: inset 0 0 0 1px rgba(255,255,255,.35)}
.gm-tagchip[style*="--tagc"]{border-color: color-mix(in srgb, var(--tagc) 35%, transparent); background: color-mix(in srgb, var(--tagc) 16%, transparent)}
.gm-tagchip--more{border-style:dashed; color: var(--muted)}

.gm-detail{overflow:auto; padding:14px}
.gm-detail__head{display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-bottom:10px}
.gm-detail__title{margin:0; font-size:18px; font-weight:950}
.gm-detail__meta{font-size:12px; color: var(--muted); margin-top:6px}
.gm-detail__media{margin-top:12px; border-radius: 16px; overflow:hidden; border:1px solid var(--line)}
.gm-detail__media img{width:100%; height: 180px; object-fit:cover; display:block}
.gm-detail__section{margin-top:14px}
.gm-detail__section h3{margin:0 0 8px; font-size:13px; text-transform:uppercase; letter-spacing:.08em; color: var(--muted)}
.gm-detail__articles{display:flex; flex-direction:column; gap:8px}
.gm-article{display:flex; gap:10px; align-items:flex-start; padding:10px; border:1px solid var(--line); border-radius: 14px; text-decoration:none; color: var(--text); background: var(--surface2)}
.gm-article:hover{background: rgba(124,58,237,.06); border-color: rgba(124,58,237,.18)}
.gm-article__thumb{width:64px; height:64px; border-radius: 12px; border:1px solid var(--line); background: rgba(15,23,42,.03); object-fit:cover; flex:0 0 auto}
.gm-article__body{min-width:0}
.gm-article__t{font-weight:900; font-size:13px; line-height:1.2; margin:0}
.gm-article__m{font-size:12px; color: var(--muted); margin-top:4px}

.gm-modal-overlay{
  position:fixed;
  inset:0;
  background: rgba(15,23,42,.55);
  display:none;
  z-index: 100;
  padding: 24px;
}
.gm-modal-overlay.is-open{display:flex; align-items:center; justify-content:center}
.gm-modal{
  width: min(520px, 100%);
  background: var(--surface);
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.gm-modal__head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.gm-modal__head h2{margin:0;font-size:18px}

@media (max-width: 1200px){
  .gm{grid-template-columns: 240px minmax(360px,1fr) 320px}
}
@media (max-width: 980px){
  .gm{grid-template-columns: 1fr;}
  .gm__col--nav,.gm__col--detail{position:static; height:auto}
}

/* === FIN SCRIBY MEDIA AJOUT DE 2026-01-09 (UI clusters: gmail-like layout) === */


/* === SCRIBY MEDIA AJOUT DE 2026-01-10 (merge modal styles) === */
.mergeModal__list{
  display:flex;
  flex-direction:column;
  gap:10px;
  max-height: min(52vh, 420px);
  overflow:auto;
  padding-right: 4px;
}
.mergePick{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius: 12px;
  cursor:pointer;
  background: var(--surface2);
}
.mergePick input{ margin-top:3px; }
.mergePick__title{ font-weight: 650; display:block; line-height:1.25; }
.mergePick__sub{ display:block; opacity:.65; font-size:12px; margin-left:auto; }
.mergePick:hover{ background: var(--surface); }
/* === FIN SCRIBY MEDIA AJOUT DE 2026-01-10 (merge modal styles) === */
