/* ── Reset & Base ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ── Page Header ── */
.page-header {
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.page-header h1 svg {
  width: 28px;
  height: 28px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* ── Theme Toggle ── */
.theme-toggle {
  background: none;
  border: 2px solid var(--primary-foreground);
  color: var(--primary-foreground);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 2.2rem;
}

.theme-toggle:hover {
  background: var(--primary-foreground);
  color: var(--primary);
  transform: rotate(20deg);
}

/* ── Sub Header (Tabs) ── */
.sub-header {
  background: var(--card);
  border-bottom: 2px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 0;
  box-shadow: var(--shadow-xs);
}

.sub-header .tab {
  padding: 0.85rem 1.5rem;
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--muted-foreground);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  font-family: var(--font-sans);
}

.sub-header .tab:hover {
  color: var(--primary);
}

.sub-header .tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.sub-header .tab-separator {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 0.25rem;
}

/* ── Main Layout ── */
.main-layoutCoventWithFinancement {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 0;
  min-height: calc(100vh - 75px);
}

/* ── Sidebar ── */
.sidebar {
  /* background: var(--sidebar); */
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow-y: auto;
  max-height: calc(100vh - 75px);
  position: sticky;
  /* top: 120px; */
}

/* ── Search Bar ── */
.search-bar {
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border: 2px solid var(--border);
  border-radius: var(--tv-radius);
  background: var(--card);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 1.9rem;
  transition: all 0.3s ease;
  outline: none;
}

.search-bar input:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px oklch(0.5547 0.2503 297.0156 / 0.15);
}

.search-bar .search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-foreground);
  font-size: 2.1rem;
  pointer-events: none;
}

/* ── Filter Panel ── */
.filter-panel {
  /* background: var(--sidebar-ring); */
  border-radius: var(--tv-radius);
  box-shadow: var(--shadow-sm);
}

.filter-panel-header {
  /* background: var(--sidebar-ring); */
  color: var(--primary-foreground);
  border-radius: var(--tv-radius);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.85rem;
  transition: background 0.3s ease;
  user-select: none;
}

.filter-panel-header:hover {
  opacity: 0.92;
}

.filter-panel-header svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.filter-panel-header.open svg {
  transform: rotate(90deg);
}

.filter-panel-body {
  padding: 0 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  opacity: 0;
  visibility: hidden;
  border: none;
  margin: 0;
  background-color: var(--background);
  color: var(--foreground);
  border: 1px solid var(--muted);
}

.filter-panel-body.open {
  max-height: 1200px;
  padding: 1.5rem;
  opacity: 1;
  visibility: visible;
}

.filterLabel {
  display: block;
  font-weight: 500;
  font-size: 1.35rem;
  color: var(--tv-text-muted);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-group select,
.filter-group input[type="text"] {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
  color: #1f2937;
  font-family: var(--font-sans);
  font-size: 1.85rem;
  outline: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.filter-group select:focus,
.filter-group input[type="text"]:focus {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-group select option {
  background: #ffffff;
  color: #1f2937;
  padding: 0.75rem;
  margin: 0.25rem 0;
  border-radius: 6px;
}

.filter-group select option:hover {
  background: #e0e7ff;
  color: #3b82f6;
}

.filter-group select option:checked {
  background: linear-gradient(#e0e7ff, #e0e7ff);
  background-color: #e0e7ff;
  color: #3b82f6;
}

/* Checkbox filters */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 1.85rem;
  color: #374151;
  padding: 0;
  line-height: 1;
  background: transparent;
  border: none;
  border-radius: 0;
  transition: all 0.3s ease;
}

.checkbox-item:hover {
  border-color: transparent;
  background: transparent;
  color: var(--accent);
}

.checkbox-item input[type="checkbox"] {
  width: 22px;
  height: 22px;
  min-width: 22px;
  flex-shrink: 0;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: #ffffff;
  transition: all 0.3s ease;
}

.checkbox-item input[type="checkbox"]:hover {
  border-color: var(--accent);
}

.checkbox-item input[type="checkbox"]:checked {
  background-color: var(--accent);
  border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M13.3 3.3L5.8 11 2.7 8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px;
}

.checkbox-item span {
  transition: color 0.2s ease;
  line-height: 1.2;
  font-weight: 400;
  color: var(--card-foreground);
}

.checkbox-item span:hover {
  color: var(--accent);
}

.checkbox-item input[type="checkbox"]:checked + span {
  color: var(--card-foreground);
  font-weight: 500;
}

/* ── Filter Apply Button ── */
.btn-regenerate {
  width: 100%;
  padding: 1.7rem 1rem;
  background: var(--accent);
  color: var(--accent-foreground);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-sm);
}

.btn-regenerate:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  filter: brightness(1.1);
}

.btn-regenerate:active {
  transform: translateY(0);
}

.btn-regenerate svg {
  width: 18px;
  height: 18px;
  transition: transform 0.4s ease;
}

.btn-regenerate:hover svg {
  transform: rotate(180deg);
}

/* ── Action Buttons ── */
.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.btn-action {
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: var(--tv-radius);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: var(--shadow-sm);
}

.btn-action svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.btn-add-event {
  background: var(--chart-4);
  color: #fff;
}

.btn-add-event:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  filter: brightness(1.1);
}

.btn-stay-informed {
  background: var(--chart-4);
  color: #fff;
}btn-sta

.btn-stay-informed:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  filter: brightness(1.1);
}

.btn-stay-informed.disabled {
  background: var(--muted);
  color: var(--muted-foreground);
  cursor: not-allowed;
  opacity: 0.65;
  box-shadow: none;
}

.btn-stay-informed.disabled:hover {
  transform: none;
  box-shadow: none;
  filter: none;
}

/* ── Legend ── */
.legend-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}

.legend-card h3 {
  font-size: 1.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-foreground);
  margin-bottom: 0.75rem;
}

.legend-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.legend-item:last-child {
  margin-bottom: 0;
}

.legend-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.legend-icon.financement {
  background: var(--destructive);
  border-radius: 50%;
}

.legend-icon.evenement {
  background: var(--primary);
  border-radius: 6px;
}

.legend-info h4 {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.15rem;
}

.legend-info p {
  font-size: 1.75rem;
  color: var(--muted-foreground);
  line-height: 1.4;
}

/* ── Timeline Section ── */
.timeline-section {
  padding: 2rem 2rem 3rem;
  position: relative;
  overflow-y: auto;
  color: var(--card-foreground);
  max-height: calc(100vh - 75px);
  overflow-y: auto;
}

.timeline-header {
  text-align: center;
  margin-bottom: 2rem;
}

.timeline-header h2 {
  font-size: 2.35rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.25rem;
}

.timeline-header p {
  font-size: 1.85rem;
  color: var(--muted-foreground);
  font-style: italic;
}

/* ── View Selector ── */
.view-selector {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.view-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--muted-foreground);
  font-family: var(--font-sans);
  font-size: 1.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.view-btn svg {
  width: 18px;
  height: 18px;
}

.view-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: oklch(from var(--primary) l c h / 0.06);
}

.view-btn.active {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
  box-shadow: 0 2px 8px oklch(from var(--primary) l c h / 0.25);
}

.view-btn.active:hover {
  filter: brightness(1.1);
}

/* ── The Timeline ── */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem 0;
}

/* Central vertical line */
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--primary), transparent);
  transform: translateX(-50%);
  border-radius: 2px;
}

/* Month separator */
.timeline-month-separator {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
  position: relative;
  z-index: 2;
}

.timeline-month-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--card), transparent);
  border-radius: 1px;
}

.timeline-month-label {
  font-family: var(--font-sans);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--background);
  padding: 0.35rem 1.25rem;
  border: 2px solid var(--primary);
  border-radius: 999px;
  white-space: nowrap;
  text-transform: capitalize;
  letter-spacing: 0.03em;
  box-shadow: var(--shadow-sm);
}

/* Timeline Item */
.timeline-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2.5rem;
  position: relative;
  opacity: 0;
  animation: fadeSlideIn 0.5s ease forwards;
}

.timeline-item:nth-child(1) {
  animation-delay: 0.05s;
}

.timeline-item:nth-child(2) {
  animation-delay: 0.1s;
}

.timeline-item:nth-child(3) {
  animation-delay: 0.15s;
}

.timeline-item:nth-child(4) {
  animation-delay: 0.2s;
}

.timeline-item:nth-child(5) {
  animation-delay: 0.25s;
}

.timeline-item:nth-child(6) {
  animation-delay: 0.3s;
}

.timeline-item:nth-child(7) {
  animation-delay: 0.35s;
}

.timeline-item:nth-child(8) {
  animation-delay: 0.4s;
}

.timeline-item:nth-child(9) {
  animation-delay: 0.45s;
}

.timeline-item:nth-child(10) {
  animation-delay: 0.5s;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Left-side items */
.timeline-item.leftItem {
  flex-direction: row-reverse;
}

.timeline-item.leftItem .timeline-card {
  margin-right: 2.5rem;
}

.timeline-item.rightItem .timeline-card {
  margin-left: 2.2rem;
}

/* Timeline dot / indicator */
.timeline-indicator {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-indicator:hover {
  transform: translateX(-50%) scale(1.15);
}

.timeline-indicator.financement {
  background: var(--destructive);
  border-radius: 50%;
  box-shadow: 0 0 0 5px oklch(0.7500 0.1600 80.0000 / 0.2);
  z-index: 6;
}

.dark .timeline-indicator.financement {
  box-shadow: 0 0 0 5px oklch(0.8467 0.0833 80.0000 / 0.2);
}

.timeline-indicator.evenement {
  background: var(--primary);
  border-radius: 8px;
  box-shadow: 0 0 0 5px oklch(0.3355 0.0530 265.0000 / 0.2);
}

.dark .timeline-indicator.evenement {
  box-shadow: 0 0 0 5px oklch(0.7000 0.0500 270.0000 / 0.2);
}

.timeline-indicator svg {
  width: 22px;
  height: 22px;
  color: #fff;
}

/* Timeline Card */
.timeline-card {
  width: calc(50% - 2.5rem);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  cursor: default;
  position: relative;
}


/* Bell icon top-left of timeline card */
.btn-card-bell {
  position: absolute;
  margin: 10px;
  width: 28px;
  height: 28px;
  padding: 4px;
  border: none;
  border-radius: 50%;
  background: var(--muted);
  color: var(--muted-foreground);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  z-index: 2;
  box-shadow: var(--shadow-2xs);
}

.list-item-bell .btn-card-bell{
  position: relative;
}

.btn-card-bell svg {
  width: 16px;
  height: 16px;
}

.btn-card-bell:hover {
  background: var(--primary);
  color: var(--primary-foreground);
  transform: scale(1.15);
  box-shadow: var(--shadow-sm);
}

.btn-card-bell.notified {
  background: var(--chart-4);
  color: #fff;
}

.btn-card-bell.notified:hover {
  filter: brightness(1.15);
  transform: scale(1.15);
}

.leftItem .btn-card-bell {
  left: 90%;
  right: auto;
}

.rightItem .btn-card-bell {
  right: 10%;
  left: auto;
}

/* Adjust right-aligned cards: bell goes top-right */
.timeline-item.left .btn-card-bell {
  left: auto;
  right: 0.5rem;
}

/* Timeline card thumbnail */
.timeline-card-thumb {
  width: 100%;
  height: 120px;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  margin: -1rem -1.25rem 0.75rem -1.25rem;
  width: calc(100% + 2.5rem);
}

.timeline-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.timeline-card-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--chart-4), var(--chart-1));
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-card-thumb-placeholder.financement{
  background: linear-gradient(135deg, var(--destructive), var(--destructive-foreground));
}


.timeline-card-thumb-placeholder svg {
  width: 36px;
  height: 36px;
  color: black;
  opacity: 0.6;
}

.timeline-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--ring);
}

.timeline-card .card-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 1.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.timeline-card .card-badge.financement {
  background: linear-gradient(135deg, var(--destructive), var(--primary));
  color: var(--accent-foreground);
}

.timeline-card .card-badge.evenement {
  background: var(--muted);
  color: var(--muted-foreground);
}

.timeline-card h3 {
  padding-top: 1rem;
  font-size: 1.95rem;
  font-weight: 700;
  color: var(--card-foreground);
  margin: 0;
  line-height: 1.3;
}


.timeline-card .card-date {
  font-size: 1.78rem;
  color: var(--card-foreground);
  font-weight: 500;
  margin-bottom: 0.4rem;
  align-items: center;
  gap: 0.3rem;
}


.timeline-card p {
  font-size: 1.82rem;
  color: var(--card-foreground);
  line-height: 1.5;
}

.timeline-card .card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.6rem;
}

.timeline-card .card-tags .tag {
  font-size: 1.7rem;
  font-weight: 500;
  padding: 0.15rem 0.5rem;
  background: var(--accent);
  background: linear-gradient(135deg, var(--destructive), var(--primary));
  border-radius: 999px;
  transition: background 0.2s ease;
}

/* .timeline-card .card-tags .tag:hover {
  background: var(--secondary);
} */

/* Card organizers */
.timeline-card .card-organizers {
  font-size: 1.78rem;
  color: var(--card-foreground);
  line-height: 1.4;
}

.timeline-card .card-organizers strong {
  color: var(--card-foreground);
  font-weight: 600;
}

/* Card status badge */
.timeline-card .card-status {
  display: inline-flex;
  font-size: 1.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  margin-left: 0.4rem;
}

.timeline-card .card-status.passe {
  background: oklch(0.55 0.15 20 / 0.15);
  color: oklch(0.55 0.2 20);
}

.timeline-card .card-status.en_cours {
  background: oklch(0.65 0.18 145 / 0.15);
  color: oklch(0.45 0.18 145);
}

.timeline-card .card-status.futur {
  background: oklch(0.65 0.15 235 / 0.15);
  color: oklch(0.5 0.15 235);
}


/* Financement amount */
.timeline-card .card-amount {
  font-size: 2.3rem;
  font-weight: 800;
  color: var(--destructive);
  margin: 0.3rem 0 0.2rem;
  letter-spacing: -0.02em;
}

/* Date indicator on the opposite side */
.timeline-date-label {
  position: absolute;
  top: 0.25rem;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}

.timeline-item.leftItem .timeline-date-label {
  left: calc(50% + 2.5rem);
}

.timeline-item.rightItem .timeline-date-label {
  right: calc(50% + 2.5rem);
  text-align: right;
}

/* ── Empty State ── */
.timeline-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted-foreground);
}

.timeline-empty svg {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.timeline-empty h3 {
  font-size: 2.1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.timeline-empty p {
  font-size: 1.85rem;
}


/* ── Responsive ── */
@media (max-width: 900px) {
  .main-layoutCoventWithFinancement {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    top: 0;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--sidebar-border);
  }

  .timeline-item.leftItem,
  .timeline-item.rightItem {
    flex-direction: row;
  }

  .timeline::before {
    left: 22px;
  }

  .timeline-indicator {
    left: 22px;
  }

  .timeline-item.leftItem .timeline-card,
  .timeline-item.rightItem .timeline-card {
    width: calc(100% - 60px);
    margin-left: 3.5rem;
    margin-right: 0;
    text-align: left;
  }

  .timeline-item.leftItem .timeline-date-label,
  .timeline-item.rightItem .timeline-date-label {
    left: 3.5rem;
    right: auto;
    text-align: left;
    top: -1.25rem;
  }
}

@media (max-width: 600px) {
  .page-header {
    padding: 1rem;
  }

  .page-header h1 {
    font-size: 2.15rem;
  }

  .sub-header {
    padding: 0 0.75rem;
    overflow-x: auto;
  }

  .sub-header .tab {
    padding: 0.75rem 1rem;
    font-size: 1.8rem;
    white-space: nowrap;
  }

  .sidebar {
    padding: 1rem;
  }

  .timeline-section {
    padding: 1.25rem 1rem;
  }

  .timeline-card {
    padding: 0.75rem 1rem;
  }
}

/* ── Loading spinner for regeneration ── */
.loading-overlay {
  position: absolute;
  inset: 0;
  background: oklch(from var(--background) l c h / 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.loading-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--background);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted-foreground);
}

/* ── Add event ── */
.modal-boostrap-create-event {
  background: rgba(0, 0, 0, 0.8);
}

 
.modal-boostrap-create-event .modal-body,.modal-footer{
  background-color: var(--muted);
}
	

.modal-boostrap-create-event .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-bottom: 0;
  background-color: #e5e5e5;
  position: relative;
  padding-bottom: 15px;
}

.modal-boostrap-create-event .modal-header h5{
  color: white;
  font-size: 20px;

}

.modal-boostrap-create-event .modal-content {
  background: var(--background) !important;
  padding: 10px;
}

.modal-boostrap-create-event .modal-content .container {
  background: var(--background) !important;
  padding: 10px;
}

.modal-boostrap-create-event .modal-header {
  background-color: var(--muted) !important
}

.modal-boostrap-create-event .modal-header button.close {
  position: absolute;
  right: 15px;
  top: 18px;
  opacity: .75;
}

.modal-boostrap-create-event .modal-header::before,
.modal-boostrap-create-event .modal-header::after {
  content: none;
}

.modal-boostrap-create-event .modal-header .tab-item {
  margin: 2px 5px 0px 5px;
  padding-bottom: 10px;
  cursor: pointer;
  text-transform: none;
  text-align: center;
  font-size: 17px;
  text-decoration: none;
}

.modal-boostrap-create-event .modal-body .link-to-doc-content {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.modal-boostrap-create-event .modal-body a.link-to-doc {
  background-color: #1890FF;
  padding: 8px 15px;
  font-weight: bold;
  color: white;
  border-top-right-radius: 10px;
  border-top-left-radius: 10px;
  font-size: 1.38rem;
}

.modal-boostrap-create-event .modal-body a.link-to-doc i {
  margin-right: 5px;
}

.modal-boostrap-create-event .modal-header a:hover,
.modal-boostrap-create-event .modal-header a.active {
  border-bottom: 1px solid #f3aa31;
}

.modal-boostrap-create-event .btn-submit {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.modal-boostrap-create-event .btn-submit p {
  font-size: 13px;
  text-align: justify;
  font-weight: 400;
  flex: 0.70;
}

.modal-boostrap-create-event .btn-submit p a,
.modal-boostrap-create-event .btn-submit p b {
  font-weight: bold;
}

.modal-boostrap-create-event .btn-submit p a {
  color: var(--primary);
}

.modal-boostrap-create-event #tabQuestion h5 {
  text-align: center;
  font-size: 14px;
  text-transform: none;
  font-weight: 500;
}

.modal-boostrap-create-event #tabQuestion h5 a {
  font-weight: bold;
}

.modal-boostrap-create-event .btn-submit button {
  min-width: 100px;
}

.modal-boostrap-create-event .form-group textarea {
  height: 150px;
}

.modal-boostrap-create-event .form-group .check-value {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.modal-boostrap-create-event .form-group .check-value .form-check:not(:first-child) {
  margin-left: 10px;
}


.inputContainerCoEvent {
  background-color: var(--card);
  color : var(--card-foreground) ;
  padding: 10px 20px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
}

.inputContainerCoEvent  textarea{
  background-color: var(--card) ;
  color : var(--card-foreground) ;
}

.inputContainerCoEvent  .select2-container-multi .select2-choices .select2-search-field input  {
  background-color: var(--card) !important ;
  color : var(--card-foreground) ;
}

.inputContainerCoEvent  .select2-container-multi .select2-choices{
  background-color: var(--card) !important ;
}


.inputContainerCoEvent  input {
  background-color: var(--card) ;
  color : var(--card-foreground) ;
}

.inputContainerCoEvent  select {
  background-color: var(--card) !important;
  color : var(--card-foreground) !important;
}

.inputContainerCoEvent  textarea{
  height: 80px ;
}

.inputContainerCoEvent .select2-container,.select2-choices {
  background-color: var(--card) ;
  color : var(--card-foreground) ;
  z-index: 999999;
}

.event-card {
    background-color: #2c2c2e;
    border-radius: 8px;
    padding: 5px;
    color: white ;
    justify-content: space-between;
    align-items: center;
    box-shadow:  var(--shadow-lg);
}

.btn-create-event{
  background-color: var(--primary);
  color: var(--primary-foreground);
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
}

.event-image img {
  object-fit: cover;
  border-radius: 10px;
}

#openModalCreateEvent .img-uploaded{
  width: 100% !important;
}

#openModalCreateEvent .btn{
  margin: auto;
}

#openModalCreateEvent .btn-delete-img {
  background-color: red !important;
}

/* ── Add event ── */

.steps-coeventWithFinancement {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.step-coeventWithFinancement {
  width: 30px;
  height: 6px;
  border-radius: 6px;
  background: var(--muted);
}

.step-coeventWithFinancement.active {
  background: var(--primary);
}

.step-content-coeventWithFinancement {
  display: none;
}

.step-content-coeventWithFinancement.active {
  display: block;
}

.btn-next-coeventWithFinancement,
.btn-submit-coeventWithFinancement,
.btn-prev-coeventWithFinancement,
.btn-update-coeventWithFinancement {
  margin-top: 24px;
  padding: 12px 18px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;

}

.btn-next-coeventWithFinancement,
.btn-submit-coeventWithFinancement,
.btn-update-coeventWithFinancement {
  background: var(--primary);
  color: var(--primary-foreground);
  float: right;
}

.btn-prev-coeventWithFinancement {
  background: var(--primary);
  color: var(--primary-foreground);
}

.actions1-coeventWithFinancement {
  display: flex;
  justify-content: end;
  margin: 10px;
}

.actions2-coeventWithFinancement , .actions3-coeventWithFinancement {
  display: flex;
  justify-content: space-between;
  margin: 10px;
}

.coeventWithFinancementtags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.coeventWithFinancementtag {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--secondary);
  color: var(--secondary-foreground);
  white-space: nowrap;
}

.modal-step-btn{
  display: none;
}

/* ── Card Header Row (badges + actions) ── */

.card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.25rem;
  margin-top: 0.6rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.timeline-card:hover .card-actions,
.list-item-card:hover .card-actions {
  opacity: 1;
}

.card-action-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.card-action-btn svg {
  width: 15px;
  height: 15px;
}

.card-action-btn.btn-edit:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: oklch(from var(--primary) l c h / 0.08);
}

.card-action-btn.btn-delete:hover {
  border-color: oklch(0.55 0.2 20);
  color: oklch(0.55 0.2 20);
  background: oklch(0.55 0.2 20 / 0.08);
}

.card-action-btn.btn-validate.validated {
  border-color: oklch(0.55 0.18 145);
  color: oklch(0.55 0.18 145);
  background: oklch(0.55 0.18 145 / 0.12);
}

.card-action-btn.btn-validate.validated:hover {
  background: oklch(0.55 0.18 145 / 0.22);
}

.card-action-btn.btn-validate.not-validated {
  border-color: oklch(0.65 0.18 50);
  color: oklch(0.65 0.18 50);
  background: oklch(0.65 0.18 50 / 0.1);
}

.card-action-btn.btn-validate.not-validated:hover {
  background: oklch(0.65 0.18 50 / 0.2);
}


/* ── Danger Button ── */
.btn-modal.danger {
  background: oklch(0.55 0.22 25);
  color: #fff;
}

.btn-modal.danger:hover {
  filter: brightness(1.15);
}

/* ── Modal Small ── */
.modal.modal-sm {
  max-width: 420px;
}

/* ── Delete Confirm Text ── */
.delete-confirm-text {
  font-size: 0.9rem;
  color: var(--foreground);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.delete-confirm-text strong {
  color: oklch(0.55 0.2 20);
}

/* ── List View ── */
.list-view {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 80%;
  margin: 0 auto;
  padding: 1rem 0;
}

.list-item {
  display: flex;
  align-items: stretch;
  gap: 0;
  opacity: 0;
  animation: fadeSlideIn 0.4s ease forwards;
  background: var(--background);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:  var(--shadow-lg);
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}

.list-item:hover {
  box-shadow:  var(--shadow-xl);
  transform: translateY(-2px);
}

/* ── Thumbnail ── */
.list-item-thumb {
  width: 250px;
  height: 250px;
  min-width: 130px;
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--background);
  padding: 0.75rem;
  flex-shrink: 0;
}

.list-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.list-item-thumb-placeholder {
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, var(--primary), var(--primary));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:  var(--shadow-lg);
}

.list-item-thumb-placeholder.is-financement {
  background: linear-gradient(135deg, var(--destructive), oklch(from var(--destructive) l c h / 0.8)) !important;
}

.list-item-thumb-placeholder svg {
  width: 48px;
  height: 48px;
  color: var(--primary-foreground);
}

list-item-thumb-placeholder.is-financement svg {
    color: var(--destructive-foreground) !important;
}

/* ── Content ── */
.list-item-content {
  flex: 1;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.list-card-top-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.list-item .card-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 1.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  cursor: pointer;
}

.list-item .card-badge.evenement {
  background: var(--muted);
  color: var(--muted-foreground);
}

.list-item .card-badge.financement {
  background: var(--accent);
  background: linear-gradient(135deg, var(--destructive), var(--primary));
}

.list-card-star {
  font-size: 1.85rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.list-card-star:hover {
  transform: scale(1.2);
}

.list-card-top-row .card-action-btn {
  width: 24px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--card-foreground);
  transition: color 0.2s ease;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.list-card-top-row .card-action-btn:hover {
  color: oklch(0.85 0.05 250);
}

.list-card-top-row .card-action-btn svg {
  width: 16px;
  height: 16px;
}

.list-item-content h3 {
  padding-top: 1rem;
  font-size: 1.95rem;
  font-weight: 700;
  color: var(--card-foreground);
  margin: 0;
  line-height: 1.3;
}

.list-card-desc , .card-organizers{
  font-size: 1.5rem;
  color: var(--card-foreground);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list-card-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 1.75rem;
  color: var(--card-foreground);
}


.list-card-tags {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin-top: 0.15rem;
}

.list-card-tags svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--accent);
}

.list-card-tag {
  font-size: 1.65rem;
  font-weight: 500;
  padding: 0.12rem 0.5rem;
  background: var(--accent);
  color: var(--accent-foreground);
  border-radius: 999px;
}

/* ── S'inscrire Button ── */
.list-item-action {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.25rem;
  flex-shrink: 0;
}



.btn-inscrire {
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.25rem;
  background: linear-gradient(135deg, var(--destructive), var(--primary));
  color: var(--accent-foreground);
  border: none;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 1.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow:  var(--shadow-lg);
}

.btn-inscrire:hover {
  transform: translateY(-2px);
  box-shadow:  var(--shadow-xl);
  filter: brightness(1.1);
  text-decoration: none !important;
}

.btn-inscrire:active {
  transform: translateY(0);
}

.btn-inscrire span {
  font-size: 2.00rem;
  transition: transform 0.2s ease;
}

.btn-inscrire:hover span {
  transform: translateX(3px);
}

#openModalCreateEvent .img-uploaded{
    width: 100% !important;
  }

  #openModalCreateEvent .btn{
    margin: auto;
  }

  #openModalCreateEvent .btn-delete-img {
    background-color: red !important;
  }

  .coeventWithFinancementevent-card {
  max-width: 860px;
  background: var(--background);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--card-foreground);
  box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}

.coeventWithFinancementevent-image {
    position: relative;
}

.coeventWithFinancementevent-image img {
    width: 100%;
    height: 200px;
    display: block;
    object-fit: contain;
}

.coeventWithFinancementbadge,
.coeventWithFinancementfeatured {
    position: absolute;
    top: 16px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.coeventWithFinancementbadge {
    left: 16px;
    background: var(--primary);
    color: var(--primary-foreground);
    font-size: larger;
}

.coeventWithFinancementfeatured {
    right: 16px;
    background: var(--muted);
    color: var(--muted-foreground);
    font-size: larger;
}

.coeventWithFinancementevent-content {
    padding-left: 28px;
    padding-right: 28px;
    padding-bottom: 28px;
}

.coeventWithFinancementtitle {
    font-size: 2.6rem;
    margin-bottom: 10px;
    color: var(--card-foreground) !important;
}

.coeventWithFinancementdescription {
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.6;
}

.coeventWithFinancementinfos {
    display: grid;
    gap: 10px;
    margin-bottom: 28px;
}

.coeventWithFinancementinfo {
    display: flex;
    gap: 12px;
    align-items: center;
}

.coeventWithFinancementinfo .icon {
    font-size: 1.4rem;
    color: var(--secondary);
}

.coeventWithFinancementinfo small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.coeventWithFinancementactions {
    display: flex;
    gap: 14px;
    align-items: center;
}

.coeventWithFinancementbtn-primary {
    flex: 1;
    background: var(--primary);
    color: var(--primary-foreground);
    border: none;
    border-radius: 14px;
    padding: 14px 18px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.coeventWithFinancementbtn-primary:hover {
    transform: translateY(-2px);
    color: var(--primary-foreground) !important;
}

.coeventWithFinancementbtn-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    border: 1.5px solid var(--border);
    background: var(--card);
    color: var(--card-foreground);
    cursor: pointer;
    transition: var(--transition);
}

.coeventWithFinancementbtn-icon:hover {
    background: var(--primary);
    color: var(--primary-foreground);
}

.modalStayInformed .form-group {
  margin-bottom: 1rem;
}

.modalStayInformed .form-group label {
  display: block;
  font-size: 1.80rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.modalStayInformed .form-group input,
.modalStayInformed .form-group select,
.modalStayInformed .form-group textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 1.85rem;
  outline: none;
  transition: border-color 0.3s ease;
}

.modalStayInformed .form-group input:focus,
.modalStayInformed .form-group select:focus,
.modalStayInformed .form-group textarea:focus {
  border-color: var(--ring);
}

.modalStayInformed .form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.modalStayInformed .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.modalStayInformed .btn-modal {
  padding: 0.6rem 1.25rem;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modalStayInformed .btn-modal.primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.modalStayInformed .btn-modal.primary:hover {
  filter: brightness(1.1);
}

.modalStayInformed .btn-modal.secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
}

.modalStayInformed .btn-modal.secondary:hover {
  background: var(--muted);
}

.items-center svg{
  vertical-align: bottom;
}

.card-organizers , .list-card-meta , .list-card-desc , .card-date {
  padding-top: 1rem;
}

/* Loader btn */
.btn-update-coeventWithFinancement.loading , .btn-submit-coeventWithFinancement.loading {
  pointer-events: none;
  opacity: .7;
}

.btn-update-coeventWithFinancement .btn-loader  , .btn-submit-coeventWithFinancement .btn-loader {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.8s linear infinite;
  display: none;
}

.btn-update-coeventWithFinancement.loading .btn-loader , .btn-submit-coeventWithFinancement.loading .btn-loader {
  display: inline-block;
}

.btn-update-coeventWithFinancement.loading .btn-label , .btn-submit-coeventWithFinancement.loading .btn-label {
  display: none;
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}
