/* ════════════════════════════════════════════════════════════════════════
   Boutons
   ════════════════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.1px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-sm  { padding: 6px 10px;  font-size: 13px; border-radius: var(--r-sm); }
.btn-md  { padding: 10px 16px; font-size: 15px; }
.btn-lg  { padding: 14px 20px; font-size: 17px; border-radius: var(--r-lg); }
.btn-full { width: 100%; }

.btn-primary       { background: var(--accent);      color: #fff;               border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn-secondary     { background: var(--surface);     color: var(--ink);         border-color: var(--rule-strong); }
.btn-secondary:hover { background: var(--paper-2); }
.btn-ghost         { background: transparent;        color: var(--ink); }
.btn-ghost:hover   { background: var(--paper-2); }
.btn-danger        { background: transparent;        color: var(--danger);      border-color: rgba(181, 76, 62, .35); }
.btn-danger:hover  { background: var(--danger-tint); }
.btn-positive      { background: var(--positive);    color: #fff;               border-color: var(--positive); }
.btn-positive:hover{ background: var(--positive-deep); border-color: var(--positive-deep); }
.btn-accent-soft   { background: var(--accent-soft); color: var(--accent-deep); }
.btn-accent-soft:hover { background: var(--accent-tint); }

.btn .icon { width: 1.1em; height: 1.1em; flex-shrink: 0; }

/* ════════════════════════════════════════════════════════════════════════
   Cartes
   ════════════════════════════════════════════════════════════════════════ */

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: var(--s-4);
}

.card-flush { padding: 0; }
.card-padded-sm { padding: var(--s-3); }
.card-padded-lg { padding: var(--s-6); }

.card-accent { border-color: rgba(176, 109, 61, .35); }

/* ════════════════════════════════════════════════════════════════════════
   Pills / badges
   ════════════════════════════════════════════════════════════════════════ */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  border: 1px solid var(--rule);
  background: var(--paper-2);
  color: var(--ink-2);
  line-height: 1.2;
  letter-spacing: 0.1px;
  white-space: nowrap;
}
.pill-md { font-size: 13px; padding: 4px 10px; }
.pill-lg { font-size: 14px; padding: 6px 14px; }

.pill-accent       { background: var(--accent-soft);   color: var(--accent-deep);  border-color: transparent; }
.pill-accent-solid { background: var(--accent);        color: #fff;                border-color: var(--accent); }
.pill-positive     { background: var(--positive-tint); color: var(--positive-deep); border-color: transparent; }
.pill-pending      { background: var(--pending-tint);  color: var(--pending-deep); border-color: transparent; }
.pill-danger       { background: var(--danger-tint);   color: var(--danger-deep);  border-color: transparent; }
.pill-outline      { background: transparent;          color: var(--ink-2);        border-color: var(--rule-strong); }

.pill-dot { width: 6px; height: 6px; border-radius: 3px; background: currentColor; opacity: .9; }

/* ════════════════════════════════════════════════════════════════════════
   Champs (inputs)
   ════════════════════════════════════════════════════════════════════════ */

.field {
  display: block;
}
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: var(--s-2);
}
.field-input,
.field-textarea,
.field-select {
  width: 100%;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-md);
  font-size: 15px;
  color: var(--ink);
  font-family: inherit;
}
.field-input::placeholder { color: var(--ink-3); }
.field-input:focus,
.field-textarea:focus,
.field-select:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: var(--accent);
}
.field-textarea {
  min-height: 70px;
  resize: vertical;
  line-height: 1.5;
}
.field-suffix {
  position: relative;
}
.field-suffix .field-input { padding-right: 40px; }
.field-suffix .field-suffix-icon {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  color: var(--ink-3); pointer-events: none;
}

/* ════════════════════════════════════════════════════════════════════════
   Alert cards
   ════════════════════════════════════════════════════════════════════════ */

.alert-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.alert-card.is-accent { border-color: rgba(176, 109, 61, .35); }

.alert-card-body { display: flex; padding: 14px; gap: 12px; }

.alert-card-icon {
  width: 40px; height: 40px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.alert-card-icon.tone-urgent   { background: var(--danger-tint);   color: var(--danger-deep); }
.alert-card-icon.tone-pending  { background: var(--pending-tint);  color: var(--pending-deep); }
.alert-card-icon.tone-accent   { background: var(--accent-tint);   color: var(--accent-deep); }
.alert-card-icon.tone-positive { background: var(--positive-tint); color: var(--positive-deep); }
.alert-card-icon.tone-neutral  { background: var(--paper-2);       color: var(--ink-2); }

.alert-card-content { flex: 1; min-width: 0; }
.alert-card-title   { font-size: 15px; font-weight: 700; line-height: 1.3; }
.alert-card-body-text { font-size: 13px; color: var(--ink-2); margin-top: 4px; line-height: 1.4; }
.alert-card-meta {
  font-size: 11px; color: var(--ink-3); margin-top: 6px;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px;
}

.alert-actions {
  border-top: 1px solid var(--rule);
  display: flex;
}
.alert-action {
  flex: 1;
  padding: 12px 14px;
  font-weight: 600;
  font-size: 14px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--ink-2);
  font-family: inherit;
}
.alert-action.is-primary { color: var(--accent); font-weight: 700; }
.alert-action + .alert-action { border-left: 1px solid var(--rule); }

/* ════════════════════════════════════════════════════════════════════════
   Filter chips
   ════════════════════════════════════════════════════════════════════════ */

.chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  flex-shrink: 0;
  padding: 7px 14px;
  background: var(--surface);
  color: var(--ink-2);
  border: 1px solid var(--rule);
  border-radius: var(--r-pill);
  font-size: 13px; font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip.is-active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.chip-count {
  font-size: 10px; padding: 1px 6px; border-radius: var(--r-sm);
  background: var(--accent); color: #fff;
}
.chip.is-active .chip-count { background: #fff; color: var(--ink); }

/* ════════════════════════════════════════════════════════════════════════
   Stepper
   ════════════════════════════════════════════════════════════════════════ */

.stepper {
  display: inline-flex; align-items: center; gap: 12px;
}
.stepper-btn {
  width: 32px; height: 32px; border-radius: 16px;
  border: 1px solid var(--rule-strong); background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--ink-2);
  font-size: 18px; line-height: 1;
  font-family: inherit;
}
.stepper-btn:disabled { opacity: .4; cursor: not-allowed; }
.stepper-value {
  min-width: 32px; text-align: center; font-size: 17px; font-weight: 600;
}

/* ════════════════════════════════════════════════════════════════════════
   Toast — base partagée (vitrine + login). L'admin surcharge via
   `.admin-body .toast` (plus spécifique), donc son rendu reste inchangé.
   ════════════════════════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0) + 24px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-float);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 100;
}
.toast.visible,
.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.is-error { background: var(--danger); }
.toast.is-success { background: var(--positive); }
