/* =============================================
   NOCHOMAJ HEADER PRO - STYLE
   ============================================= */

:root {
  --ncp-primary: #ff5e00;
  --ncp-primary-dark: #e05200;
  --ncp-dark: #0d1033;
  --ncp-text: #404145;
  --ncp-gray: #74767e;
  --ncp-border: #e4e5e7;
  --ncp-white: #ffffff;
  --ncp-topbar-h: 72px;
  --ncp-nav-h: 48px;
  --ncp-shadow: 0 2px 12px rgba(13,16,51,0.10);
}

/* RESET HEADER EXISTANT */
#masthead, .site-header, header.entry-header:not(#ncp-header) {
  display: none !important;
}

/* ============ HEADER WRAPPER ============ */
#ncp-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  background: var(--ncp-white);
  box-shadow: var(--ncp-shadow);
  font-family: 'Maison Neue', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* ============ TOP BAR ============ */
.ncp-topbar {
  height: var(--ncp-topbar-h);
  border-bottom: 1px solid var(--ncp-border);
}

.ncp-topbar .ncp-container {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* LOGO */
.ncp-logo {
  flex-shrink: 0;
  text-decoration: none;
}
.ncp-logo img {
  height: 44px;
  width: auto;
  mix-blend-mode: multiply;
  filter: brightness(1);
}
/* Si fond sombre: utilise multiply pour retirer le fond noir */
.ncp-topbar {
  background: #fff;
}
.ncp-logo-text {
  font-size: 22px;
  font-weight: 800;
  color: var(--ncp-dark);
  letter-spacing: -0.5px;
}
.ncp-logo-text::after {
  content: '.';
  color: var(--ncp-primary);
}

/* SEARCH */
.ncp-search {
  flex: 1;
  max-width: 560px;
}
.ncp-search form {
  display: flex;
  border: 1.5px solid #ccc;
  border-radius: 50px;
  overflow: hidden;
  transition: box-shadow .2s, border-color .2s;
  background: #f7f7f7;
}
.ncp-search form:focus-within {
  box-shadow: 0 0 0 3px rgba(255,94,0,0.15);
  border-color: var(--ncp-primary);
  background: #fff;
}
.ncp-search input {
  flex: 1;
  border: none;
  outline: none;
  padding: 11px 18px;
  font-size: 14px;
  color: var(--ncp-text);
  background: transparent;
}
.ncp-search input::placeholder { color: #aaa; }
.ncp-search button {
  background: var(--ncp-dark);
  border: none;
  padding: 0 22px;
  cursor: pointer;
  color: white;
  display: flex;
  align-items: center;
  transition: background .2s;
  border-radius: 0 50px 50px 0;
}
.ncp-search button:hover {
  background: var(--ncp-primary);
}

/* RIGHT SECTION */
.ncp-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* BOUTONS AUTH */
.ncp-btn-login {
  padding: 9px 20px;
  border-radius: 4px;
  border: 1.5px solid var(--ncp-gray);
  color: var(--ncp-text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s;
  white-space: nowrap;
}
.ncp-btn-login:hover {
  border-color: var(--ncp-dark);
  color: var(--ncp-dark);
}
.ncp-btn-register {
  padding: 9px 20px;
  border-radius: 4px;
  background: var(--ncp-primary);
  color: white;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s;
  white-space: nowrap;
}
.ncp-btn-register:hover {
  background: var(--ncp-primary-dark);
  color: white;
}

/* BOUTON PROPOSER SERVICE */
.ncp-post-service {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 4px;
  border: 1.5px solid var(--ncp-primary);
  color: var(--ncp-primary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s;
  white-space: nowrap;
}
.ncp-post-service:hover {
  background: var(--ncp-primary);
  color: white;
}

/* USER MENU DROPDOWN */
.ncp-user-menu {
  position: relative;
}
.ncp-user-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1.5px solid var(--ncp-border);
  border-radius: 50px;
  padding: 5px 14px 5px 6px;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.ncp-user-trigger:hover {
  border-color: var(--ncp-primary);
  box-shadow: 0 0 0 3px rgba(29,191,115,0.1);
}
.ncp-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}
.ncp-username {
  font-size: 13px;
  font-weight: 600;
  color: var(--ncp-dark);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ncp-chevron {
  color: var(--ncp-gray);
  transition: transform .2s;
}
.ncp-user-menu.open .ncp-chevron {
  transform: rotate(180deg);
}

/* DROPDOWN MENU */
.ncp-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 240px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  border: 1px solid var(--ncp-border);
  overflow: hidden;
  z-index: 10000;
  animation: ncpFadeIn .15s ease;
}
.ncp-user-menu.open .ncp-dropdown {
  display: block;
}
@keyframes ncpFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ncp-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #f7f7f7;
  border-bottom: 1px solid var(--ncp-border);
}
.ncp-dropdown-header img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}
.ncp-dropdown-header strong {
  display: block;
  font-size: 14px;
  color: var(--ncp-dark);
}
.ncp-role-badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  margin-top: 3px;
  font-weight: 600;
}
.ncp-role-vendor { background: #fff0e6; color: #ff5e00; }
.ncp-role-client { background: #e8eaf6; color: #0d1033; }
.ncp-dropdown ul {
  list-style: none;
  margin: 6px 0;
  padding: 0;
}
.ncp-dropdown ul li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--ncp-text);
  text-decoration: none;
  transition: background .15s;
}
.ncp-dropdown ul li a:hover {
  background: #f7f7f7;
  color: var(--ncp-dark);
}
.ncp-dropdown ul li a.ncp-logout {
  color: #e74c3c;
}
.ncp-dropdown ul li a.ncp-logout:hover {
  background: #fff0f0;
}
.ncp-divider {
  height: 1px;
  background: var(--ncp-border);
  margin: 4px 0;
}

/* ============ CATEGORIES NAV ============ */
.ncp-categories-nav .ncp-container {
  display: flex;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  position: relative;
}
.ncp-categories-list {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-behavior: smooth;
  flex: 1;
}
.ncp-categories-list::-webkit-scrollbar { display: none; }
.ncp-categories-list li a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  height: var(--ncp-nav-h);
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
  color: var(--ncp-text);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.ncp-categories-list li a:hover {
  color: var(--ncp-primary);
  border-bottom-color: var(--ncp-primary);
}
/* Active category */
.ncp-categories-list li a.current {
  color: var(--ncp-primary);
  border-bottom-color: var(--ncp-primary);
  font-weight: 600;
}
/* Nav background */
.ncp-categories-nav {
  height: var(--ncp-nav-h);
  border-bottom: 1px solid var(--ncp-border);
  background: #fafafa;
  position: relative;
  overflow: hidden;
}
.cat-icon { font-size: 16px; }
.ncp-cat-scroll-right {
  position: absolute;
  right: 0;
  top: 0; bottom: 0;
  width: 40px;
  background: linear-gradient(to right, transparent, white 40%);
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--ncp-gray);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
}

/* ============ HAMBURGER / MOBILE ============ */
.ncp-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}
.ncp-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ncp-dark);
  border-radius: 2px;
  transition: all .2s;
}

/* ============ MOBILE MENU ============ */
.ncp-mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99998;
}
.ncp-mobile-menu.open {
  display: block;
}
.ncp-mobile-inner {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(320px, 90vw);
  background: white;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: slideIn .2s ease;
}
@keyframes slideIn {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}
.ncp-mobile-inner a {
  display: block;
  padding: 12px 16px;
  font-size: 15px;
  color: var(--ncp-text);
  text-decoration: none;
  border-radius: 6px;
  transition: background .15s;
}
.ncp-mobile-inner a:hover { background: #f7f7f7; }
.ncp-mobile-inner .ncp-full {
  display: block;
  text-align: center;
  padding: 12px;
  border-radius: 6px;
  font-weight: 600;
  margin-bottom: 4px;
}
.ncp-mobile-inner .ncp-btn-register.ncp-full {
  background: var(--ncp-primary);
  color: white;
}
.ncp-mobile-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #f7f7f7;
  border-radius: 8px;
  margin-bottom: 8px;
}
.ncp-mobile-user img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}
.ncp-mobile-inner hr {
  border: none;
  border-top: 1px solid var(--ncp-border);
  margin: 8px 0;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .ncp-search { max-width: 300px; }
  .ncp-post-service span:not(:first-child):not(.ncp-post-service > svg ~ span) { display: none; }
}
@media (max-width: 768px) {
  .ncp-search, .ncp-header-right { display: none; }
  .ncp-hamburger { display: flex; }
  .ncp-categories-nav { display: none; }
}

/* ============ NOTICE ============ */
.ncp-notice {
  background: #fff8e6;
  border: 1px solid #f0c050;
  border-radius: 6px;
  padding: 16px 20px;
  font-size: 15px;
  color: var(--ncp-text);
  margin: 20px 0;
}

/* ============ DASHBOARDS ============ */
.ncp-dashboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
  font-family: 'Maison Neue', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
.ncp-dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}
.ncp-dashboard-header h1 {
  font-size: 26px;
  font-weight: 700;
  color: var(--ncp-dark);
  margin: 0;
}
.ncp-welcome {
  font-size: 15px;
  color: var(--ncp-gray);
  margin-top: 4px;
}
.ncp-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.ncp-stat-card {
  background: white;
  border: 1px solid var(--ncp-border);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  transition: box-shadow .2s, transform .2s;
}
.ncp-stat-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  transform: translateY(-2px);
}
.ncp-stat-icon {
  font-size: 28px;
  margin-bottom: 4px;
}
.ncp-stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--ncp-dark);
}
.ncp-stat-label {
  font-size: 13px;
  color: var(--ncp-gray);
  font-weight: 500;
}
.ncp-stat-card.green { border-top: 3px solid var(--ncp-primary); }
.ncp-stat-card.blue  { border-top: 3px solid var(--ncp-dark); }
.ncp-stat-card.orange{ border-top: 3px solid #ff5e00; }
.ncp-stat-card.purple{ border-top: 3px solid #6200ea; }

.ncp-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 768px) {
  .ncp-dashboard-grid { grid-template-columns: 1fr; }
}
.ncp-card {
  background: white;
  border: 1px solid var(--ncp-border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.ncp-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ncp-dark);
  margin: 0 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ncp-border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ncp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ncp-table th {
  text-align: left;
  padding: 8px 10px;
  color: var(--ncp-gray);
  font-weight: 600;
  border-bottom: 1px solid var(--ncp-border);
}
.ncp-table td {
  padding: 10px;
  border-bottom: 1px solid #f5f5f5;
  color: var(--ncp-text);
}
.ncp-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.ncp-badge.success { background: #e6f9f0; color: #19a463; }
.ncp-badge.pending { background: #fff3e0; color: #f57c00; }
.ncp-badge.active  { background: #e3f2fd; color: #1565c0; }
.ncp-badge.done    { background: #f3e5f5; color: #7b1fa2; }

.ncp-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--ncp-primary);
  color: white;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background .2s;
}
.ncp-action-btn:hover { background: var(--ncp-primary-dark); color: white; }
.ncp-action-btn.outline {
  background: transparent;
  border: 1.5px solid var(--ncp-primary);
  color: var(--ncp-primary);
}
.ncp-action-btn.outline:hover {
  background: var(--ncp-primary);
  color: white;
}

.ncp-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}
.ncp-empty-state {
  text-align: center;
  padding: 32px;
  color: var(--ncp-gray);
  font-size: 14px;
}
.ncp-empty-state .ncp-empty-icon { font-size: 40px; margin-bottom: 12px; }

.ncp-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--ncp-border);
  margin-bottom: 20px;
}
.ncp-tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ncp-gray);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
}
.ncp-tab.active {
  color: var(--ncp-primary);
  border-bottom-color: var(--ncp-primary);
}
.ncp-tab-content { display: none; }
.ncp-tab-content.active { display: block; }
