/* ===================================================================
   GBU Connect — Design system « Foyer »
   Tokens et composants fidèles au handoff Claude Design.
   =================================================================== */
:root {
  --bg:#FBF6EF; --panel:#FFFFFF; --panel2:#FBF6EF; --border:#EBE1D4; --line:#F0E6D8;
  --text:#2A211B; --muted:#8C7E72; --faint:#A8998B;
  --primary:#E8732A; --primary-press:#C6611C; --soft:#FBF1E6;
  --grad:linear-gradient(150deg,#FF8A1E,#FFC93C); --on-primary:#fff;
  --shadow:0 10px 30px rgba(42,33,27,.10);
  --display:'Newsreader',serif; --ui:'Hanken Grotesk',sans-serif;
  --ok:#2F7D52; --ok-bg:#EAF4EC; --live:#D8472B;
}
* { box-sizing:border-box; }
html,body { margin:0; }
body {
  background:var(--bg); color:var(--text); font-family:var(--ui);
  font-size:14px; -webkit-font-smoothing:antialiased;
}
a { color:inherit; text-decoration:none; }
button { font-family:inherit; cursor:pointer; border:none; background:none; }
::placeholder { color:var(--faint); }

@keyframes gbuLive { 0%,100%{opacity:1;} 50%{opacity:.35;} }
@keyframes gbuBars { 0%,100%{transform:scaleY(.4);} 50%{transform:scaleY(1);} }

/* ===================== Shell ===================== */
.app { display:flex; min-height:100vh; }

.sidebar {
  width:258px; flex:none; background:var(--panel); border-right:1px solid var(--border);
  display:flex; flex-direction:column; padding:22px 16px;
  position:sticky; top:0; height:100vh;
}
.brand { display:flex; align-items:center; gap:11px; padding:0 8px 22px; }
.brand .logo {
  height:38px; width:auto; flex:none; display:block;
  object-fit:contain;                 /* logo officiel GBUM (fond detoure) */
}
.brand .name { font-weight:700; font-size:16px; line-height:1.05; }
.brand .sub { font-size:11px; color:var(--faint); }

.nav { display:flex; flex-direction:column; gap:3px; }
.nav-item {
  display:flex; align-items:center; gap:12px;
  padding:11px 12px; border-radius:11px; color:var(--muted);
  font-size:14.5px; font-weight:500; transition:none;
}
.nav-item svg { width:19px; height:19px; flex:none; }
.nav-item:hover { background:var(--soft); }
.nav-item.active { color:var(--primary); background:var(--soft); font-weight:600; }
.nav-badge {
  margin-left:auto; background:var(--primary); color:var(--on-primary);
  font-size:11px; font-weight:700; padding:1px 7px; border-radius:9px;
}
.nav-live {
  margin-left:auto; display:flex; align-items:center; gap:4px;
  color:var(--live); font-size:10.5px; font-weight:700;
}
.nav-live .dot {
  width:7px; height:7px; border-radius:50%; background:var(--live);
  animation:gbuLive 1.4s infinite;
}
.sidebar-bottom { margin-top:auto; display:flex; flex-direction:column; gap:10px; }
.user-card {
  display:flex; align-items:center; gap:10px; padding:10px; border-radius:12px;
  background:var(--panel2); border:1px solid var(--border);
}
.user-card .meta { line-height:1.15; min-width:0; }
.user-card .meta .n { font-weight:600; font-size:13px; }
.user-card .meta .r { font-size:11px; color:var(--faint); }

/* avatars */
.avatar {
  border-radius:50%; color:#fff; display:flex; align-items:center;
  justify-content:center; font-weight:700; flex:none;
}
.avatar.s28 { width:28px; height:28px; font-size:11px; }
.avatar.s36 { width:36px; height:36px; font-size:13px; }
.avatar.s38 { width:38px; height:38px; font-size:13px; }
.avatar.s42 { width:42px; height:42px; font-size:14px; }
.avatar.s62 { width:62px; height:62px; font-size:20px; }

/* main + header */
.main { flex:1; display:flex; flex-direction:column; min-width:0; }
.topbar {
  display:flex; align-items:center; gap:18px; padding:18px 30px;
  border-bottom:1px solid var(--border); background:var(--panel);
  position:sticky; top:0; z-index:20;
}
.topbar .title { font-family:var(--display); font-size:24px; font-weight:500; line-height:1.1; }
.topbar .subtitle { font-size:12.5px; color:var(--faint); margin-top:2px; }
.topbar .right { margin-left:auto; display:flex; align-items:center; gap:16px; }
.search {
  display:flex; align-items:center; gap:7px; background:var(--panel2);
  border:1px solid var(--border); border-radius:11px; padding:8px 12px;
  color:var(--faint); font-size:13px; width:230px;
}
.search input { border:none; background:none; outline:none; color:var(--text); width:100%; font-size:13px; }
.badge-enc {
  display:flex; align-items:center; gap:6px; background:var(--ok-bg); color:var(--ok);
  padding:7px 12px; border-radius:20px; font-size:12px; font-weight:600;
}
.content { flex:1; padding:28px 30px; }

/* ===================== Composants ===================== */
.two-col { display:flex; gap:26px; align-items:flex-start; }
.col-main { flex:1; min-width:0; }
.rail { width:300px; flex:none; display:flex; flex-direction:column; gap:18px; }

.card {
  background:var(--panel); border:1px solid var(--border); border-radius:18px;
  padding:18px 20px; box-shadow:var(--shadow);
}
.card-tight { border-radius:16px; padding:14px 16px; box-shadow:none; }
.section-title { font-family:var(--display); font-size:20px; font-weight:500; margin:24px 2px 14px; }
.section-title:first-child { margin-top:0; }

.serif { font-family:var(--display); font-weight:500; }
.muted { color:var(--muted); }
.faint { color:var(--faint); }

/* boutons */
.btn {
  display:inline-flex; align-items:center; gap:8px; justify-content:center;
  padding:10px 16px; border-radius:11px; font-weight:600; font-size:13.5px;
}
.btn svg { width:15px; height:15px; }
.btn-primary { background:var(--primary); color:var(--on-primary); }
.btn-primary:hover { background:var(--primary-press); }
.btn-soft { background:var(--soft); color:var(--primary-press); }
.btn-ghost { background:var(--panel); border:1px solid var(--border); color:var(--text); }
.btn-live { background:var(--live); color:#fff; }
.btn-block { width:100%; }
.btn-lg { padding:13px 20px; font-size:15px; }

/* tags / pills */
.tag {
  font-size:11px; font-weight:600; color:var(--primary-press); background:var(--soft);
  padding:5px 11px; border-radius:14px;
}
.tag-ok { color:var(--ok); background:var(--ok-bg); }
.pill {
  padding:9px 16px; border-radius:50px; font-size:13.5px; font-weight:600;
  background:var(--panel); border:1px solid var(--border); color:var(--muted);
}
.pill.active { background:var(--primary); color:var(--on-primary); border-color:var(--primary); }

/* bannière dégradé */
.banner {
  border-radius:20px; position:relative; overflow:hidden; background:var(--grad);
  padding:22px 24px; color:var(--on-primary); box-shadow:var(--shadow);
}
.live-pill {
  display:inline-flex; align-items:center; gap:5px; background:var(--live); color:#fff;
  padding:3px 9px; border-radius:7px; font-size:12px; font-weight:700;
}
.live-pill .dot { width:6px; height:6px; border-radius:50%; background:#fff; animation:gbuLive 1.4s infinite; }
.banner .glass {
  display:inline-flex; align-items:center; gap:8px; background:rgba(255,255,255,.22);
  border:1px solid rgba(255,255,255,.4); padding:9px 16px; border-radius:11px;
  font-weight:700; font-size:13.5px; margin-top:16px; color:#fff;
}

/* fil d'actualités */
.post .head { display:flex; align-items:center; gap:11px; }
.post .author { font-weight:600; font-size:14.5px; }
.post .ptitle { font-family:var(--display); font-size:18px; font-weight:500; margin-top:13px; }
.post .body { font-size:14px; color:var(--muted); line-height:1.55; margin-top:6px; }
.post .actions { display:flex; align-items:center; gap:20px; margin-top:15px; color:var(--faint); font-size:13px; }
.post .actions svg { width:16px; height:16px; }
.act { display:flex; align-items:center; gap:6px; }

/* listes rail */
.rail-row { display:flex; align-items:center; gap:11px; padding:9px 0; }
.rail-row + .rail-row { border-top:1px solid var(--line); }
.datechip {
  width:42px; height:42px; border-radius:11px; background:var(--soft); color:var(--primary-press);
  display:flex; flex-direction:column; align-items:center; justify-content:center; flex:none; line-height:1;
}
.datechip .d { font-weight:700; font-size:15px; }
.datechip .m { font-size:9.5px; text-transform:uppercase; }

/* placeholder vidéo */
.video-ph {
  background-color:#2A211B;
  background-image:repeating-linear-gradient(45deg, rgba(232,115,42,.18) 0 12px, rgba(232,115,42,.05) 12px 24px);
  border-radius:16px; position:relative; overflow:hidden;
  display:flex; align-items:center; justify-content:center;
  color:rgba(255,255,255,.8); font-family:ui-monospace,monospace; font-size:12px;
}
.eq { display:inline-flex; align-items:flex-end; gap:3px; height:16px; }
.eq i { width:3px; height:100%; background:currentColor; border-radius:2px; transform-origin:bottom; animation:gbuBars .8s infinite; }
.eq i:nth-child(2){ animation-delay:.2s; } .eq i:nth-child(3){ animation-delay:.4s; }

/* grilles */
.grid-3 { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.grid-4 { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }

/* toggles */
.toggle { width:42px; height:24px; border-radius:50px; background:var(--border); position:relative; flex:none; }
.toggle.on { background:var(--primary); }
.toggle::after { content:""; position:absolute; top:3px; left:3px; width:18px; height:18px; border-radius:50%; background:#fff; transition:left .15s; }
.toggle.on::after { left:21px; }
.row-between { display:flex; align-items:center; justify-content:space-between; gap:14px; }
.field { display:flex; flex-direction:column; gap:6px; margin-bottom:14px; }
.field label { font-size:12.5px; color:var(--muted); font-weight:600; }
.field input, .field select, .input {
  background:var(--panel2); border:1px solid var(--border); border-radius:11px;
  padding:11px 13px; font-size:14px; color:var(--text); outline:none; font-family:inherit;
}
.divider { height:1px; background:var(--line); margin:16px 0; }

/* utilitaires */
.flex { display:flex; }
.between { display:flex; align-items:center; justify-content:space-between; }
.gap8 { gap:8px; } .gap12 { gap:12px; } .gap16 { gap:16px; }
.center { display:flex; align-items:center; }
.mt8{margin-top:8px;} .mt12{margin-top:12px;} .mt18{margin-top:18px;} .mt24{margin-top:24px;}
.note { font-size:12.5px; color:var(--faint); }

@media (max-width: 980px) {
  .two-col { flex-direction:column; }
  .rail { width:100%; }
  .grid-3 { grid-template-columns:repeat(2,1fr); }
  .grid-4 { grid-template-columns:repeat(2,1fr); }
}

/* ===================== Disponibilités (sondage) ===================== */
.avail-row {
  display:flex; align-items:center; gap:14px;
  border:1px solid var(--border); border-radius:14px; padding:13px 16px;
}
.avail-btn {
  padding:8px 14px; border-radius:10px; font-size:12.5px; font-weight:600;
  background:transparent; color:var(--faint); border:1px solid var(--border);
}
.avail-btn.on-yes   { background:var(--ok-bg); color:var(--ok); border-color:var(--ok); }
.avail-btn.on-maybe { background:var(--soft); color:var(--primary-press); border-color:var(--primary-press); }
.avail-btn.on-no    { background:#FBEAE7; color:#B0473F; border-color:#B0473F; }

.wa-icon {
  width:38px; height:38px; flex:none; border-radius:11px; background:#EAF4EC; color:#2F7D52;
  display:flex; align-items:center; justify-content:center;
}
.btn-wa { background:#25D366; color:#fff; }
.btn-wa:hover { background:#1FB458; }
.salut-pill {
  font-size:12.5px; background:var(--soft); color:var(--primary-press);
  padding:6px 12px; border-radius:12px;
}

.delivery-row {
  display:flex; align-items:center; gap:13px; padding:13px 18px;
  border-bottom:1px solid var(--line);
}
.delivery-row:last-child { border-bottom:none; }
.status-badge {
  font-size:11.5px; font-weight:600; padding:5px 12px; border-radius:14px;
  width:84px; text-align:center; flex:none;
}
.status-repondu   { background:var(--ok-bg); color:var(--ok); }
.status-lu        { background:var(--soft); color:var(--primary-press); }
.status-envoye    { background:var(--panel2); color:var(--muted); }
.status-a_envoyer { background:var(--panel2); color:var(--faint); border:1px dashed var(--border); }

/* Tableau des réponses — ⚠ mêmes pistes sur les 3 rangées (voir handoff) */
.dispo-scroll { overflow-x:auto; }
.dispo-inner  { min-width:760px; }
.dispo-grid   { display:grid; grid-template-columns:186px repeat(8,minmax(0,1fr)); align-items:center; }
.dispo-grid + .dispo-grid { border-top:1px solid var(--line); }
.dispo-head { background:var(--panel2); border-bottom:1px solid var(--border); }
.dispo-col  { padding:13px 8px; text-align:center; border-left:1px solid var(--border); }
.dispo-cell {
  display:flex; align-items:center; justify-content:center; height:52px;
  border-left:1px solid var(--border); font-size:15px; font-weight:700;
}
.dispo-cell.c-yes   { color:var(--ok); background:var(--ok-bg); }
.dispo-cell.c-maybe { color:var(--primary-press); background:var(--soft); }
.dispo-cell.c-no    { color:#B0473F; }
.dispo-cell.c-none  { color:var(--faint); }
.dispo-total { background:var(--panel2); }
.dispo-total .dispo-cell { height:46px; font-size:14px; color:var(--muted); background:transparent; }
.dispo-total .dispo-cell.best { background:var(--primary); color:var(--on-primary); }
