/* ═══════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════ */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: var(--z-header);
}

.header-main {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 13px 24px;
  transition: padding .2s ease;
}

body.header--compact .header-main {
  padding-top: 6px;
  padding-bottom: 6px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-decoration: none;
  width: 180px;
}

/* Nav links left (Accueil) */
.nav-left {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

.nav-link-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 14px;
  border-radius: var(--radius);
  color: var(--text2);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  background: none;
  border: none;
}

.nav-link-icon svg {
  width: 21px;
  height: 21px;
  fill: var(--text2);
}

.nav-link-icon:hover,
.nav-link-icon.active {
  color: var(--g);
}

.nav-link-icon:hover svg,
.nav-link-icon.active svg {
  fill: var(--g);
}

.nav-link-icon.active::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 3px;
  background: var(--g);
  border-radius: 2px 2px 0 0;
}

/* Search bar */
.header-search-bar {
  flex: 1;
  max-width: 520px;
  box-shadow: none !important;
}

/* Nav right */
.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

/* Sub-nav / category bar */
.header-subnav {
  border-top: 1px solid var(--border);
  background: var(--white);
}

body.header--compact .header-subnav {
  border-top-color: transparent;
}

.subnav-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 24px;
  overflow-x: auto;
  overflow-y: hidden;
  min-height: 0;
}

.subnav-inner::-webkit-scrollbar {
  display: none;
}

.subnav-cat {
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  padding: 10px 0;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--transition-base);
  background: none;
  border: none;
}

.subnav-cat:hover {
  color: var(--g);
}

.subnav-dot {
  color: var(--text4);
  font-size: 13px;
  padding: 0 8px;
  flex-shrink: 0;
}

.subnav-promo {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--g);
  white-space: nowrap;
  padding: 10px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Header — Responsive ── */
@media (max-width: 860px) {
  .header-main {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 16px;
  }

  .logo {
    width: 130px;
  }

  .header-search-bar {
    order: 3;
    flex-basis: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    max-height: 64px;
    opacity: 1;
    transition: max-height .25s ease, opacity .2s ease;
  }

  body.header--compact .header-search-bar {
    max-height: 0;
    opacity: 0;
  }

  .nav-right {
    gap: 6px;
  }

  .subnav-inner {
    padding: 0 16px;
  }

  /* Panneau de localisation : bottom-sheet plein écran sur mobile */
  .loc-panel {
    position: fixed;
    left: 16px;
    right: 16px;
    top: auto;
    bottom: 16px;
    width: auto;
    max-height: 75vh;
    overflow-y: auto;
  }
}

@media (max-width: 560px) {
  .header-main {
    padding: 8px 12px;
    gap: 8px;
  }

  .logo {
    width: 110px;
  }

  .nav-link-icon {
    font-size: 0;
    padding: 6px 10px;
  }

  .nav-right .btn--secondary {
    display: none;
  }

  .nav-right .btn {
    padding: 0 12px;
    font-size: 12px;
  }

  /* Barre de recherche : ne garder que le champ de saisie (icône + input) */
  .header-search-bar .search-unified-sep,
  .header-search-bar .loc-filter,
  .header-search-bar .search-unified-btn {
    display: none;
  }

  .header-search-bar .search-unified-metier {
    padding: 0 16px;
  }
}

/* ═══════════════════════════════════════════════
   PAGES
═══════════════════════════════════════════════ */
.page {
  min-height: calc(100vh - var(--header-h));
}

/* ═══════════════════════════════════════════════
   HOME PAGE
═══════════════════════════════════════════════ */
.home-layout {
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 24px 60px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
}

/* Feed section title */
.feed-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.1;
}

/* ── Artisan activity feed ── */
.artisan-feed {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.artisan-post {
  background: white;
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow var(--transition-base);
}

.artisan-post:hover {
  box-shadow: var(--shadow2);
}

.artisan-post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 10px;
}

.artisan-post-info {
  flex: 1;
  min-width: 0;
}

.artisan-post-name {
  font-weight: 700;
  font-size: 14px;
}

.artisan-post-trade {
  font-size: 12px;
  color: var(--g);
  font-weight: 600;
}

.artisan-post-date {
  font-size: 11px;
  color: var(--text4);
  margin-left: auto;
}

.artisan-post-content {
  padding: 0 16px 10px;
}

.artisan-post-caption {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 10px;
}

.artisan-post-images {
  display: grid;
  gap: 3px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
}

.artisan-post-images.one {
  grid-template-columns: 1fr;
}

.artisan-post-images.two {
  grid-template-columns: 1fr 1fr;
}

.artisan-post-images.three {
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.post-img {
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  position: relative;
  overflow: hidden;
}

.post-img.tall {
  grid-row: 1 / 3;
  aspect-ratio: auto;
  min-height: 200px;
}

.artisan-post-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
}

.post-action {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text3);
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background var(--transition-fast);
}

.post-action:hover {
  background: var(--bg);
  color: var(--text);
}

.post-action svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

/* Trust button */
.trust-btn {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  transition: color .2s, background .15s;
  position: relative;
  user-select: none;
}

.trust-btn:hover {
  background: var(--bg);
}

.trust-btn.trusted {
  color: var(--color-primary-600);
}

.trust-btn .trust-icon {
  width: 24px;
  height: 24px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s;
}

.trust-btn.trusted .trust-icon {
  animation: trust-pop .4s cubic-bezier(.175, .885, .32, 1.275) forwards;
}

@keyframes trust-pop {
  0% {
    transform: scale(1);
  }

  40% {
    transform: scale(1.55);
  }

  70% {
    transform: scale(.88);
  }

  100% {
    transform: scale(1);
  }
}

/* Burst particles */
.trust-btn .trust-burst {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
}

.trust-btn.trusted .trust-burst::before,
.trust-btn.trusted .trust-burst::after {
  content: '';
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-primary-500);
  animation: trust-burst .5s ease-out forwards;
}

.trust-btn.trusted .trust-burst::before {
  box-shadow:
    0 -14px 0 var(--color-primary-400),
    14px 0 0 var(--color-primary-600),
    0 14px 0 var(--color-primary-500),
    -14px 0 0 var(--color-primary-400);
  animation-delay: .05s;
}

.trust-btn.trusted .trust-burst::after {
  box-shadow:
    10px -10px 0 var(--color-primary-300),
    10px 10px 0 var(--color-primary-500),
    -10px 10px 0 var(--color-primary-400),
    -10px -10px 0 var(--color-primary-600);
  animation-delay: .05s;
}

@keyframes trust-burst {
  0% {
    transform: scale(0);
    opacity: 1;
  }

  60% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

.post-tag {
  margin-left: auto;
}

.post-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--color-primary-50);
  color: var(--color-primary-700);
  border: 1px solid var(--color-primary-100);
  cursor: pointer;
  transition: background-color var(--transition-base), border-color var(--transition-base);
}

.post-tag-chip:hover {
  background: var(--color-primary-100);
  border-color: var(--color-primary-300);
}

/* ── Feed tabs ── */
.feed-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  padding: 4px;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--border);
  width: fit-content;
}

.feed-tab {
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-display);
  padding: 6px 14px;
  border-radius: 7px;
  cursor: pointer;
  border: none;
  background: none;
  color: var(--text3);
  transition: all var(--transition-base);
}

.feed-tab.active {
  background: white;
  color: var(--g);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}

.feed-tab:not(.active):hover {
  color: var(--text);
}

/* ── Unified feed ── */
.main-feed {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* Post type badge */
.post-type-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: var(--font-bold);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  margin-left: var(--space-2);
  vertical-align: middle;
  white-space: nowrap;
}

.post-type-badge.realisation {
  background: var(--color-info-bg);
  color: var(--color-info-text);
  border-color: var(--color-info-border);
}

.post-type-badge.temoignage {
  background: var(--color-success-bg);
  color: var(--color-success-text);
  border-color: var(--color-success-border);
}

/* ── Community feed ── */
.community-feed {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 32px;
}

.community-post {
  background: white;
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 16px;
  transition: box-shadow var(--transition-base);
}

.community-post:hover {
  box-shadow: var(--shadow2);
}

.community-post-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.community-post-meta {
  flex: 1;
}

.community-post-name {
  font-weight: 700;
  font-size: 14px;
}

.community-post-sub {
  font-size: 12px;
  color: var(--text3);
  margin-top: 1px;
}

.community-post-artisan {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--g-light);
  color: var(--g);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  margin-top: 6px;
  cursor: pointer;
}

.community-post-text {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.65;
  margin-bottom: 12px;
}

.community-post-img {
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: var(--bg);
}

.community-post-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.community-post-media-grid {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  border-radius: 8px;
  overflow: hidden;
}

.community-post-media-grid.count-1 {
  grid-template-columns: 1fr;
}

.community-post-media-grid.count-2 {
  grid-template-columns: 1fr 1fr;
}

.community-post-media-grid.count-3plus {
  grid-template-columns: 1fr 1fr;
}

.community-post-media-grid .community-post-img {
  margin-bottom: 0;
  height: 180px;
}

.community-post-media-grid.count-1 .community-post-img {
  height: 260px;
}

.community-post-stars {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 10px;
}

.community-post-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.comments-preview {
  margin-top: 12px;
  padding-top: 12px;
}

.comment {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.comment:last-child {
  margin-bottom: 0;
}

.comment--reply {
  margin-left: 38px;
}

.comment--reply-2 {
  margin-left: 72px;
}

.comment-reply-row {
  margin-top: 4px;
}

.comment-reply-btn {
  border: none;
  background: transparent;
  padding: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--text4);
  cursor: pointer;
}

.comment-reply-btn:hover {
  color: var(--color-primary-700);
  text-decoration: underline;
}

.comment-input--reply {
  margin-left: 38px;
  margin-top: 6px;
}

.comment-input--reply-2 {
  margin-left: 72px;
}

.comment-deleted {
  font-size: 12px;
  font-style: italic;
  color: var(--text4);
}

.comment-bubble {
  flex: 1;
  background: var(--bg);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text2);
  line-height: 1.5;
}

.comment-name {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.comment-post-context {
  font-size: 11px;
  font-style: italic;
  color: var(--text4);
  margin-bottom: 4px;
}

.comment-actions {
  display: flex;
  gap: 2px;
  align-items: flex-start;
  flex-shrink: 0;
}

.comment-action-btn {
  border: none;
  background: transparent;
  padding: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--text4);
  cursor: pointer;
}

.comment-action-btn:hover {
  color: var(--color-primary-700);
  text-decoration: underline;
}

.comment-edit-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.comment-edit-btn {
  border: none;
  background: transparent;
  padding: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-primary-700);
  cursor: pointer;
}

.comment-edit-btn:hover {
  text-decoration: underline;
}

.comment-edit-btn:disabled {
  color: var(--text4);
  cursor: default;
  text-decoration: none;
}

.comment-input {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}

.comment-send {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--g);
  display: flex;
  align-items: center;
  justify-content: center;
}

.comment-send svg {
  width: 14px;
  height: 14px;
  fill: white;
}

.post-button {
  background: rgba(0, 0, 0, 0.03);
  border-radius: 6px;
  border: none;
  padding: 3px 6px;
  height: 28px;
  margin: 0;
  font-size: 12px;
  color: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all var(--transition-fast);
}

.post-button:hover {
  color: var(--g);
}

/* ── RIGHT SIDEBAR ── */
.home-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-card {
  background: var(--color-neutral-0);
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.sidebar-card-header {
  padding: 14px 16px 10px;
  font-weight: var(--font-extrabold);
  font-size: var(--text-base);
  font-family: var(--font-display);
  border-bottom: 1px solid var(--color-neutral-200);
}

.sidebar-artisan {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.sidebar-artisan:last-child {
  border-bottom: none;
}

.sidebar-artisan:hover {
  background: var(--g-lighter);
}

.sidebar-artisan-info {
  flex: 1;
  min-width: 0;
}

.sidebar-artisan-name {
  font-weight: 700;
  font-size: 13px;
}

.sidebar-artisan-trade {
  font-size: 11px;
  color: var(--g);
  font-weight: 600;
}

.sidebar-artisan-dist {
  font-size: 11px;
  color: var(--text4);
}

.sidebar-see-all {
  display: block;
  text-align: center;
  padding: 11px;
  font-size: 13px;
  font-weight: 700;
  color: var(--g);
  border-top: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.sidebar-see-all:hover {
  background: var(--g-lighter);
}

.cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px;
}

.cat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  cursor: pointer;
  transition: all var(--transition-base);
}

.cat-pill:hover {
  background: var(--g-light);
  border-color: var(--g);
  color: var(--g);
}

/* ── Home sections (new layout) ── */
.home-section {
  background: var(--color-neutral-0);
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--space-4);
}

.home-section-head {
  padding: 14px 20px 12px;
  border-bottom: 1px solid var(--color-neutral-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.home-section-body {
  padding: 16px 20px;
}

.home-section-footer {
  padding: 10px 20px;
  border-top: 1px solid var(--border);
  text-align: right;
}

.home-see-more {
  font-size: 13px;
  color: var(--text3);
  font-weight: 600;
  cursor: pointer;
}

.home-see-more:hover {
  color: var(--g);
  text-decoration: underline;
}

.artisan-cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.artisan-top-card {
  background: var(--color-neutral-0);
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius-base);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.artisan-top-card:hover {
  border-color: var(--color-primary-700);
  box-shadow: var(--shadow-md);
}

.artisan-top-img {
  height: 155px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.artisan-top-info {
  padding: 10px 12px 12px;
}

.artisan-top-name {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 2px;
}

.artisan-top-trade {
  font-size: 11px;
  color: var(--g);
  font-weight: 600;
  margin-bottom: 5px;
}

.artisan-top-stars {
  display: flex;
  align-items: center;
  gap: 3px;
}

.sponsored-block {
  height: 110px;
  background: var(--bg);
  border-radius: 8px;
  border: 1.5px dashed var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text4);
  font-size: 13px;
  font-weight: 500;
}

/* ── Feed : cartes mises en valeur / sponsorisées ── */
.feed-featured-card {
  background: var(--color-neutral-0);
  border: 1px solid var(--color-primary-300);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: box-shadow var(--transition-base);
}

.feed-featured-card:hover {
  box-shadow: var(--shadow2);
}

.feed-featured-tag {
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  color: var(--g);
  background: var(--g-light);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.feed-featured-body {
  display: flex;
  gap: 12px;
  align-items: center;
}

.feed-featured-info {
  flex: 1;
  min-width: 0;
}

.feed-sponsored-card {
  background: var(--bg);
  border: 1.5px dashed var(--border2);
  border-radius: 10px;
  padding: 14px 16px;
}

.feed-sponsored-tag {
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  background: var(--color-neutral-0);
  border: 1px solid var(--border2);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.feed-sentinel {
  height: 1px;
}

.feed-loading {
  text-align: center;
  padding: 16px;
  font-size: 12px;
  color: var(--text4);
}

.comments-loading {
  text-align: center;
  padding: 10px;
  font-size: 12px;
  color: var(--text4);
}

.allcat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.allcat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition-base);
  background: var(--bg);
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  text-align: center;
}

.allcat-item:hover {
  background: var(--g-light);
  border-color: var(--g);
  color: var(--g);
}

.allcat-icon {
  font-size: 22px;
}

/* ═══════════════════════════════════════════════
   SEARCH PAGE
═══════════════════════════════════════════════ */
.search-layout {
  display: flex;
  min-height: calc(100vh - var(--header-h));
}

.search-filters {
  width: 260px;
  flex-shrink: 0;
  background: white;
  border-right: 1px solid var(--border);
  padding: 20px 16px;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
}

.filter-title {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 18px;
  font-family: var(--font-display);
}

.filter-group {
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.filter-group:last-of-type {
  border-bottom: none;
}

.filter-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 10px;
}

.filter-check {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.filter-check ul {
  list-style-type: none;
  gap: 6px;
}

.filter-check .filter-subcategories {
  margin-left: 16px;
  margin-top: 6px;
}

.filter-check ul li {
  list-style-type: none;
  margin-bottom: 6px;
}

.filter-check label {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text2);
}

.filter-check input[type=checkbox],
.filter-check input[type=radio] {
  accent-color: var(--g);
  width: 15px;
  height: 15px;
}

.filters-toggle-btn,
.filters-backdrop,
.filters-close-btn {
  display: none;
}

.filters-apply {
  margin-top: var(--space-1);
}

.search-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.search-bar-page {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
  position: sticky;
  top: var(--header-h);
  z-index: var(--z-dropdown);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-unified {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--color-neutral-200);
  border-radius: 40px;
  background: white;
  max-width: 680px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
  transition: box-shadow .2s, border-color .2s;
}

.search-unified:focus-within {
  border-color: var(--color-primary-500);
  box-shadow: 0 4px 20px rgba(46, 125, 50, .12);
}

.search-unified-metier {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px 0 18px;
}

.search-unified-metier svg {
  color: var(--color-neutral-400);
  flex-shrink: 0;
}

.search-unified-metier input {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 0;
  font-size: 14px;
  font-family: var(--font-body);
  background: transparent;
  color: var(--text);
}

.search-unified-sep {
  width: 1px;
  height: 28px;
  background: var(--color-neutral-200);
  flex-shrink: 0;
  margin: 0 2px;
}

.search-unified .loc-filter {
  flex-shrink: 0;
}

.search-unified .loc-trigger {
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 12px 14px;
  height: auto;
  color: var(--color-neutral-600);
  font-size: 13px;
  transition: color .15s, background .15s;
}

.search-unified .loc-trigger:hover {
  background: var(--color-neutral-25);
  color: var(--color-neutral-900);
}

.search-unified .loc-trigger.has-city {
  color: var(--color-primary-700);
  font-weight: 600;
  background: transparent;
}

.search-unified-btn {
  background: var(--g);
  color: white;
  border: none;
  border-radius: 36px;
  padding: 10px 22px;
  margin: 4px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}

.search-unified-btn:hover {
  background: var(--g-dark);
}

.search-bar-page-inner {
  display: none;
}

.search-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.results-count {
  font-size: 13px;
  color: var(--text3);
}

.results-count strong {
  color: var(--text);
}

.view-toggle {
  display: flex;
}

.view-btn {
  border: 1px solid var(--border2);
  background: white;
  padding: 7px 10px;
  transition: all var(--transition-base);
}

.view-btn:first-child {
  border-radius: var(--radius) 0 0 var(--radius);
}

.view-btn:last-child {
  border-radius: 0 var(--radius) var(--radius) 0;
  border-left: none;
}

.view-btn.active {
  background: var(--g);
  border-color: var(--g);
}

.view-btn svg {
  width: 15px;
  height: 15px;
  fill: var(--text3);
  display: block;
}

.view-btn.active svg {
  fill: white;
}

.search-content {
  display: flex;
  flex: 1;
}

.results-list {
  flex: 1;
  padding: 16px 20px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: 20px 0;
}

.result-row {
  background: var(--color-neutral-0);
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius-md);
  display: flex;
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  margin-bottom: var(--space-3);
}

.result-row:hover {
  border-color: var(--color-primary-700);
  box-shadow: var(--shadow-md);
}

.result-img {
  width: 130px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.result-body {
  flex: 1;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.result-name {
  font-size: 15px;
  font-weight: 700;
}

.result-trade {
  font-size: 12px;
  color: var(--g);
  font-weight: 600;
}

.result-desc {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
}

.result-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

/* ═══════════════════════════════════════════════
   PROJECTS PAGE
═══════════════════════════════════════════════ */
.projects-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}

.projects-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 22px;
}

.proj-tab {
  padding: 11px 18px;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--text3);
  cursor: pointer;
  position: relative;
}

.proj-tab.active {
  color: var(--g);
}

.proj-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--g);
}

.project-card {
  background: var(--color-neutral-0);
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  margin-bottom: var(--space-3);
  display: flex;
  gap: var(--space-4);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  white-space: nowrap;
  border: 1px solid transparent;
}

.status-chip.done {
  background: var(--color-success-bg);
  color: var(--color-success-text);
  border-color: var(--color-success-border);
}

.status-chip.ongoing {
  background: var(--color-warning-bg);
  color: var(--color-warning-text);
  border-color: var(--color-warning-border);
}

/* ═══════════════════════════════════════════════
   MESSAGES PAGE
═══════════════════════════════════════════════ */
.messages-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  gap: 14px;
  height: calc(100vh - 112px);
}

.conv-list {
  width: 310px;
  flex-shrink: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.conv-list-head {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.conv-list-head h2 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 10px;
  font-family: var(--font-display);
}

.conv-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 8px 12px;
}

.conv-search-bar input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  flex: 1;
}

.conv-items {
  flex: 1;
  overflow-y: auto;
}

.conv-item {
  display: flex;
  gap: 12px;
  padding: 13px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-fast);
  align-items: center;
}

.conv-item:hover {
  background: var(--g-lighter);
}

.conv-item.active {
  background: var(--g-light);
}

.conv-item-body {
  flex: 1;
  min-width: 0;
}

.conv-item-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2px;
}

.conv-item-name {
  font-weight: 700;
  font-size: 13px;
}

.conv-item-time {
  font-size: 11px;
  color: var(--text4);
}

.conv-item-artisan {
  font-size: 11px;
  color: var(--g);
  font-weight: 600;
  margin-bottom: 2px;
}

.conv-item-last {
  font-size: 12px;
  color: var(--text3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unread-dot {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  background: var(--color-primary-700);
  color: var(--color-neutral-0);
  font-size: 9px;
  font-weight: var(--font-extrabold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-area {
  flex: 1;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-head-info {
  flex: 1;
}

.chat-head-name {
  font-weight: 700;
  font-size: 15px;
}

.chat-head-sub {
  font-size: 12px;
  color: var(--g);
  font-weight: 600;
}

.chat-back-btn {
  display: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg);
  color: var(--text2);
}

.chat-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #FAFAFA;
}

.msg-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.msg-row.me {
  flex-direction: row-reverse;
}

.msg-bubble {
  max-width: 65%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.6;
}

.msg-row.them .msg-bubble {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px 16px 16px 4px;
}

.msg-row.me .msg-bubble {
  background: var(--g);
  color: white;
  border-radius: 16px 16px 4px 16px;
}

.msg-time {
  font-size: 10px;
  color: var(--text4);
  margin-top: 3px;
}

.msg-row.me .msg-time {
  text-align: right;
}

.chat-input-bar {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: center;
}

.chat-input-bar .input {
  flex: 1;
  width: auto;
  min-width: 0;
}

.send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--g);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition-base);
}

.send-btn:hover {
  background: var(--g-dark);
}

.send-btn svg {
  width: 16px;
  height: 16px;
  fill: white;
}

@media (max-width: 1024px) {
  .home-layout {
    grid-template-columns: 1fr;
  }

  .home-sidebar {
    display: none;
  }

  .search-layout {
    flex-direction: column;
  }

  .search-bar-page {
    position: static;
  }

  /* Filtres : tiroir plein écran ouvert via le bouton flottant */
  .filters-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-sticky);
    background: var(--g);
    color: white;
    border-radius: 999px;
    padding: 12px 24px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
  }

  .filters-toggle-btn svg {
    width: 16px;
    height: 16px;
    fill: white;
  }

  .filters-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s;
  }

  .search-filters {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: auto;
    height: auto;
    max-height: 82vh;
    border-right: none;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, .15);
    z-index: calc(var(--z-modal) + 1);
    transform: translateY(100%);
    transition: transform .25s ease;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
  }

  .filter-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    padding: 20px 16px 0;
  }

  .filters-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--bg);
    color: var(--text2);
    font-size: 18px;
    line-height: 1;
  }

  .filters-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0 16px 16px;
  }

  .filters-apply {
    flex-shrink: 0;
    margin: 0;
    border-radius: 0;
    padding: 16px;
    border-top: 1px solid var(--border);
  }

  body.filters-open {
    overflow: hidden;
  }

  body.filters-open .filters-backdrop {
    opacity: 1;
    visibility: visible;
  }

  body.filters-open .search-filters {
    transform: translateY(0);
  }
}

@media (max-width: 760px) {
  .header-subnav {
    display: none;
  }

  .messages-wrap {
    height: calc(100vh - 64px);
    padding: 0;
    gap: 0;
  }

  .conv-list {
    width: 100%;
    border: none;
    border-radius: 0;
  }

  .chat-area {
    display: none;
    border: none;
    border-radius: 0;
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
  }

  .messages-wrap.chat-open .conv-list {
    display: none;
  }

  .messages-wrap.chat-open .chat-area {
    display: flex;
  }

  .messages-wrap.chat-open .chat-back-btn {
    display: inline-flex;
  }

  .result-row {
    flex-direction: column;
  }

  .result-img {
    width: 100%;
    height: 170px;
  }
}

/* ═══════════════════════════════════════════════
   LOGIN / REGISTER PAGE
═══════════════════════════════════════════════ */
.login-wrap {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--bg);
}

.login-card {
  background: var(--color-neutral-0);
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius-xl);
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-md);
}

.login-logo {
  text-align: center;
  height: 60px;
  text-align: center;
  display: block;
  margin: auto;
  margin-bottom: 20px;
}

.login-logo img {
  display: block;
}

.login-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
  margin-bottom: 6px;
}

.login-sub {
  font-size: 14px;
  color: var(--text3);
  text-align: center;
  margin-bottom: 28px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-forgot {
  text-align: right;
  margin-top: -6px;
}

.login-forgot a {
  font-size: 12px;
  color: var(--text3);
  font-weight: 500;
}

.login-forgot a:hover {
  color: var(--g);
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--text4);
  font-size: 12px;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.login-switch {
  text-align: center;
  font-size: 13px;
  color: var(--text2);
}

.login-switch a {
  color: var(--g);
  font-weight: 700;
}

.login-switch a:hover {
  text-decoration: underline;
}

.login-tabs {
  display: flex;
  border: 1.5px solid var(--border2);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 28px;
}

.login-tab {
  flex: 1;
  padding: 10px;
  font-size: 13px;
  font-weight: 700;
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  transition: all var(--transition-base);
}

.login-tab.active {
  background: var(--g);
  color: white;
}

.login-code-info {
  font-size: 13px;
  color: var(--text2);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 20px;
}

.login-code-input {
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 10px;
  font-variant-numeric: tabular-nums;
}

.login-code-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.login-code-actions a {
  font-size: 12px;
  color: var(--text3);
  font-weight: 600;
}

.login-code-actions a:hover {
  color: var(--g);
}

/* ═══════════════════════════════════════════════
   ARTISAN PROFILE PAGE  (prefix: ap-)
═══════════════════════════════════════════════ */
#nav-messages {
  display: none;
}

/* messages: en attente backend */

.ap-wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.ap-back-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0 10px;
}

.ap-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color var(--transition-base);
}

.ap-back-btn:hover {
  color: var(--g);
}

.ap-back-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.ap-breadcrumb {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text4);
}

.ap-breadcrumb a {
  color: var(--text3);
  cursor: pointer;
  transition: color var(--transition-base);
}

.ap-breadcrumb a:hover {
  color: var(--g);
}

/* Hero */
.ap-hero {
  background: var(--color-neutral-0);
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-5);
}

.ap-hero-cover {
  height: 110px;
}

.ap-hero-content {
  padding: 12px 28px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.ap-hero-left {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  flex: 1;
  min-width: 0;
}

.ap-hero-info-row {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-width: 0;
}

.ap-avatar-wrap {
  position: relative;
  margin-top: -44px;
  flex-shrink: 0;
}

.ap-avatar {
  --avatar-size: 80px;
  width: var(--avatar-size);
  height: var(--avatar-size);
  border-radius: var(--radius-full);
  border: 4px solid var(--color-neutral-0);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: calc(var(--avatar-size) * 0.33);
  font-weight: var(--font-extrabold);
  color: var(--color-neutral-0);
  overflow: hidden;
  flex-shrink: 0;
}

.ap-verified-dot {
  position: absolute;
  bottom: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: var(--color-primary-700);
  border: 3px solid var(--color-neutral-0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: var(--color-neutral-0);
  font-weight: var(--font-black);
}

.ap-hero-info {
  flex: 1;
  min-width: 0;
  padding-bottom: 4px;
}

.ap-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.ap-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  padding: 3px 9px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  white-space: nowrap;
}

.ap-badge.verified {
  background: var(--color-primary-700);
  color: var(--color-neutral-0);
}

.ap-badge.eco {
  background: var(--color-success-bg);
  color: var(--color-success-text);
  border-color: var(--color-success-icon);
}

.ap-trade {
  font-size: 14px;
  color: var(--g);
  font-weight: 700;
  margin-bottom: 3px;
}

.ap-loc {
  font-size: 13px;
  color: var(--text3);
  margin-bottom: 6px;
}

.ap-rating-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.ap-rating-count {
  font-size: 13px;
  color: var(--text3);
  margin-left: 2px;
}

.ap-hero-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

/* Stats bar */
.ap-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
}

.ap-stat {
  text-align: center;
  padding: 14px 8px;
  border-right: 1px solid var(--border);
}

.ap-stat:last-child {
  border-right: none;
}

.ap-stat-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--g);
  line-height: 1.2;
}

.ap-stat-lbl {
  font-size: 11px;
  color: var(--text3);
  margin-top: 2px;
}

/* Body layout */
.ap-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: start;
}

.ap-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ap-aside {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Sections */
.ap-section {
  background: var(--color-neutral-0);
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.ap-section-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-neutral-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ap-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.ap-section-body {
  padding: 16px 20px;
}

/* Services */
.ap-services {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ap-service-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text2);
  font-weight: 500;
}

.ap-service-icon {
  color: var(--g);
  font-weight: 900;
  font-size: 13px;
  flex-shrink: 0;
}

/* Portfolio */
.ap-portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.ap-portfolio-item {
  background: var(--color-neutral-0);
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius-base);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.ap-portfolio-item:hover {
  border-color: var(--color-primary-700);
  box-shadow: var(--shadow-md);
}

.ap-portfolio-img {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
}

.ap-portfolio-info {
  padding: 8px 10px 10px;
}

.ap-portfolio-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.ap-portfolio-meta {
  font-size: 11px;
  color: var(--text4);
}

.ap-portfolio-tag {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: var(--font-bold);
  color: var(--color-primary-700);
  background: var(--color-primary-50);
  border: 1px solid var(--color-primary-100);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

/* Reviews */
.ap-reviews {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ap-review {
  padding: 14px;
  background: var(--bg);
  border-radius: 8px;
}

.ap-review-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.ap-review-meta {
  flex: 1;
}

.ap-review-name {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 1px;
}

.ap-review-since {
  font-size: 11px;
  color: var(--text3);
}

.ap-review-text {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.65;
  font-style: italic;
}

/* Sidebar: contact card */
.ap-contact-card {
  background: var(--color-neutral-0);
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.ap-contact-head {
  background: var(--g);
  padding: 14px 18px;
}

.ap-contact-head-title {
  font-size: 14px;
  font-weight: 800;
  color: white;
  font-family: var(--font-display);
}

.ap-contact-body {
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ap-contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text2);
}

.ap-contact-row strong {
  color: var(--text);
}

.ap-contact-icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.ap-avail-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #43A047;
  flex-shrink: 0;
}

/* Sidebar: certifications */
.ap-certs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ap-cert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--g-light);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--g);
}

.ap-cert-check {
  font-weight: 900;
}

/* Sidebar: trust clients */
.ap-trust-clients {
  display: flex;
  flex-direction: column;
}

.ap-trust-client {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.ap-trust-client:last-child {
  border-bottom: none;
}

.ap-trust-client:hover {
  background: var(--g-lighter);
}

.ap-trust-client-info {
  flex: 1;
  min-width: 0;
}

.ap-trust-client-name {
  font-size: 13px;
  font-weight: 700;
}

.ap-trust-client-since {
  font-size: 11px;
  color: var(--text3);
  margin-top: 1px;
}

.ap-trust-cta {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ap-trust-desc {
  font-size: 12px;
  color: var(--text3);
  line-height: 1.5;
}

/* Score ProTrust (lotus) */
.ap-score-card {
  background: var(--color-neutral-0);
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.ap-score-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-neutral-200);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.ap-score-head-title {
  font-size: 15px;
  font-weight: 700;
}

.ap-score-head-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: var(--font-bold);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: var(--color-primary-50);
  color: var(--color-primary-700);
  border: 1px solid var(--color-primary-100);
  margin-left: auto;
}

.ap-score-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.ap-score-lotus {
  line-height: 0;
}

.ap-score-number {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  color: var(--g);
  line-height: 1;
}

.ap-score-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text2);
}

.ap-score-desc {
  font-size: 12px;
  color: var(--text3);
  text-align: center;
  line-height: 1.5;
  padding: 0 4px;
}

/* Responsive */
@media (max-width: 900px) {
  .ap-wrap {
    padding: 0 14px 60px;
  }

  .ap-body {
    grid-template-columns: 1fr;
  }

  .ap-aside {
    order: -1;
  }

  .ap-portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ap-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .ap-hero-content {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 12px 16px 18px;
  }

  .ap-hero-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .ap-hero-info-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .ap-hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
  }

  .ap-hero-actions .btn {
    flex: 1;
  }
}

/* ─── Lotus score selector ───────────────────────── */
.lotus-widget {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.lotus-widget svg {
  display: block;
  cursor: pointer;
}

.lotus-widget g[data-petal] {
  cursor: pointer;
}

.lotus-widget g[data-petal] path {
  transition: fill .18s ease;
}

.lotus-reset {
  font-size: 11px;
  color: var(--color-neutral-400);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-body);
}

.lotus-reset:hover {
  color: var(--color-primary-600);
}

.lotus-filter-hint {
  font-size: 12px;
  color: var(--color-primary-600);
  font-weight: 600;
  min-height: 16px;
}

/* ─── Location filter ────────────────────────────── */
.loc-filter {
  position: relative;
  flex-shrink: 0;
}

.loc-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  height: 40px;
  background: var(--color-neutral-0);
  border: 1.5px solid var(--color-neutral-200);
  border-radius: 40px;
  cursor: pointer;
  font-size: 13px;
  color: var(--color-neutral-600);
  font-family: var(--font-body);
  font-weight: 500;
  white-space: nowrap;
  transition: border-color .15s, box-shadow .15s;
}

.loc-trigger:hover {
  border-color: var(--color-primary-400);
}

.loc-trigger.has-city {
  border-color: var(--color-primary-500);
  color: var(--color-primary-700);
  background: var(--color-primary-25);
}

.loc-trigger svg {
  flex-shrink: 0;
}

.loc-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 360px;
  z-index: 300;
  background: var(--color-neutral-0);
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .14), 0 2px 8px rgba(0, 0, 0, .08);
  padding: 16px;
  display: none;
}

.loc-panel.open {
  display: block;
}

.loc-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.loc-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px 4px 12px;
  background: var(--color-primary-50);
  border: 1px solid var(--color-primary-200);
  border-radius: 40px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary-700);
}

.loc-chip-x {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  color: var(--color-primary-500);
  display: flex;
  border-radius: 50%;
  transition: background .15s;
}

.loc-chip-x:hover {
  background: var(--color-primary-100);
}

.loc-city-input {
  width: 100%;
  border: 1.5px solid var(--color-neutral-200);
  border-radius: var(--radius-lg);
  padding: 9px 12px;
  font-size: 13px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color .15s;
}

.loc-city-input:focus {
  border-color: var(--color-primary-400);
}

.loc-suggestions {
  background: var(--color-neutral-0);
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 4px;
  max-height: 160px;
  overflow-y: auto;
}

.loc-sugg-item {
  padding: 9px 12px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-neutral-800);
  transition: background .1s;
}

.loc-sugg-item:hover {
  background: var(--color-primary-25);
  color: var(--color-primary-700);
}

.loc-sugg-item svg {
  flex-shrink: 0;
  color: var(--color-neutral-400);
}

.loc-radius-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--color-neutral-700);
}

.loc-radius-row strong {
  color: var(--color-primary-600);
  font-size: 14px;
  font-weight: 700;
}

.loc-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--color-neutral-200);
  outline: none;
  cursor: pointer;
}

.loc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-primary-600);
  border: 3px solid white;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
  cursor: pointer;
}

.loc-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-primary-600);
  border: 3px solid white;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
  cursor: pointer;
  border: 3px solid white;
}

.loc-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--color-neutral-400);
  margin-top: 4px;
}

.loc-map-wrap {
  height: 180px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 12px;
  border: 1px solid var(--color-neutral-200);
}

.loc-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.loc-actions .btn {
  flex: 1;
  justify-content: center;
}

.loc-backdrop {
  position: fixed;
  inset: 0;
  z-index: 299;
  background: transparent;
  border: none;
  padding: 0;
  cursor: default;
}

.loc-hint {
  font-size: 12px;
  color: var(--color-neutral-500);
  margin: 8px 0 12px;
  text-align: center;
}

.loc-error {
  background: var(--color-error-bg);
  border: 1px solid var(--color-error-border);
  color: var(--color-error-text);
  font-size: 12px;
  border-radius: var(--radius-lg);
  padding: 8px 12px;
  margin-top: 10px;
}

/* ─── Splash screen ───────────────────────────────── */
#splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0f2d10;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  overflow: hidden;
  transition: opacity 0.7s ease;
}

#splash.hiding {
  animation: sb-bg-out 1.1s ease forwards;
  pointer-events: none;
}

#splash.hiding .sb-logo {
  animation: sb-logo-zoom 1s cubic-bezier(.2, 0, .4, 1) forwards !important;
}

#splash.hiding .sb-wrap,
#splash.hiding .sb-grid,
#splash.hiding #splash-canvas {
  animation: sb-bg-out 0.8s ease forwards;
}

@keyframes sb-bg-out {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

@keyframes sb-logo-zoom {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  60% {
    transform: scale(3);
    opacity: 0.6;
  }

  100% {
    transform: scale(10);
    opacity: 0;
  }
}

#splash-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.sb-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.sb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.28;
}

.sb1 {
  width: 700px;
  height: 700px;
  background: #2E7D32;
  top: -200px;
  left: -200px;
  animation: sb-o1 28s ease-in-out infinite alternate;
}

.sb2 {
  width: 580px;
  height: 580px;
  background: #1B5E20;
  bottom: -160px;
  right: -160px;
  animation: sb-o2 22s ease-in-out infinite alternate;
}

.sb3 {
  width: 420px;
  height: 420px;
  background: #43A047;
  top: 30%;
  left: 40%;
  animation: sb-o3 18s ease-in-out infinite alternate;
  opacity: 0.18;
}

.sb4 {
  width: 360px;
  height: 360px;
  background: #388E3C;
  top: 60%;
  left: -100px;
  animation: sb-o4 24s ease-in-out infinite alternate;
  opacity: 0.2;
}

@keyframes sb-o1 {
  0% {
    transform: translate(0, 0) scale(1)
  }

  25% {
    transform: translate(280px, 80px) scale(1.08)
  }

  50% {
    transform: translate(180px, 260px) scale(.94)
  }

  75% {
    transform: translate(60px, 200px) scale(1.04)
  }

  100% {
    transform: translate(320px, 140px) scale(1.1)
  }
}

@keyframes sb-o2 {
  0% {
    transform: translate(0, 0) scale(1)
  }

  30% {
    transform: translate(-200px, -120px) scale(1.06)
  }

  60% {
    transform: translate(-300px, -60px) scale(.92)
  }

  100% {
    transform: translate(-140px, -240px) scale(1.08)
  }
}

@keyframes sb-o3 {
  0% {
    transform: translate(0, 0) scale(1)
  }

  40% {
    transform: translate(-180px, 120px) scale(1.12)
  }

  70% {
    transform: translate(100px, 180px) scale(.9)
  }

  100% {
    transform: translate(-80px, -140px) scale(1.05)
  }
}

@keyframes sb-o4 {
  0% {
    transform: translate(0, 0) scale(1)
  }

  35% {
    transform: translate(240px, -80px) scale(1.1)
  }

  65% {
    transform: translate(160px, 160px) scale(.9)
  }

  100% {
    transform: translate(300px, 60px) scale(1.05)
  }
}

.sb-grid {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

.sb-logo {
  position: relative;
  z-index: 10;
  width: 520px;
  animation: sb-fadein 1.4s cubic-bezier(.16, 1, .3, 1) both, sb-glow 4s ease-in-out infinite alternate;
}

.sb-logo img {
  width: 100%;
  display: block;
}

@keyframes sb-fadein {
  from {
    opacity: 0;
    transform: scale(.92)
  }

  to {
    opacity: 1;
    transform: scale(1)
  }
}

@keyframes sb-glow {
  from {
    filter: drop-shadow(0 0 30px rgba(46, 125, 50, .4));
  }

  to {
    filter: drop-shadow(0 0 70px rgba(46, 125, 50, .85));
  }
}

/* ─── Artisan Registration ─────────────────────────────────────── */
.login-card--wide {
  max-width: 500px;
}

.reg-type-selector {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}

.reg-type-card {
  flex: 1;
  padding: 18px 12px 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: all .18s cubic-bezier(.4, 0, .2, 1);
  background: var(--color-neutral-0);
}

.reg-type-card:hover {
  border-color: var(--color-primary-400);
  background: var(--color-primary-25);
}

.reg-type-card.selected {
  border-color: var(--color-primary-600);
  background: var(--color-primary-25);
}

.reg-type-icon {
  font-size: 26px;
  margin-bottom: 8px;
}

.reg-type-label {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  font-family: var(--font-display);
  margin-bottom: 3px;
}

.reg-type-desc {
  font-size: 11px;
  color: var(--text3);
  line-height: 1.4;
}

.reg-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.reg-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-neutral-200);
  transition: all .3s cubic-bezier(.4, 0, .2, 1);
  flex-shrink: 0;
}

.reg-step-dot.active {
  width: 28px;
  border-radius: 4px;
  background: var(--color-primary-600);
}

.reg-step-dot.done {
  background: var(--color-primary-300);
}

.reg-step-wrap {
  overflow: hidden;
  position: relative;
}

.reg-step-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.reg-step-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  font-family: var(--font-display);
}

.reg-step-subtitle {
  font-size: 12px;
  color: var(--text3);
  margin-top: 1px;
}

.reg-footer {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.reg-footer .btn {
  flex: 1;
  justify-content: center;
}

.reg-input-hint {
  font-size: 11px;
  color: var(--text3);
  margin-top: 3px;
}

.reg-siret-row {
  position: relative;
}

.reg-siret-status {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
}

.reg-siret-status.valid {
  color: var(--color-primary-600);
}

.reg-siret-status.invalid {
  color: #c0392b;
}

.reg-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.reg-chip {
  padding: 6px 11px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--text2);
  cursor: pointer;
  transition: all .15s;
  user-select: none;
}

.reg-chip:hover {
  border-color: var(--color-primary-400);
}

.reg-chip.selected {
  border-color: var(--color-primary-600);
  background: var(--color-primary-25);
  color: var(--color-primary-700);
  font-weight: 600;
}

@keyframes reg-slide-fwd {
  from {
    transform: translateX(36px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes reg-slide-bwd {
  from {
    transform: translateX(-36px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.reg-slide-fwd {
  animation: reg-slide-fwd .25s cubic-bezier(.4, 0, .2, 1) both;
}

.reg-slide-bwd {
  animation: reg-slide-bwd .25s cubic-bezier(.4, 0, .2, 1) both;
}

.select {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
  background: white;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  transition: border-color .15s;
}

.select:focus {
  border-color: var(--color-primary-500);
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — MOBILE (général)
═══════════════════════════════════════════════ */
@media (max-width: 860px) {
  .home-layout {
    padding: 16px 12px 40px;
    gap: 16px;
  }

  .artisan-cards-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .allcat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .login-wrap {
    padding: 24px 16px;
  }

  .projects-wrap {
    padding: 16px 12px 40px;
  }
}

@media (max-width: 600px) {
  .sb-logo {
    width: min(520px, 78vw);
  }
}

/* ─── Compte utilisateur ──────────────────────── */
.profile-wrap {
  max-width: 640px;
  margin: 24px auto;
  padding: 0 16px 60px;
}

.profile-title {
  font-size: 22px;
  font-weight: 900;
  font-family: var(--font-display);
  margin-bottom: 20px;
}

.profile-loading {
  text-align: center;
  padding: 60px;
  color: var(--text4);
  font-size: 20px;
}

.profile-section {
  background: var(--color-neutral-0);
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  overflow: hidden;
}

.profile-section-title {
  font-size: 15px;
  font-weight: 800;
  font-family: var(--font-display);
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-neutral-100);
}

.profile-section-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-email-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.profile-email-display {
  flex: 1;
  display: flex;
  align-items: center;
  color: var(--text2);
  background: var(--color-neutral-50);
}

.profile-hint {
  font-size: 12px;
  color: var(--text4);
}

.profile-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text2);
  cursor: pointer;
}

.profile-section--danger {
  border-color: var(--color-error-border);
}

.profile-section--danger .profile-section-title {
  color: var(--color-error-text);
  border-bottom-color: var(--color-error-border);
}

@media (max-width: 480px) {
  .artisan-post-footer {
    flex-wrap: wrap;
    gap: 8px 12px;
  }

  .post-tag {
    margin-left: 0;
    flex-basis: 100%;
  }

  .login-card {
    padding: 28px 20px;
  }

  .login-card--wide {
    max-width: 100%;
  }
}