/**
 * Batiso Design Tokens
 * Single source of truth for all pages.
 * Typographie : Fredoka / Fredoka One
 * Palette : crème (#FAF7F2), blanc, gris chaud, orange (#E85D2C)
 */

/* Google Fonts — load once here, reference everywhere */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Fredoka+One&display=swap');

:root {
  /* ── Brand palette ─────────────────────────────── */
  --cream:       #FAF7F2;   /* page background */
  --white:       #FFFFFF;   /* card / surface */
  --warm-gray:   #F0EEE9;   /* secondary surface */
  --text:        #1A1A1A;   /* primary text */
  --text-muted:  #737373;   /* secondary text */
  --placeholder: #A3A3A3;   /* form placeholders */
  --border:      #E8E4DC;   /* borders / dividers */
  --accent:      #E85D2C;   /* primary accent — CTAs, links, badges */
  --accent-soft: #FEF2EC;   /* accent tint background */

  /* ── Semantic colours ──────────────────────────── */
  --success:     #22c55e;
  --danger:      #ef4444;
  --warning:     #f59e0b;
  --info:        #4a90d9;

  /* ── Typography ────────────────────────────────── */
  --font-display: 'Fredoka', sans-serif;
  --font-body:    'Fredoka', sans-serif;

  /* ── Spacing / shape ───────────────────────────── */
  --radius-sm:    8px;
  --radius:       12px;
  --radius-lg:    16px;
  --radius-xl:    20px;
  --radius-pill:  999px;
}

/* ── Global reset ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.2;
  letter-spacing: -0.015em;
}

/* ── Shared brand bar (topbar / header) ─────────────── */
.brand-bar {
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-logo {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: -0.02em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-logo-b {
  width: 28px; height: 28px;
  background: var(--accent);
  border-radius: 22%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-logo-b span {
  font-family: 'Fredoka One', cursive;
  font-size: 1.1rem;
  color: #fff;
  line-height: 1;
}

/* ── Shared button system ───────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-lg);
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.18s;
  text-decoration: none;
  white-space: nowrap;
  min-height: 40px;
}
.btn:hover  { opacity: 0.85; }
.btn:active { opacity: 0.75; }

/* Primary — orange fill */
.btn-primary  { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent); opacity: 0.88; }

/* Outline — white / border */
.btn-outline  {
  background: var(--white);
  border: 1.5px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* Ghost — transparent with hover fill */
.btn-ghost    { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--warm-gray); color: var(--text); }

.btn-success  { background: var(--success); color: #fff; }
.btn-danger   { background: var(--danger);  color: #fff; }
.btn-warning  { background: var(--warning); color: #fff; }

.btn-sm       { padding: 5px 12px; font-size: 0.78rem; min-height: 32px; }
.btn-lg       { padding: 13px 28px; font-size: 1rem; min-height: 48px; }

/* ── Shared card ────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px 24px;
}
.card + .card { margin-top: 16px; }

/* ── Shared badge system ────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-pending    { background: var(--accent-soft); color: var(--accent); }
.badge-confirmed  { background: var(--warm-gray);   color: var(--text); border: 1px solid var(--border); }
.badge-active     { background: var(--warm-gray);   color: var(--text); border: 1px solid var(--border); }
.badge-validate   { background: var(--accent-soft); color: var(--accent); }
.badge-done       { background: rgba(34,197,94,0.12); color: #16a34a; }
.badge-cancelled  { background: rgba(239,68,68,0.1);   color: #dc2626; }
.badge-certified  { background: var(--accent); color: var(--white); }

/* ── Shared form inputs ─────────────────────────────── */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="date"],
input[type="time"],
select,
textarea {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  padding: 10px 14px;
  font-size: 0.88rem;
  font-family: var(--font-body);
  outline: none;
  width: 100%;
  transition: border-color 0.18s;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-display);
}

/* ── Section label (overline) ───────────────────────── */
.overline {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

/* ── Avatar ─────────────────────────────────────────── */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--white);
  flex-shrink: 0;
}

/* ── Toast ──────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 20px;
  font-size: 0.88rem;
  z-index: 300;
  transition: opacity 0.3s, transform 0.3s;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}
.toast.show  { opacity: 1; transform: translateY(0); }
.toast.success { border-color: var(--success); color: #16a34a; }
.toast.error   { border-color: var(--danger);  color: #dc2626; }