@tailwind base;
@tailwind components;
@tailwind utilities;

/* =====================================================================
   Aristide — design system v1.0 (vert anglais & laiton).
   Source de vérité : doc/memory/style_guide.html
   ===================================================================== */

@layer components {
  /* ---- Sceau « A » ----------------------------------------------- */
  .seal {
    @apply flex items-center justify-center rounded-full border-2 border-brass-500
           font-display font-bold text-brass-500;
    transform: rotate(-7deg);
  }

  /* ---- Boutons ---------------------------------------------------- */
  .btn {
    @apply inline-flex cursor-pointer items-center justify-center gap-2 rounded-m
           px-4 py-2 text-sm font-medium transition;
  }
  .btn-primary { @apply bg-green-800 text-ivory hover:bg-green-600; }
  .btn-brass   { @apply bg-brass-500 text-green-900 hover:bg-brass-300; }
  .btn-ghost   { @apply border border-line bg-transparent text-green-700 hover:bg-ivory; }

  /* ---- Badges de statut (pills) ----------------------------------- */
  .badge {
    @apply inline-flex items-center gap-1.5 whitespace-nowrap rounded-pill
           px-2.5 py-0.5 font-mono text-[11px] font-medium tracking-wide;
  }
  .b-valid { background-color: #e3ede6; @apply text-green-600; }  /* validé / accepté */
  .b-wait  { @apply bg-brass-100 text-brass-700; }                /* en attente / à valider */
  .b-auto  { background-color: #f6e7de; @apply text-copper-500; } /* full auto / alerte */
  .b-mute  { @apply bg-ivory text-muted; }                        /* neutre / inactif */

  /* ---- Stat cards -------------------------------------------------- */
  .stat { @apply rounded-l border border-line bg-white px-5 py-4 shadow-s; }
  .stat-lab { @apply text-xs uppercase tracking-wider text-faint; }
  .stat-num { @apply mt-2 font-display text-4xl font-semibold leading-none text-green-700; }
  .stat-feat { @apply border-green-800 bg-green-800; }
  .stat-feat .stat-lab { @apply text-green-300; }
  .stat-feat .stat-num { @apply text-brass-300; }

  /* ---- Cartes & tables --------------------------------------------- */
  .card { @apply rounded-l border border-line bg-white shadow-s; }

  .tbl { @apply w-full border-collapse text-sm; }
  .tbl th {
    @apply border-b border-line px-4 py-2 text-left font-mono text-[10.5px]
           font-medium uppercase tracking-wider text-faint;
  }
  .tbl td { @apply border-b border-line px-4 py-2.5 text-green-800; }
  .tbl tr:last-child td { border-bottom: none; }

  /* ---- Champs ------------------------------------------------------ */
  .field-input {
    @apply block w-full rounded-m border border-line bg-paper px-3 py-2.5 text-sm
           text-green-800 shadow-sm placeholder:text-faint
           focus:border-green-400 focus:outline-none focus:ring-2 focus:ring-green-400/15;
  }
}
