/* ================================================================
   L'Atelier — Clients overrides (neo-brut style)
   ================================================================ */

/* ---- Listes bar ---- */
.listes-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.listes-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex: 1;
  min-width: 0;
}
.liste-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: #fff;
  border: 2px solid var(--base);
  border-radius: 999px;
  box-shadow: 2px 2px 0 var(--base);
  font-family: Labil, Arial, sans-serif;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.liste-chip:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--base);
}
.liste-chip.is-active {
  background: var(--primary);
  color: #fff;
  box-shadow: 3px 3px 0 var(--base);
}
.liste-chip .liste-count {
  font-size: 0.62rem;
  opacity: 0.7;
}
.liste-chip .liste-edit,
.liste-chip .liste-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--base);
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  margin-left: 0.35rem;
  line-height: 1;
  font-size: 0.75rem;
  font-weight: 800;
  transition: background 0.15s, transform 0.15s;
  flex-shrink: 0;
}
.liste-chip .liste-edit {
  background: var(--secondary);
  color: var(--base);
}
.liste-chip .liste-edit:hover { background: #ffd500; transform: scale(1.15); }
.liste-chip .liste-delete {
  background: #e74c3c;
  color: #fff;
}
.liste-chip .liste-delete:hover { background: #c0392b; transform: scale(1.15); }
.liste-chip.is-active .liste-edit {
  background: #fff;
  color: var(--base);
}

.liste-btn-new {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  font-family: Labil, Arial, sans-serif;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--base);
  background: var(--secondary);
  border: 2px solid var(--base);
  border-radius: 999px;
  box-shadow: 2px 2px 0 var(--base);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.liste-btn-new:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--base);
}

/* ---- Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(23,20,18,0.45);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-box {
  background: #fff;
  border: 2.5px solid var(--base);
  border-radius: var(--radius-lg);
  box-shadow: 8px 8px 0 var(--base);
  padding: 1.75rem;
  width: 100%;
  max-width: 380px;
}
.modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
}
.modal-actions {
  display: flex;
  gap: 0.65rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}
.btn-ghost {
  background: transparent;
  border: 2px solid var(--base);
  border-radius: var(--radius-sm);
  padding: 0.55rem 1.1rem;
  font-family: Labil, Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-ghost:hover { background: var(--bg-alt); }

/* ---- Pick liste modal ---- */
.pick-liste-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.pick-liste-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  background: var(--bg-alt);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: Labil, Arial, sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  transition: border-color 0.15s, background 0.15s, transform 0.15s, box-shadow 0.15s;
  width: 100%;
}
.pick-liste-item:hover {
  border-color: var(--primary);
  background: #fff;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--base);
}
.pick-liste-item .pick-count {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--grey);
}
.pick-liste-empty {
  text-align: center;
  color: var(--grey);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 1.5rem 0;
}

/* ---- Toolbar ---- */
.clients-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1.25rem;
  gap: 0.5rem;
}
.clients-search {
  flex: 1 1 0;
  min-width: 0;
}
.clients-search:focus {
  border-color: var(--base);
  box-shadow: none;
  transform: none;
}
.clients-search::-webkit-search-cancel-button {
  cursor: pointer;
}
.clients-sort {
  width: auto;
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.55rem 0.5rem 0.55rem 0.75rem;
  border: 2.5px solid var(--base);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23171412' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  padding-right: 1.5rem;
  transition: none;
}
.clients-sort:focus {
  outline: none;
  box-shadow: none;
  transform: none;
  border-color: var(--base);
}
.clients-toolbar .filter-chip {
  width: 140px;
  flex-shrink: 0;
  text-align: center;
  white-space: nowrap;
}

/* ---- Mass selection ---- */
.clients-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border-bottom: 2px solid var(--line);
}
.clients-check-all {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
}
.clients-check-all input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}
.clients-check-all input[type="checkbox"]:hover,
.clients-check-all input[type="checkbox"]:focus,
.clients-check-all input[type="checkbox"]:active,
.clients-check-all input[type="checkbox"]:checked,
.client-row-check:hover,
.client-row-check:focus,
.client-row-check:active,
.client-row-check:checked {
  transform: none !important;
  box-shadow: none !important;
  outline: none !important;
}
.clients-sel-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--grey);
}
.client-row-check {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.mass-action-bar {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--base);
  color: #fff;
  border: 2.5px solid var(--base);
  border-radius: var(--radius-lg);
  box-shadow: 6px 6px 0 rgba(0,0,0,0.2);
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  z-index: 100;
  font-size: 0.82rem;
  font-weight: 700;
}
.mass-action-count {
  background: var(--secondary);
  color: var(--base);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.85rem;
}
.mass-action-label {
  white-space: nowrap;
}
.mass-action-btn {
  font-size: 0.74rem !important;
  padding: 0.5rem 1rem !important;
  white-space: nowrap;
  transition: filter 0.15s ease, opacity 0.15s ease;
}
.mass-action-btn:hover {
  transform: none;
  box-shadow: none;
  filter: brightness(0.94);
}
.mass-action-cancel {
  background: var(--secondary) !important;
  color: var(--base) !important;
  border: 1.5px solid var(--base) !important;
  font-size: 0.74rem;
  white-space: nowrap;
}
.mass-action-cancel:hover {
  background: #fff36d !important;
  transform: none;
  box-shadow: none;
  filter: brightness(0.96);
}
.mass-action-delete {
  background: #e74c3c !important;
  color: #fff !important;
  border: 1.5px solid #c0392b !important;
}
.mass-action-delete:hover {
  background: #c0392b !important;
}
.mass-action-remove {
  background: #fc6b44 !important;
  color: #fff !important;
  border: 1.5px solid var(--base) !important;
}
.mass-action-remove:hover {
  background: #e55a35 !important;
}

/* ---- List card wrapper ---- */
.clients-list-card {
  background: #fff;
  border: 2.5px solid var(--base);
  border-radius: var(--radius-lg);
  box-shadow: 5px 5px 0 var(--base);
  padding: 0.5rem;
  overflow: hidden;
}
.clients-list-inner {
  max-height: 520px;
  overflow-y: auto;
  padding: 0.25rem;
}
.clients-list-inner::-webkit-scrollbar { width: 4px; }
.clients-list-inner::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }

/* ---- Client rows ---- */
.client-row-mobile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: none;
  box-shadow: none;
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  margin-bottom: 2px;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease;
}
.client-row-mobile:hover {
  transform: none;
  box-shadow: none;
  background: var(--bg-alt);
}
.client-row-mobile.is-selected {
  background: color-mix(in srgb, var(--primary) 8%, transparent);
}

.client-avatar {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--base);
  border-radius: 50%;
  box-shadow: 2px 2px 0 var(--base);
  background: var(--secondary);
  color: var(--base);
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}

.client-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.client-name {
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-sub {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--grey);
}

/* ---- Detail panel ---- */
.client-detail {
  border: 2.5px solid var(--base);
  border-radius: var(--radius-lg);
  box-shadow: 5px 5px 0 var(--primary);
  padding: 0;
  overflow: hidden;
  position: sticky;
  top: 2.5rem;
}

.client-detail-header {
  background: var(--primary);
  padding: 1.75rem 1.5rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}
.client-detail-header::before {
  content: "";
  position: absolute;
  bottom: -25px; right: -25px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.07;
}

.client-detail-avatar-lg {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--secondary);
  color: var(--base);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 800;
  border: 2.5px solid var(--base);
  box-shadow: 3px 3px 0 rgba(0,0,0,0.2);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.client-detail-name-lg {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.2;
  position: relative;
  z-index: 1;
}

.client-detail-body {
  padding: 1.25rem 1.5rem 1.5rem;
  background: #fff;
}

.client-detail-fields {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.client-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0;
  border-bottom: 2px solid var(--line);
}
.client-detail-row:last-child {
  border-bottom: none;
}

.client-detail-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey);
}

.client-detail-value {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--base);
  text-align: right;
}

/* ---- Loyalty points inline row ---- */
.points-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.points-value {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary);
  min-width: 32px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.points-btn {
  width: 28px; height: 28px;
  border: 2px solid var(--base);
  border-radius: 50%;
  background: #fff;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  box-shadow: 2px 2px 0 var(--base);
  color: var(--base);
  padding: 0;
  line-height: 1;
}
.points-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--base);
}
.points-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 0 0 0 var(--base);
}
.points-btn-plus:hover { background: var(--green); color: #fff; }
.points-btn-minus:hover { background: var(--orange); color: #fff; }
.points-btn-validate {
  width: 28px; height: 28px;
  border: 2px solid var(--base);
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  box-shadow: 2px 2px 0 var(--base);
  padding: 0;
  line-height: 1;
  margin-left: 0.25rem;
}
.points-btn-validate:hover {
  background: var(--primary);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--base);
}
.points-btn-validate:active {
  transform: translate(1px, 1px);
  box-shadow: 0 0 0 var(--base);
}
.points-no-card {
  font-style: normal;
  color: var(--base);
  font-weight: 600;
  font-size: 0.78rem;
}

/* ---- Grid layout (mobile = stack, desktop = 2 colonnes) ---- */
.clients-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: start;
}
@media (min-width: 900px) {
  .clients-grid {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1.75rem;
  }
}
