/* Publications — styles dédiés (chargé après style.css) */

.pub-section {
  background: #f4f7f5;
  padding: 1.5rem 0 3rem;
}

.pub-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.25rem;
  align-items: start;
}

.pub-layout-aside {
  position: sticky;
  top: 90px;
  align-self: start;
  height: auto;
}

.pub-toolbar {
  background: #fff;
  border: 1px solid #dde5df;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  padding: 1rem;
  margin: 0;
  height: auto;
}

.pub-sidebar-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
  margin: 0;
}

.pub-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.pub-search-bar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

.pub-search-field {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 42px;
  width: 100%;
  padding: 0 0.85rem;
  border: 1px solid #cfd8d2;
  border-radius: 8px;
  background: #fafbfa;
  color: #6b7280;
}

.pub-search-field svg {
  flex-shrink: 0;
}

.pub-search-field input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: #1f2937;
  outline: none;
}

.pub-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  padding: 0 1.15rem;
  border: none;
  border-radius: 8px;
  background: #1b6b3a;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease;
  flex: 0 0 auto;
}

.pub-search-btn:hover {
  background: #155729;
}

.pub-search-reset {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  color: #4b5563;
  text-decoration: underline;
  text-align: center;
}

.pub-filters-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid #e8eeea;
}

.pub-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pub-filter-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  border: 1px solid #cfd8d2;
  background: #fff;
  color: #374151;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.pub-filter-btn:hover {
  border-color: #237a45;
  color: #1b6b3a;
}

.pub-filter-btn--active {
  background: #1b6b3a;
  border-color: #1b6b3a;
  color: #fff !important;
}

.pub-date-filter {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
}

.pub-date-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: #4b5563;
}

.pub-date-select {
  width: 100%;
  min-height: 40px;
  padding: 0.3rem 0.65rem;
  border: 1px solid #cfd8d2;
  border-radius: 8px;
  background: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  color: #1f2937;
}

.pub-results-info {
  margin: 0 0 0.85rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.84rem;
  color: #6b7280;
}

.pub-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.pub-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.9rem 1rem;
  padding: 0.95rem 1.1rem;
  background: #fff;
  border: 1px solid #dde5df;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pub-row:hover {
  border-color: #b8d4c4;
  box-shadow: 0 4px 12px rgba(27, 107, 58, 0.08);
}

.pub-row-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #fef2f2;
  flex-shrink: 0;
}

.pub-row-icon svg,
.pub-pdf-icon {
  width: 22px !important;
  height: 22px !important;
  display: block;
}

.pub-row-content {
  min-width: 0;
}

.pub-row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin-bottom: 0.25rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  color: #6b7280;
}

.pub-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.pub-type-badge--publication { background: #ecfdf5; color: #047857; }
.pub-type-badge--decret { background: #eff6ff; color: #1d4ed8; }
.pub-type-badge--arrete { background: #fef3c7; color: #b45309; }
.pub-type-badge--rapport { background: #f3e8ff; color: #7c3aed; }
.pub-type-badge--article { background: #ecfeff; color: #0e7490; }
.pub-type-badge--autre { background: #f3f4f6; color: #4b5563; }

.pub-row-title {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  color: #111827;
}

.pub-row-desc {
  margin: 0.3rem 0 0;
  font-family: 'Inter', sans-serif;
  font-size: 0.84rem;
  line-height: 1.5;
  color: #4b5563;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pub-row-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex-shrink: 0;
}

.pub-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 118px;
  padding: 0.45rem 0.85rem;
  border-radius: 7px;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none !important;
  text-align: center;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.pub-btn svg {
  flex-shrink: 0;
}

.pub-btn--view {
  border: 1px solid #cfd8d2;
  background: #fff;
  color: #374151 !important;
}

.pub-btn--view:hover {
  border-color: #1b6b3a;
  color: #1b6b3a !important;
}

.pub-btn--download {
  border: 1px solid #1b6b3a;
  background: #1b6b3a;
  color: #fff !important;
}

.pub-btn--download:hover {
  background: #155729;
  border-color: #155729;
}

.pub-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 1.5rem;
}

.pub-pagination .page-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 36px;
  min-height: 36px;
  padding: 0 0.55rem;
  border: 1px solid #dde5df;
  border-radius: 8px;
  background: #fff;
  color: #374151 !important;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.pub-pagination .page-btn:hover {
  border-color: #1b6b3a;
  color: #1b6b3a !important;
}

.pub-pagination .page-btn--active {
  background: #1b6b3a;
  border-color: #1b6b3a;
  color: #fff !important;
}

.pub-pagination .page-sep {
  color: #9ca3af;
  padding: 0 0.2rem;
}

.pub-page-info {
  margin: 0.65rem 0 0;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  color: #9ca3af;
}

.pub-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 1.5rem;
  background: #fff;
  border: 1px dashed #cfd8d2;
  border-radius: 12px;
}

.pub-empty .pub-pdf-icon,
.pub-empty svg {
  width: 40px !important;
  height: 40px !important;
  opacity: 0.5;
  margin-bottom: 0.75rem;
}

.pub-empty-title {
  margin: 0 0 0.35rem;
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: #111827;
}

.pub-empty-text {
  margin: 0 0 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  color: #6b7280;
}

@media (max-width: 900px) {
  .pub-layout {
    grid-template-columns: 1fr;
  }

  .pub-layout-aside {
    position: static;
    order: -1;
  }
}

@media (max-width: 768px) {
  .pub-row {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "icon content"
      "actions actions";
  }

  .pub-row-icon { grid-area: icon; }
  .pub-row-content { grid-area: content; }

  .pub-row-actions {
    grid-area: actions;
    flex-direction: row;
    justify-content: flex-end;
  }

  .pub-search-bar {
    flex-direction: column;
  }

  .pub-date-filter {
    flex-direction: column;
  }
}
