/* =========================================================
   styles.css — Minimaliste Premium Bleu (mobile + desktop)
   - Recherche centrée + suggestions centrées
   - RecapBar sticky safe (ne masque pas le contenu)
   - Zone picker en colonnes propres (catégories)
   - Modals/popup fond flou (édition/ajout)
   ========================================================= */

:root{
  --bg:#f4f6f9;
  --surface:#ffffff;
  --surface2:#f8fafc;

  --text:#0f172a;
  --muted:#64748b;
  --border:rgba(15,23,42,0.12);

  --blue:#5bbcff;
  --blue-dark:#3aa5e6;

  --green:#22c55e;
  --red:#ef4444;
  --yellow:#fbbf24;

  --r:14px;
  --r2:18px;
  --pill:999px;

  --shadow:0 8px 18px rgba(2,6,23,0.06);
  --shadow2:0 20px 50px rgba(2,6,23,0.14);

  --font:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;

  /* Heights (pour sticky) */
  --topbar-h:60px;
  --recap-h:58px;
}

*{box-sizing:border-box}

body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:var(--font);
}

/* =========================================================
   Layout
   ========================================================= */

.container{
  width:min(1200px,calc(100% - 32px));
  margin:18px auto 64px;

  /* évite que la sticky recap masque le contenu */
  padding-top:6px;
}

/* Pages */
.pagePanel{ display:none; }
.pagePanel.active{ display:block; }

.title{
  margin:0 0 8px;
  letter-spacing:-0.2px;
}

.sub{
  color:var(--muted);
  font-size:13px;
  line-height:1.35;
  margin-bottom:14px;
}

.small{font-size:12px;}
.muted{color:var(--muted);}

.divider{
  height:1px;
  background:var(--border);
  margin:14px 0;
}

.mt{ margin-top:14px; }

.row{
  display:flex;
  gap:10px;
  align-items:center;
}

/* =========================================================
   Topbar
   ========================================================= */

.topbar{
  position:sticky;
  top:0;
  z-index:50;
  background:#fff;
  border-bottom:1px solid var(--border);
  padding:12px 14px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  min-height:var(--topbar-h);
}

.topLeft,.topRight{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.brand{
  font-weight:950;
  padding:7px 12px;
  border-radius:var(--pill);
  background:none;
  border:none;
}

/* Tabs */
.pageTab{
  border:1px solid var(--border);
  background:#fff;
  padding:8px 12px;
  border-radius:var(--pill);
  cursor:pointer;
  font-weight:850;
  font-size:13px;
  color:#0b3b66;
  white-space:nowrap;
}
.pageTab.active{
  background:var(--blue);
  color:#fff;
}

/* Connexion */
.btnLoginText{
  border:0;
  background:var(--blue);
  color:#fff;
  padding:10px 14px;
  border-radius:999px;
  font-weight:900;
  cursor:pointer;
}
.btnLoginText:hover{background:var(--blue-dark);}

/* User pill */
.userPill{
  display:flex;
  align-items:center;
  gap:10px;
  border:1px solid var(--border);
  padding:6px 10px;
  border-radius:999px;
  background:#fff;
}
.userBadge{
  font-weight:900;
  font-size:12px;
  color:#0b3b66;
  white-space:nowrap;
}

/* Bouton hamburger (mobile only) */
.btnMenuToggle{
  display:none;
  align-items:center;
  justify-content:center;
  width:36px;height:36px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  font-size:1.1rem;
  cursor:pointer;
  flex-shrink:0;
  transition:transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s;
}
.btnMenuToggle:hover{
  transform:translateY(-2px);
  box-shadow:0 6px 14px rgba(2,6,23,0.1);
}

/* Bouton Plan (topRight) */
.btnMapNav{
  display:flex;
  align-items:center;
  justify-content:center;
  width:36px;height:36px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  font-size:1rem;
  text-decoration:none;
  transition:transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s, border-color .15s;
  cursor:pointer;
  flex-shrink:0;
}
.btnMapNav:hover{
  transform:translateY(-3px);
  box-shadow:0 6px 14px rgba(2,6,23,0.1);
  border-color:rgba(91,188,255,0.5);
}

/* =========================================================
   Buttons / Inputs
   ========================================================= */

.btn{
  border:0;
  background:var(--blue);
  color:#fff;
  padding:10px 16px;
  border-radius:999px;
  font-weight:900;
  cursor:pointer;
  transition:transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s, background .15s;
}
.btn:hover{
  background:var(--blue-dark);
  transform:translateY(-3px);
  box-shadow:0 8px 20px rgba(91,188,255,0.35);
}
.btn:active{ transform:translateY(0); box-shadow:none; }

.btn.secondary{
  background:#e8f4ff;
  color:#0b3b66;
}

.btn.green{ background:var(--green); }
.btn.danger{ background:var(--red); }

.btnSmall{
  padding:8px 10px;
  border-radius:999px;
}

.btnIcon{
  width:40px;
  height:40px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  display:grid;
  place-items:center;
  cursor:pointer;
  transition:transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s, border-color .15s;
}
.btnIcon:hover{
  transform:translateY(-3px);
  box-shadow:0 6px 14px rgba(2,6,23,0.1);
  border-color:rgba(91,188,255,0.5);
}
.btnIcon:active{ transform:translateY(0); box-shadow:none; }

.input{
  width:100%;
  height:46px;
  padding:11px 18px;
  border-radius:999px;
  border:1.5px solid #e2e8f0;
  background:#fff;
  font-family:var(--font);
  font-size:.88rem;
  color:var(--text);
  transition:border-color .2s, box-shadow .2s, background .2s;
}
.input:focus{
  outline:none;
  border-color:var(--blue);
  box-shadow:0 0 0 4px rgba(91,188,255,0.15);
  background:#fafcff;
}

/* Empêche le zoom automatique iOS sur le champ de recherche */
#searchInput{
  font-size:16px;
}

select.input{
  appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 16px center;
  padding-right:36px;
  cursor:pointer;
}

/* =========================================================
   Toast
   ========================================================= */

.toast{
  position:fixed;
  left:50%;
  bottom:18px;
  transform:translateX(-50%);
  background:#0f172a;
  color:#fff;
  padding:10px 14px;
  border-radius:999px;
  font-weight:900;
  font-size:13px;
  z-index:999;
  box-shadow:var(--shadow2);
}

/* =========================================================
   Recap Bar sticky (safe)
   ========================================================= */

/* =========================================================
   RecapBar — sticky compacte + fond flouté au scroll
   ========================================================= */

.recapBar{
  position:sticky;
  top:var(--topbar-h); /* fallback, écrasé par JS */
  z-index:45;
  background:rgba(255,255,255,0.88);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  border-bottom:1px solid var(--border);
  padding:8px 16px;
  transition:padding .2s, box-shadow .2s;
}

.recapBar.scrolled{
  padding:5px 16px;
  box-shadow:0 4px 16px rgba(2,6,23,0.08);
}

/* Pour que le contenu ne soit jamais caché par recap */
.pagePanel.active{
  scroll-margin-top: calc(var(--topbar-h) + var(--recap-h) + 12px);
}

.recapScroller{
  display:flex;
  gap:10px;
  overflow-x:auto;
  align-items:center;
  max-width:min(980px,100%);
  margin:0 auto;
  scrollbar-width:none;
}
.recapScroller::-webkit-scrollbar{ display:none; }

.recapZonesMini{
  display:flex;
  gap:6px;
  align-items:center;
  flex-shrink:0;
}

.recapTag{
  padding:5px 10px;
  border-radius:999px;
  color:#fff;
  font-weight:900;
  font-size:12px;
  white-space:nowrap;
  cursor:pointer;
  transition:opacity .15s, transform .15s;
}
.recapTag:hover{ opacity:.85; transform:scale(1.04); }

.recapRight{
  margin-left:auto;
  flex-shrink:0;
  text-align:right;
}
.recapRefLine{
  font-weight:900;
  color:#0b3b66;
  font-size:13px;
  white-space:nowrap;
}
.recapDescLine{
  font-size:11px;
  color:#64748b;
  white-space:nowrap;
  max-width:220px;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* =========================================================
   Recherche — centrée + itemMiniCard en dessous
   ========================================================= */

.searchHeaderRow{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:14px;
  margin-bottom:14px;
}

/* Barre recherche centrée */
.searchWrap{
  position:relative;
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:center;
  width:min(680px,100%);
}

/* Suggestions box */
.suggestBox{
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  top:54px;
  width:min(680px,100%);
  background:#fff;
  border:1px solid var(--border);
  border-radius:18px;
  box-shadow:var(--shadow2);
  z-index:200;
  overflow:hidden;
}

#suggestList{ padding:8px; }

.sItem{
  padding:10px 12px;
  border-radius:14px;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  gap:2px;
  border:1px solid transparent;
}
.sItem:hover{
  background:#f1f5f9;
  border-color:rgba(15,23,42,0.06);
}

.sMain{
  font-weight:950;
  color:#0b3b66;
}
.sSub{
  font-size:12px;
  color:#334155;
}

/* =========================================================
   itemMiniCard — pleine largeur centrée sous la recherche
   ========================================================= */

.itemMiniCard{
  background:#fff;
  border:1px solid var(--border);
  border-radius:18px;
  padding:14px 18px;
  box-shadow:var(--shadow);
  width:min(980px,100%);
  display:none; /* masquée par défaut, affichée via JS */
}

.itemMiniCard[style*="display: "]:not([style*="display: none"]),
.itemMiniCard:not([style*="display"]){
  display:block;
}

.itemMiniTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:6px;
}

.itemMiniRef{
  font-weight:950;
  color:#0b3b66;
  font-size:15px;
}

.itemMiniDesc{
  font-size:13px;
  color:#334155;
  line-height:1.4;
  margin-bottom:8px;
}

.itemMiniZones{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

/* Chips */
.zchip{
  padding:7px 10px;
  border-radius:999px;
  font-weight:900;
  color:#fff;
  font-size:12px;
}

/* =========================================================
   Zone Picker — colonnes propres + catégories
   ========================================================= */

.zonePickerWrap{
  display:flex;
  justify-content:center;
  margin:18px 0 10px;
}

.zonePickerBlue{
  width:min(980px,100%);
  background:#f0f7ff;
  border:1px solid var(--border);
  border-radius:18px;
  padding:16px;
  box-shadow:var(--shadow);
}

.zonePickerTitle{
  font-weight:950;
  color:#0b3b66;
  margin-bottom:14px;
}

/* Grille de blocs */
.zonePickerInner{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(180px, 1fr));
  gap:12px;
}

@media(max-width:900px){
  .zonePickerInner{ grid-template-columns:1fr 1fr; }
}

@media(max-width:520px){
  .zonePickerInner{ grid-template-columns:1fr; }
}

/* Bloc par categorie */
.zoneGroup{
  background:#fff;
  border:1px solid rgba(91,188,255,0.3);
  border-radius:14px;
  padding:12px 14px;
  box-shadow:0 2px 8px rgba(91,188,255,0.08);
}

.zoneGroupTitle{
  font-weight:950;
  font-size:.72rem;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:#5bbcff;
  background:#f0f7ff;
  border:1px solid rgba(91,188,255,0.25);
  border-radius:8px;
  padding:4px 10px;
  display:inline-block;
  margin-bottom:10px;
}

.zoneBtns{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

/* Boutons zones */
.zoneBtn{
  border:1px solid rgba(91,188,255,0.35);
  background:var(--blue);
  color:#fff;
  border-radius:18px;
  padding:10px 14px;
  min-width:90px;
  font-weight:950;
  cursor:pointer;
  transition:background .15s, transform .1s;
}
.zoneBtn:hover{background:var(--blue-dark); transform:translateY(-1px);}

.zoneBtn.on{
  background:#e8f4ff;
  color:#0b3b66;
  border-color:rgba(91,188,255,0.6);
}

/* =========================================================
   Résultats zone
   ========================================================= */

.grid2{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
}

.rowItem{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(15,23,42,0.08);
  background:#fff;
  cursor:pointer;
  margin-bottom:8px;
}
.rowItem:hover{
  background:#f8fafc;
}

/* =========================================================
   Tables (refs/users)
   ========================================================= */

.table{
  width:100%;
  background:#fff;
  border:1px solid var(--border);
  border-radius:18px;
  overflow:hidden;
  box-shadow:var(--shadow);
}

.tr{
  display:grid;
  grid-template-columns: 1fr 1.2fr 0.8fr;
  gap:10px;
  padding:12px 14px;
  border-top:1px solid rgba(15,23,42,0.08);
  align-items:center;
}
.tr.th{
  background:#f8fafc;
  border-top:0;
  font-weight:950;
  color:#0b3b66;
}
@media(max-width:760px){
  .tr{ grid-template-columns:1fr; }
  .tr.th{ display:none; }
}

.tdActions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
}

/* =========================================================
   Zones list rows / logs rows
   ========================================================= */

.zoneRow{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  border:1px solid rgba(15,23,42,0.08);
  border-radius:18px;
  background:#fff;
  margin-bottom:10px;
  box-shadow:var(--shadow);
}

/* =========================================================
   Logs
   ========================================================= */
.logRow{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:12px 16px;
  border:1.5px solid rgba(15,23,42,0.08);
  border-left-width:4px;
  border-radius:14px;
  background:#fff;
  margin-bottom:8px;
  box-shadow:var(--shadow);
  flex-wrap:wrap;
}
.logRow--green  { border-left-color:#22c55e; background:#f0fdf4; }
.logRow--red    { border-left-color:#ef4444; background:#fff5f5; }
.logRow--orange { border-left-color:#f59e0b; background:#fffbeb; }
.logRow--blue   { border-left-color:#5bbcff; background:#f0f9ff; }
.logRow--muted  { border-left-color:#cbd5e1; background:#f8fafc; }

.logRow-main{
  display:flex;
  align-items:flex-start;
  gap:10px;
  flex:1;
  min-width:0;
}
.logRow-icon{
  font-size:18px;
  line-height:1;
  flex-shrink:0;
  margin-top:1px;
}
.logRow-msg{
  font-size:.9rem;
  color:var(--text);
  line-height:1.5;
  word-break:break-word;
}
.logRow-msg b{ font-weight:700; }
.logRow-meta{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:2px;
  flex-shrink:0;
}
.logRow-time{
  font-size:.78rem;
  color:var(--muted);
  white-space:nowrap;
  font-weight:600;
}
.log-val{
  font-style:italic;
  color:var(--blue);
}

/* =========================================================
   CardSoft (garde compatibilité HTML existant)
   ========================================================= */

.cardSoft{
  background:#fff;
  border:1px solid var(--border);
  border-radius:18px;
  padding:14px;
  box-shadow:var(--shadow);
}

/* =========================================================
   Modals / Popups (fond flou)
   ========================================================= */

.modalOverlay{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(15,23,42,0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index:999;
  padding:16px;
}

.modal{
  width:min(520px,100%);
  background:#fff;
  border:1px solid rgba(15,23,42,0.12);
  border-radius:22px;
  box-shadow:var(--shadow2);
  padding:16px;
}

.smallModal{
  width:min(420px,100%);
}

.loginHead{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:12px;
}

.loginTitle{
  font-weight:950;
  color:#0b3b66;
}

.passRow{
  display:flex;
  gap:10px;
  align-items:center;
}

.rememberRow{
  display:flex;
  gap:10px;
  align-items:center;
  margin:10px 0 0;
  color:#334155;
  font-weight:700;
}

.full{ width:100%; }

/* =========================================================
   Mobile (max 520px)
   ========================================================= */

@media(max-width:520px){

  :root{
    --topbar-h:56px;
    --recap-h:52px;
  }

  .container{
    width:calc(100% - 22px);
    margin:14px auto 64px;
  }

  /* Topbar mobile — logo gauche, actions droite, profil tout à droite */
  .topbar{
    display:flex;
    flex-wrap:nowrap;
    align-items:center;
    gap:0;
    padding:10px 12px;
    justify-content:space-between;
  }

  /* Logo toujours visible à gauche */
  .brand{
    display:flex;
    align-items:center;
    flex-shrink:0;
    font-size:17px;
    padding:4px 6px;
    margin-right:8px;
  }

  .topLeft{
    /* Côté gauche : logo + onglets (onglets cachés par défaut) */
    flex-shrink:0;
    display:flex;
    align-items:center;
    gap:0;
    overflow:visible;
    flex-wrap:nowrap;
  }

  /* Les onglets restent cachés sur mobile (menu hamburger) */
  .topLeft .pageTab{
    display:none;
  }
  .topLeft.menu-open{
    position:fixed;
    top:var(--topbar-h);
    left:0;
    right:0;
    background:#fff;
    border-bottom:1px solid var(--border);
    padding:10px 12px;
    display:flex;
    flex-direction:column;
    gap:6px;
    z-index:49;
    box-shadow:0 4px 16px rgba(0,0,0,.10);
  }
  .topLeft.menu-open .pageTab{
    display:flex;
    width:100%;
    border-radius:10px;
    padding:12px 14px;
    font-size:14px;
    justify-content:flex-start;
  }

  /* Côté droit : actions (panier, cloche, hamburger) + profil tout à droite */
  .topRight{
    display:flex;
    align-items:center;
    gap:8px;
    flex-shrink:0;
    margin-left:auto;
  }

  /* Profil : séparé visuellement, tout à droite */
  .userPill{
    margin-left:4px;
  }

  /* Cacher le bouton carte sur mobile */
  .btnMapNav{ display:none !important; }

  /* Hamburger visible */
  .btnMenuToggle{ display:flex; }

  /* Recap compacte sur mobile */
  .recapBar{
    padding:6px 12px;
  }
  .recapRight{ display:none; }
  .recapDescLine{ max-width:140px; }

  /* Recherche mobile */
  .searchWrap{
    flex-direction:column;
    gap:8px;
    width:100%;
  }
  .searchInputWrap{ width:100%; }
  .searchWrap > .btn,
  .searchWrap > .btnBasketAdd{
    /* Rechercher + ➕ sur la même ligne */
  }
  .searchWrap .searchBottomRow{
    display:flex;
    gap:8px;
    width:100%;
  }
  .searchWrap .searchBottomRow .btn{ flex:1; justify-content:center; }
  .searchWrap .searchBottomRow .btnBasketAdd{ flex-shrink:0; }

  .suggestBox{
    width:100%;
    left:0;
    transform:none;
  }

  /* itemMiniCard mobile */
  .itemMiniCard{
    padding:12px 14px;
    width:100%;
    border-radius:14px;
  }

  .zoneBtn{
    flex:1 1 calc(50% - 8px);
    min-width:0;
    padding:10px 8px;
    font-size:.82rem;
  }

  .zonePickerInner{
    grid-template-columns:1fr;
  }
}
/* Colonnes de tri dans le tableau Références */
.sortCol{
  display:flex;
  align-items:center;
  gap:5px;
  transition:color .15s;
}
.sortCol:hover{ color:var(--blue); }
.sortIcon{
  font-size:11px;
  opacity:.6;
  transition:opacity .15s;
}
.sortCol:hover .sortIcon{ opacity:1; }

/* ── Statut des références ──────────────────────────────── */
.statusBadge{
  display:inline-flex;
  align-items:center;
  gap:4px;
  font-size:11px;
  font-weight:700;
  padding:3px 8px;
  border-radius:999px;
  white-space:nowrap;
}
.statusBadge.active { background:#dcfce7; color:#15803d; }
.statusBadge.sleep  { background:#fff7ed; color:#c2410c; }
.statusBadge.hidden { background:#f3e8ff; color:#7c3aed; }

/* Ligne de référence inactive — légèrement atténuée */
.refRowInactive { opacity:.65; }
.refRowInactive:hover { opacity:1; transition:opacity .15s; }

/* Boutons de filtre actifs */
.btn.active-filter{
  background:var(--blue);
  color:#fff;
  border-color:var(--blue);
}
.btn.active-filter:hover{ filter:brightness(1.08); }

/* ═══════════════════════════════════════════════════════════
   Tableau Références — nouvelle mise en page
   ═══════════════════════════════════════════════════════════ */

.refsTable{
  width:100%;
  background:#fff;
  border:1px solid var(--border);
  border-radius:18px;
  overflow:hidden;
  box-shadow:var(--shadow);
}

.refsTableHead{
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 18px;
  background:#f8fafc;
  border-bottom:1px solid var(--border);
  font-size:12px;
  font-weight:800;
  color:#0b3b66;
  letter-spacing:.03em;
  text-transform:uppercase;
}

/* Ligne référence */
.refRow{
  display:flex;
  align-items:stretch;
  border-top:1px solid rgba(15,23,42,0.07);
  cursor:pointer;
  transition:background .12s;
  position:relative;
}
.refRow:first-child{ border-top:0; }
.refRow:hover{ background:#f8fafc; }
.refRow:hover .refRowActions{ opacity:1; }

.refRowMain{
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  padding:11px 16px;
  gap:12px;
  min-height:58px;
}

.refRowLeft{
  display:flex;
  flex-direction:column;
  gap:3px;
  flex:1;
  min-width:0;
}

/* Référence + boutons sur la même ligne */
.refRowRef{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.refCode{
  font-family:ui-monospace, "SF Mono", Menlo, monospace;
  font-size:13.5px;
  font-weight:700;
  color:var(--blue);
  letter-spacing:.02em;
  white-space:nowrap;
}

.refRowName{
  font-size:12.5px;
  color:var(--muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:520px;
}

/* Boutons d'action inline */
.refRowActions{
  display:flex;
  align-items:center;
  gap:4px;
  opacity:0;
  transition:opacity .15s;
  flex-shrink:0;
}

/* Sur mobile toujours visible */
@media(max-width:760px){
  .refRowActions{ opacity:1; }
}

.refBtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:28px;
  height:28px;
  border-radius:8px;
  border:1px solid var(--border);
  background:#fff;
  cursor:pointer;
  font-size:14px;
  line-height:1;
  transition:background .12s, border-color .12s, transform .1s;
  flex-shrink:0;
}
.refBtn:hover{ background:#f1f5f9; border-color:#c4d2e2; transform:scale(1.1); }
.refBtnDel{ border-color:#fecaca; }
.refBtnDel:hover{ background:#fee2e2; border-color:#fca5a5; }
.refBtnSleep:hover{ background:#fff7ed; border-color:#fdba74; }
.refBtnHide:hover{ background:#f3e8ff; border-color:#c4b5fd; }
.refBtnWake:hover{ background:#dcfce7; border-color:#86efac; }

/* Statut à droite */
.refRowStatus{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-shrink:0;
  min-width:90px;
}

/* Ligne inactive atténuée */
.refRowInactive .refCode{ color:#94a3b8; }
.refRowInactive .refRowName{ opacity:.6; }
.refRowInactive:hover{ background:#fafafa; }

/* ═══════════════════════════════════════════════════════════
   Cartes Utilisateurs
   ═══════════════════════════════════════════════════════════ */

.userCard{
  display:flex;
  align-items:center;
  gap:14px;
  padding:14px 16px;
  border-top:1px solid rgba(15,23,42,0.07);
  transition:background .12s;
}
.userCard:first-child{ border-top:0; }
.userCard:hover{ background:#f8fafc; }

.userCardAvatar{
  width:44px;
  height:44px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  font-size:15px;
  flex-shrink:0;
}

.userCardInfo{
  flex:1;
  min-width:0;
}

.userCardName{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.userCardUsername{
  font-weight:700;
  font-size:14px;
  color:var(--text);
}

.userCardRole{
  font-size:11px !important;
  padding:2px 8px !important;
}

.userCardSub{
  font-size:12px;
  color:var(--muted);
  margin-top:2px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.userCardContact{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:4px;
}

.userCardContactItem{
  font-size:11.5px;
  color:var(--muted);
  background:#f1f5f9;
  border-radius:6px;
  padding:2px 7px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:200px;
}

.userCardActions{
  display:flex;
  align-items:center;
  gap:6px;
  flex-shrink:0;
}

.userContactBtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:32px;
  height:32px;
  border-radius:8px;
  background:#f1f5f9;
  border:1px solid var(--border);
  text-decoration:none;
  font-size:15px;
  transition:background .12s, transform .1s;
}
.userContactBtn:hover{ background:#e2e8f0; transform:scale(1.08); }

/* Bouton badge profil dans la topbar */
.userBadgeBtn{
  background:none;
  border:none;
  padding:0;
  cursor:pointer;
  border-radius:8px;
  transition:opacity .15s;
}
.userBadgeBtn:hover{ opacity:.75; }

/* ═══════════════════════════════════════════════════════════
   Modal Profil
   ═══════════════════════════════════════════════════════════ */

.profileModal{
  max-width:440px;
  max-height:92vh;
  overflow-y:auto;
}

.profileAvatar{
  width:72px;
  height:72px;
  border-radius:20px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  font-size:26px;
  margin:14px auto 8px;
}

.profileUsername{
  text-align:center;
  font-weight:800;
  font-size:17px;
  color:var(--text);
}

.profileRole{
  text-align:center;
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.05em;
  margin-top:2px;
  margin-bottom:4px;
}

.profileDivider{
  height:1px;
  background:var(--border);
  margin:16px 0;
}

.profileSection{ }

.profileSectionTitle{
  font-weight:800;
  font-size:13px;
  color:var(--text);
  margin-bottom:4px;
}

.profileFieldLabel{
  font-size:12px;
  font-weight:700;
  color:var(--muted);
  margin-bottom:5px;
}

/* ═══════════════════════════════════════════════════════════
   Panier de recherche / Récapitulatif
   ═══════════════════════════════════════════════════════════ */

/* Bouton ➕ dans la searchWrap */
.btnBasketAdd{
  height:46px;
  min-width:46px;
  padding:0 14px;
  border-radius:999px;
  border:1.5px solid var(--blue);
  background:#fff;
  color:var(--blue);
  font-size:18px;
  font-weight:700;
  cursor:pointer;
  transition:background .15s, color .15s, transform .1s;
  white-space:nowrap;
  flex-shrink:0;
}
.btnBasketAdd:hover:not(:disabled){
  background:var(--blue);
  color:#fff;
  transform:scale(1.05);
}

/* Bouton 📋 dans la topbar */
.btnBasketOpen{
  display:inline-flex;
  align-items:center;
  gap:6px;
  height:36px;
  padding:0 12px;
  border-radius:999px;
  border:1.5px solid var(--blue);
  background:#fff;
  color:var(--blue);
  font-size:13px;
  font-weight:700;
  cursor:pointer;
  transition:background .15s, color .15s;
}
.btnBasketOpen:hover{ background:var(--blue); color:#fff; }

/* Badge compteur */
.basketCountBadge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:20px;
  height:20px;
  padding:0 5px;
  border-radius:999px;
  background:var(--blue);
  color:#fff;
  font-size:11px;
  font-weight:800;
  line-height:1;
}
.btnBasketOpen .basketCountBadge{
  background:#fff;
  color:var(--blue);
}
.btnBasketOpen:hover .basketCountBadge{
  background:rgba(255,255,255,0.25);
  color:#fff;
}

/* Overlay plein écran */
.basketOverlay{
  align-items: flex-end !important;
  justify-content: flex-end !important;
  background: rgba(15,23,42,0.4) !important;
  backdrop-filter: blur(3px);
}

/* Panel latéral */
.basketPanel{
  width: 480px;
  max-width: 100vw;
  height: 100vh;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 40px rgba(15,23,42,0.15);
  animation: slideInRight .22s cubic-bezier(.4,0,.2,1);
}
@keyframes slideInRight{
  from{ transform:translateX(40px); opacity:0; }
  to{   transform:translateX(0);    opacity:1; }
}

/* Header du panel */
.basketHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 18px;
  border-bottom:1px solid var(--border);
  background:#f8fafc;
  flex-shrink:0;
}
.basketTitle{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
  font-size:16px;
  color:var(--text);
}
.basketHeaderActions{
  display:flex;
  align-items:center;
  gap:8px;
}

/* État vide */
.basketEmpty{
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  color:var(--muted);
  font-size:14px;
  padding:32px;
  text-align:center;
}
.basketEmptyIcon{ font-size:48px; margin-bottom:4px; }

/* Liste scrollable */
.basketList{
  flex:1;
  overflow-y:auto;
  padding:10px 12px;
  display:flex;
  flex-direction:column;
  gap:8px;
}

/* Carte référence dans le panier */
.basketCard{
  background:#fff;
  border:1.5px solid var(--border);
  border-radius:14px;
  padding:12px 14px;
  transition:border-color .15s, box-shadow .15s;
}
.basketCard:hover{
  border-color:var(--blue);
  box-shadow:0 2px 12px rgba(91,188,255,0.12);
}

.basketCardHead{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}
.basketCardLeft{
  display:flex;
  align-items:center;
  gap:10px;
  flex:1;
  min-width:0;
}
.basketCardNum{
  width:26px;
  height:26px;
  border-radius:8px;
  background:var(--blue);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  font-weight:800;
  flex-shrink:0;
}
.basketCardInfo{ flex:1; min-width:0; }
.basketCardRef{
  font-family:ui-monospace,"SF Mono",Menlo,monospace;
  font-weight:700;
  font-size:14px;
  color:var(--blue);
}
.basketCardName{
  font-size:12px;
  color:var(--muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  margin-top:1px;
}
.basketCardActions{
  display:flex;
  gap:5px;
  flex-shrink:0;
}

/* Zones dans la carte */
.basketCardZones{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
}
.basketZoneChip{
  font-size:11.5px;
  font-weight:700;
  padding:3px 9px;
  border-radius:999px;
  white-space:nowrap;
}
.basketZoneNone{
  font-size:11.5px;
  color:var(--muted);
  font-style:italic;
}

/* Footer */
.basketFooter{
  padding:12px 18px;
  border-top:1px solid var(--border);
  background:#f8fafc;
  flex-shrink:0;
}
.basketTotalText{
  font-size:13px;
  font-weight:700;
  color:var(--muted);
}

/* Mobile */
@media(max-width:600px){
  .basketPanel{
    width:100vw;
    height:92vh;
    border-radius:20px 20px 0 0;
    animation:slideInUp .22s cubic-bezier(.4,0,.2,1);
  }
  .basketOverlay{
    align-items:flex-end !important;
    justify-content:center !important;
  }
  @keyframes slideInUp{
    from{ transform:translateY(40px); opacity:0; }
    to{   transform:translateY(0);    opacity:1; }
  }
}

/* Croix dans la barre de recherche */
.searchInputWrap{
  position:relative;
  display:flex;
  align-items:center;
  flex:1;
  min-width:0;
}
.searchInputWrap .input{
  width:100%;
  padding-right:40px; /* espace pour la croix */
}
.btnSearchClear{
  position:absolute;
  right:12px;
  top:50%;
  transform:translateY(-50%);
  width:26px;
  height:26px;
  border-radius:50%;
  border:none;
  background:#e2e8f0;
  color:#64748b;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:background .12s, color .12s;
  z-index:2;
  flex-shrink:0;
}
.btnSearchClear:hover{ background:#cbd5e1; color:#0f172a; }

/* Bouton effacer recherches récentes */
.btnClearRecents{
  background:none;
  border:none;
  color:var(--muted);
  font-size:11.5px;
  font-weight:700;
  cursor:pointer;
  padding:2px 6px;
  border-radius:6px;
  white-space:nowrap;
  transition:color .12s, background .12s;
}
.btnClearRecents:hover{ color:#ef4444; background:#fee2e2; }

/* ═══════════════════════════════════════════════════════════
   Notification Bell
   ═══════════════════════════════════════════════════════════ */
.btnNotifBell{
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:5px;
  height:36px;
  padding:0 10px;
  border-radius:999px;
  border:1.5px solid var(--border);
  background:#fff;
  color:var(--text);
  font-size:16px;
  cursor:pointer;
  transition:background .15s, border-color .15s;
}
.btnNotifBell:hover{ background:#f8fafc; border-color:var(--blue); }
.notifCountBadge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:18px;
  height:18px;
  padding:0 4px;
  border-radius:999px;
  background:#ef4444;
  color:#fff;
  font-size:10px;
  font-weight:800;
}
.notifItem{
  padding:12px 14px;
  border-bottom:1px solid var(--border);
  cursor:pointer;
  transition:background .12s;
  display:flex;
  gap:10px;
  align-items:flex-start;
}
.notifItem:hover{ background:#f8fafc; }
.notifItem.unread{ background:#eff6ff; border-left:3px solid #3b82f6; }
.notifItem.unread:hover{ background:#dbeafe; }
.notifItemBody{ flex:1; min-width:0; }
.notifItemTitle{ font-weight:700; font-size:13px; color:var(--text); }
.notifItemText{ font-size:12px; color:var(--muted); margin-top:2px; }
.notifItemTime{ font-size:11px; color:var(--muted); white-space:nowrap; }
.notifItemDot{ width:8px; height:8px; border-radius:50%; background:#3b82f6; flex-shrink:0; margin-top:4px; }

/* ═══════════════════════════════════════════════════════════
   Admin Section
   ═══════════════════════════════════════════════════════════ */
.adminSection{ margin-bottom:24px; }
.adminSectionTitle{
  font-weight:800;
  font-size:14px;
  color:var(--text);
  margin-bottom:10px;
  padding-bottom:6px;
  border-bottom:2px solid var(--border);
}
.adminCard{
  background:#f8fafc;
  border:1px solid var(--border);
  border-radius:14px;
  padding:16px;
}
.adminRow{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.adminLabel{ font-size:12px; font-weight:700; color:var(--muted); margin-bottom:4px; }

/* Nav editor drag & drop */
.navEditorList{ display:flex; flex-direction:column; gap:6px; }
.navEditorItem{
  display:flex;
  align-items:center;
  gap:10px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:10px;
  padding:8px 12px;
  cursor:grab;
  transition:box-shadow .15s;
  user-select:none;
}
.navEditorItem:active{ cursor:grabbing; box-shadow:0 4px 16px rgba(0,0,0,.12); }
.navEditorItem.drag-over{ border-color:var(--blue); background:#eff6ff; }
.navEditorHandle{ color:var(--muted); font-size:16px; flex-shrink:0; }
.navEditorLabel{ flex:1; }
.navEditorLabel input{ border:none; background:none; font-size:13px; font-weight:600; color:var(--text); width:100%; outline:none; }
.navEditorLabel input:focus{ background:#f1f5f9; border-radius:6px; padding:2px 6px; }
.navEditorToggle{ font-size:12px; color:var(--muted); cursor:pointer; white-space:nowrap; }
.navEditorToggle:hover{ color:var(--blue); }

/* Motifs admin */
.motifTag{
  display:inline-flex;
  align-items:center;
  gap:6px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:999px;
  padding:4px 10px;
  font-size:12px;
  font-weight:600;
}
.motifTag button{ background:none; border:none; cursor:pointer; color:#ef4444; font-size:14px; line-height:1; padding:0; }

/* ═══════════════════════════════════════════════════════════
   Achats — Navigation sous-onglets
   ═══════════════════════════════════════════════════════════ */
.purchasesNav{
  display:flex;
  gap:4px;
  padding:4px;
  background:#f1f5f9;
  border-radius:14px;
  margin-bottom:18px;
}
.purchaseTab{
  flex:1;
  padding:9px 14px;
  border-radius:10px;
  border:none;
  background:none;
  font-size:13px;
  font-weight:700;
  color:var(--muted);
  cursor:pointer;
  transition:background .15s, color .15s;
  white-space:nowrap;
}
.purchaseTab.active{
  background:#fff;
  color:var(--text);
  box-shadow:0 1px 4px rgba(0,0,0,.08);
}
.purchasePanel{ display:none; }
.purchasePanel.active{ display:block; }

/* ═══════════════════════════════════════════════════════════
   Commandes
   ═══════════════════════════════════════════════════════════ */
.ordersGroupTitle{
  font-weight:800;
  font-size:13px;
  color:var(--muted);
  margin-bottom:8px;
  display:flex;
  align-items:center;
  gap:6px;
}
.ordersList{ display:flex; flex-direction:column; gap:8px; }
.orderCard{
  background:#fff;
  border:1.5px solid var(--border);
  border-radius:14px;
  padding:14px 16px;
  cursor:pointer;
  transition:border-color .15s, box-shadow .15s;
}
.orderCard:hover{ border-color:var(--blue); box-shadow:0 2px 12px rgba(91,188,255,.12); }
.orderCardHead{ display:flex; justify-content:space-between; align-items:center; gap:10px; }
.orderCardNum{ font-family:monospace; font-weight:800; color:var(--blue); font-size:14px; }
.orderCardMeta{ font-size:12px; color:var(--muted); margin-top:3px; }
.orderStatutBadge{
  font-size:11px;
  font-weight:700;
  padding:3px 10px;
  border-radius:999px;
  white-space:nowrap;
}
.orderStatut-soumise{ background:#dbeafe; color:#1d4ed8; }
.orderStatut-acceptee{ background:#dcfce7; color:#166534; }
.orderStatut-refusee{ background:#fee2e2; color:#991b1b; }
.orderStatut-archivee{ background:#f1f5f9; color:#64748b; }

/* Catalogue dans commande */
.orderCatalogList{
  display:flex;
  flex-direction:column;
  gap:4px;
  max-height:260px;
  overflow-y:auto;
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
}
.catalogLineItem{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 14px;
  border-bottom:1px solid #f1f5f9;
  gap:8px;
  flex-wrap:wrap;
}
.catalogLineItem:last-child{ border-bottom:none; }
.catalogLineLeft{ flex:1; min-width:0; }
.catalogLineTitle{ font-weight:700; font-size:13px; color:var(--text); }
.catalogLineSub{ font-size:11.5px; color:var(--muted); }
.catalogFournisseurBlock{
  background:#f8fafc;
  border:1px solid var(--border);
  border-radius:12px;
  padding:12px;
  margin-bottom:10px;
}
.catalogFournisseurTitle{
  font-weight:800;
  font-size:12px;
  color:var(--muted);
  margin-bottom:8px;
  text-transform:uppercase;
  letter-spacing:.04em;
}

/* Panier commande */
.orderBasket{ display:flex; flex-direction:column; gap:6px; }
.basketOrderLine{
  display:flex;
  align-items:center;
  gap:10px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:10px;
  padding:8px 12px;
  flex-wrap:wrap;
}
.basketOrderLineInfo{ flex:1; min-width:0; }
.basketOrderLineTitle{ font-weight:700; font-size:13px; }
.basketOrderLineSub{ font-size:11px; color:var(--muted); }
.basketQtyControl{ display:flex; align-items:center; gap:6px; }
.basketQtyBtn{ width:28px; height:28px; border-radius:8px; border:1px solid var(--border); background:#fff; cursor:pointer; font-weight:700; font-size:16px; display:flex; align-items:center; justify-content:center; transition:background .12s; }
.basketQtyBtn:hover{ background:#f1f5f9; }
.basketQtyVal{ font-weight:700; font-size:14px; min-width:24px; text-align:center; }

/* New order form */
.newOrderForm{
  background:#f8fafc;
  border:1.5px solid var(--blue);
  border-radius:16px;
  padding:18px;
  margin-bottom:18px;
}

/* Mentions tags */
.mentionInputWrap{ position:relative; }
.mentionSuggest{
  position:absolute;
  top:100%;
  left:0;
  right:0;
  background:#fff;
  border:1px solid var(--border);
  border-radius:10px;
  box-shadow:0 4px 16px rgba(0,0,0,.1);
  z-index:300;
  max-height:180px;
  overflow-y:auto;
}
.mentionSuggestItem{
  padding:8px 12px;
  cursor:pointer;
  font-size:13px;
  display:flex;
  align-items:center;
  gap:8px;
  transition:background .1s;
}
.mentionSuggestItem:hover{ background:#f1f5f9; }
.mentionTags{ display:flex; flex-wrap:wrap; gap:6px; }
.mentionTag{
  display:inline-flex;
  align-items:center;
  gap:5px;
  background:#dbeafe;
  color:#1d4ed8;
  border-radius:999px;
  padding:3px 10px;
  font-size:12px;
  font-weight:700;
}
.mentionTag button{ background:none; border:none; cursor:pointer; color:#1d4ed8; font-size:13px; line-height:1; padding:0; }

/* ═══════════════════════════════════════════════════════════
   Catalogue
   ═══════════════════════════════════════════════════════════ */
.catalogList{ display:flex; flex-direction:column; gap:4px; }
.catalogCard{
  background:#fff;
  border:1.5px solid var(--border);
  border-radius:12px;
  padding:12px 14px;
  display:flex;
  align-items:center;
  gap:12px;
  cursor:pointer;
  transition:border-color .15s;
}
.catalogCard:hover{ border-color:var(--blue); }
.catalogCardInfo{ flex:1; min-width:0; }
.catalogCardTitle{ font-weight:700; font-size:13px; }
.catalogCardSub{ font-size:11.5px; color:var(--muted); margin-top:2px; }
.catalogCatBadge{
  font-size:11px;
  font-weight:700;
  padding:2px 8px;
  border-radius:999px;
  background:#f1f5f9;
  color:var(--muted);
  white-space:nowrap;
}
.catalogGroupHeader{
  font-weight:800;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.05em;
  color:var(--muted);
  padding:8px 4px 4px;
}

/* ═══════════════════════════════════════════════════════════
   Litiges
   ═══════════════════════════════════════════════════════════ */
.disputeFilters{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:14px;
  align-items:center;
}
.disputesList{ display:flex; flex-direction:column; gap:8px; margin-bottom:10px; }
.disputeCard{
  background:#fff;
  border:1.5px solid var(--border);
  border-radius:14px;
  padding:14px 16px;
  cursor:pointer;
  transition:border-color .15s, box-shadow .15s;
  position:relative;
}
.disputeCard:hover{ border-color:var(--blue); box-shadow:0 2px 12px rgba(91,188,255,.12); }
.disputeCardHead{ display:flex; justify-content:space-between; align-items:flex-start; gap:8px; }
.disputeCardLeft{ flex:1; min-width:0; }
.disputeCardTitle{ font-weight:800; font-size:13px; color:var(--text); }
.disputeCardMeta{ font-size:11.5px; color:var(--muted); margin-top:3px; }
.disputeCardTags{ display:flex; flex-wrap:wrap; gap:5px; margin-top:8px; }
.disputePrioBadge{ font-size:11px; font-weight:700; padding:3px 9px; border-radius:999px; }
.prio-basse{ background:#dcfce7; color:#166534; }
.prio-moderee{ background:#dbeafe; color:#1d4ed8; }
.prio-haute{ background:#fef9c3; color:#854d0e; }
.prio-urgent{ background:#fee2e2; color:#991b1b; }
.disputeStatutBadge{ font-size:11px; font-weight:700; padding:3px 9px; border-radius:999px; }
.statut-a_traiter{ background:#dbeafe; color:#1d4ed8; }
.statut-en_cours{ background:#fef9c3; color:#854d0e; }
.statut-resolu{ background:#dcfce7; color:#166534; }
.disputeFavStar{
  font-size:16px;
  opacity:.3;
  transition:opacity .15s;
  cursor:pointer;
  flex-shrink:0;
  align-self:flex-start;
  margin-left:4px;
}
.disputeFavStar.active{ opacity:1; }

/* Formulaire litige */
.newDisputeForm{
  background:#f8fafc;
  border:1.5px solid var(--border);
  border-radius:16px;
  padding:18px;
  margin-bottom:18px;
}
.disputeFormGrid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
@media(max-width:520px){ .disputeFormGrid{ grid-template-columns:1fr; } }

/* Rich editor */
.richEditorBar{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  padding:8px 10px;
  background:#f1f5f9;
  border:1px solid var(--border);
  border-bottom:none;
  border-radius:10px 10px 0 0;
}
.richBtn{
  width:30px;
  height:30px;
  border-radius:6px;
  border:1px solid var(--border);
  background:#fff;
  cursor:pointer;
  font-size:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:background .12s;
}
.richBtn:hover{ background:#e2e8f0; }
.richColorPalette{ display:flex; align-items:center; gap:4px; flex-wrap:wrap; }
.richColorLabel{ font-size:11px; color:var(--muted); font-weight:600; }
.colorSwatch{
  width:20px;
  height:20px;
  border-radius:5px;
  cursor:pointer;
  transition:transform .1s;
}
.colorSwatch:hover{ transform:scale(1.2); }
.richColorPicker{ width:28px; height:28px; border:none; cursor:pointer; border-radius:5px; padding:0; }
.richEditor{
  min-height:100px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:0 0 10px 10px;
  background:#fff;
  font-size:14px;
  line-height:1.6;
  outline:none;
  overflow-y:auto;
}
.richEditor:empty:before{
  content:attr(placeholder);
  color:#94a3b8;
  pointer-events:none;
}

/* Photos */
.disputePhotosGrid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
  margin-bottom:8px;
}
@media(max-width:480px){ .disputePhotosGrid{ grid-template-columns:repeat(2,1fr); } }
.disputePhotoThumb{
  position:relative;
  aspect-ratio:1;
  border-radius:10px;
  overflow:hidden;
  cursor:pointer;
  border:2px solid transparent;
  transition:border-color .15s;
}
.disputePhotoThumb:hover{ border-color:var(--blue); }
.disputePhotoThumb img{ width:100%; height:100%; object-fit:cover; }
.disputePhotoCaption{
  position:absolute;
  bottom:0;
  left:0;
  right:0;
  background:rgba(0,0,0,.6);
  color:#fff;
  font-size:10px;
  padding:3px 5px;
  text-overflow:ellipsis;
  overflow:hidden;
  white-space:nowrap;
}
.disputePhotoDelete{
  position:absolute;
  top:4px;
  right:4px;
  width:20px;
  height:20px;
  border-radius:50%;
  background:rgba(239,68,68,.9);
  color:#fff;
  border:none;
  cursor:pointer;
  font-size:11px;
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  transition:opacity .15s;
}
.disputePhotoThumb:hover .disputePhotoDelete{ opacity:1; }
.btnPhotoUpload{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 14px;
  border-radius:10px;
  border:1.5px dashed var(--border);
  background:#f8fafc;
  color:var(--muted);
  font-size:13px;
  font-weight:600;
  cursor:pointer;
  transition:border-color .15s, color .15s;
}
.btnPhotoUpload:hover{ border-color:var(--blue); color:var(--blue); }

/* Replies */
.disputeReply{
  padding:10px 12px;
  background:#f8fafc;
  border-radius:10px;
  margin-bottom:6px;
}
.disputeReplyHead{ display:flex; justify-content:space-between; font-size:12px; color:var(--muted); margin-bottom:4px; }
.disputeReplyBody{ font-size:13px; color:var(--text); line-height:1.5; }

/* ═══════════════════════════════════════════════════════════
   Litige — Page plein écran
   ═══════════════════════════════════════════════════════════ */
.disputeFullPage{
  position:fixed;
  inset:0;
  z-index:500;
  background:var(--bg,#f1f5f9);
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.disputeFullHeader{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px 20px;
  background:#fff;
  border-bottom:1.5px solid var(--border);
  flex-shrink:0;
  flex-wrap:wrap;
}
.disputeFullBack{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:7px 14px;
  border-radius:10px;
  border:1.5px solid var(--border);
  background:#f8fafc;
  color:var(--text);
  font-size:13px;
  font-weight:700;
  cursor:pointer;
  white-space:nowrap;
  transition:border-color .15s;
}
.disputeFullBack:hover{ border-color:var(--blue); color:var(--blue); }
.disputeFullTitle{
  flex:1;
  font-size:17px;
  font-weight:800;
  color:var(--text);
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.disputeFullHeaderActions{
  display:flex;
  gap:8px;
  align-items:center;
  flex-shrink:0;
  flex-wrap:wrap;
}
.disputeFullBody{
  flex:1;
  display:grid;
  grid-template-columns:1fr 360px;
  overflow:hidden;
  gap:0;
}
@media(max-width:768px){
  .disputeFullBody{ grid-template-columns:1fr; grid-template-rows:1fr auto; }
}
.disputeFullContent{
  overflow-y:auto;
  padding:24px;
}
.disputeFullReply{
  border-left:1.5px solid var(--border);
  padding:20px;
  background:#fff;
  overflow-y:auto;
  display:flex;
  flex-direction:column;
  gap:6px;
}
@media(max-width:768px){
  .disputeFullReply{ border-left:none; border-top:1.5px solid var(--border); }
}

/* Dispute card — étoile dans le flux, plus de superposition */
.disputeCard{ position:static; }
.disputeCardHead{ position:relative; }
.disputeCardHeadLeft{
  display:flex;
  align-items:flex-start;
  gap:0;
  flex:1;
  min-width:0;
}

/* Detail sections */
.disputeDetailSection{
  background:#fff;
  border:1.5px solid var(--border);
  border-radius:14px;
  padding:18px 20px;
  margin-bottom:14px;
}
.disputeDetailSectionTitle{
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.05em;
  color:var(--muted);
  margin-bottom:12px;
  padding-bottom:8px;
  border-bottom:1px solid var(--border);
}
.disputeDetailGrid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(160px,1fr));
  gap:12px;
  margin-bottom:14px;
}
.disputeDetailField label{
  display:block;
  font-size:11px;
  font-weight:700;
  color:var(--muted);
  margin-bottom:3px;
}
.disputeDetailField span{
  font-size:13px;
  font-weight:600;
  color:var(--text);
}

/* ═══════════════════════════════════════════════════════════
   Order Modal — Modale centrée
   ═══════════════════════════════════════════════════════════ */
.orderModalOverlay{
  position:fixed;
  inset:0;
  z-index:400;
  background:rgba(15,23,42,.45);
  backdrop-filter:blur(4px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
  overflow:auto;
}
.orderModalBox{
  background:#fff;
  border-radius:20px;
  box-shadow:0 24px 80px rgba(15,23,42,.22);
  width:100%;
  max-width:640px;
  max-height:90vh;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  animation:orderModalIn .2s cubic-bezier(.34,1.56,.64,1);
}
@keyframes orderModalIn{
  from{ opacity:0; transform:scale(.94) translateY(12px); }
  to  { opacity:1; transform:scale(1)   translateY(0); }
}
.orderModalHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:18px 20px 14px;
  border-bottom:1.5px solid var(--border);
  flex-shrink:0;
}
.orderModalHeaderLeft{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  min-width:0;
}
.orderModalNum{
  font-size:17px;
  font-weight:800;
  color:var(--text);
  font-family:monospace;
}
.orderModalBody{
  flex:1;
  overflow-y:auto;
  padding:20px;
}
.orderModalFooter{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:14px 20px;
  border-top:1.5px solid var(--border);
  flex-shrink:0;
  flex-wrap:wrap;
}
.orderModalFooterLeft{ display:flex; gap:8px; }
.orderModalFooterRight{ display:flex; gap:8px; flex-wrap:wrap; }

/* Sections commandes collapsibles */
.ordersGroupTitle.collapsible:hover{ color:var(--blue); }
.collapseIcon{ font-size:10px; margin-left:4px; transition:transform .2s; }
.collapseOpen .collapseIcon{ transform:rotate(90deg); }

/* Order card — version riche */
.orderCard{
  background:#fff;
  border:1.5px solid var(--border);
  border-radius:14px;
  padding:14px 16px;
  cursor:pointer;
  transition:border-color .15s,box-shadow .15s;
  display:flex;
  align-items:center;
  gap:12px;
}
.orderCard:hover{ border-color:var(--blue); box-shadow:0 2px 12px rgba(91,188,255,.12); }
.orderCardBody{ flex:1; min-width:0; }
.orderCardNum{ font-family:monospace; font-weight:800; color:var(--blue); font-size:14px; }
.orderCardMeta{ font-size:12px; color:var(--muted); margin-top:2px; }
.orderCardRight{ display:flex; align-items:center; gap:8px; flex-shrink:0; }

/* Order detail body sections */
.orderSection{
  background:#f8fafc;
  border:1px solid var(--border);
  border-radius:12px;
  padding:14px 16px;
  margin-bottom:12px;
}
.orderSectionTitle{
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:var(--muted);
  margin-bottom:10px;
}
.orderLineRow{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 0;
  border-bottom:1px solid #f1f5f9;
}
.orderLineRow:last-child{ border-bottom:none; }
.orderLineInfo{ flex:1; min-width:0; }
.orderLineTitle{ font-weight:700; font-size:13px; color:var(--text); }
.orderLineSub{ font-size:11.5px; color:var(--muted); margin-top:1px; }
.orderLineQty{
  font-weight:800;
  font-size:14px;
  background:#e0f2fe;
  color:#0369a1;
  border-radius:8px;
  padding:3px 10px;
  white-space:nowrap;
}

/* New order modal — catalogue/panier 2 colonnes */
@media(max-width:600px){
  .orderModalBox > .orderModalBody[style*="grid"]{
    display:flex !important;
    flex-direction:column !important;
  }
  .orderModalBox > .orderModalBody > div:first-child{
    border-right:none !important;
    border-bottom:1.5px solid var(--border);
    max-height:45vh;
    overflow-y:auto;
  }
}

/* Dispute archived section */
.disputesArchivedCard{
  opacity:.75;
  filter:saturate(.5);
}
.disputesArchivedCard:hover{ opacity:1; filter:saturate(1); }

/* ═══════════════════════════════════════════════════════════
   In-App Toast Notification
   ═══════════════════════════════════════════════════════════ */
.inAppToast {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--blue);
  border-radius: 14px;
  padding: 14px 14px 14px 16px;
  box-shadow: 0 8px 32px rgba(15,23,42,.18);
  cursor: pointer;
  /* État initial : invisible + décalé vers le bas */
  opacity: 0;
  transform: translateY(16px) scale(.97);
  transition: opacity .3s ease, transform .3s cubic-bezier(.34,1.56,.64,1);
  pointer-events: none;
  will-change: transform, opacity;
}
.inAppToast.inAppToastVisible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.inAppToast.inAppToastOut {
  opacity: 0;
  transform: translateY(8px) scale(.96);
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
}
.inAppToastIcon {
  font-size: 22px;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 1px;
}
.inAppToastBody {
  flex: 1;
  min-width: 0;
}
.inAppToastTitle {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 3px;
}
.inAppToastText {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.inAppToastClose {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  padding: 0;
  flex-shrink: 0;
  line-height: 1;
  opacity: .6;
  transition: opacity .15s;
}
.inAppToastClose:hover { opacity: 1; }

/* Sur mobile : ancré en bas, pleine largeur */
@media (max-width: 480px) {
  .inAppToast {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 14px 14px 0 0;
    border-left: 1.5px solid var(--border);
    border-top: 4px solid var(--blue);
    /* État initial mobile : caché vers le bas + transparent */
    opacity: 0;
    transform: translateY(100%);
    will-change: transform, opacity;
  }
  .inAppToast.inAppToastVisible {
    opacity: 1;
    transform: translateY(0);
  }
  .inAppToast.inAppToastOut {
    opacity: 0;
    transform: translateY(100%);
  }
}

/* ═══════════════════════════════════════════════════════════
   Admin — Sélecteur destinataires notification
   ═══════════════════════════════════════════════════════════ */
.notifUserList {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 4px 0;
}
.notifUserChip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: #f8fafc;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  user-select: none;
  transition: border-color .15s, background .15s, color .15s;
}
.notifUserChip:hover {
  border-color: var(--blue);
}
.notifUserChip.selected {
  border-color: var(--blue);
  background: #eff6ff;
  color: var(--blue);
}
.notifUserChip .chipAvatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.notifUserChip.selected .chipAvatar {
  background: var(--blue);
}

/* ── Anti-zoom iOS sur les champs texte ──────────────────────
   iOS zoome si font-size < 16px. On force 16px sur mobile
   uniquement — invisible visuellement mais bloque le zoom.    */
@media (max-width: 768px) {
  input, textarea, select {
    font-size: 16px !important;
  }
}

/* ── Admin notif — color pickers + preview ───────────── */
.notifColorPicker {
  width: 36px;
  height: 30px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 2px;
  cursor: pointer;
  background: none;
}
.notifPreviewBox {
  border-left: 4px solid #3b82f6;
  border-radius: 10px;
  padding: 10px 14px;
  background: #fff;
  min-width: 200px;
  max-width: 280px;
  box-shadow: 0 2px 10px rgba(15,23,42,.10);
  transition: background .2s, border-color .2s;
}
.notifPreviewTitle {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 3px;
  transition: color .2s;
}
.notifPreviewBody {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
  transition: color .2s;
}

/* ── Toast — titre plus gros ─────────────────────────── */
.inAppToastTitle {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 3px;
}

/* ═══════════════════════════════════════════════════════════
   Admin — Éditeur de notification (refonte)
   ═══════════════════════════════════════════════════════════ */

/* Barre preview pleine largeur */
.notifEditorPreviewBar {
  background: #f1f5f9;
  border-bottom: 1.5px solid var(--border);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.notifEditorPreviewLabel {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  white-space: nowrap;
}

/* Preview toast */
.notifPreviewBox {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 4px solid #3b82f6;
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(15,23,42,.10);
  min-width: 240px;
  max-width: 560px;
  transition: background .2s, border-color .2s;
}
.notifPreviewLeft { flex-shrink: 0; }
.notifPreviewIconEl { font-size: 24px; line-height: 1; }
.notifPreviewRight { flex: 1; min-width: 0; }
.notifPreviewTitle {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 2px;
  transition: color .2s;
}
.notifPreviewBody {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
  transition: color .2s;
}
.notifPreviewClose {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 13px;
  cursor: default;
  flex-shrink: 0;
  padding: 0;
}

/* Icônes */
.notifIconGrid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.notifIconBtn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: #f8fafc;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s, background .15s;
  flex-shrink: 0;
}
.notifIconBtn:hover  { border-color: var(--blue); background: #eff6ff; }
.notifIconBtn.active { border-color: var(--blue); background: #eff6ff;
                       box-shadow: 0 0 0 3px rgba(59,130,246,.15); }

/* Thèmes prédéfinis */
.notifThemeGrid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.notifThemeChip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: border-color .15s, box-shadow .15s;
  white-space: nowrap;
}
.notifThemeChip:hover  { border-color: rgba(0,0,0,.2); }
.notifThemeChip.active { border-color: rgba(0,0,0,.35);
                         box-shadow: 0 0 0 3px rgba(0,0,0,.08); }
.notifThemeSwatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid rgba(0,0,0,.12);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   Admin — Section Identité entreprise
   ═══════════════════════════════════════════════════════════ */

/* Barre aperçu brand */
.identityPreviewBar {
  background: #ffffff;
  border-bottom: 1.5px solid var(--border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  min-height: 68px;
}
.identityBrandPreview {
  display: flex;
  align-items: center;
}
.identityPreviewText {
  font-weight: 900;
  color: #0f172a;
  font-size: 22px;
  letter-spacing: -.01em;
  line-height: 1;
  white-space: nowrap;
}
.identityPreviewImg {
  max-height: 40px;
  max-width: 160px;
  object-fit: contain;
}
.identityPreviewMeta {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

/* Grille form 2 colonnes */
.identityFormGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 640px) {
  .identityFormGrid { grid-template-columns: 1fr; }
}

/* Colonne logo */
.identityLogoCol {}
.identityLogoTabs {
  display: flex;
  gap: 0;
  margin-bottom: 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  width: fit-content;
}
.identityLogoTab {
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  background: #f8fafc;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.identityLogoTab:first-child { border-right: 1.5px solid var(--border); }
.identityLogoTab.active { background: #fff; color: var(--blue); }

.identityLogoPanel { }

.identityNameInput {
  width: 100%;
  font-size: 15px;
  font-weight: 700;
}

/* Drop zone image */
.identityDropZone {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 18px 14px;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.identityDropZone:hover { border-color: var(--blue); background: #eff6ff; }
.identityDropIcon { font-size: 28px; margin-bottom: 6px; }
.identityDropText {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.5;
}
.identityDropText span { font-size: 11px; font-weight: 400; }

.identityImgPreviewWrap {
  background: repeating-conic-gradient(#e2e8f0 0% 25%, #fff 0% 50%) 0 0 / 14px 14px;
  border-radius: 8px;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Colonne infos */
.identityInfoGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ═══════════════════════════════════════════════════════════
   Brand Text Editor
   ═══════════════════════════════════════════════════════════ */
.brandEditorBar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 7px 10px;
  background: #f1f5f9;
  border: 1.5px solid var(--border);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
}
.brandEditorSep {
  width: 1px;
  height: 20px;
  background: var(--border);
  flex-shrink: 0;
}
.brandFontWrap { display: flex; align-items: center; }
.brandFontSelect {
  height: 30px;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  background: #fff;
  font-size: 13px;
  padding: 0 6px;
  cursor: pointer;
  max-width: 150px;
}
.brandToolBtn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .12s;
}
.brandToolBtn:hover { background: #e2e8f0; }
.brandColorSwatches {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}
.brandColorSwatch {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  cursor: pointer;
  border: 1.5px solid rgba(0,0,0,.12);
  flex-shrink: 0;
  transition: transform .1s, box-shadow .1s;
}
.brandColorSwatch:hover {
  transform: scale(1.2);
  box-shadow: 0 0 0 2px rgba(59,130,246,.4);
}

/* Éditeur contenteditable */
.brandEditor {
  min-height: 52px;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 0 0 10px 10px;
  background: #fff;
  font-size: 22px;
  font-weight: 900;
  color: #0f172a;
  outline: none;
  line-height: 1.3;
  word-break: break-word;
  cursor: text;
}
.brandEditor:empty::before {
  content: attr(data-placeholder);
  color: #94a3b8;
  font-weight: 400;
  font-size: 16px;
  pointer-events: none;
}
.brandEditor:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

/* ═══════════════════════════════════════════════════════════
   Écran non connecté
   ═══════════════════════════════════════════════════════════ */

/* Message centré au-dessus de la recherche */
.guestHero {
  text-align: center;
  padding: 40px 20px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.guestHeroIcon {
  font-size: 48px;
  line-height: 1;
  filter: grayscale(.3);
}
.guestHeroTitle {
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  max-width: 480px;
  line-height: 1.3;
}
.guestHeroSub {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

@media (max-width: 480px) {
  .guestHeroTitle { font-size: 18px; }
  .guestHero { padding: 28px 16px 20px; }
}

/* Bandeau pendant une recherche hors connexion */
.guestSearchBanner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fef3c7;
  color: #92400e;
  border-bottom: 2px solid #f59e0b;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 90;
  margin-bottom: 20px;
}
.guestBannerBtn {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1.5px solid #f59e0b;
  background: #fff;
  color: #92400e;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}
.guestBannerBtn:hover { background: #fffbeb; }

/* ═══════════════════════════════════════════════════════════
   Admin — Maintenance
   ═══════════════════════════════════════════════════════════ */
.maintenanceStatusBar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  flex-wrap: wrap;
  font-weight: 700;
  font-size: 14px;
  border-bottom: 1.5px solid var(--border);
}
.maintenanceOff  { background: #f0fdf4; color: #166534; }
.maintenanceOn   { background: #fef2f2; color: #991b1b; }

.maintEditorBar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 7px 10px;
  background: #f1f5f9;
  border: 1.5px solid var(--border);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  margin-top: 6px;
}
.maintEditor {
  min-height: 90px;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 0 0 10px 10px;
  background: #fff;
  font-size: 14px;
  line-height: 1.7;
  outline: none;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.maintEditor:empty::before {
  content: attr(data-placeholder);
  color: #94a3b8;
  pointer-events: none;
}
.maintEditor:focus { border-color: var(--blue); }

/* ═══════════════════════════════════════════════════════════
   Admin — Groupes & Permissions
   ═══════════════════════════════════════════════════════════ */
.gpGroupBar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1.5px solid var(--border);
  background: #f8fafc;
  flex-wrap: wrap;
}
.gpGroupList {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}
.gpGroupChip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
  transition: border-color .15s, background .15s;
  white-space: nowrap;
}
.gpGroupChip:hover { border-color: var(--blue); }
.gpGroupChip.active {
  border-color: var(--blue);
  background: #eff6ff;
  color: var(--blue);
}
.gpGroupChip.admin-chip {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #92400e;
}
.gpGroupChip.admin-chip.active {
  background: #fef3c7;
  border-color: #d97706;
}

.gpEditor {
  padding: 0;
}
.gpEditorHeader {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1.5px solid var(--border);
  flex-wrap: wrap;
  background: #fff;
}
.gpGroupNameInput {
  font-size: 15px;
  font-weight: 700;
}
.gpAdminBadge {
  font-size: 12px;
  font-weight: 700;
  background: #fef3c7;
  color: #92400e;
  border-radius: 8px;
  padding: 4px 10px;
}
.gpEmpty {
  padding: 28px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* Grille de permissions */
.gpPermGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0;
  padding: 0;
}
@media (max-width: 640px) {
  .gpPermGrid { grid-template-columns: 1fr; }
}
.gpPermCategory {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 8px;
  background: #f8fafc;
  border-top: 1.5px solid var(--border);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  margin-top: 0;
}
.gpPermItem {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background .12s;
  user-select: none;
}
.gpPermItem:hover { background: #f8fafc; }
.gpPermItem.disabled {
  opacity: .5;
  cursor: default;
  pointer-events: none;
}

/* Toggle switch */
.gpToggle {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 22px;
  margin-top: 1px;
}
.gpToggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.gpToggleTrack {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #e2e8f0;
  transition: background .2s;
}
.gpToggle input:checked + .gpToggleTrack { background: var(--blue); }
.gpToggleThumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform .2s;
}
.gpToggle input:checked ~ .gpToggleThumb { transform: translateX(18px); }

.gpPermInfo { flex: 1; min-width: 0; }
.gpPermName {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.gpPermDesc {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.4;
}

/* ── Groupes — sélecteur de couleur ──────────────────────── */
.gpColorPickerWrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.gpColorSwatches {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  align-items: center;
}
.gpColorSwatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  border: 2.5px solid transparent;
  transition: transform .15s, border-color .15s;
  flex-shrink: 0;
}
.gpColorSwatch:hover { transform: scale(1.2); }
.gpColorSwatch.selected {
  border-color: #0f172a;
  box-shadow: 0 0 0 2px rgba(255,255,255,.8), 0 0 0 4px currentColor;
  transform: scale(1.15);
}

/* Toast erreur — rouge */
.toast-error {
  background: #ef4444 !important;
  color: #fff !important;
  box-shadow: 0 4px 20px rgba(239,68,68,.35) !important;
}