/* =========================================================
   NOYZHUB UI — Base visuelle commune
   ========================================================= */
:root{
  --nh-main-width:1200px;
  --bg:#f5f7fb;
  --ink:#1f2937;
  --muted:#6b7280;
  --panel:#ffffff;
  --line:#e5e7eb;
  --radius:16px;
  --accent:#0ea5e9;
  --accent-2:#6366f1;
  --shadow:0 12px 30px rgba(2,6,23,.06),0 6px 14px rgba(2,6,23,.05);
}

*,*::before,*::after{box-sizing:border-box}
html,body{min-height:100%;background:var(--bg)}
html{background:var(--bg)}
body{
  margin:0;
  min-height:100vh;
  overflow-x:hidden;
  color:var(--ink);
  background-attachment:fixed;
  font:400 15px/1.6 Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
}
a{color:inherit;text-decoration:none}

.app{display:grid;grid-template-columns:310px minmax(0,1fr);width:100%}
.app > *{min-width:0}
.main{width:100%;max-width:var(--nh-main-width);margin:0 auto;padding:24px;display:grid;gap:24px}
.main > *{min-width:0}

.card{
  padding:18px 20px;
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:linear-gradient(160deg,#fff 0%,#f7f9ff 100%);
  box-shadow:var(--shadow);
}
.card-compact{padding:14px 16px}
.card h2,.section-header h2{
  margin:0;
  color:var(--muted);
  font-size:13px;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.card h2{margin-bottom:8px;font-size:14px}
.card h3{margin:0 0 8px;font-size:17px}
.lead{margin:0 0 10px;color:var(--muted);font-size:14px}
.muted{color:var(--muted);font-size:14px}
.section-header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.section-header h2,.section-header h3{margin:0}

.chip{
  --chip-b:rgba(148,163,184,.55);
  --chip-bg1:rgba(255,255,255,.9);
  --chip-bg2:rgba(240,246,255,.9);
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:5px 10px;
  border:1px solid var(--chip-b);
  border-radius:999px;
  background:linear-gradient(145deg,var(--chip-bg1),var(--chip-bg2));
  box-shadow:0 1px 0 rgba(255,255,255,.9) inset,0 10px 20px rgba(15,23,42,.04);
  color:#0f172a;
  font-size:12px;
  font-weight:600;
  letter-spacing:.01em;
  transition:transform .12s ease,box-shadow .12s ease,border-color .12s ease;
}
.chip::before{content:"";position:absolute;left:10px;top:50%;width:6px;height:6px;transform:translateY(-50%);border-radius:2px;background:rgba(14,165,233,.22);box-shadow:0 0 0 1px rgba(14,165,233,.18)}
.chip:hover{transform:translateY(-1px);border-color:rgba(14,165,233,.35);box-shadow:0 1px 0 rgba(255,255,255,.92) inset,0 14px 28px rgba(15,23,42,.06)}
.chip-plain::before{display:none}

.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 12px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fff;
  color:inherit;
  font:inherit;
  font-size:13px;
  font-weight:500;
  line-height:1.4;
  cursor:pointer;
}
.btn-primary{border-color:transparent;background:linear-gradient(135deg,var(--accent),var(--accent-2));color:#fff}
.btn-ghost{background:transparent}
.btn-sm{padding:5px 9px;font-size:12px}
.btn:hover{border-color:#cfe9ff;background:#eef6ff}
.btn-primary:hover{border-color:transparent;background:linear-gradient(135deg,var(--accent),var(--accent-2));filter:brightness(1.03)}

@media (max-width:1100px){
  .app{grid-template-columns:1fr}
  .app > :not(.nh-sidebar){grid-column:1 !important;min-width:0}
}

@media (max-width:640px){
  .main{max-width:none;margin:0;padding:14px 12px;gap:16px}
  .card{padding:16px}
}


/* =========================================================
   TEAM FORUM — module admin interne
   Toutes les classes sont préfixées pour ne pas impacter le reste du site.
   ========================================================= */
.nh-forum-page{gap:18px}
.nh-forum-page h1{margin:0;color:#0f172a;font-size:clamp(22px,2.5vw,30px);line-height:1.15}
.nh-forum-page p{margin:5px 0 0;color:var(--muted)}
.nh-forum-eyebrow{margin-bottom:5px;color:var(--accent);font-size:11px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}
.nh-forum-hero,.nh-forum-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px}
.nh-forum-hero-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.nh-forum-hero-actions form{margin:0}
.nh-forum-notice{padding:11px 14px;border:1px solid;border-radius:12px;font-weight:650;font-size:13px}
.nh-forum-notice.is-ok{border-color:#bbf7d0;background:#f0fdf4;color:#166534}
.nh-forum-notice.is-error{border-color:#fecaca;background:#fef2f2;color:#991b1b}
.nh-forum-section-header{margin-bottom:10px}
.nh-forum-total-unread,.nh-forum-unread-badge{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;background:#dc2626;color:#fff;font-weight:800;line-height:1}
.nh-forum-total-unread{min-height:25px;padding:5px 9px;font-size:11px}
.nh-forum-unread-badge{min-width:22px;height:22px;padding:0 7px;font-size:11px;box-shadow:0 3px 10px rgba(220,38,38,.2)}
.nh-forum-card-list{padding:12px}
.nh-forum-categories,.nh-forum-topics,.nh-forum-manage-list{display:grid;gap:7px}
.nh-forum-category,.nh-forum-topic-row{display:grid;align-items:center;border:1px solid #e7eaf0;border-radius:13px;background:#fff;transition:border-color .14s ease,transform .14s ease,box-shadow .14s ease}
.nh-forum-category{grid-template-columns:38px minmax(0,1fr) auto;gap:10px;padding:8px 10px}
.nh-forum-topic-row{grid-template-columns:44px minmax(0,1fr) 24px;gap:12px;padding:12px}
.nh-forum-category:hover,.nh-forum-topic-row:hover{transform:translateY(-1px);border-color:#cfe9ff;box-shadow:0 8px 20px rgba(15,23,42,.05)}
.nh-forum-category.has-unread,.nh-forum-topic-row.has-unread{border-color:#fecaca;background:linear-gradient(90deg,#fff7f7,#fff)}
.nh-forum-category-icon,.nh-forum-topic-status{display:flex;align-items:center;justify-content:center;border-radius:11px;background:#f3f6fb}
.nh-forum-category-icon{width:36px;height:36px;font-size:18px}
.nh-forum-topic-status{width:40px;height:40px;font-size:20px}
.nh-forum-topic-status{gap:2px;font-size:16px}
.nh-forum-category-main,.nh-forum-topic-main{min-width:0}
.nh-forum-category-title-row,.nh-forum-topic-title-row{display:flex;align-items:center;gap:8px;min-width:0}
.nh-forum-category-title-row strong,.nh-forum-topic-title-row strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#111827;font-size:14px}
.nh-forum-category p{margin:2px 0 0;font-size:12.5px;line-height:1.35}
.nh-forum-category-pills{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap}
.nh-forum-topic-count-pill{display:inline-flex;align-items:center;justify-content:center;min-height:24px;padding:5px 9px;border:1px solid #e2e8f0;border-radius:999px;background:#f8fafc;color:#64748b;font-size:10.5px;font-weight:800;line-height:1;white-space:nowrap}
.nh-forum-separator{display:flex;align-items:center;gap:10px;padding:7px 4px 1px;color:#64748b;font-size:10px;font-weight:850;letter-spacing:.09em;line-height:1;text-transform:uppercase}
.nh-forum-separator::after{content:"";height:1px;flex:1;background:#e2e8f0}
.nh-forum-separator span{flex:0 0 auto;white-space:nowrap}
.nh-forum-meta{display:flex;align-items:center;gap:6px;min-width:0;flex-wrap:wrap;color:#7b8493;font-size:11.5px}
.nh-forum-chevron{color:#94a3b8;font-size:26px;font-weight:300}
.nh-forum-back{display:inline-block;margin-bottom:9px;color:#64748b;font-size:12px;font-weight:700}
.nh-forum-back:hover{color:#0ea5e9}
.nh-forum-title-line{display:flex;align-items:center;gap:12px}
.nh-forum-title-icon{display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:12px;background:#f3f6fb;font-size:22px}
.nh-forum-topic-flags{display:flex;gap:6px;flex-wrap:wrap;margin-top:9px}
.nh-forum-form{display:grid;gap:12px}
.nh-forum-form label{display:grid;gap:5px;color:#475569;font-size:12px;font-weight:750}
.nh-forum-form input[type="text"],.nh-forum-form textarea,.nh-forum-category-form input{width:100%;border:1px solid #dce2ea;border-radius:11px;background:#fff;color:#111827;font:inherit;outline:none;transition:border-color .12s ease,box-shadow .12s ease}
.nh-forum-form input[type="text"],.nh-forum-category-form input{min-height:40px;padding:8px 10px}
.nh-forum-form textarea{min-height:125px;padding:10px 12px;resize:vertical;line-height:1.55}
.nh-forum-form input:focus,.nh-forum-form textarea:focus,.nh-forum-category-form input:focus{border-color:#7dd3fc;box-shadow:0 0 0 3px rgba(14,165,233,.1)}
.nh-forum-form-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.nh-forum-post-list{display:grid;gap:10px}
.nh-forum-post{display:grid;grid-template-columns:180px minmax(0,1fr);padding:0;overflow:hidden}
.nh-forum-author{padding:16px;background:linear-gradient(160deg,#f8fafc,#f3f6fb);border-right:1px solid #e5e7eb;text-align:center}
.nh-forum-avatar{display:block;width:64px;height:64px;margin:0 auto 9px;border:2px solid #fff;border-radius:50%;object-fit:cover;box-shadow:0 4px 12px rgba(15,23,42,.12)}
.nh-forum-author-info{display:grid;justify-items:center;gap:5px;min-width:0}
.nh-forum-author-info strong{max-width:100%;overflow:hidden;text-overflow:ellipsis;color:#111827;font-size:13px}
.nh-forum-role{display:inline-flex;align-items:center;min-height:20px;padding:3px 7px;border:1px solid transparent;border-radius:999px;font-size:9px;font-weight:850;letter-spacing:.04em;line-height:1;text-transform:uppercase}
.nh-forum-role-super_admin{border-color:#c7d2fe;background:#eef2ff;color:#4338ca}
.nh-forum-role-admin{border-color:#bae6fd;background:#f0f9ff;color:#0369a1}
.nh-forum-role-moderator{border-color:#bbf7d0;background:#f0fdf4;color:#15803d}
.nh-forum-role-staff{border-color:#e5e7eb;background:#f8fafc;color:#475569}
.nh-forum-country,.nh-forum-location{color:#64748b;font-size:10.5px;font-weight:650;line-height:1.35;text-align:center}
.nh-forum-location{display:inline-flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap;max-width:100%}
.nh-forum-location-flag{width:18px;height:auto;border:1px solid #dbe2ea;border-radius:3px;box-shadow:0 1px 2px rgba(15,23,42,.08);flex:0 0 auto}
.nh-forum-location-text{display:inline;min-width:0;overflow-wrap:anywhere}
.nh-forum-post-body{min-width:0;padding:15px 17px}
.nh-forum-post-head{display:flex;gap:5px;flex-wrap:wrap;padding-bottom:8px;border-bottom:1px solid #eef1f5;color:#8892a0;font-size:10.5px}
.nh-forum-message{padding:14px 0 8px;color:#283548;font-size:14px;line-height:1.68;overflow-wrap:anywhere}
.nh-forum-message p{margin:0 0 12px;color:inherit;font:inherit;line-height:inherit}
.nh-forum-message p:last-child{margin-bottom:0}
.nh-forum-message h1,.nh-forum-message h2,.nh-forum-message h3,.nh-forum-message h4,.nh-forum-message h5,.nh-forum-message h6{margin:18px 0 8px;color:#182235;font-weight:800;line-height:1.3}
.nh-forum-message h1{font-size:20px}.nh-forum-message h2{font-size:18px}.nh-forum-message h3{font-size:16px}.nh-forum-message h4,.nh-forum-message h5,.nh-forum-message h6{font-size:14px}
.nh-forum-message>:first-child{margin-top:0}.nh-forum-message>:last-child{margin-bottom:0}
.nh-forum-message strong{font-weight:800;color:#1e293b}.nh-forum-message em{font-style:italic}.nh-forum-message del{opacity:.72}
.nh-forum-message a{color:#0284c7;font-weight:650;text-decoration:underline;text-decoration-color:#bae6fd;text-underline-offset:2px}.nh-forum-message a:hover{color:#0369a1;text-decoration-color:currentColor}
.nh-forum-message ul,.nh-forum-message ol{margin:8px 0 13px;padding-left:24px}.nh-forum-message li{margin:3px 0;padding-left:2px}
.nh-forum-message blockquote{margin:12px 0;padding:9px 13px;border-left:3px solid #7dd3fc;border-radius:0 9px 9px 0;background:#f8fafc;color:#475569}.nh-forum-message blockquote p{margin:0;color:inherit}
.nh-forum-message code{padding:2px 5px;border:1px solid #e2e8f0;border-radius:5px;background:#f8fafc;color:#0f172a;font:600 .9em/1.4 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.nh-forum-message pre{max-width:100%;margin:12px 0;padding:12px 14px;overflow:auto;border:1px solid #e2e8f0;border-radius:10px;background:#0f172a;color:#e2e8f0;line-height:1.55}.nh-forum-message pre code{padding:0;border:0;background:transparent;color:inherit;font-weight:500}
.nh-forum-message hr{height:1px;margin:16px 0;border:0;background:#e2e8f0}
.nh-forum-post-actions{display:flex;justify-content:flex-end;align-items:center;gap:10px;margin-top:7px;padding-top:8px;border-top:1px solid #f0f2f6;font-size:11px}
.nh-forum-post-actions a{color:#64748b;font-weight:700}
.nh-forum-post-actions a:hover{color:#0ea5e9}
.nh-forum-post-actions form{margin:0}
.nh-forum-link-danger{padding:0;border:0;background:transparent;color:#b91c1c;font:inherit;font-weight:750;cursor:pointer}
.nh-forum-link-danger:hover{text-decoration:underline}
.nh-forum-locked-message{text-align:center;color:#64748b;font-size:13px;font-weight:700}
.nh-forum-empty,.nh-forum-empty-row{text-align:center;color:#64748b}
.nh-forum-empty{padding:38px 20px}
.nh-forum-empty h1{margin:7px 0}
.nh-forum-empty-icon{font-size:34px}
.nh-forum-empty-row{padding:28px 12px;font-size:13px}
.nh-forum-category-form{display:grid;grid-template-columns:72px minmax(150px,.8fr) minmax(230px,1.7fr) auto auto;align-items:end;gap:8px;width:100%}
.nh-forum-category-form label{display:grid;gap:4px;color:#64748b;font-size:10px;font-weight:750}
.nh-forum-category-form .nh-forum-grow{min-width:0}
.nh-forum-check{display:flex!important;flex-direction:row;align-items:center;gap:5px!important;min-height:40px;white-space:nowrap}
.nh-forum-check input{width:auto!important;min-height:0!important}
.nh-forum-manage-row{display:flex;align-items:flex-end;gap:8px;padding:10px;border:1px solid #e7eaf0;border-radius:12px;background:#fff;transition:opacity .12s ease,border-color .12s ease,box-shadow .12s ease,transform .12s ease}
.nh-forum-manage-actions{display:flex;align-items:center;gap:7px;justify-content:flex-end}
.nh-forum-add-separator{margin-top:11px;padding-top:11px;border-top:1px solid #eef1f5}
.nh-forum-separator-form{display:grid;grid-template-columns:minmax(180px,1fr) auto auto;align-items:end;gap:8px;width:100%}
.nh-forum-separator-form label{display:grid;gap:4px;color:#64748b;font-size:10px;font-weight:750}
.nh-forum-separator-form input:not([type="hidden"]):not([type="checkbox"]){width:100%;min-height:40px;padding:8px 10px;border:1px solid #dce2ea;border-radius:11px;background:#fff;color:#111827;font:inherit;outline:none;transition:border-color .12s ease,box-shadow .12s ease}
.nh-forum-separator-form input:not([type="hidden"]):not([type="checkbox"]):focus{border-color:#7dd3fc;box-shadow:0 0 0 3px rgba(14,165,233,.1)}
.nh-forum-manage-row.is-separator{background:#f8fafc;border-style:dashed}
.nh-forum-drag-handle{align-self:center;display:flex;align-items:center;justify-content:center;width:30px;height:40px;padding:0;border:0;border-radius:9px;background:transparent;color:#94a3b8;font:700 18px/1 Inter,system-ui,sans-serif;cursor:grab;user-select:none;touch-action:none;flex:0 0 auto}
.nh-forum-drag-handle:hover{background:#f1f5f9;color:#475569}
.nh-forum-drag-handle:active{cursor:grabbing}
.nh-forum-manage-row.is-dragging{opacity:.55;border-color:#7dd3fc;box-shadow:0 10px 24px rgba(14,165,233,.12);transform:scale(.997)}
.nh-forum-is-dragging{cursor:grabbing!important}
.nh-forum-manage-row>.nh-forum-category-form,.nh-forum-manage-row>.nh-forum-separator-form{min-width:0;flex:1 1 auto}
.nh-forum-bulk-form{display:grid;gap:0}
.nh-forum-bulk-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid #eef1f5}
.nh-forum-bulk-actions .btn-primary{min-width:110px;justify-content:center}
.nh-forum-manage-row>.nh-forum-link-danger{align-self:center;flex:0 0 auto}
.nh-forum-delete-icon{align-self:center;display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;padding:0;border:0;border-radius:9px;background:transparent;cursor:pointer;font:inherit;font-size:17px;line-height:1;flex:0 0 auto;transition:background .12s ease,transform .12s ease}
.nh-forum-delete-icon:hover{background:#fef2f2;transform:scale(1.04)}
.nh-forum-delete-icon:focus-visible{outline:2px solid #fca5a5;outline-offset:2px}
.nh-forum-manage-list.has-unsaved-changes+.nh-forum-bulk-actions{border-top-color:#dbeafe}
.nh-forum-edit-form{margin-top:10px}

@media (max-width:900px){
  .nh-forum-category-form{grid-template-columns:70px 1fr 1.4fr auto}
  .nh-forum-category-form .nh-forum-check,.nh-forum-category-form .btn,.nh-forum-manage-actions{grid-column:auto}
  .nh-forum-manage-row{position:relative;align-items:stretch;flex-direction:column;padding-left:48px}
  .nh-forum-drag-handle{position:absolute;left:8px;top:50%;transform:translateY(-50%)}
  .nh-forum-separator-form{grid-template-columns:1fr auto auto}
}

@media (max-width:700px){
  .nh-forum-hero,.nh-forum-toolbar{align-items:flex-start;flex-direction:column}
  .nh-forum-hero-actions{justify-content:flex-start}
  .nh-forum-category{grid-template-columns:36px minmax(0,1fr) auto;padding:8px 9px;gap:8px}
  .nh-forum-topic-row{grid-template-columns:38px minmax(0,1fr) 16px;padding:10px;gap:9px}
  .nh-forum-category-icon{width:34px;height:34px;font-size:16px}
  .nh-forum-topic-status{width:36px;height:36px;font-size:17px}
  .nh-forum-category-pills{gap:4px}
  .nh-forum-topic-count-pill,.nh-forum-unread-badge{font-size:10px}
  .nh-forum-post{grid-template-columns:1fr}
  .nh-forum-author{display:flex;align-items:center;gap:10px;padding:11px 13px;border-right:0;border-bottom:1px solid #e5e7eb;text-align:left}
  .nh-forum-avatar{width:42px;height:42px;margin:0}
  .nh-forum-author-info{justify-items:start;gap:3px}
  .nh-forum-location{justify-content:flex-start;text-align:left}
  .nh-forum-post-body{padding:12px 13px}
  .nh-forum-category-form{grid-template-columns:65px 1fr}
  .nh-forum-separator-form{grid-template-columns:1fr auto}
  .nh-forum-separator-form .nh-forum-check{grid-column:1 / 2}
  .nh-forum-separator-form .btn{grid-column:2 / 3;justify-self:end}
  .nh-forum-category-form .nh-forum-grow{grid-column:1 / -1}
  .nh-forum-category-form .nh-forum-check{grid-column:2 / 3}
  .nh-forum-category-form .btn,.nh-forum-manage-actions{grid-column:1 / -1;justify-self:end}
}
