/* Conteneur général */
.qb-journal-page {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px 60px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #222;
}

.qb-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}


/* Limiter la hauteur du menu de la liste Formation */
.qb-field select[name="formation"] {
  max-height: 70px;      /* hauteur visible */
  overflow-y: auto;       /* barre de défilement si nécessaire */
}

.qb-modal__close {
  border: none;
  background: transparent;
  color: #1f2933;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem; /* taille de la croix */
}

.qb-modal__close:hover {
  background: rgba(15, 23, 42, 0.04);
}

.qb-modal__close span {
  pointer-events: none;
}¨

.qb-modal__footer {
  display: flex;
  justify-content: center; /* centre horizontalement */
  gap: 1rem;               /* espace entre les deux boutons */
  padding: 1.5rem 2rem;
}

/* En-tête */
.qb-journal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
}

.qb-journal-header__subtitle {
  margin-top: 8px;
  color: #666;
  font-size: 0.95rem;
}

.qb-field--inline-dates .qb-field__dates-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qb-field--inline-dates .qb-field__dates-row input[type="date"] {
  flex: 1 1 0;
}

.qb-field__dates-separator {
  font-size: 0.9rem;
  color: #4b5563;
}


/* Boutons génériques */
.qb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  padding: 8px 14px;
  font-size: 0.95rem;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
}

.qb-btn--primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.qb-btn--primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.qb-btn--ghost {
  background: #fff;
  border-color: #d1d5db;
  color: #374151;
}

.qb-btn--ghost:hover {
  background: #f3f4f6;
}

.qb-link-button {
  border: none;
  background: none;
  color: #2563eb;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0;
}

.qb-link-button:hover {
  text-decoration: underline;
}

/* Filtres */
.qb-filters {
  margin-bottom: 20px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  padding: 16px 18px 12px;
  background: #f9fafb;
}

.qb-filters--sticky {
  position: sticky;
  top: 72px; /* à adapter selon ton header admin / front */
  z-index: 10;
}

.qb-filters__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qb-filters__row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.qb-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 180px;
}

.qb-field--full {
  flex: 1 1 100%;
}

.qb-field--search {
  flex: 1 1 auto;
}

.qb-field label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6b7280;
}

.qb-field select,
.qb-field input[type="text"],
.qb-field input[type="date"] {
  border-radius: 4px;
  border: 1px solid #d1d5db;
  padding: 6px 8px;
  font-size: 0.9rem;
}

.qb-filters__buttons {
  margin-left: auto;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

/* Chips sources */
.qb-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.qb-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  padding: 4px 10px;
  font-size: 0.8rem;
  background: #fff;
  cursor: pointer;
}

.qb-chip input {
  accent-color: #2563eb;
}

/* KPI bar */
.qb-kpi-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.qb-kpi-card {
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  padding: 12px 14px;
  background: #fff;
}

.qb-kpi-card__label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 4px;
}

.qb-kpi-card__value {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.qb-kpi-card__sub {
  font-size: 0.85rem;
  color: #4b5563;
}

.qb-kpi-card__list {
  margin: 0;
  padding-left: 16px;
  font-size: 0.85rem;
  color: #4b5563;
}

.qb-progress {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #e5e7eb;
  margin-top: 4px;
}

.qb-progress__bar {
  height: 100%;
  border-radius: inherit;
  background: #10b981;
}

/* Cartes d’action */
.qb-journal-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.qb-action-card {
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: 14px 16px;
}

.qb-action-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.qb-action-card__title {
  font-size: 1.05rem;
  margin: 0;
}

.qb-action-card__meta {
  text-align: right;
  font-size: 0.8rem;
  color: #6b7280;
}

.qb-action-card__date {
  display: block;
  margin-top: 2px;
}

/* Badges */
.qb-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 600;
}

.qb-badge--success {
  background: #ecfdf5;
  color: #047857;
}

.qb-badge--warning {
  background: #fffbeb;
  color: #92400e;
}

.qb-badge--neutral {
  background: #eff6ff;
  color: #1d4ed8;
}

.qb-action-card__body {
  font-size: 0.9rem;
  color: #374151;
}

.qb-action-card__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.qb-action-card__row--inline .qb-label {
  margin-right: 4px;
}

.qb-label {
  font-weight: 600;
  font-size: 0.85rem;
}

.qb-label--offset {
  margin-left: 16px;
}

.qb-value {
  font-size: 0.9rem;
}

.qb-action-card__footer {
  margin-top: 8px;
  display: flex;
  gap: 12px;
}

/* Pagination */
.qb-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

.qb-pagination__info {
  font-size: 0.85rem;
  color: #6b7280;
}

/* Modale */
.qb-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.qb-modal[aria-hidden="false"] {
  display: flex;
}

.qb-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
}

.qb-modal__dialog {
  position: relative;
  background: #fff;
  border-radius: 8px;
  max-width: 720px;
  width: 100%;
  margin: 16px;
  z-index: 1;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.2);
}

.qb-modal__header,
.qb-modal__footer {
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
}

.qb-modal__footer {
  border-top: 1px solid #e5e7eb;
  border-bottom: none;
  display: flex;
  justify-content: center; /* ici */
  gap: 1rem;
  padding: 1.5rem 2rem;
}

.qb-modal__body {
  padding: 12px 16px 16px;
}

.qb-modal__close {
  border: none;
  background: none;
  font-size: 1.2rem;
  cursor: pointer;
}

.qb-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.qb-detail-grid__item h3 {
  font-size: 0.95rem;
  margin: 0 0 4px;
}

.qb-detail-grid__item p {
  margin: 0;
  font-size: 0.9rem;
  color: #374151;
}

/* Responsive */
@media (max-width: 900px) {
  .qb-journal-header {
    flex-direction: column;
    align-items: stretch;
  }

  .qb-kpi-bar {
    grid-template-columns: 1fr;
  }

  .qb-detail-grid {
    grid-template-columns: 1fr;
  }
}

.qb-journal-summary {
  margin: 20px 0 10px;
}

.qb-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.qb-summary-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
}

.qb-summary-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 4px;
}

.qb-summary-value {
  font-size: 20px;
  font-weight: 600;
  color: #0f172a;
}

.qb-summary-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
  color: #0f172a;
}

.qb-summary-list li + li {
  margin-top: 2px;
}

.qb-journal-header__actions {
  display: flex;
  gap: 0.75rem; /* ou ce que tu veux */
  align-items: center;
}

.qb-journal-header__export-form {
  margin: 0;
  display: inline-block; /* ou display:flex; align-items:center; */
}
