/* Helvo — Design System CSS v2 */
/* À compiler avec Tailwind CLI en prod */
/* En dev, utiliser le CDN Tailwind Play CDN avec la config custom */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Syne:wght@700;800&display=swap');

:root {
  /* Palette v2 — suisse sobre */
  --color-brand:      #1A1A2E;   /* navy profond */
  --color-brand-light:#2D2D4E;
  --color-swiss-red:  #D42B2B;   /* rouge suisse plus digne */
  --color-stone:      #F7F6F4;   /* gris pierre — sections alternées */
  --color-border:     #E5E5EA;   /* bordures légères */
  --color-text:       #1C1C1E;   /* corps principal */
  --color-muted:      #6E6E73;   /* texte secondaire */
  --color-success:    #2D6A4F;
  --color-warning:    #B45309;
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
  background: #ffffff;
}

/* Headings premium — Syne pour les grands titres publics uniquement */
.heading-display {
  font-family: 'Syne', 'Inter', sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Swiss red alias */
.text-swiss-red  { color: var(--color-swiss-red); }
.bg-swiss-red    { background: var(--color-swiss-red); }
.text-brand      { color: var(--color-brand); }
.bg-brand        { background: var(--color-brand); }
.border-brand    { border-color: var(--color-brand); }

/* Navigation */
.nav-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: #6C757D;
  transition: background 0.15s, color 0.15s;
}

.nav-icon-btn:hover {
  background: #F8F9FA;
  color: var(--color-brand);
}

.nav-icon-btn.active {
  color: var(--color-brand);
  border-bottom: 2px solid var(--color-brand);
}

/* Dropdown items */
.dropdown-item {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: #374151;
  transition: background 0.1s;
}

.dropdown-item:hover {
  background: #F9FAFB;
}

/* Cards */
.card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Boutons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  background: var(--color-brand);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-primary:hover {
  background: var(--color-brand-light);
}

.btn-danger {
  background: var(--color-swiss-red);
}

.btn-danger:hover {
  background: #c62d38;
}

.btn-ghost {
  background: transparent;
  color: var(--color-brand);
  border: 1px solid var(--color-border);
}

.btn-ghost:hover {
  background: #F8F9FA;
}

/* Avatars */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-brand);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.avatar-sm { width: 32px; height: 32px; font-size: 0.75rem; }
.avatar-md { width: 48px; height: 48px; font-size: 1rem; }
.avatar-lg { width: 80px; height: 80px; font-size: 1.5rem; }
.avatar-xl { width: 120px; height: 120px; font-size: 2rem; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-blue { background: #EFF6FF; color: #1E40AF; }
.badge-red { background: #FEF2F2; color: #B91C1C; }
.badge-green { background: #F0FDF4; color: #166534; }
.badge-gray { background: #F9FAFB; color: #374151; }
.badge-verified { background: #EFF6FF; color: #1D4ED8; }

/* Feed post card */
.post-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.75rem;
}

/* Sidebar */
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #374151;
  transition: background 0.1s;
}

.sidebar-item:hover {
  background: #F3F4F6;
}

.sidebar-item.active {
  background: #EEF2FF;
  color: var(--color-brand);
  font-weight: 500;
}

/* Layout feed 3 colonnes */
.feed-layout {
  display: grid;
  grid-template-columns: 260px 1fr 320px;
  gap: 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1rem 0;
  padding-top: calc(56px + 1rem);
}

@media (max-width: 1024px) {
  .feed-layout {
    grid-template-columns: 260px 1fr;
  }
  .feed-right-col { display: none; }
}

@media (max-width: 768px) {
  .feed-layout {
    grid-template-columns: 1fr;
  }
  .feed-left-col { display: none; }
}

/* Line clamp */
.line-clamp-1 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.line-clamp-2 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.line-clamp-3 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }

/* Composer */
.post-composer {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}

/* Réactions */
.reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  color: #6C757D;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}

.reaction-btn:hover {
  background: #F3F4F6;
  color: var(--color-brand);
}

.reaction-btn.active {
  color: var(--color-brand);
  background: #EEF2FF;
  font-weight: 500;
}

/* Event card */
.event-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.1s;
}

.event-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

/* Swiss color accent */
.text-brand { color: var(--color-brand); }
.text-swiss-red { color: var(--color-swiss-red); }
.bg-brand { background: var(--color-brand); }
.bg-swiss-red { background: var(--color-swiss-red); }
.border-brand { border-color: var(--color-brand); }

/* Scrollbar invisible */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* Transitions HTMX */
.htmx-indicator {
  display: none;
}
.htmx-request .htmx-indicator {
  display: block;
}
