:root {
  --primary: #1d4ed8; /* Blue 700 */
  --primary-light: #3b82f6; /* Blue 500 */
  --secondary: #10b981; /* Emerald 500 */
  --bg-color: #f8fafc;
  --surface: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --border-radius: 12px;
}

body.hub-page {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  padding: 0;
}

/* Hub Container */
.hub-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Hero Section */
.hub-hero {
  text-align: center;
  padding: 4rem 1rem;
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
  border-radius: var(--border-radius);
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.hub-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 60%);
  z-index: 0;
  pointer-events: none;
}

.hub-hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-main);
  position: relative;
  z-index: 1;
  letter-spacing: -0.025em;
}

.hub-hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
  position: relative;
  z-index: 1;
}

/* Search and Filters */
.hub-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  max-width: 900px;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.hub-filters input,
.hub-filters select {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: all 0.2s ease;
  flex: 1;
  min-width: 200px;
  background: var(--surface);
}

.hub-filters input:focus,
.hub-filters select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Results Grid */
.hub-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* Card */
.hub-card {
  background: var(--surface);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.hub-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

/* Inscriptions ouvertes badge */
.hub-card.premium {
  border: 2px solid #10b981; /* Emerald 500 */
  background: linear-gradient(to bottom right, #ffffff, #ecfdf5);
}

.hub-card.premium::after {
  content: 'Inscriptions ouvertes';
  position: absolute;
  top: 1.5rem;
  right: -3.5rem;
  background: #10b981;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: bold;
  padding: 0.25rem 3.5rem;
  transform: rotate(45deg);
  box-shadow: var(--shadow-sm);
}

.hub-card-type {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
  width: fit-content;
}

.type-IFAS { background: #e0e7ff; color: #3730a3; }
.type-IFAP { background: #fce7f3; color: #9d174d; }
.type-IFA { background: #dcfce7; color: #166534; }
.type-IFSI { background: #fef3c7; color: #92400e; }

.hub-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  line-height: 1.4;
  color: var(--text-main);
}

.hub-card-location {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.hub-card-location svg {
  width: 16px;
  height: 16px;
}

.hub-card-dates {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
  font-size: 0.875rem;
}

.hub-card-dates p {
  margin: 0.25rem 0;
  display: flex;
  justify-content: space-between;
}

.hub-card-dates strong {
  color: var(--text-main);
}

/* Empty State */
.hub-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem;
  color: var(--text-muted);
  background: var(--surface);
  border-radius: var(--border-radius);
  border: 1px dashed var(--border);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hub-card {
  animation: fadeIn 0.4s ease-out forwards;
}

/* Responsive */
@media (max-width: 768px) {
  .hub-hero h1 { font-size: 2rem; }
  .hub-filters { flex-direction: column; }
  .hub-filters input, .hub-filters select { width: 100%; }
}
