/* Rubrique Actualités CMS */

.news-cms__intro {
  max-width: 760px;
  margin: 0 auto 1.8rem;
  text-align: center;
  color: var(--gray-600);
  line-height: 1.65;
}

.news-cms__layout {
  display: grid;
  gap: 1.25rem;
}

.news-cms__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--gray-100);
  background: var(--gray-50);
}

.news-cms__meta {
  color: var(--gray-600);
  font-size: 0.9rem;
}

.news-cms__search {
  min-width: 220px;
  max-width: 320px;
  width: 100%;
}

.news-cms__search input {
  width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: 0.6rem 0.95rem;
  font-size: 0.9rem;
}

.news-cms__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.news-cms__card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-cms__card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.news-cms__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--gray-100);
}

.news-cms__image--fallback {
  display: grid;
  place-items: center;
  color: var(--gray-500);
  font-size: 0.9rem;
}

.news-cms__body {
  padding: 1rem 1rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.news-cms__date {
  font-size: 0.78rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.news-cms__title {
  font-size: 1.05rem;
  color: var(--gray-900);
  line-height: 1.35;
}

.news-cms__summary {
  color: var(--gray-600);
  font-size: 0.9rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-cms__read-more-wrap {
  margin: -0.2rem 0 0.2rem;
}

.news-cms__read-more {
  color: #1877f2;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}

.news-cms__read-more:hover {
  text-decoration: underline;
}

.news-cms__actions {
  margin-top: 0.35rem;
}

.news-cms__card-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  color: var(--gray-500);
  font-size: 0.8rem;
  padding: 0.55rem 0.1rem 0.45rem;
  border-top: 1px solid var(--gray-100);
}

.news-cms__card-stats i {
  margin-right: 0.25rem;
}

.news-cms__card-social {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  border-top: 1px solid var(--gray-100);
  padding-top: 0.55rem;
}

.news-cms__card-action {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--gray-700);
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: 8px;
  padding: 0.4rem 0.3rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.news-cms__card-action:hover {
  background: #eef3ff;
  color: #1877f2;
}

.news-cms__card-action[data-action="like"].is-active {
  color: #1877f2;
  background: #e8f1ff;
}

.news-cms__card-action[data-action="comment"]:hover {
  color: #ec4899;
  background: #fdf2f8;
}

.news-cms__card-action[data-action="share"]:hover {
  color: #16a34a;
  background: #f0fdf4;
}

.news-cms__empty {
  text-align: center;
  color: var(--gray-600);
  border: 1px dashed var(--gray-200);
  border-radius: var(--radius);
  padding: 2rem 1rem;
  background: var(--gray-50);
}

.news-cms__modal[hidden] {
  display: none;
}

.news-cms__modal {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(2px);
  padding: 1rem;
}

.news-cms__modal-dialog {
  width: min(860px, 100%);
  max-height: 92dvh;
  overflow: auto;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.25);
}

.news-cms__modal-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--gray-100);
}

.news-cms__modal-close {
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  color: var(--gray-500);
  cursor: pointer;
}

.news-cms__modal-content {
  padding: 1rem 1.2rem 1.4rem;
}

.news-cms__modal-image {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 0.9rem;
}

.news-cms__modal-text {
  color: var(--gray-700);
  line-height: 1.7;
  white-space: pre-wrap;
}

.news-cms__social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.25rem 0 1rem;
}

.news-cms__social .btn {
  border-radius: 999px;
}

#news-cms-like-btn.is-active {
  border-color: rgba(220, 38, 38, 0.25);
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.08);
}

.news-cms__comments {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--gray-100);
}

.news-cms__comment-form {
  display: grid;
  gap: 0.55rem;
}

.news-cms__comment-form input,
.news-cms__comment-form textarea {
  width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
}

.news-cms__comment-feedback {
  margin-top: 0.55rem;
  min-height: 1.2em;
  color: var(--gray-600);
  font-size: 0.86rem;
}

.news-cms__comment-list {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.7rem;
}

.news-cms__comment-item {
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  background: var(--gray-50);
  padding: 0.6rem 0.75rem;
}

.news-cms__comment-meta {
  font-size: 0.78rem;
  color: var(--gray-500);
  margin-bottom: 0.25rem;
}

.news-cms__comment-item > div:last-child {
  white-space: pre-wrap;
}

.news-cms__comment-controls {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.45rem;
}

.news-cms__comment-btn {
  border: 0;
  background: #eef2ff;
  color: #1d4ed8;
  border-radius: 999px;
  padding: 0.22rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.news-cms__comment-btn--danger {
  background: #fef2f2;
  color: #b91c1c;
}

@media (max-width: 640px) {
  .news-cms__toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}
