.brochures-section-wrap {
  padding: 2rem 0 5rem;
}

.brochures-layout {
  display: flex;
  gap: 2rem;
}

.brochures-main {
  flex: 3;
}

.brochures-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.brochures-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
  border: 1px solid rgba(202, 138, 16, 0.08);
}

.brochures-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 32px rgba(202, 138, 16, 0.16);
  border-color: rgba(202, 138, 16, 0.2);
}

.brochures-image {
  height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.brochures-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.35), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.brochures-card:hover .brochures-image::after {
  opacity: 1;
}

.brochures-info {
  padding: 1rem;
}

.brochures-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0.25rem 0;
}

.page-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 50px;
  color: #ca8a10;
}

.brochures-author,
.brochures-date {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0.1rem 0;
}

.btn-download {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: #037f2c;
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  margin-top: 1rem;
}

.btn-description {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: #2563eb;
  color: #fff;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  margin-top: 0.5rem;
  margin-right: 0.5rem;
  cursor: pointer;
  font-size: 0.85rem;
}

.btn-description:hover {
  background-color: #1d4ed8;
}

.btn-comments {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: #f59e0b;
  color: #fff;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  margin-top: 0.5rem;
  cursor: pointer;
  font-size: 0.85rem;
}

.btn-comments:hover {
  background-color: #d97706;
}

.badge.coming-soon {
  display: inline-block;
  padding: 0.3rem 0.6rem;
  background: #f59e0b;
  color: #fff;
  font-weight: 600;
  border-radius: 6px;
  margin-top: 0.5rem;
}

/* Sidebar */
.brochures-sidebar {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.search-box {
  background: #fff;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.search-box input {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  border-radius: 8px;
  border: 1px solid #d1d5db;
}

.recent-brochures {
  background-color: white;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 5rem;
}

.recent-brochures h4 {
  margin-bottom: 1rem;
  font-weight: 600;
}

.recent-brochures ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recent-brochures li {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  align-items: center;
}

.recent-brochures li img {
  width: 50px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
}

.brochures-info h5 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.brochures-info p {
  margin: 0;
  font-size: 0.85rem;
  color: #555;
}

.brochures-info .brochures-date {
  font-size: 0.8rem;
  color: #888;
}

/* Actions des brochures */
.brochure-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    margin-bottom: 5rem;
}

.page-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: #f3f4f6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover {
    background: #e5e7eb;
}

.page-btn.active {
    background: #2563eb;
    color: white;
}

.dots {
    padding: 0.5rem 1rem;
    color: #6b7280;
}

/* Brochures */
.brochures-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    margin: 2rem 0;
}

.brochures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.brochure-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.brochure-image {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.brochure-info {
    padding: 1rem;
}

/* Styles spécifiques aux brochures */
.brochure-title {
    color: #2563eb;
    margin: 0 0 0.5rem;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 2rem;
  border-radius: 12px;
  max-width: 800px;  /* Augmenté pour le modal description */
  width: 90%;
  z-index: 1001;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  max-height: 90vh;
  overflow-y: auto;
}

.modal.active,
.modal-overlay.active {
  display: block;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 1rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  color: #6b7280;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #374151;
}

.modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
}

/* Styles pour le modal de description */
.modal-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.description-image {
  text-align: center;
  background: #f9fafb;
  padding: 1rem;
  border-radius: 8px;
}

.full-brochure-image {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.description-text {
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: 8px;
}

.description-text h4 {
  margin: 0 0 1rem 0;
  color: #1f2937;
  font-size: 1.2rem;
  font-weight: 600;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 0.5rem;
}

.description-text p {
  color: #4b5563;
  line-height: 1.6;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.description-meta {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.description-meta p {
  margin: 0.5rem 0;
  font-size: 0.95rem;
  color: #6b7280;
}

.description-meta strong {
  color: #374151;
}

/* Styles pour le modal et les commentaires */
.comment-form {
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: border-color 0.2s;
  margin-bottom: 1rem;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.btn-submit {
  background: #2563eb;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-submit:hover {
  background: #1d4ed8;
}

.comments-list {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 2px solid #e2e8f0;
}

.comments-title {
  font-size: 1.1rem;
  color: #1f2937;
  margin-bottom: 1rem;
  font-weight: 600;
}

.comment {
  background: white;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  border: 1px solid #e5e7eb;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.comment-author {
  font-weight: 600;
  color: #2563eb;
  font-size: 1rem;
}

.comment-date {
  font-size: 0.85rem;
  color: #6b7280;
}

.comment-text {
  color: #4b5563;
  line-height: 1.5;
  font-size: 0.95rem;
}

.no-comments {
  text-align: center;
  color: #6b7280;
  font-style: italic;
  padding: 2rem;
  background: #f9fafb;
  border-radius: 8px;
  margin: 1rem 0;
  border: 1px dashed #e5e7eb;
}

/* Animation pour les nouveaux commentaires */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}


/* Styles pour les commentaires et réponses */
.comment {
  background: white;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  animation: fadeIn 0.3s ease-out;
}

.comment-actions {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.btn-reply,
.btn-contact {
  background: none;
  border: none;
  color: #2563eb;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-reply:hover,
.btn-contact:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.reply-form {
  margin: 1rem 0;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 6px;
}

.reply-form.hidden {
  display: none;
}

.form-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.btn-cancel {
  background: #e5e7eb;
  color: #374151;
}

.btn-cancel:hover {
  background: #d1d5db;
}

.hidden {
  display: none;
}
/* Bouton Répondre */
.btn-reply {
  background-color: #5ab35d;   /* Vert */
  color: white;
  border: none;
  padding: 6px 12px;
  font-size: 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  margin-right: 5px;
}

.btn-reply:hover {
  background-color: #45a049;
  text-decoration: none;
  transform: translateY(-2px);
  color: white;
}

/* Bouton Afficher les réponses */
.btn-toggle-replies {
  background-color: #9b9c9c;  /* Bleu */
  color: white;
  border: none;
  padding: 6px 12px;
  font-size: 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

.btn-toggle-replies:hover {
  background-color: #868787;
  transform: translateY(-2px);
}

/* Optionnel : ajouter un petit espace entre le texte et le compteur */
.btn-toggle-replies::after {
  content: ' ⬇';
  margin-left: 4px;
  font-size: 0.8rem;
}

/* Conteneur du formulaire de réponse */
.reply-form {
  margin: 10px 0 15px 20px; /* décalé pour montrer que c’est une réponse */
  padding: 12px;
  border-left: 3px solid #5ab35d; /* petite barre verte pour indiquer la réponse */
  background-color: #f9f9f9;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Inputs et textarea */
.reply-form input[type="text"],
.reply-form input[type="email"],
.reply-form textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: border-color 0.3s;
}

.reply-form input:focus,
.reply-form textarea:focus {
  border-color: #5ab35d;
  outline: none;
}

/* Zone de texte plus petite que le commentaire principal */
.reply-form textarea {
  min-height: 60px;
  resize: vertical;
}

/* Boutons du formulaire */
.reply-form .form-actions {
  display: flex;
  gap: 10px;
  margin-top: 5px;
}

.reply-form .btn-submit {
  background-color: #5ab35d;
  color: white;
  border: none;
  padding: 6px 14px;
  font-size: 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

.reply-form .btn-submit:hover {
  background-color: #45a049;
  transform: translateY(-2px);
}

.reply-form .btn-cancel {
  background-color: #ccc;
  color: #333;
  border: none;
  padding: 6px 14px;
  font-size: 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

.reply-form .btn-cancel:hover {
  background-color: #999;
  transform: translateY(-2px);
}

/* Masquer le formulaire par défaut */
.reply-form.hidden {
  display: none;
}



/* Responsive */
@media (max-width:1024px) {
  .brochures-layout {
    flex-direction: column;
  }

  .brochures-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal {
    max-width: 600px;
  }

  .modal-content {
    flex-direction: column;
  }
}

@media (max-width:640px) {
  .brochures-grid {
    grid-template-columns: 1fr;
  }

  .modal {
    padding: 1.5rem;
    max-width: 95%;
  }

  .comment-form {
    padding: 1rem;
  }

  .comment {
    padding: 1rem;
  }

  .description-text {
    padding: 1rem;
  }

  .brochure-actions {
    flex-direction: column;
  }

  .btn-description,
  .btn-comments {
    width: 100%;
    text-align: center;
    margin-right: 0;
  }
}


#recent-brochures-list li {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#recent-brochures-list li:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.description-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

