/* asso-events · shared styles */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,400&display=swap');

:root {
  --bg: #F4F1EC;
  --surface: #FFFFFF;
  --surface2: #F9F7F4;
  --accent: #00529B;
  --accent-hover: #003d74;
  --accent-light: #ddeeff;
  --accent-mid: #4a90d9;
  --text: #1A1A18;
  --muted: #72706A;
  --subtle: #A8A59F;
  --border: #E2DED7;
  --border2: #CCC9C2;
  --danger: #C0392B;
  --danger-light: #FDECEA;
  --warn: #E67E22;
  --warn-light: #FEF3E2;
  --info: #2471A3;
  --info-light: #EBF5FB;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-xs: 5px;
  --shadow: 0 1px 3px rgba(0,0,0,0.07), 0 4px 16px rgba(0,0,0,0.04);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

h1,h2,h3,h4 { font-family: 'Syne', sans-serif; font-weight: 600; line-height: 1.2; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: 'Syne', sans-serif; font-size: 14px; font-weight: 600;
  cursor: pointer; border: none; transition: background 0.15s, transform 0.1s, opacity 0.15s;
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); color: white; }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border2); }
.btn-secondary:hover { background: var(--surface2); color: var(--text); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #a93226; color: white; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface2); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: default; pointer-events: none; }

/* ── Inputs ── */
input[type=text], input[type=date], input[type=time], input[type=password],
input[type=number], textarea, select {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif; font-size: 15px;
  background: var(--surface); color: var(--text);
  transition: border-color 0.15s;
  outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent-mid); }
input::placeholder, textarea::placeholder { color: var(--subtle); }
textarea { resize: vertical; min-height: 80px; }
select { appearance: none; cursor: pointer; }

label {
  display: block; font-size: 13px; font-weight: 500;
  color: var(--muted); margin-bottom: 5px;
}

.field { margin-bottom: 14px; }
.field-row { display: flex; gap: 8px; }
.field-row > * { flex: 1; }

/* ── Cards ── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.card-body { padding: 1.25rem; }
.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  padding: 3px 9px; border-radius: 99px;
  text-transform: uppercase;
}
.badge-green  { background: var(--accent-light); color: var(--accent); }
.badge-gray   { background: #EDEBE7; color: var(--muted); }
.badge-blue   { background: var(--info-light); color: var(--info); }
.badge-orange { background: var(--warn-light); color: var(--warn); }
.badge-red    { background: var(--danger-light); color: var(--danger); }

/* ── Toast ── */
#toast {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--text); color: white;
  padding: 11px 20px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1), opacity 0.2s;
  opacity: 0; z-index: 999; white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
#toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
#toast.error { background: var(--danger); }
#toast.success { background: var(--accent); }

/* ── Spinner ── */
.spinner {
  width: 22px; height: 22px;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-center { display: flex; flex-direction: column; align-items: center; gap: 1rem; padding: 3rem 1rem; color: var(--muted); font-size: 14px; }

/* ── Utils ── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.text-muted { color: var(--muted); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.w-full { width: 100%; }
.hidden { display: none !important; }
