/*
 * Fichier    : components.css
 * Rôle       : Composants réutilisésables  boutons, toggles, inputs, badges,
 *              toasts, modals, tats vides, upload areas
 * Emplacement: assets/css/components.css
 * Auteur     : RCBG
 * Projet     : Franck Emery v1.0.0
 */


/* ============================================================
   BOUTONS
============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 11px 22px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    opacity var(--transition-fast);
  user-select: none;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: translateY(1px);
}

/*  Primaire  */
.btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 12px var(--accent-glow);
}

.btn--primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: background var(--transition-fast);
}

.btn--primary:hover::before {
  background: rgba(255, 255, 255, 0.10);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px var(--accent-glow);
}

/*  Ghost  */
.btn--ghost {
  background: transparent;
  color: var(--text2);
  border-color: var(--border2);
}

.btn--ghost:hover {
  background: var(--bg3);
  border-color: var(--border-accent);
  color: var(--text);
  transform: translateY(-1px);
}

/*  Danger  */
.btn--danger {
  background: var(--danger-dim);
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.25);
}

.btn--danger:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
  box-shadow: 0 4px 16px rgba(248, 113, 113, 0.35);
  transform: translateY(-1px);
}

/*  Tailles  */
.btn--sm {
  padding: 7px 14px;
  font-size: var(--text-xs);
  border-radius: var(--radius-sm);
  gap: 5px;
}

.btn--lg {
  padding: 14px 32px;
  font-size: var(--text-md);
  border-radius: var(--radius-lg);
}

/*  Full width  */
.btn--full {
  width: 100%;
}

/*  Icne seule  */
.btn--icon {
  padding: 8px;
  border-radius: var(--radius-md);
}

/*  Dsactiv  */
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}


/* ============================================================
   FORMULAIRES  INPUTS, TEXTAREAS, SELECTS
============================================================ */

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text2);
  letter-spacing: 0.01em;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  line-height: 1.5;
  transition:
    border-color var(--transition-base),
    background var(--transition-base),
    box-shadow var(--transition-base);
  -webkit-appearance: none;
  appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text3);
}

.form-input:hover,
.form-textarea:hover,
.form-select:hover {
  border-color: var(--border2);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
  background: var(--bg4);
}

.form-textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.6;
}

.form-textarea--mono {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.5;
}

/* Select avec flche custom */
.form-select {
  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='%239898b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-select option {
  background: var(--bg4);
  color: var(--text);
}

/* Input numrique */
input[type="number"].form-input {
  -moz-appearance: textfield;
}

input[type="number"].form-input::-webkit-outer-spin-button,
input[type="number"].form-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

/* Hint sous les champs */
.form-hint {
  font-size: var(--text-xs);
  color: var(--text3);
  line-height: 1.5;
  margin-top: 2px;
}

/* Erreur */
.form-error {
  font-size: var(--text-xs);
  color: var(--danger);
  background: var(--danger-dim);
  border: 1px solid rgba(248, 113, 113, 0.20);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-top: var(--space-2);
  line-height: 1.5;
}

/* Toggle groupe form (label + switch) */
.form-group--toggle {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.form-group--toggle:last-child {
  border-bottom: none;
}

/* Actions de formulaire */
.form-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: var(--space-4);
  margin-top: var(--space-2);
}

.form-actions--row {
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: flex-start;
}

/* Bloc de formulaire (groupe visuel) */
.form-block {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  margin-bottom: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.form-block--danger {
  border-color: rgba(248, 113, 113, 0.20);
  background: color-mix(in srgb, var(--bg2) 95%, var(--danger) 5%);
}

.form-block__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
  margin-bottom: calc(-1 * var(--space-2));
}

.form-block__title--danger {
  color: var(--danger);
}


/* ============================================================
   INPUT MOT DE PASSE  WRAPPER
============================================================ */

.input-password-wrapper {
  position: relative;
}

.input-password-wrapper .form-input {
  padding-right: 42px;
}

.btn-show-pwd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--text3);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

.btn-show-pwd:hover {
  color: var(--text2);
}


/* ============================================================
   COLOR PICKER
============================================================ */

.color-picker-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.color-picker {
  width: 40px;
  height: 40px;
  padding: 3px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color var(--transition-fast);
}

.color-picker::-webkit-color-swatch-wrapper {
  padding: 0;
  border-radius: 6px;
}

.color-picker::-webkit-color-swatch {
  border: none;
  border-radius: 6px;
}

.color-picker::-moz-color-swatch {
  border: none;
  border-radius: 6px;
}

.color-picker:hover {
  border-color: var(--accent);
}

.color-hex {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text2);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}


/* ============================================================
   TOGGLE SWITCH (checkbox stylise)
============================================================ */

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-switch__slider {
  position: absolute;
  inset: 0;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition:
    background var(--transition-base),
    border-color var(--transition-base);
}

.toggle-switch__slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: var(--text3);
  border-radius: 50%;
  transition:
    transform var(--transition-spring),
    background var(--transition-base);
}

.toggle-switch input:checked + .toggle-switch__slider {
  background: var(--accent);
  border-color: var(--accent);
}

.toggle-switch input:checked + .toggle-switch__slider::before {
  transform: translateX(20px);
  background: #fff;
}

.toggle-switch input:focus-visible + .toggle-switch__slider {
  box-shadow: 0 0 0 3px var(--accent-dim);
}


/* ============================================================
   TOGGLE GROUP (boutons radio visuels)
============================================================ */

.toggle-group {
  display: inline-flex;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 2px;
}

.toggle-btn {
  padding: 7px 16px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text3);
  border-radius: calc(var(--radius-md) - 2px);
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast);
  white-space: nowrap;
}

.toggle-btn:hover:not(.toggle-btn--active) {
  color: var(--text2);
  background: var(--bg4);
}

.toggle-btn--active {
  background: var(--bg2);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}


/* ============================================================
   BADGES
============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: var(--text-xs);
  font-weight: 500;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1.4;
}

.badge--accent {
  background: var(--accent-dim);
  color: var(--accent2);
  border: 1px solid var(--border-accent);
}

.badge--success {
  background: var(--success-dim);
  color: var(--success);
}

.badge--warning {
  background: var(--warning-dim);
  color: var(--warning);
}

.badge--danger {
  background: var(--danger-dim);
  color: var(--danger);
}

.badge--neutral {
  background: var(--bg3);
  color: var(--text2);
  border: 1px solid var(--border);
}

/* Badge pingle dor */
.badge--pin {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.30);
}


/* ============================================================
   TOAST NOTIFICATIONS
============================================================ */

.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  min-width: 280px;
  max-width: 380px;
  padding: 13px 16px;
  background: var(--bg4);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  pointer-events: all;
  animation: toastIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.toast--leaving {
  animation: toastOut 0.25s ease-in both;
}

.toast__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.toast--success { border-left: 3px solid var(--success); }
.toast--success .toast__icon { color: var(--success); }

.toast--error   { border-left: 3px solid var(--danger); }
.toast--error   .toast__icon { color: var(--danger); }

.toast--warning { border-left: 3px solid var(--warning); }
.toast--warning .toast__icon { color: var(--warning); }

.toast--info    { border-left: 3px solid var(--info); }
.toast--info    .toast__icon { color: var(--info); }

.toast__body {
  flex: 1;
  min-width: 0;
}

.toast__title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.toast__msg {
  font-size: var(--text-xs);
  color: var(--text2);
  line-height: 1.5;
  margin-top: 2px;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(32px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(24px) scale(0.95);
  }
}

@media (max-width: 480px) {
  .toast-container {
    right: var(--space-4);
    left: var(--space-4);
    bottom: var(--space-4);
  }

  .toast {
    min-width: 0;
    width: 100%;
  }
}


/* ============================================================
   MODALS
============================================================ */

.modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: backdropIn 0.25s ease both;
}

.modal__panel {
  position: relative;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 560px;
  max-height: calc(100dvh - var(--space-12));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn 0.30s cubic-bezier(0.34, 1.40, 0.64, 1) both;
}

.modal--wide .modal__panel {
  max-width: 820px;
}

.modal--sm .modal__panel {
  max-width: 400px;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6) var(--space-8);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

.modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--text3);
  border-radius: var(--radius-md);
  transition: color var(--transition-fast), background var(--transition-fast);
  flex-shrink: 0;
}

.modal__close:hover {
  color: var(--text);
  background: var(--bg3);
}

.modal__body {
  padding: var(--space-8);
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

/* Layout body split (carrousel) */
.modal__body--split {
  flex-direction: row;
  gap: var(--space-6);
  align-items: flex-start;
}

.modal__form-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  min-width: 0;
}

.modal__preview-col {
  width: 260px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-8);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg2);
}

.modal__confirm-msg {
  font-size: var(--text-sm);
  color: var(--text2);
  line-height: 1.6;
}

@keyframes backdropIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(16px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@media (max-width: 640px) {
  .modal {
    padding: var(--space-3);
    align-items: flex-end;
  }

  .modal__panel {
    max-height: 92dvh;
    border-radius: var(--radius-2xl) var(--radius-2xl) var(--radius-lg) var(--radius-lg);
  }

  .modal__body--split {
    flex-direction: column;
  }

  .modal__preview-col {
    width: 100%;
  }

  .modal--wide .modal__panel,
  .modal--sm .modal__panel {
    max-width: 100%;
  }
}


/* ============================================================
   UPLOAD AREAS
============================================================ */

.upload-area {
  position: relative;
  border: 1.5px dashed var(--border2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition:
    border-color var(--transition-base),
    background var(--transition-base);
  cursor: pointer;
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-area:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-6);
  color: var(--text3);
  font-size: var(--text-sm);
  pointer-events: none;
  text-align: center;
}

.upload-placeholder svg {
  color: var(--text3);
  transition: color var(--transition-fast);
}

.upload-area:hover .upload-placeholder {
  color: var(--accent);
}

.upload-area:hover .upload-placeholder svg {
  color: var(--accent);
}

.upload-preview {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 110px;
}

.upload-preview img {
  width: 100%;
  height: 100%;
  min-height: 110px;
  object-fit: cover;
  border-radius: calc(var(--radius-lg) - 2px);
}

.upload-remove {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.70);
  color: #fff;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
  z-index: 2;
  cursor: pointer;
}

.upload-remove:hover {
  background: var(--danger);
}


/* ============================================================
   TATS VIDES (EMPTY STATES)
============================================================ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-20) var(--space-8);
  text-align: center;
  color: var(--text3);
}

.empty-state svg {
  color: var(--border2);
  opacity: 0.6;
}

.empty-state p {
  font-size: var(--text-sm);
  color: var(--text3);
  max-width: 280px;
  line-height: 1.6;
}


/* ============================================================
   INFO BANNER (avertissement inline)
============================================================ */

.info-banner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 11px 16px;
  background: var(--info-dim);
  border: 1px solid rgba(96, 165, 250, 0.20);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--info);
  line-height: 1.5;
  margin-bottom: var(--space-4);
}

.info-banner svg {
  flex-shrink: 0;
  color: var(--info);
}


/* ============================================================
   SECTION BLOCK (admin overview sections)
============================================================ */

.section-block {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  margin-bottom: var(--space-6);
}

.section-block__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}


/* ============================================================
   SLIDE PREVIEW (modal carrousel)
============================================================ */

.slide-preview {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #6c3483;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 20px 22px;
  gap: 8px;
  transition: background var(--transition-base);
  position: relative;
}

.slide-preview::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0) 100%);
  pointer-events: none;
}

.slide-preview__tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.15);
  padding: 2px 8px;
  border-radius: 4px;
  position: relative;
  z-index: 1;
}

.slide-preview__title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
}

.slide-preview__subtitle {
  font-size: 11px;
  color: rgba(255,255,255,0.75);
  line-height: 1.4;
  position: relative;
  z-index: 1;
}

.slide-preview__btn {
  font-size: 10px;
  font-weight: 600;
  padding: 5px 12px;
  background: rgba(255,255,255,0.20);
  color: #fff;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.30);
  margin-top: 4px;
  cursor: default;
  position: relative;
  z-index: 1;
}


/* ============================================================
   ITEM LIST (admin  publications, services, etc.)
============================================================ */

.item-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.item-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.item-card:hover {
  border-color: var(--border2);
  box-shadow: var(--shadow-sm);
}

.item-card__thumb {
  width: 56px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg3);
}

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

.item-card__title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-card__meta {
  font-size: var(--text-xs);
  color: var(--text3);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-card__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.item-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: var(--text3);
  border-radius: var(--radius-sm);
  transition:
    color var(--transition-fast),
    background var(--transition-fast);
}

.item-action-btn:hover {
  color: var(--text);
  background: var(--bg3);
}

.item-action-btn--pin.active {
  color: #fbbf24;
}

.item-action-btn--pin.active:hover {
  background: rgba(251, 191, 36, 0.10);
}

.item-action-btn--delete:hover {
  color: var(--danger);
  background: var(--danger-dim);
}

/* Expired indicator */
.item-card--expired {
  opacity: 0.55;
}

.item-card--expired .item-card__title::after {
  content: '  Expir';
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--text3);
  font-style: italic;
}


/* ============================================================
   TAB ACTIONS (row au dessus des listes)
============================================================ */

.tab-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: var(--space-5);
  gap: var(--space-3);
}

/*  Label petit (gradient builder, crop controls)  */
.form-label-sm {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text3);
  letter-spacing: 0.01em;
  display: block;
  margin-bottom: var(--space-1);
}