 :root {
      --main: #e51c3b;
    }

    body {
      font-family: 'Segoe UI', sans-serif;
      background: #f8fafc;
      color: #111827;
      margin: 0;
      padding: 0;
    }

    #loader {
      position: fixed;
      inset: 0;
      background: #f8fafc;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      z-index: 9999;
    }

    .spinner {
      display: flex;
      gap: 12px;
    }

    .dot {
      width: 18px;
      height: 18px;
      border-radius: 50%;
      animation: bounce 0.8s infinite alternate;
    }

    .dot1 {
      background: var(--main);
    }

    .dot2 {
      background: #021aba;
      animation-delay: 0.3s;
    }

    @keyframes bounce {
      from {
        transform: translateY(0);
        opacity: 0.7;
      }
      to {
        transform: translateY(-20px);
        opacity: 1;
      }
    }

    .title-block {
      margin: 16px;
      padding-left: 16px;
      border-left: 5px solid var(--main);
    }

    .title-block h2 {
      margin: 0;
      text-transform: uppercase;
    }

    .view-toggle, .status-filter {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin: 0 16px 12px;
    }

    .btn-toggle {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px 12px;
      border: 1px solid #d1d5db;
      border-radius: 4px;
      background: #fff;
      cursor: pointer;
      font-size: 14px;
    }

    .btn-toggle.active {
      background: #111827;
      color: #fff;
      border-color: #111827;
    }

    #searchContainer {
      position: sticky;
      top: 0;
      z-index: 100;
      background: #f8fafc;
      padding: 8px 16px;
    }

    #searchInput {
      width: 100%;
      max-width: 420px;
      padding: 8px;
      border-radius: 4px;
      border: 1px solid #d1d5db;
    }

    #container.grid-view {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
      gap: 12px;
      padding: 0 16px 20px;
    }

    #container.list-view {
      display: flex;
      flex-direction: column;
      gap: 12px;
      padding: 0 16px 20px;
    }

    .card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 12px;

  max-height: 400px;        /* ✅ limite hauteur */
  overflow-y: auto;         /* ✅ scroll vertical */
  overflow-x: hidden;

  word-wrap: break-word;
  overflow-wrap: anywhere;
}

/* Scrollbar (Chrome / Edge / Safari) */
.card::-webkit-scrollbar {
  width: 6px;
}

.card::-webkit-scrollbar-thumb {
  background-color: var(--main);   /* ✅ couleur salon */
  border-radius: 4px;
}

/* Firefox */
.card {
  scrollbar-width: thin;
  scrollbar-color: var(--main) transparent;
}

/* Liens web : retour à la ligne propre */
.card a {
  display: block;
  word-break: break-all;
  overflow-wrap: anywhere;
  text-decoration: underline;
  color: #2563eb;
}


    .card-title {
      border-left: 5px solid var(--main);
      padding-left: 10px;
      margin-bottom: 6px;
      text-transform: uppercase;
    }

    .card small {
      display: block;
      margin-bottom: 4px;
      font-size: 14px;
    }

    .badge {
      display: inline-block;
      font-size: 11px;
      font-weight: 600;
      padding: 2px 8px;
      border-radius: 999px;
      margin-bottom: 6px;
    }

    .badge.confirmed {
      background: #16a34a;
      color: #fff;
    }

    .badge.advanced {
      background: #f97316;
      color: #fff;
    }