/* ══════════════════════════════════════════════════════════════
   COMPOSANTS DE BASE & UTILITAIRES (LIGHT THEME)
══════════════════════════════════════════════════════════════ */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.btn {
  border: none;
  border-radius: 12px;
  padding: 14px 20px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .6px;
  cursor: pointer;
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all .15s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-appearance: none;
  user-select: none;
}
.btn:active {
  transform: scale(.97);
}
.btn-primary {
  background: linear-gradient(135deg, var(--red), var(--red2));
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(225, 29, 72, .28);
}
.btn-primary:hover {
  box-shadow: 0 6px 18px rgba(225, 29, 72, .38);
  filter: brightness(1.04);
}
.btn-ghost {
  background: #ffffff;
  border: 1.5px solid var(--border);
  color: var(--sub);
  box-shadow: var(--shadow-xs);
}
.btn-ghost:hover {
  background: var(--card2);
  border-color: var(--border2);
  color: var(--text);
}
.btn-sm {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 9px;
}

.inp {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: 11px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 15px;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  width: 100%;
  transition: all .2s ease;
  min-height: 48px;
  box-shadow: var(--shadow-xs);
}
.inp:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, .12);
  background: #ffffff;
}
.inp::placeholder {
  color: var(--dim);
}

.lbl {
  font-size: 11px;
  color: var(--sub);
  font-weight: 700;
  letter-spacing: .6px;
  margin-bottom: 5px;
  display: block;
  text-transform: uppercase;
}

.fg {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ═══ BADGES D'ÉTAT CLAIRS & PASTELS ═══ */
.badge {
  padding: 3px 10px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: .2px;
}
.b-ok {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-border);
}
.b-act {
  background: var(--red-light);
  color: var(--red);
  border: 1px solid rgba(225, 29, 72, .25);
}
.b-warn {
  background: var(--yellow-bg);
  color: var(--yellow);
  border: 1px solid var(--yellow-border);
}
.b-wait {
  background: var(--card2);
  color: var(--sub);
  border: 1px solid var(--border);
}
.b-orange {
  background: var(--orange-bg);
  color: var(--orange);
  border: 1px solid var(--orange-border);
}

/* ═══ BOÎTES DE STATISTIQUES ═══ */
.sbox {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 10px;
  text-align: center;
  box-shadow: var(--shadow-xs);
  transition: transform .15s ease, box-shadow .15s ease;
}
.sbox:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.sval {
  font-family: 'Rajdhani', sans-serif;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}
.slbl {
  font-size: 11px;
  color: var(--sub);
  margin-top: 5px;
  font-weight: 600;
}

/* ═══ AVATAR INITIALES ═══ */
.av {
  border-radius: 50%;
  background: var(--red-light);
  border: 2px solid rgba(225, 29, 72, .3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 800;
  color: var(--red);
  flex-shrink: 0;
}

.sec-lbl {
  font-size: 11px;
  color: var(--sub);
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.divider {
  height: 1px;
  background: var(--border);
  flex-shrink: 0;
  margin: 0;
}

/* ═══ NOTIFICATION TOAST ═══ */
.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + var(--sab) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: #0f172a;
  color: #ffffff;
  border-radius: 12px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transition: all .25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 999;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, .1);
  max-width: 90vw;
  text-align: center;
}
.toast.on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.ok {
  background: #064e3b;
  border-color: #059669;
  color: #a7f3d0;
}
.toast.err {
  background: #881337;
  border-color: #e11d48;
  color: #fecdd3;
}

/* ═══ ANIMATIONS & UTILITAIRES ═══ */
.spin {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0, 0, 0, .12);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.err {
  color: var(--red);
  background: var(--red-light);
  border: 1px solid rgba(225, 29, 72, .2);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  display: none;
  margin-top: 8px;
  font-weight: 600;
}
.err.on {
  display: block;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}
