:root {
  --primary: #8B0000;
  --primary-light: #a50000;
}

/* Override Bootstrap primary color */
.bg-primary, .btn-primary, .navbar.bg-primary { background-color: var(--primary) !important; }
.btn-primary:hover { background-color: var(--primary-light) !important; }
.text-primary { color: var(--primary) !important; }
.border-primary { border-color: var(--primary) !important; }
.btn-outline-primary { color: var(--primary) !important; border-color: var(--primary) !important; }
.btn-outline-primary:hover { background-color: var(--primary) !important; color: #fff !important; }
.progress-bar { background-color: var(--primary) !important; }

/* Layout */
body { min-height: 100vh; display: flex; flex-direction: column; background-color: #f4f5f7; }
main { flex: 1; }

/* Event cards */
.event-card {
  transition: transform .15s ease, box-shadow .15s ease;
  border-left: 4px solid transparent !important;
}
.event-card:hover { transform: translateY(-2px); box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.12) !important; }
.event-card.prestation  { border-left-color: #dc3545 !important; }
.event-card.repetition  { border-left-color: #0d6efd !important; }
.event-header-card.prestation  { border-left: 5px solid #dc3545 !important; }
.event-header-card.repetition  { border-left: 5px solid #0d6efd !important; }

/* Date bloc */
.date-bloc {
  min-width: 52px;
  border-right: 1px solid #dee2e6;
  padding-right: 1rem;
  margin-right: .5rem;
}

/* Navbar */
.navbar { box-shadow: 0 2px 8px rgba(0,0,0,.15); }

/* Cards */
.card { border-radius: .75rem !important; }
.card-header { border-radius: .75rem .75rem 0 0 !important; font-size: .95rem; }

/* Forms */
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 .25rem rgba(139,0,0,.2);
}

/* Badges */
.badge { font-weight: 500; font-size: .78em; }

/* Tables */
.table th { font-weight: 600; font-size: .875rem; letter-spacing: .02em; }

/* Utility */
.cursor-pointer { cursor: pointer; }
.wave { display: inline-block; animation: wave .8s ease-in-out; }
@keyframes wave { 0%,100% { transform: rotate(0deg); } 50% { transform: rotate(20deg); } }

/* Mobile bottom padding for iOS safe area */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  body { padding-bottom: env(safe-area-inset-bottom); }
}

/* PWA install banner */
#installBanner {
  position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%);
  z-index: 9999; min-width: 280px; max-width: 90vw;
  animation: slideUp .3s ease;
}
@keyframes slideUp { from { transform: translateX(-50%) translateY(100px); opacity:0; } to { transform: translateX(-50%) translateY(0); opacity:1; } }

/* Responsive tweaks */
@media (max-width: 576px) {
  .container { padding-left: 1rem; padding-right: 1rem; }
  h1.h3 { font-size: 1.3rem; }
}
