/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 44px; padding: 0 var(--space-5);
  border-radius: var(--radius-round);
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
  text-align: center;
  line-height: 1.1;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 2px;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary { background: var(--corail); color: white; box-shadow: var(--shadow-md); }
.btn-primary:hover { box-shadow: var(--shadow-lg); }

.btn-ghost {
  background: transparent;
  color: var(--anthracite);
  border: 2px solid var(--anthracite);
}
.btn-ghost:hover { background: var(--anthracite); color: var(--creme); }

.btn-danger {
  background: transparent;
  color: var(--corail);
  border: 2px solid var(--corail);
}
.btn-danger:hover { background: var(--corail); color: white; }

/* Champs de formulaire */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.field label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--anthracite);
}
.field input,
.input {
  min-height: 44px;
  padding: var(--space-2) var(--space-4);
  border: 2px solid var(--gris-clair);
  border-radius: var(--radius-md);
  background: white;
  font-size: 16px;
  color: var(--anthracite);
  transition: border-color .15s ease, box-shadow .15s ease;
  width: 100%;
}
.field input:focus,
.input:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(123, 97, 255, 0.15);
}
.field .field-help {
  font-size: 13px;
  color: var(--gris-fonce);
}
.field .field-error {
  font-size: 13px;
  color: var(--corail);
  font-weight: 600;
}

/* Cartes */
.card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover {
  box-shadow: var(--shadow-md);
}

/* Modals : full-screen mobile, centré desktop */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(31, 41, 55, 0.5);
  z-index: 90;
  display: none;
}
.modal-backdrop.is-open {
  display: block;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--creme);
  padding: var(--space-5);
  overflow-y: auto;
  display: none;
}
.modal.is-open {
  display: block;
}
.modal-close {
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-round);
  background: white;
  box-shadow: var(--shadow-sm);
  font-size: 20px;
  font-weight: 700;
  color: var(--anthracite);
}

@media (min-width: 640px) {
  .modal {
    inset: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 480px;
    width: calc(100% - var(--space-6));
    max-height: 90dvh;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
  }
}

/* Toasts */
.toast {
  position: fixed;
  top: var(--space-4);
  left: 50%;
  transform: translateX(-50%);
  min-width: 240px;
  max-width: calc(100% - var(--space-6));
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  background: var(--anthracite);
  color: white;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  text-align: center;
  animation: toast-in .25s ease;
}
.toast-info {
  background: var(--anthracite);
  color: white;
}
.toast-error {
  background: var(--corail);
  color: white;
}
.toast-success {
  background: #10B981;
  color: white;
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
