/* ===== Moodboard-inspired style (soft gradients, cards, rounded) ===== */
:root{
  --bg: #0f1115;
  --paper: rgba(255,255,255,.06);
  --paper-2: rgba(255,255,255,.04);
  --line: rgba(255,255,255,.10);
  --over_text: #ffffff;
  --muted: #a9b2c4;
  --primary: #ff7a59;  /* warm coral for CTA */
  --accent: #aD8574b;   /* soft violet */
  --teal: #6ee7ff;     /* cyan accent */
  --danger: #ff6b6b;
  --radius: 16px;
  --shadow: 0 12px 40px rgba(0,0,0,.35);
}
*{box-sizing:border-box}
/*html,body{height:100%}*/
body{
  margin:0; /*color: var(--text);*/
  /*background:
    radial-gradient(800px 500px at 10% 10%, rgba(218, 86, 86, 0.75), transparent 50%),
    radial-gradient(800px 500px at 85% 20%, rgba(110,231,255,.16), transparent 50%),
    radial-gradient(800px 600px at 50% 100%, rgba(255,122,89,.15), transparent 50%),
    rgba(240, 242, 245, 1);*/
    
   font: 14px/1.4 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;
}





/* ######## TOPBAR ####### */


.topbar{
  position:sticky; top:0; z-index:50;
  height:64px; display:flex; align-items:center; gap:14px;
  padding-top:10px;
  pointer-events: none !important; /* laisse passer les clics au centre, même si inline auto */
  /*backdrop-filter: blur(8px);*/
  /*border-bottom:1px solid var(--line);*/
}
.topbar .brand,
.topbar .top-actions{ pointer-events: auto; }
.brand{
  display:flex; 
  align-items:center; 
  font-weight:800; 
  letter-spacing:.35px;
  background: rgba(18,22,32,.7); border:1px solid var(--line);
  border-radius: 999px; padding:8px 12px; box-shadow: var(--shadow);
  margin-left: 16px;
  height: 60px;
  gap: 2px;
  padding-left: 30px;
  padding-right: 30px;
}

.logo{
  border-radius:10px;
  display:grid;place-items:center;font-weight:900;
}
.brand-text{
  font-size: 34px;
  font-weight: 600;
  margin-bottom: -5px;
}
.brand-text em{font-style:normal; color:var(--muted); font-weight:600; font-size: normal; margin-left: 5px;}


/* Top actions */
.top-actions{
  margin-left:auto;
  margin-right: 16px;
  display:flex; 
  align-items:center;
  gap:10px;

  background: rgba(18,22,32,.7); border:1px solid var(--line);
  border-radius: 999px; box-shadow: var(--shadow);
  padding:8px 20px 8px 20px;
}
.progress-stack{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:110px;
  align-items:flex-end;
}
.progress-stack.progress-stack--public{
  min-width:10px;
}
.progress-pill{
  position:relative;
  width:110px;
  height:12px;
  border-radius:999px;
  overflow:hidden;
  background: rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.12);
}
.progress-pill .pill-fill{
  position:absolute;
  top:0; bottom:0;
  right:0;
  width:0%;
  transition: width .25s ease;
  background: linear-gradient(135deg, #22c55e, #16a34a);
}
.progress-pill.pill-user .pill-fill{
  background: var(--sb-accent, #43BCCD);
}
.progress-pill.pill-wide{
  width:100px;
  height:20px;
}
.progress-pill .pill-label{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:11px;
  font-weight:800;
  color:#fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.35);
}
.change-action{
    gap: 10px;
    align-items: center;
}

.btn{
  appearance:none; border:0; cursor:pointer;
  padding:10px 14px; border-radius:12px; font-weight:700; letter-spacing:.2px;
  background: var(--paper-2); color: var(--over_text); border: 1px solid var(--line);
  transition: transform .08s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover{ transform: translateY(-1px); box-shadow: var(--shadow) }
.btn:active{ transform: translateY(0) scale(.99) }
.btn.primary{ background: linear-gradient(135deg, var(--primary), #D85745); color: white; border:none }
.btn.ghost{ background: rgba(255,255,255,.06) }
.btn.hollow{
  background: transparent;
  border:1px dashed white/*var(--primary)*/;
  /*color: var(--primary);*/
}
.btn.icon{ width:40px; height:40px; padding:0; display:grid; place-items:center; font-size:20px }
.btn.small{ padding:6px 10px; border-radius:10px; font-weight:700 }
.btn--with-icon{
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.btn--with-icon svg{
  width:18px;
  height:18px;
  stroke: currentColor;
}

.avatars{ display:flex; }
.avatar{
  width:34px; height:34px; border-radius:999px;
  display:grid; place-items:center; font-weight:800; font-size:17px;
  border:1px solid rgba(0, 0, 0, 0.823);
  margin-right: 5px;
  background: #F9C80E;
  color: #fff;
}

/* Dropdown menu */
.menu{ position:relative }
.dropdown{
  position:absolute; right:0; top:48px; width:200px; padding:8px;
  background: rgba(18,22,32,.98);
  border:1px solid var(--line); border-radius:14px; box-shadow: var(--shadow);
  transform: translateY(-6px); opacity:0; pointer-events:none;
  transition: transform .16s ease, opacity .16s ease;
}
.dropdown[aria-hidden="false"]{ transform: translateY(0); opacity:1; pointer-events:auto }
.dropdown-item{
  width:100%; text-align:left; padding:10px 10px; border-radius:8px; background: transparent; color: var(--over_text);
  border:0; cursor:pointer;
}
.dropdown-item:hover{ background: rgba(255,255,255,.06) }
.dropdown-item.danger{ color: var(--danger) }
.dropdown hr{ border:0; border-top:1px solid var(--line); margin:6px 0 }

/* Layout */
.shell{ 
  display:grid; 
  grid-template-columns: 300px 1fr; 
  gap:16px; 
  padding:16px; 
}







/* ######### SIDEBAR ######## */


.sidebar{
  background: rgba(85, 85, 85, 0.906); 
  border:1px solid var(--line); 
  border-radius: var(--radius);
  padding:12px; align-self:start;
  margin-top: 20vh;
  margin-left: 16px;
  width: 300px;
}
.board-card{
  background: rgba(255,255,255,.04);
  border:1px solid var(--line); border-radius: 14px; padding:10px; margin-bottom:12px;
}
.board-card.muted{ opacity: 0.8; }
.board-title{font-size:16px; font-weight:800; color: white; margin-bottom:8px }
.tabs{ display:flex; gap:8px; margin-bottom:10px }
.chip{
  padding:6px 10px; border-radius:999px; font-size:12px; font-weight:800; letter-spacing:.3px;
  background: rgba(255,255,255,.06); border:1px solid var(--line); color:var(--muted);
}
.chip.active{ background: linear-gradient(135deg, #a78bfa, #6ee7ff); color:#0f1115; border:none }
.team{ display:grid; gap:8px }
.team-row{ display:flex; align-items:center; justify-content:space-between }
.member{ font-weight:700 }
.color-tag{ width:16px; height:8px; border-radius:3px; display:inline-block }
.color-tag.green{ background:#22c55e }
.color-tag.orange{ background:#ff9f43 }
.add-member{ color:#7cc4ff; text-decoration:none; font-weight:700; font-size:13px }
.add-member:hover{ text-decoration:underline }
.btn.create{ width:100%; margin-top:8px }

/* NOM  POTENTIELLEMENT PROBLéMATIQUE*/
.whiteboard{
  min-height:70vh; position:relative;
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
  border:1px solid var(--line); border-radius: var(--radius);
}

.hint{ color:var(--muted); padding:12px }










/* ######### TOOLBAR ########## */


.toolbar{
  position:absolute; left:50%; bottom:16px; transform: translateX(-50%);
  display:flex; align-items:center; gap:10px;
  background: rgba(18,22,32,.7);
  border:1px solid var(--line);
  border-radius: 999px;
  padding:8px 12px;
  box-shadow: var(--shadow);
}
.tool{ background: transparent; color: var(--over_text); border:0; cursor:pointer; padding:8px 10px; border-radius:10px }
.tool:hover{ background: rgba(255,255,255,.06) }
.tool.label{ font-weight:800; color: var(--muted) }
.tool.tool--icon{
  width:42px;
  height:42px;
  padding:8px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.toolbar .tool svg{
  width:22px;
  height:22px;
  display:block;
  stroke: currentColor;
}
.toolbar .tool svg path{
  stroke: currentColor;
}
.toolbar .tool[data-tool="delete"]:hover{
  color: var(--danger);
}
.toolbar .tool[data-tool="add"]:hover{
  color: #22c55e; /* green cue */
}
.toolbar .tool[data-tool="flow"]:hover,
.toolbar .tool[data-tool="columns"]:hover{
  color: var(--teal);
}

/* Overlays */


.modal{
  position:fixed; inset:0; display:grid; place-items:center; z-index:90; pointer-events:none;
}
.modal-card{
  width: clamp(320px, 46vw, 520px);
  pointer-events:auto;
  background: #f8f9fb; /* fond plus doux*/
  transform: translateY(14px) scale(.985); opacity:0;
  transition: transform .18s ease, opacity .18s ease;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.15);
  color: #1a1d23;
  width: clamp(380px, 55vw, 640px);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

}
.modal[aria-hidden="false"] .modal-card{ transform: translateY(0) scale(1); opacity:1 }
.modal-header, .modal-footer{ 
    display:flex;
    justify-content:space-between; 
    align-items:center; 
    padding:10px 10px;
    font-size: large; 
    border-bottom:1px solid var(--line); border-radius: 18px; border-color: rgba(0, 0, 0, 0.08);}
.modal-footer{ 
    border-top:1px solid var(--line); 
    border-bottom:0 
}
.modal-body{ 
    padding:16px; 
    display:grid; 
    gap:10px;
   /* background-color: white;
    border-radius: 18px;
    margin-top: 20px;
    margin-bottom: 20px;*/
}
.modal-body label{ display:grid; gap:6px; font-weight:700; color: var(--muted) }
.modal-body input{
  padding:10px; border-radius:10px; border:1px solid var(--line); background: #0e1320; color: var(--over_text);
}

/* ===== Consent modal (cookies/analytics) ===== */
.modal-card--light.consent-modal{
  width: min(460px, 92vw);
  color: #555e6a;
}
.consent-header{
  justify-content: center;
}
.consent-body{
  position: relative;
  padding-right: 150px;
  color: inherit;
}
.consent-illu{
  position: absolute;
  top: -120px;
  right: -32px;
  width: 128px;
  height: auto;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  opacity: 0.95;
}
.consent-lead{
  margin: 0;
  font-weight: 500;
  color: inherit;
  text-align: justify;
  
  padding-right: 10px;
  padding-left: 10px;
}
.consent-list{
  margin: 10px 0 0;
  padding-left: 18px;
  color: inherit;
}
.consent-links{
  display:flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
  margin-top: 8px;
}
.consent-tertiary{
  appearance:none;
  border:0;
  padding:0;
  background: transparent;
  cursor: pointer;
  color: #6b7280;
  font-weight: 700;
  font-size: 12.5px;
  text-decoration: none;
}
.consent-tertiary:hover{
  color: #374151;
  text-decoration: underline;
}
.consent-tertiary:focus{
  outline: none;
}
.consent-tertiary:focus-visible{
  outline: 2px solid rgba(255, 122, 89, 0.30);
  outline-offset: 2px;
  border-radius: 10px;
}
.consent-k{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12.5px;
  background: rgba(0,0,0,0.04);
  padding: 2px 6px;
  border-radius: 8px;
}
.consent-footer{
  justify-content: space-between;
  gap: 12px;
}
.consent-footer .btn:focus{
  outline: none;
}
.consent-footer .btn:focus-visible{
  box-shadow: 0 0 0 3px rgba(255, 122, 89, 0.18);
}
.consent-footer .consent-decline{
  background: #ffffff !important;
  border: 1px dashed rgba(255, 122, 89, 0.65) !important;
  color: var(--primary, #ff7a59) !important;
}
.consent-footer .consent-decline:hover{
  background: rgba(255, 122, 89, 0.06) !important;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08) !important;
}
.consent-footer .consent-decline:active{
  background: rgba(255, 122, 89, 0.10) !important;
  box-shadow: 0 6px 16px rgba(17, 24, 39, 0.06) !important;
}

@media (max-width: 520px){
  .consent-body{ padding-right: 20px; padding-top: 110px; }
  .consent-illu{ width: 92px; top: 12px; right: 12px; }
}

/* Side sheet */
.sheet{
  position:fixed; top:0; right:0; width:min(420px, 86vw); height:100vh; z-index:95;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255, 255, 255, 0.02));
  border-left:1px solid var(--line); box-shadow: var(--shadow);
  transform: translateX(104%); transition: transform .2s ease;
}
.sheet[aria-hidden="false"]{ transform: translateX(0) }
.sheet-header{ display:flex; align-items:center; justify-content:space-between; padding:14px; border-bottom:1px solid var(--line) }
.sheet-body{ padding:14px; display:grid; gap:10px }
.sheet-body label{ display:grid; gap:6px; font-weight:700; color: var(--muted) }
.sheet-body input{ padding:10px; border-radius:10px; border:1px solid var(--line); background:#0e1320; color:var(--over_text) }

/* Toasts */
.toast-zone{ position:fixed; right:16px; bottom:16px; display:grid; gap:8px; z-index:100 }
.toast{
  background:#151a26; border:1px solid var(--line); border-radius:12px; padding:10px 12px; min-width:240px; box-shadow: var(--shadow)
  ;color:#fff
}

@media (max-width: 900px){
  .shell{ grid-template-columns: 1fr }
}







/* === SHARE BOARD MODAL – STYLE AMÉLIORÉ === */
.modal-card--light {
  background: #f8f9fb; /* fond plus doux*/
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.15);
  color: #1a1d23;
  width: clamp(380px, 55vw, 640px);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* HEADER + FOOTER */
.modal-card--light .modal-header,
.modal-card--light .modal-footer {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  border-radius: 18px;
}

.modal-card--light .modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: inherit;
  letter-spacing: 0.3px;
}

.modal-card--light .modal-body {
  padding: 20px;
  display: grid;
  gap: 18px;
  color: #222;
}

/* === Auth modals (login/signup) === */
.auth-modal{
  width: min(560px, 92vw);
  color: #555e6a;
}
.modal-card--light .modal-header .btn[data-close]{
  background: #ffffff !important;
  border: 1px dashed rgba(255, 122, 89, 0.65) !important;
  color: var(--primary, #ff7a59) !important;
}
.modal-card--light .modal-header .btn[data-close]:hover{
  background: rgba(255, 122, 89, 0.06) !important;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08) !important;
}
.modal-card--light .modal-header .btn[data-close]:active{
  background: rgba(255, 122, 89, 0.10) !important;
  box-shadow: 0 6px 16px rgba(17, 24, 39, 0.06) !important;
}
.auth-modal--login{
  width: min(460px, 92vw);
}
.auth-modal .modal-body{
  padding: 20px;
  color: inherit;
}
.modal-card--light.auth-modal .modal-body label{
  color: #555e6a;
}
.modal-card--light.auth-modal .modal-header,
.modal-card--light.auth-modal .modal-footer{
  padding-left: 15px;
  padding-right: 15px;
}
.modal-card--light.auth-modal .modal-footer{
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.modal-card--light.auth-modal .auth-footer-left{
  margin-right: auto;
}
.modal-card--light.auth-modal .auth-actions{
  margin-left: auto;
}
.auth-modal section{
  padding: 16px;
}
.auth-subtitle{
  margin: 0 0 4px;
}
.auth-fields{
  display: grid;
  gap: 12px;
}
.auth-field{
  display: grid;
  gap: 6px;
  font-weight: 700;
}
.auth-modal .modal-body input{
  width: 100%;
  height: 40px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  background: #ffffff;
  color: #1a1d23;
  font-size: 14px;
}
.auth-modal .modal-body input:focus{
  outline: none;
  border-color: var(--primary, #ff7a59);
  box-shadow: 0 0 0 3px rgba(255, 122, 89, 0.18);
}
.auth-modal .modal-body input.is-error{
  border-color: rgba(185, 28, 28, 0.55);
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);
}
.auth-inline-status{
  margin: 2px 0 0;
  font-size: 12.5px;
  font-weight: 700;
  color: #4b5563;
}
.auth-inline-status.is-error{
  color: #b91c1c;
}
.auth-checkbox{
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 12px;
  row-gap: 6px;
  font-weight: 700;
}
.auth-checkbox span{
  flex: 1;
}
.auth-checkbox input[type="checkbox"]{
  width: 16px;
  height: 16px;
  margin: 0;
  justify-self: end;
}
.auth-actions{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.auth-footer-left{
  display: flex;
  align-items: center;
  gap: 8px;
}
.auth-switch-hint{
  font-weight: 400;
  font-size: 13px;
}
.auth-switch{
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font-weight: 800;
  color: var(--primary, #ff7a59);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-switch:hover{
  opacity: 0.9;
}


/* SECTIONS */
section {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sep {
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin: 10px 0;
}

/* KEY-VALUE LAYOUT */
.kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px;
  align-items: start;
  margin: 8px 0;
}
.kv-key {
  font-weight: 600;
  color: #555e6a;
}
.kv-val {
  font-weight: 500;
  color: #1a1d23;
  word-break: break-word;
}

/* MEMBER LIST */
.member-list {
  list-style: none;
  padding: 0;
  margin: 6px 0 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}
.member-list li {
  background: #e6eaf0;
  color: #1a1d23;
  font-weight: 600;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 8px;
}

/* GRID D’INVITATION */
.grid-3 {
  display: grid;
  grid-template-columns: 1fr 150px 120px;
  gap: 10px;
  align-items: end;
}

.grid-3 label {
  display: grid;
  gap: 4px;
  font-weight: 600;
  font-size: 13px;
  color: #3a404b;
}

.grid-3 input[type="email"],
.grid-3 select,
.grid-3 input[type="color"] {
  width: 100%;
  height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  background: #fff;
  color: #1a1d23;
  font-size: 14px;
  box-sizing: border-box;
}

.grid-3 input[type="email"]:focus,
.grid-3 select:focus {
  outline: none;
  border-color: #43bccd;
  box-shadow: 0 0 0 3px rgba(67, 188, 205, 0.2);
}

/* BOUTONS */
.btn {
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn.ghost {
  background: rgba(0, 0, 0, 0.05);
  color: #ffffff;
}
.btn.ghost:hover {
  background: rgba(0, 0, 0, 0.1);
}

.btn.ghost.light {
  background: rgba(18, 22, 32, 0.7);
  border: 1px solid var(--line);
  color: #fff;
}
.btn.ghost.light:hover {
  transform: translateY(-1px);
  background: rgba(18, 22, 32, 0.85);
}

/* FOOTER */
.modal-card--light .modal-footer {
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ADAPTATION MOBILE */
@media (max-width: 720px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .modal-card--light {
    width: 92vw;
  }
}



/* === SETTINGS MODAL === */
.settings-modal{
  display: flex;
  flex-direction: column;
  max-height: 82vh; /* prevent the modal from growing; scroll inside the body */
}
.settings-modal .settings-form{
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0; /* allow children to shrink and enable scrolling */
}
.settings-modal .modal-body{
  background: linear-gradient(180deg, #f8f9fb 0%, #eff3f9 100%);
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
}
.settings-modal .modal-footer{
  flex: 0 0 auto;
}
.settings-header{
  align-items: flex-start;
}
.settings-header__titles{
  display: flex;
  align-items: flex-start;
  margin-left: 15px;
  gap: 12px;
}
.settings-chip{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(67, 188, 205, 0.16);
  color: #0f172a;
  font-weight: 700;
  font-size: 12px;
  border-radius: 12px;
  border: 1px solid rgba(67, 188, 205, 0.35);
}
.settings-subtitle{
  margin: 4px 0 0;
  color: #5a6477;
  font-size: 13px;
}
.settings-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.settings-card{
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.05);
  padding: 14px 16px;
  display: grid;
  gap: 12px;
}
.settings-card__head{
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.settings-eyebrow{
  margin: 0 0 4px;
  color: #6b7280;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.settings-muted{
  margin: 4px 0 0;
  color: #5a6477;
  font-size: 13px;
}
.settings-fields{
  display: grid;
  gap: 10px;
}
.settings-toggle-row{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.settings-toggle-text{
  min-width: 0;
}
.settings-toggle-title{
  font-weight: 800;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.1;
}
.settings-toggle-desc{
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.25;
  color: #5a6477;
}
.settings-modal .sb-icon-toggle{
  margin-bottom: 0;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #ffffff;
  color: #0f172a;
}
.settings-modal .sb-icon-toggle:hover{
  background: rgba(15, 23, 42, 0.04);
}
.settings-modal .sb-icon-toggle.is-on{
  border-color: rgba(255, 122, 89, 0.55);
  background: rgba(255, 122, 89, 0.14);
  color: var(--primary, #ff7a59);
}
.settings-field{
  display: grid;
  gap: 6px;
  font-weight: 600;
  color: #3a404b;
}
.settings-value-row{
  display: flex;
  align-items: center;
  gap: 10px;
}
.settings-value{
  flex: 1;
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #1a1d23;
  font-size: 14px;
  box-sizing: border-box;
}
.settings-input{
  flex: 1;
}
.settings-field[data-field="name"] .settings-name-input{
  height: 40px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-weight: 700;
  color: #1a1d23;
  cursor: default;
}
.settings-field[data-field="name"] .settings-name-input[readonly]{
  caret-color: transparent;
  pointer-events: none;
}
.settings-field[data-field="name"] .settings-name-input:not([readonly]){
  cursor: text;
}
.settings-field[data-field="name"] .settings-name-input:not([readonly]){
  border-bottom: 2px solid rgba(255, 122, 89, 0.55) !important;
}
.settings-field[data-field="name"] .settings-name-input:not([readonly]):focus{
  outline: none;
  border-bottom-color: var(--primary, #ff7a59) !important;
}
.settings-edit-btn{
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: transparent !important;
  border: none !important;
  color: var(--primary, #ff7a59);
  box-shadow: none !important;
}
.settings-edit-btn:hover{
  background: transparent !important;
  transform: none !important;
  box-shadow: none !important;
  opacity: 0.85;
}
.settings-edit-btn:active{
  background: transparent !important;
  transform: none !important;
  box-shadow: none !important;
  opacity: 0.75;
}
.settings-icon__fill{
  opacity: 0;
  transition: opacity .12s ease;
}
.settings-edit-btn.is-editing .settings-icon__fill{
  opacity: 1;
}
.settings-edit-btn[disabled]{
  opacity: 0.4;
  cursor: not-allowed;
}
.settings-field input,
.settings-field select{
  width: 100%;
  height: 40px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  background: #fff;
  color: #1a1d23;
  font-size: 14px;
  box-sizing: border-box;
}
.settings-field input:focus,
.settings-field select:focus{
  outline: none;
  border-color: #43bccd;
  box-shadow: 0 0 0 3px rgba(67, 188, 205, 0.18);
}
.two-cols{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.settings-pill{
  background: linear-gradient(135deg, #a78bfa, #6ee7ff);
  color: #0f1115;
  font-weight: 800;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 0;
  white-space: nowrap;
  align-self: flex-start;
}
.settings-pill--soon{
  background: linear-gradient(135deg, #fde68a, #fbbf24);
  color: #7c2d12;
}
.settings-hint{
  margin: 2px 0 0;
  font-size: 12.5px;
  color: #6b7280;
}
.settings-card--muted{
  background: #ffffff;
  border: 0;
}

.settings-privacy{
  display: grid;
  gap: 10px;
  font-size: 13px;
  color: #1f2937;
}
.settings-privacy__actions{
  display: flex;
  justify-content: flex-start;
}
.settings-privacy__danger{
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  display: grid;
  gap: 8px;
}
.settings-privacy__danger-title{
  margin: 0;
  font-weight: 900;
  color: #0f172a;
  font-size: 13px;
}
.settings-danger-btn{
  justify-self: flex-start;
  background: #ffffff !important;
  border: 1px dashed rgba(185, 28, 28, 0.55) !important;
  color: #b91c1c !important;
}
.settings-danger-btn:hover{
  background: rgba(185, 28, 28, 0.06) !important;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08) !important;
}
.settings-danger-btn:active{
  background: rgba(185, 28, 28, 0.10) !important;
  box-shadow: 0 6px 16px rgba(17, 24, 39, 0.06) !important;
}
.settings-privacy-btn{
  background: #ffffff !important;
  border: 1px dashed rgba(255, 122, 89, 0.65) !important;
  color: var(--primary, #ff7a59) !important;
}
.settings-privacy-btn:hover{
  background: rgba(255, 122, 89, 0.06) !important;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08) !important;
}
.settings-privacy-btn:active{
  background: rgba(255, 122, 89, 0.10) !important;
  box-shadow: 0 6px 16px rgba(17, 24, 39, 0.06) !important;
}

.privacy-grid{
  display: grid;
  gap: 12px;
}
.privacy-body{
  display: grid;
  gap: 10px;
}
.privacy-docs{
  display: grid;
  gap: 8px;
  justify-items: start;
}
.privacy-doc-link{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary, #ff7a59);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}
.privacy-doc-link::after{
  content: '↗';
  font-weight: 900;
  opacity: 0.85;
}
.privacy-doc-link.privacy-doc-link--internal::after{
  content: '';
}
.privacy-doc-link:hover{
  text-decoration-style: solid;
}

button.privacy-doc-link{
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.privacy-list{
  margin: 0;
  padding-left: 18px;
  color: #1f2937;
  font-size: 13px;
  line-height: 1.4;
}
.privacy-details{
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.6);
}
.privacy-details summary{
  cursor: pointer;
  font-weight: 800;
  color: #0f172a;
}
.privacy-details p{
  margin: 10px 0 0;
  color: #1f2937;
  font-size: 13px;
}
.privacy-toggle{
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #0f172a;
}
.privacy-toggle input{
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.privacy-toggle__ui{
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.10);
  position: relative;
  flex: 0 0 auto;
}
.privacy-toggle__ui::after{
  content: '';
  position: absolute;
  top: 50%;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  transform: translateY(-50%);
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
  transition: left .16s ease, background .16s ease;
}
.privacy-toggle input:focus + .privacy-toggle__ui{
  outline: none;
  box-shadow: 0 0 0 3px rgba(67, 188, 205, 0.18);
}
.privacy-toggle input:checked + .privacy-toggle__ui{
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-color: rgba(22, 163, 74, 0.35);
}
.privacy-toggle input:checked + .privacy-toggle__ui::after{
  left: 21px;
}
.privacy-toggle__text{
  font-weight: 800;
}
.privacy-note{
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: #4b5563;
}
.settings-coming{
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: #1f2937;
}
.settings-inline-status{
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: #4b5563;
}
.settings-inline-status.is-error{
  color: #b91c1c;
}
.settings-inline-status.is-success{
  color: #15803d;
}
.settings-progress{
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
}
.settings-progress__bar{
  display: block;
  position: absolute;
  inset: 0;
  right: auto;
  width: 65%;
  background: linear-gradient(135deg, var(--primary, #ff7a59), #43bccd);
}
.settings-progress__label{
  position: relative;
  z-index: 1;
  margin-left: 10px;
  font-weight: 700;
  font-size: 12px;
  color: #1f2937;
}
.settings-footer{
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px;
}

@media (max-width: 720px){
  .settings-grid{
    grid-template-columns: 1fr;
  }
  .settings-header__titles{
    flex-direction: column;
  }
}


/* === TABLEAU MEMBRES (Share) === */
.table-wrap{
  background:#fff;
  border:1px solid rgba(0,0,0,.06);
  border-radius:10px;
  overflow:auto;
  box-shadow:0 1px 2px rgba(0,0,0,.04);
}
.boardname{
  margin-top: 0px;
  margin-bottom: 10px;
  font-size: 16px;
}

.member-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  min-width: 560px; /* pour laisser respirer l'email */
}

.subtle{
  margin-top: 0px;
  margin-bottom: 10px;
  font-size: 16px;
}

.member-table thead th{
  position:sticky; top:0;
  background:#f1f3f6;
  color:#2a2f39;
  font-weight:800; font-size:13px;
  text-align:left;
  letter-spacing:.2px;
  border-bottom:1px solid rgba(0,0,0,.08);
}
.member-table tbody td{
  padding:10px 12px;
  border-bottom:1px solid rgba(0,0,0,.06);
  vertical-align:middle;
}

.member-table input[type="text"],
.member-table input[type="email"],
.member-table select{
  width:100%;
  height:36px;
  padding:8px 10px;
  border:1px solid rgba(0,0,0,.12);
  border-radius:8px;
  background:#fff;
  color:#1a1d23;
  font-size:14px;
  box-sizing:border-box;
}
.member-table input[type="text"]:focus,
.member-table input[type="email"]:focus,
.member-table select:focus{
  outline:none;
  border-color:#43bccd;
  box-shadow:0 0 0 3px rgba(67,188,205,.2);
}
.member-table input[type="color"]{
  width:44px; height:36px;
  padding:0; border:1px solid rgba(0,0,0,.12);
  border-radius:8px; background:#fff;
}

.section-actions{
  display:flex; justify-content:flex-end; gap:10px;
  margin-top:12px;
}

/* Mobile */
@media (max-width: 720px){
  .member-table{ min-width: 0; }
  .member-table thead{ display:none; }
  .member-table, .member-table tbody, .member-table tr, .member-table td{ display:block; width:100% }
  .member-table tr{ border-bottom:1px solid rgba(0,0,0,.06); padding:8px 0 }
  .member-table td{ padding:6px 2px }
  .member-table td::before{
    content: attr(data-label);
    display:block; font-size:12px; font-weight:700; color:#5a6477; margin-bottom:2px;
  }
}


/* === TABLEAU MEMBRES : COMPACT + SCROLL INTERNE === */

/* Limite la hauteur et active le scroll si la liste grandit (> ~5 lignes) */
.table-wrap--limited{
  max-height: min(38vh, 320px);   /* ~5–7 lignes selon écran */
  overflow: auto;
  scrollbar-gutter: stable;
}

/* Tableau compact et lisible */
.member-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  min-width: 560px;
  table-layout: fixed;            /* pour ellipses */
}

.member-table col.col-member{ width: 22%; }
.member-table col.col-email{ width: 30%; }   /* ↔ augmente/réduit pour changer la largeur des emails */
.member-table col.col-status{ width: 18%; }
.member-table col.col-color{ width: 14%; }
.member-table col.col-actions{ width: 16%; }

.member-table thead th{
  position: sticky; top: 0;
  background:#f1f3f6;
  color:#2a2f39;
  font-weight:800; font-size:12.5px;
  text-align:left; letter-spacing:.2px;
  padding:8px 10px;
  border-bottom:1px solid rgba(0,0,0,.08);
}

.member-table tbody td{
  padding:6px 10px;               /* plus compact */
  border-bottom:1px solid rgba(0,0,0,.06);
  vertical-align:middle;
  font-size: 13px;
  line-height: 1.2;
}

/* Texte non éditable avec ellipses */
.cell-text{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.cell-name{ font-weight: 700; color:#19202a; }
.cell-email{ color:#2a3441; }

/* Champs éditables (Status, Color) compactés */
.member-table select{
  width:100%; height:32px;
  padding:6px 8px;
  border:1px solid rgba(0,0,0,.12);
  border-radius:8px; background:#fff; color:#1a1d23; font-size:13px;                                   
}
.member-table input[type="color"]{
  width:40px; height:32px; padding:0;
  border:1px solid rgba(0,0,0,.12);
  border-radius:8px; background:#fff;
}

.member-table .btn-remove{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  height:28px;
  padding:0 10px;
  border-radius:6px;
  border:1px solid rgba(220,38,38,.3);
  background:rgba(248,113,113,.12);
  color:#b91c1c;
  font-size:12.5px;
  font-weight:600;
  cursor:pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.member-table .btn-remove svg{
  width:16px;
  height:16px;
  stroke: currentColor;
}
.member-table .btn-remove:hover:not(:disabled){
  background:rgba(248,113,113,.18);
  border-color:rgba(220,38,38,.5);
  color:#991b1b;
}
.member-table .btn-remove:disabled{
  opacity:.6;
  cursor:not-allowed;
}

.member-table select:focus{
  outline:none; border-color:#43bccd;
  box-shadow:0 0 0 3px rgba(67,188,205,.2);
}

/* Boutons de section */
.section-actions{
  display:flex; justify-content:flex-end; gap:10px;
  margin-top:10px;
}

/* Mobile : carte verticale compacte */
@media (max-width: 720px){
  .member-table{ min-width: 0; }
  .member-table thead{ display:none; }
  .member-table, .member-table tbody, .member-table tr, .member-table td{ display:block; width:100% }
  .member-table tr{ border-bottom:1px solid rgba(0,0,0,.06); padding:6px 0 }
  .member-table td{ padding:6px 2px }
  .member-table td::before{
    content: attr(data-label);
    display:block; font-size:12px; font-weight:700; color:#5a6477; margin-bottom:2px;
  }
}


/* === LIGNES COMPACTES + NOM/EMAIL EN TEXTE === */
.member-table tbody.compact-rows td{
  padding: 4px 8px;            /* plus serré */
  font-size: 12.5px;
  line-height: 1.15;
  border-bottom: 1px solid rgba(0,0,0,.06);
  vertical-align: middle;
}

/* Texte non-éditable avec ellipses */
.cell-text{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.cell-name{ font-weight:700; color:#19202a; }
.cell-email{ color:#2a3441; }

/* Champs éditables (Status, Color) compacts */
.member-table tbody.compact-rows select{
  width:100%;
  height: 28px;               /* plus bas que 32-36px */
  padding: 4px 8px;
  font-size: 12.5px;
  border:1px solid rgba(0,0,0,.12);
  border-radius: 6px;
  background:#fff; color:#1a1d23;                                   
}
.member-table tbody.compact-rows input[type="color"]{
  width: 34px; height: 28px;  /* plus petit */
  padding:0; border:1px solid rgba(0,0,0,.12);
  border-radius:6px; background:#fff;                                   
}

/* En-têtes un peu plus compacts aussi */
.member-table thead th{
  padding: 6px 8px;
  font-size: 12.5px;
}


/* ===== FIX: pointer-events uniquement quand le modal est ouvert ===== */
.modal-card {
  pointer-events: none; /* par défaut: AUCUNE interaction quand aria-hidden="true" */
}

.modal[aria-hidden="false"] .modal-card {
  pointer-events: auto; /* interactif UNIQUEMENT quand ouvert */
}









/*TOOLBAR - Placement-type (existant chez toi, garde tes règles) */
.toolbar{
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 90;
  transition: opacity .5s ease, transform .5s ease;
  opacity: 1;
}

/* Etat caché : fade + léger slide */
.toolbar.is-hidden{
  opacity: 0;
  transform: translateX(-50%) translateY(6px);
  pointer-events: none; /* ne bloque pas la hotzone */
}
/* Hotzone: large zone transparente autour de l'emplacement */
.toolbar-hotzone{
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(600px, 90vw);   /* largeur sensible */
  height: 120px;             /* hauteur sensible */
  z-index: 80;               /* sous la toolbar */
  pointer-events: auto;      /* doit capter la souris */
  background: transparent;   /* invisible */
  cursor: grab;
}


/*Radio Bouton*/
/* ===== Mode Switch (Grid / Free) ===== */
.mode-switch{
  display:inline-flex;
  align-items:center;
  gap:0;
  background: rgba(255, 255, 255, 0.75);
  border:1px solid rgba(255,255,255,0.06);
  border-radius:16px;
  padding:2px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.22);
  backdrop-filter: blur(3px);
}

/* Masque les radio bruts */
.mode-switch input[type="radio"]{
  display:none;
}

/* Styles visuels pour les labels */
.mode-switch .mode-btn{
  cursor:pointer;
  padding:6px 1px;
  min-width:56px;
  text-align:center;
  border-radius:999px;
  font-weight:800;
  font-size:12px;
  letter-spacing:0.2px;
  color:rgba(0, 0, 0, 0.72);
  background: transparent;
  border:0;
  margin-top:1px;
  transition:all .15s ease, transform .15s ease, box-shadow .2s ease;
}

/* État actif (radio coché) */
.mode-switch input[type="radio"]:checked + .mode-btn{
  background: rgba(0,0,0,0.6);
  color:rgba(255,255,255,0.94);
  box-shadow:0 2px 8px rgba(0,0,0,.28);
  transform:translateY(-1px);
}

/* Hover / focus */
.mode-switch .mode-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 2px 8px rgba(0, 0, 0, 0.52);
}








/* ===== SIDEBAR sombre translucide (cohérente avec tes overlays) ===== */
:root{
  --sb-bg: rgba(18,22,32,.72);
  --sb-line: rgba(255,255,255,.14);
  --sb-soft: rgba(255,255,255,.06);
  --sb-text: #fff;
  --sb-muted: #c8cfda;
  --sb-danger: #EA3546;
  --sb-radius: 16px;
  --sb-shadow: 0 12px 34px rgba(0,0,0,.35);
  --sb-accent: #ff7a59;   /* cohérent avec le reste */
  --sb-accent2:#D85745;
  --sb-collapsed-width: 56px;
  --sb-hotzone-width: 70px;
}

.sb{
  position: fixed;
  top: 25%; left: 16px;
  width: 300px;
  max-height: calc(100vh - 120px);
  display: grid; grid-template-rows: auto 1fr auto;
  gap: 10px; padding: 12px;
  background: var(--sb-bg);
  border: 1px solid var(--sb-line);
  border-radius: var(--sb-radius);
  color: var(--sb-text);
  backdrop-filter: blur(6px);
  box-shadow: var(--sb-shadow);
  z-index: 60;
  transition: width .22s ease, padding .22s ease;
}

/* Hotzone: petite zone qui déclenche la réouverture au survol */
.sb-hotzone{
  position: fixed;
  top: 25%; left: 16px;
  width: var(--sb-hotzone-width);
  height: calc(100vh - 120px);
  z-index: 61;
  pointer-events: none;
  background: transparent;
}
.sb.is-collapsed:not(.hover-open) + .sb-hotzone{ pointer-events: auto; }
.sb.is-collapsed.hover-open + .sb-hotzone,
.sb.is-open + .sb-hotzone{ pointer-events: none; }
.sb-auth-in{display: flex;flex-direction: column; max-height: 450px;} /*LOGIN*/
.sb-auth-out{display: flex;flex-direction: column;}/*LOGOUT*/

/* Repliée */
.sb.is-collapsed{ width: var(--sb-collapsed-width); padding: 12px 10px }
.sb.is-collapsed.hover-open{ padding: 12px }
.sb.is-collapsed:not(.hover-open) .sb-title,
.sb.is-collapsed:not(.hover-open) .sb-boardName,
.sb.is-collapsed:not(.hover-open) .sb-chev,
.sb.is-collapsed:not(.hover-open) .sb-boardBody,
.sb.is-collapsed:not(.hover-open) .sb-foot{ opacity:.0; pointer-events:none; visibility:hidden }
.sb.is-collapsed:not(.hover-open) .sb-title{ display:none }
.sb.is-collapsed:not(.hover-open) .sb-h{ justify-content:center }
.sb.is-collapsed:not(.hover-open) .sb-list{
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.sb.is-collapsed:not(.hover-open) .sb-boardHead{ justify-content:center; padding:10px }

/* Hover-open quand non épinglée (classe ajoutée par JS) */
.sb.hover-open:not(.is-open){ width:300px }

/* Header */
.sb-h{ display:flex; align-items:center; justify-content:space-between }
.sb-title{ margin:0; font: 800 18px/1.2 system-ui; letter-spacing:.3px; }
.sb-toggle{
  width:28px; height:28px; border-radius:999px; cursor:pointer;
  display:grid; place-items:center; font-weight:900; color:#fff;
  background: var(--sb-soft); border:1px solid var(--sb-line);
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.sb-toggle:hover{ background: rgba(255,255,255,.09); box-shadow: 0 2px 8px rgba(0,0,0,.25) }
.sb.is-collapsed .sb-toggle{ transform: rotate(180deg) }
.sb.is-collapsed:not(.hover-open) .sb-toggle{
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}


/* Édition inline du titre de workspace */
.sb-ws-rename {
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  outline: none;
  padding: 0;
  margin: 0;
  width: 100%;
  line-height: inherit;
  text-overflow: ellipsis;
}

.sb-ws-rename:focus {
  outline: none;
  border: none;
  background: transparent;
}



/* Liste scrollable */
.sb-list{ overflow:auto; /*padding-right:2px;*/ scrollbar-gutter:stable }

/* Board (carte sombre) */
.sb-board{
  border:1px solid var(--sb-line);
  border-radius: 14px;
  background: rgba(255,255,255,.04);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
  margin-bottom: 10px;
  padding: 0px;
  overflow: hidden;
}
.sb-boardHead{
  width:100%; border:0; text-align:left; cursor:pointer;
  display:flex; align-items:center; justify-content:space-between; gap:8px;
  padding: 10px 12px; color:#fff; background:rgba(255,255,255,.06);
  font-weight:800; letter-spacing:.2px;
}
.sb-boardHead:hover{ background: rgba(255,255,255,.06) }
.sb-chev{ transition: transform .2s ease }
.sb-board[data-open="true"] .sb-chev{ transform: rotate(180deg) }

.sb-boardBody{
  max-height: 0; overflow:hidden; transition: max-height .24s ease, padding .24s ease;
  /*padding: 0 10px;*/
}
.sb-board[data-open="true"] .sb-boardBody{
  max-height: 65vh;
  overflow: auto;
  padding: 0px 0px 12px 1px;
}

/* Sous-menus (Filtre/Team/Setting) */
/*.sb-sub{ margin: 6px 0; border:1px solid var(--sb-line); border-radius:12px; background: rgba(255,255,255,.03) } */
.sb-subHead{
  list-style:none; cursor:pointer; user-select:none;
  display:flex; align-items:center; justify-content:space-between;
  padding:8px 15px; font-weight:700; color:#fff;
}
/*.sb-sub[open] .sb-subHead{background: rgba(255,255,255,.06)}*/
.sb-subBody{ padding: 8px 10px 8px; color: var(--sb-muted) }
.sb-subBody.sb-team{
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  gap:6px;
  padding-bottom: 0;
}
.sb-subBody.sb-team .sb-teamList{
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  gap:4px;
  overflow-y:auto;
  max-height: 180px;
  padding-right: 2px;
}
.sb-subBody.sb-team .sb-btn{
  margin-top: 0;
}
.sb-icon-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  border-radius:10px;
  border:1px solid var(--sb-line, rgba(255,255,255,.18));
  background: rgba(255,255,255,.06);
  color: #fff;
  cursor:pointer;
  margin-bottom: 8px;
}
.sb-icon-toggle:hover{ background: rgba(255,255,255,.10) }
.sb-icon-toggle.is-on{
  border-color: rgba(255, 122, 89, 0.55);
  background: rgba(255, 122, 89, 0.18);
}
.sb-icon-toggle svg{
  width:18px;
  height:18px;
  stroke: currentColor;
  display:block;
}

/* Settings layout */
.sb-settings{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.sb-settingRow{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin-right: 30px;
}
.sb-settingRow .sb-icon-toggle{
  margin-bottom:0;
  flex:0 0 auto;
}
.sb-settingText{
  min-width:0;
}
.sb-settingTitle{
  font-weight:900;
  color:#fff;
  font-size:13px;
  line-height:1.1;
}
.sb-settingDesc{
  margin-top:4px;
  font-size:12px;
  line-height:1.25;
  color: rgba(255,255,255,.70);
}
.sb-settingsDivider{
  height:1px;
  background: rgba(255,255,255,.10);
  margin: 2px 0;
}
.sb-dangerZone{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.sb-zoneTitle{
  font-size:12px;
  font-weight:900;
  letter-spacing:.25px;
  text-transform:uppercase;
  color: rgba(255,255,255,.82);
}
.sb-action-btn{
  width:100%;
  border-radius:12px;
  padding:10px 10px;
  font-weight:900;
  letter-spacing:.2px;
  cursor:pointer;
  border:1px solid var(--sb-line);
  background: rgba(255,255,255,.06);
  color:#fff;
  transition: transform .08s ease, background .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.sb-action-btn:hover{
  background: rgba(255,255,255,.10);
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
  transform: translateY(-1px);
}
.sb-action-btn:active{
  transform: translateY(0);
}
.sb-action-btn[disabled],
.sb-action-btn[aria-busy="true"]{
  opacity:.55;
  cursor: not-allowed;
}
.sb-action-btn--danger{
  border-color: rgba(234,53,70,.32);
  background: rgba(234,53,70,.16);
}
.sb-action-btn--danger:hover{
  border-color: rgba(234,53,70,.52);
  background: rgba(234,53,70,.24);
}

.sb-boardName{
  font-size: 18px;
  flex:1;
  min-width: 0;
}
.sb-boardPct{
  color: var(--sb-muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}


/* Team entries */
.sb-team .sb-member{ 
  display:flex; 
  align-items:center; 
  justify-content:flex-start; 
  gap:8px; padding:4px 2px; 
  color:#fff; 
  margin-right:10px;
  padding: 6px 10px;
}
.sb-member:hover{ margin-left: 10px; background: rgba(255,255,255,.06); border-radius:8px }
.sb-team .sb-member i{ 
  width:24px; 
  height:10px; 
  border-radius:3px; 
  display:inline-block;
  margin-left:0px;
}
.sb-team .sb-memberName{
  flex:1;
  min-width: 0;
  overflow:hidden;
  text-overflow: ellipsis;
}
.sb-team .sb-memberPct{
  color: var(--sb-muted);
  font-size: 12px;
  font-weight: 300;
  margin-right: 0px;
  margin-left: auto;
  min-width: 34px;
  text-align: right;
}

/* Segmented control (All / My Tasks) */
.sb-segment{
  display:inline-flex; gap:0; padding:4px; border-radius:999px;
  background: rgba(255,255,255,.06); border:1px solid var(--sb-line);
}
.sb-segment input{ display:none }
.sb-segment label{
  cursor:pointer; padding:6px 14px; border-radius:999px;
  color:#dfe4f0; font-weight:800; font-size:12px; letter-spacing:.2px;
  transition: background .18s ease, color .18s ease, box-shadow .2s ease, transform .12s ease, opacity .18s ease;
  position: relative;
  display:inline-flex; align-items:center; gap:6px;
  opacity:.62;
}
.sb-segment label:hover{ background: rgba(255,255,255,.08) }
.sb .sb-segment input:checked + label,
.sb .sb-segment label.is-active{
  color:#0b0f18;
  background: #ffffff;
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow: 0 0 0 1px rgba(255,255,255,.55), 0 3px 10px rgba(0,0,0,.25);
  transform: translateY(-1px);
  opacity: 1;
}
.sb-segment input:focus-visible + label{
  box-shadow: 0 0 0 2px rgba(255,255,255,0.6), 0 0 0 5px rgba(255,255,255,0.18);
  opacity: 1;
}

/* Fallback visuel par mode (utile si le :checked ne s’applique pas) */
.sb .sb-segment[data-mode="all"] label[for$="-all"],
.sb .sb-segment[data-mode="mine"] label[for$="-mine"],
.sb .sb-segment[data-mode="unassigned"] label[for$="-unassigned"]{
  color:#0b0f18;
  background:#fff;
  border: 1px solid rgba(255,255,255,0.65);
  box-shadow: 0 0 0 1px rgba(255,255,255,.55), 0 3px 10px rgba(0,0,0,.25);
  transform: translateY(-1px);
  opacity:1;
}

/* Footer / bouton */
.sb-foot{ position:sticky; bottom:0; padding-top:8px;}
.sb-btn{
  appearance:none; border:1px solid var(--sb-line); border-radius:12px; padding:10px 14px;
  background: rgba(255, 255, 255, 0.06); color:#fff; font-weight:800; cursor:pointer;
}
.sb-btn:hover{ transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.3) }
.sb-primary{ border:none; background: linear-gradient(135deg, var(--sb-accent), var(--sb-accent2)) }
.sb-full{ width:100% }



/* ---------- Ligne blanche + chevron de fin ---------- */

/* Conteneur du titre + flèche (dans <summary>) */
.sb-subHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:8px 10px;
  font-weight:700;
  color:#fff;
  cursor:pointer;
  user-select:none;
}

/* Le texte "Filter/Team/Settings" occupe la place disponible */
.sb-titleline{
  position:relative;
  flex:1 1 auto;
  /* pour éviter que la ligne passe par-dessus le texte quand très court */
  padding-right:12px;
  border-top: solid white 1px ;
}

/* Chevron (pur CSS) */
.sb-chevron{
  width:18px; height:18px;
  border-radius:999px;
  display:grid; place-items:center;
  position:relative;
  flex:0 0 auto;
}

/* Pseudo-élément qui dessine la flèche (chevron) */
.sb-chevron::before{
  content:"";
  display:inline-block;
  width:8px; height:8px;
  border-right:2px solid rgba(255,255,255,.95);
  border-bottom:2px solid rgba(255,255,255,.95);
  transform: rotate(45deg);     /* “▾” orienté vers le bas (ouvert) */
  transition: transform .18s ease;
}

/* Quand le details est FERME (pas [open]), on remonte la flèche “▸” */
.sb-sub:not([open]) .sb-chevron::before{
  transform: rotate(-45deg);    /* “▸” (fermé) */
}

/* Hover léger sur le header */
.sb-subHead:hover{
  background: rgba(255,255,255,.06);
  border-radius:10px;
}

/* (Optionnel) légère marge visuelle quand la ligne serait trop courte */
@media (max-width: 340px){
  .sb-titleline::after{ left: calc(100% + 4px); }
}


.sb-titleline::after { height: 2px; opacity: 1; }

/* s'assure que la couche SVG ne capture rien au-dessus (test) */
#connections {
  pointer-events: none;
}


/* ===== Feedback widget ===== */
[data-feedback-enabled="false"] .feedback-widget{ display: none !important; }
.wb-ui:not(.is-authenticated) .feedback-widget{ display: none !important; }

.feedback-widget{
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-end;
  gap: 10px;
  z-index: 120;
  pointer-events: none; /* ne capture rien hors du bouton/panneau */
  color: var(--over_text);
  font: 14px/1.4 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;
}

.feedback-tab{
  pointer-events: auto;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  background: linear-gradient(135deg, var(--primary), #fba07a);
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px 14px 0 0;
  padding: 12px 10px;
  letter-spacing: .4px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
}
.feedback-tab:hover{ transform: rotate(180deg) translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,.45); }
.feedback-tab:active{ transform: rotate(180deg) translateY(0); }
.feedback-widget.is-open .feedback-tab{ display: none; }

.feedback-panel{
  width: min(360px, 86vw);
  max-height: 72vh;
  padding: 14px 14px 16px;
  border-radius: 16px;
  background: rgba(18,22,32,.96);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.feedback-widget.is-open .feedback-panel{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.feedback-widget:not(.is-open) .feedback-panel{ visibility: hidden; }
.feedback-widget.is-pinned .feedback-tab{ background: linear-gradient(135deg, #fba07a, var(--primary)); }
.feedback-widget.is-success .feedback-panel{
  filter: blur(3px);
}

.feedback-head{
  display: grid;
  gap: 4px;
}
.feedback-title-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.feedback-eyebrow{
  text-transform: uppercase;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .8px;
  color: var(--muted);
  margin: 0;
}
.feedback-title{
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}
.feedback-close{
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .15s ease, transform .12s ease, box-shadow .2s ease;
}
.feedback-close:hover{ background: rgba(255,255,255,.08); box-shadow: 0 6px 18px rgba(0,0,0,.35); transform: translateY(-1px); }
.feedback-close:active{ transform: translateY(0); }
.feedback-close-icon{
  position: relative;
  width: 12px;
  height: 12px;
}
.feedback-close-icon::before{
  content: "";
  position: absolute;
  inset: 2px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}
.feedback-description{
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.feedback-choice{
  display: flex;
  gap: 10px;
  padding: 10px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.feedback-choice label{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #fff;
}

.feedback-field{
  display: grid;
  gap: 6px;
  font-weight: 700;
  color: var(--muted);
}
.feedback-field input,
.feedback-field textarea{
  width: 100%;
  background: #0e1320;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--over_text);
  padding: 10px 12px;
  resize: vertical;
}
.feedback-field textarea{ min-height: 200px; margin-bottom: 15px;}

.feedback-actions{
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}
.feedback-status{
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.feedback-status.is-error{ color: var(--danger); }

.feedback-widget .btn.small{
  padding: 8px 10px;
}

.feedback-toast{
  position: absolute;
  left: 50%;
  bottom: 50%;
  transform: translate(-50%, 50%) scale(.9);
  padding: 14px 16px 12px;
  border-radius: 14px;
  background:(12, 18, 30, 0.52);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  display: grid;
  gap: 6px;
  align-items: center;
  text-align: center;
  visibility: hidden;
}
.feedback-toast.is-visible{
  opacity: 1;
  transform: translate(-50%, 50%) scale(1);
  visibility: visible;
}
.feedback-widget:not(.is-open) .feedback-toast{
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 50%) scale(.9);
}
.feedback-toast .feedback-toast-icon{
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.18);
  color: #fff;
  margin: 0 auto;
}
.feedback-toast .feedback-toast-text{
  margin: 0;
  font-weight: 700;
  font-size: 13px;
}

@media (max-width: 720px){
  .feedback-panel{ width: min(320px, 92vw); }
}


/* ##### CONFIGURATION DU SCRIM / BACKDROP */
.wb-backdrop, #wb-scrim, .scrim, #scrim {
  position: fixed;
  inset: 0;
  position:fixed; inset:0; background: rgba(7,10,16,.60); /*backdrop-filter: blur(2px);*/ /* <-- Le blur fait bug l'ouverture*/
  opacity:0; pointer-events:none; transition: opacity .16s ease; z-index:80;
  pointer-events: none;
  z-index: 85;              /* < modal (90), > topbar (50) */
  transition: opacity .2s ease;
}
.scrim[aria-hidden="false"]{ opacity:1; pointer-events:auto }

.wb-backdrop.is-visible,
#wb-scrim.is-visible,
.scrim.is-visible,
#scrim.is-visible {
  opacity: 1;
  pointer-events: auto;
}




/* ===== Auth gates ===== > Changer le style si authentifié */

/*TOPBAR */
.wb-ui [data-auth="in"]   { display: none; }
.wb-ui [data-auth="out"]  { display: inline-flex; } /* boutons -> inline-flex = garde l'alignement topbar */

.wb-ui.is-authenticated [data-auth="in"]  { display: inline-flex; }
.wb-ui.is-authenticated [data-auth="out"] { display: none; }


/* SIDEBAR */
/* État par défaut (déconnecté) */


#sb [data-auth="in"]  { display: none; }
#sb [data-auth="out"] { display: flex; }      /* ou inline-flex selon ton layout */
#sb .sb-user { display: inline-flex; align-items: center; gap: .5rem; }

/* Deux façons d'activer: soit on met la classe sur .wb-ui (parent),
   soit directement sur #sb. On prend en charge les deux. */
.wb-ui.is-authenticated #sb [data-auth="in"],
#sb.is-authenticated [data-auth="in"]  { display: flex; }

.wb-ui.is-authenticated #sb [data-auth="out"],
#sb.is-authenticated [data-auth="out"] { display: none; }
