/* ── CSS Variables ── */
:root {
    --tv-bg: #f4f6fb;
    --tv-card-bg: #ffffff;
    --tv-text: #1e293b;
    --tv-text-muted: #64748b;
    --tv-border: #e2e8f0;
    --tv-accent: #6366f1;
    --tv-accent-soft: rgba(99, 102, 241, 0.08);
    --tv-row-hover: rgba(99, 102, 241, 0.04);
    --tv-header-bg: #f8fafc;
    --tv-link: #6366f1;
    --tv-link-hover: #4f46e5;
    --tv-badge-bg: rgba(99, 102, 241, 0.1);
    --tv-badge-text: #6366f1;
    --tv-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --tv-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
    --tv-radius: 16px;
    --tv-radius-sm: 8px;
    --tv-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark {
    --tv-bg: #0f172a;
    --tv-card-bg: #1e293b;
    --tv-text: #e2e8f0;
    --tv-text-muted: #94a3b8;
    --tv-border: #334155;
    --tv-accent: #818cf8;
    --tv-accent-soft: rgba(129, 140, 248, 0.1);
    --tv-row-hover: rgba(129, 140, 248, 0.06);
    --tv-header-bg: #1a2332;
    --tv-link: #818cf8;
    --tv-link-hover: #a5b4fc;
    --tv-badge-bg: rgba(129, 140, 248, 0.15);
    --tv-badge-text: #a5b4fc;
    --tv-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.15);
    --tv-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.3);
}


/* ── 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-layoutFinancementIb {
  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-financement {
  background: var(--chart-4);
  color: #fff;
}

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

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

.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;
  background-color: var(--background);
  color: var(--foreground);
}

.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);
}

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

.list-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  opacity: 0;
  animation: fadeSlideIn 0.4s ease forwards;
}
/* ── 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;
}

/* 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;
  text-align: right;
}

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

/* Timeline dot / indicator */
.timeline-indicator {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  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);
}

.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;
}

.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: 999px;
  margin-bottom: 0.5rem;
}

.timeline-card .card-badge.financement {
  background: var(--accent);
  color: var(--accent-foreground);
}

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

.timeline-card h3 {
  font-size: 1.95rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.3rem;
}

.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 .card-date svg {
  width: 14px;
  height: 14px;
}

.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);
  color: var(--accent-foreground);
  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);
  margin-top: 0.4rem;
  margin-bottom: 0.2rem;
  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: 999px;
  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-layoutFinancementIb {
    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 financement ── */
.modal-boostrap-create-financement {
  background: rgba(0, 0, 0, 0.8);
}

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

.modal-boostrap-create-financement .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-financement .modal-header h5{
  color: white;
  font-size: 20px;

}

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

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

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

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

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

.modal-boostrap-create-financement .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-financement .modal-body .link-to-doc-content {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.modal-boostrap-create-financement .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-financement .modal-body a.link-to-doc i {
  margin-right: 5px;
}

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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


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

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

.inputContainerCofinancement  textarea{
  height: 80px ;
}

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

.financement-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-financement{
  background-color: var(--primary);
  color: var(--primary-foreground);
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
}

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

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

#openModalCreatefinancement .btn{
  margin: auto;
}

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

/* ── Add financement ── */

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

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

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

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

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

.btn-next-fiancementIb,
.btn-submit-fiancementIb,
.btn-prev-fiancementIb,
.btn-update-fiancementIb {
  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-fiancementIb,
.btn-submit-fiancementIb,
.btn-update-fiancementIb {
  background: var(--primary);
  color: var(--primary-foreground);
  float: right;
}

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

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

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

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

.fiancementIbtag {
  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);
}

/* ── 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: 900px;
  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: 130px;
  min-width: 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 svg {
  width: 48px;
  height: 48px;
  color: var(--primary-foreground);
}

/* ── 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: 999px;
}

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

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

.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 {
  font-size: 1.95rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
  line-height: 1.3;
}

.list-card-desc {
  font-size: 1.78rem;
  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 {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.25rem;
  background: linear-gradient(135deg, var(--accent), var(--accent));
  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);
}

.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);
}

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

  #openModalCreatefinancement .btn{
    margin: auto;
  }

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

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

.fiancementIbfinancement-image {
    position: relative;
}

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

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

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

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

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

.fiancementIbtitle {
    font-size: 1.6rem;
    margin-bottom: 10px;
}

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

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

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

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

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

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

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

.fiancementIbbtn-primary:hover {
    transform: translateY(-2px);
}

.fiancementIbbtn-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    border: none;
    background: var(--primary);
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.fiancementIbbtn-icon:hover {
    background: rgba(255,255,255,0.18);
}

/* ── Table Container ── */
.table-view-container {
    width: 100%;
    animation: tvFadeIn 0.4s ease-out;
}

@keyframes tvFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

.table-view-wrapper {
    background: var(--tv-card-bg);
    border-radius: var(--tv-radius);
    box-shadow: var(--tv-shadow);
    overflow: hidden;
    border: 1px solid var(--tv-border);
    transition: box-shadow var(--tv-transition);
    max-height: 85vh;
    overflow-y: auto;
}

.table-view-wrapper:hover {
    box-shadow: var(--tv-shadow-lg);
}

/* ── Table Header Bar ── */
.table-view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--tv-border);
    background: var(--tv-header-bg);
}

.table-view-header h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--tv-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table-view-header h3 svg {
    width: 20px;
    height: 20px;
    color: var(--tv-accent);
}

.table-view-count {
    font-family: 'Inter', sans-serif;
    font-size: 1.375rem;
    color: var(--tv-text-muted);
    background: var(--tv-accent-soft);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-weight: 500;
}

/* ── The Table ── */
.financement-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-family: 'Inter', sans-serif;
}

.financement-table thead th {
    text-align: left;
    padding: 0.875rem 1.25rem;
    font-size: 1.25rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tv-text-muted);
    background: var(--tv-header-bg);
    border-bottom: 2px solid var(--tv-border);
    position: sticky;
    top: 0;
    z-index: 1;
    white-space: nowrap;
    user-select: none;
}

.financement-table thead th:first-child {
    padding-left: 1.5rem;
}

.financement-table thead th:last-child {
    padding-right: 1.5rem;
}

.financement-table thead th .th-content {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.financement-table thead th svg {
    width: 14px;
    height: 14px;
    opacity: 0.5;
}

/* ── Table Body ── */
.financement-table tbody tr {
    transition: background var(--tv-transition);
    cursor: default;
}

.financement-table tbody tr:hover {
    background: var(--tv-row-hover);
}

.financement-table tbody tr:not(:last-child) td {
    border-bottom: 1px solid var(--tv-border);
}

.financement-table tbody td {
    padding: 1rem 1.25rem;
    font-size: 1.7rem;
    color: var(--tv-text);
    vertical-align: middle;
}

.financement-table tbody td:first-child {
    padding-left: 1.5rem;
}

.financement-table tbody td:last-child {
    padding-right: 1.5rem;
}

/* ── Name Column ── */
.td-name {
    font-weight: 600;
    color: var(--tv-text);
    max-width: 300px;
    min-width: 200px;
    width: 300px;
}

.td-name .name-text {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Type Column ── */
.td-type {
    white-space: nowrap;
    max-width: 200px;
    width: 150px;
}

.type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3rem 0.75rem;
    border-radius: 10px;
    font-size: 1.3125rem;
    font-weight: 500;
    background: var(--tv-badge-bg);
    color: var(--tv-badge-text);
    transition: all var(--tv-transition);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.type-badge:hover {
    transform: scale(1.03);
}

.type-badge svg {
    width: 14px;
    height: 14px;
}

/* ── Source Column ── */
.td-source {
    max-width: 120px;
    width: 120px;
}

.td-source a {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--tv-link);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.375rem;
    padding: 0.3rem 0.625rem;
    border-radius: var(--tv-radius-sm);
    transition: all var(--tv-transition);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.td-source a svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.td-source a:hover {
    background: var(--tv-accent-soft);
    color: var(--tv-link-hover);
    transform: translateX(2px);
}

.deadline-none {
    color: var(--tv-text-muted);
    font-style: italic;
}

/* ── Echelle Column ── */
.td-echelle {
    white-space: nowrap;
    max-width: 180px;
    width: 180px;
}

.echelle-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 1.3125rem;
    font-weight: 500;
}

.echelle-badge svg {
    width: 14px;
    height: 14px;
}

.echelle-nationale {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent);
}

body.dark .echelle-nationale {
    background: rgba(96, 165, 250, 0.15);
    color: #93bbfd;
}

.echelle-locale {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

body.dark .echelle-locale {
    background: rgba(52, 211, 153, 0.15);
    color: #6ee7b7;
}

/* ── Deadline Column ── */
.td-deadline {
    white-space: nowrap;
    max-width: 150px;
    width: 150px;
}

.deadline-value {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 1.375rem;
    font-weight: 500;
    color: var(--tv-text);
}

.deadline-value svg {
    width: 14px;
    height: 14px;
    color: var(--tv-accent);
}

.deadline-none {
    color: var(--tv-text-muted);
    font-style: italic;
    font-size: 1.3125rem;
}

/* ── Validation Column (Admin Only) ── */
.td-validation {
    white-space: nowrap;
    max-width: 140px;
    width: 140px;
}

.validation-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 1.3125rem;
    font-weight: 500;
    transition: all var(--tv-transition);
}

.validation-badge.validated {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

body.dark .validation-badge.validated {
    background: rgba(52, 211, 153, 0.15);
    color: #6ee7b7;
}

.validation-badge.pending {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

body.dark .validation-badge.pending {
    background: rgba(251, 191, 36, 0.15);
    color: #fcd34d;
}

.validation-badge svg {
    width: 14px;
    height: 14px;
}

/* ── Empty State ── */
.table-empty {
    text-align: center;
    padding: 3rem 1.5rem;
}

.table-empty svg {
    width: 48px;
    height: 48px;
    color: var(--tv-text-muted);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.table-empty h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.625rem;
    font-weight: 600;
    color: var(--tv-text);
    margin: 0 0 0.5rem;
}

.table-empty p {
    font-family: 'Inter', sans-serif;
    font-size: 1.4375rem;
    color: var(--tv-text-muted);
    margin: 0;
}

/* ── Row Animation ── */
@keyframes tvRowSlide {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

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

.financement-table tbody tr {
    animation: tvRowSlide 0.3s ease-out both;
}

.financement-table tbody tr:nth-child(1) {
    animation-delay: 0.03s;
}

.financement-table tbody tr:nth-child(2) {
    animation-delay: 0.06s;
}

.financement-table tbody tr:nth-child(3) {
    animation-delay: 0.09s;
}

.financement-table tbody tr:nth-child(4) {
    animation-delay: 0.12s;
}

.financement-table tbody tr:nth-child(5) {
    animation-delay: 0.15s;
}

.financement-table tbody tr:nth-child(6) {
    animation-delay: 0.18s;
}

.financement-table tbody tr:nth-child(7) {
    animation-delay: 0.21s;
}

.financement-table tbody tr:nth-child(8) {
    animation-delay: 0.24s;
}

.financement-table tbody tr:nth-child(9) {
    animation-delay: 0.27s;
}

.financement-table tbody tr:nth-child(10) {
    animation-delay: 0.30s;
}


/* ── Validation Column (SuperAdmin) ── */
.td-validation {
    white-space: nowrap;
}

.validation-radio-group {
    display: inline-flex;
    gap: 0.25rem;
    padding: 0.2rem;
    border-radius: 999px;
    background: var(--tv-accent-soft);
    transition: all var(--tv-transition);
}

.validation-radio-label {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.validation-radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.validation-radio-text {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    font-family: 'Inter', sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all var(--tv-transition);
    user-select: none;
    color: var(--tv-text-muted);
    background: transparent;
}

.validation-radio-label input[type="radio"]:checked+.validation-oui {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
    box-shadow: 0 1px 4px rgba(16, 185, 129, 0.2);
}

body.dark .validation-radio-label input[type="radio"]:checked+.validation-oui {
    background: rgba(52, 211, 153, 0.2);
    color: #6ee7b7;
}

.validation-radio-label input[type="radio"]:checked+.validation-non {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
    box-shadow: 0 1px 4px rgba(239, 68, 68, 0.15);
}

body.dark .validation-radio-label input[type="radio"]:checked+.validation-non {
    background: rgba(248, 113, 113, 0.2);
    color: #fca5a5;
}

.validation-radio-text:hover {
    background: var(--tv-row-hover);
}

.validation-validated {
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.validation-pending {
    border: 1px solid rgba(239, 68, 68, 0.15);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .table-view-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .financement-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .financement-table thead th,
    .financement-table tbody td {
        padding: 0.75rem 1rem;
        font-size: 1.3125rem;
    }

    .financement-table thead th:first-child,
    .financement-table tbody td:first-child {
        padding-left: 1rem;
    }
}

.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);
}

/* ── Pagination Controls ── */
.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem;
  flex-wrap: wrap;
}

.pagination-btn {
  padding: 0.5rem 0.75rem;
  min-width: 2.5rem;
  height: 2.5rem;
  border: 1.5px solid var(--tv-border);
  border-radius: var(--tv-radius-sm);
  background: var(--tv-card-bg);
  color: var(--tv-text);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--tv-transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
  border-color: var(--tv-accent);
  background: var(--tv-accent-soft);
  color: var(--tv-accent);
}

.pagination-btn.active {
  background: var(--tv-accent);
  color: white;
  border-color: var(--tv-accent);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn svg {
  width: 1rem;
  height: 1rem;
  stroke-width: 2;
}

.pagination-ellipsis {
  padding: 0 0.25rem;
  color: var(--tv-text-muted);
  font-size: 1.25rem;
  line-height: 1;
}

.pagination-info {
  font-size: 0.875rem;
  color: var(--tv-text-muted);
  margin-left: 1rem;
  min-width: 120px;
}

@media (max-width: 768px) {
  .pagination-controls {
    gap: 0.25rem;
    padding: 1rem;
  }
  
  .pagination-btn {
    padding: 0.4rem 0.6rem;
    min-width: 2.2rem;
    height: 2.2rem;
    font-size: 0.8rem;
  }
  
  .pagination-info {
    margin-left: 0.5rem;
    min-width: auto;
    font-size: 0.75rem;
  }
}

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

.btn-update-fiancementIb .btn-loader  , .btn-submit-fiancementIb .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-fiancementIb.loading .btn-loader , .btn-submit-fiancementIb.loading .btn-loader {
  display: inline-block;
}

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

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

/* Filter panel responsive */
.filter-panel-body {
  display: block !important;
}

@media (max-width: 768px) {
  .filter-panel-body {
    display: none !important;
  }

  .filter-panel-body.open {
    display: block !important;
  }
}

/* ── Action Buttons ── */
.td-actions {
  text-align: center;
  padding: 0.75rem !important;
}

.action-buttons-cell {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
}

.btn-action-edit,
.btn-action-delete {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all var(--tv-transition);
  width: 36px;
  height: 36px;
}

.btn-action-edit {
  color: var(--tv-link);
}

.btn-action-edit:hover {
  background: var(--tv-accent-soft);
  color: var(--tv-link-hover);
}

.btn-action-delete {
  color: #ef4444;
}

.btn-action-delete:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.btn-action-edit svg,
.btn-action-delete svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke-width: 1.5;
}

@media (max-width: 768px) {
  .action-buttons-cell {
    gap: 0.25rem;
  }

  .btn-action-edit,
  .btn-action-delete {
    width: 32px;
    height: 32px;
    padding: 0.375rem;
  }

  .btn-action-edit svg,
  .btn-action-delete svg {
    width: 1.1rem;
    height: 1.1rem;
  }
}