/* Fichier : style_detail.css */

/* Note : Ce fichier dépend de style.css pour les variables et les styles de base. */

/* --- Correction de la Spécificité pour MAIN (pour garantir l'application du style) --- */
main.section-padding.article-page {
  padding-top: 100px; /* Espace sous la navbar fixe */
  max-width: 1000px;
  margin: 0 auto;
  background-color: var(--color-white);
  min-height: 80vh;
}

/* ... (Le reste des styles de l'article, des commentaires et de la modale) ... */

.article-detail {
  margin-bottom: 40px;
}

/* Titre et Méta-données */
.article-title {
  font-size: 2.5em;
  margin-bottom: 10px;
  color: var(--color-black);
  text-align: center;
}

/* Administration et Méta-données (Alignement) */
.article-meta-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.article-meta {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 0;
  font-size: 0.9em;
  color: #666;
}

.article-meta span {
  margin-right: 20px;
}

.date-publication i {
  color: var(--color-red);
  margin-right: 5px;
}

.domaine-tag {
  background-color: var(--color-green);
  color: var(--color-white);
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: bold;
}

/* Boutons d'Administration */
.admin-buttons {
  display: flex;
  gap: 15px;
}

.btn-icon {
  background: none;
  border: 1px solid #ccc;
  color: var(--color-black);
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
  font-weight: bold;
  transition: background-color 0.3s, color 0.3s;
}

.admin-action i {
  margin-right: 5px;
}

.admin-action:hover {
  background-color: #f0f0f0;
}

.btn-danger {
  color: var(--color-red);
  border-color: var(--color-red);
}

.btn-danger:hover {
  background-color: var(--color-red);
  color: var(--color-white);
}

/* Image de Couverture */
.article-image {
  width: 100%;
  margin: 30px 0;
  text-align: center;
}

.article-image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.article-image figcaption {
  margin-top: 10px;
  font-style: italic;
  color: #888;
}

/* Contenu de l'Article */
.article-content {
  font-size: 1.1em;
  line-height: 1.8;
}

.article-content p,
.article-content ul,
.article-content h3 {
  margin-bottom: 20px;
}

.article-content h3 {
  color: var(--color-red);
  font-size: 1.5em;
  border-bottom: 2px solid #eee;
  padding-bottom: 5px;
}

/* --- Séparateur et Sous-titres --- */
.section-separator {
  border: none;
  border-top: 1px solid #ddd;
  margin: 40px 0;
}

.section-subtitle {
  font-size: 1.8em;
  color: var(--color-black);
  margin-bottom: 30px;
}

/* --- Formulaire de Commentaire --- */
.comment-form input[type='email'],
.comment-form textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1em;
}

.comment-form textarea {
  min-height: 120px;
  resize: vertical;
}

.comment-form label {
  display: block;
  font-weight: bold;
  margin-top: 15px;
  margin-bottom: 5px;
}

.comment-form .btn-auth {
  width: 100%;
  margin-top: 10px;
}

/* --- Liste des Commentaires --- */
.comment-list {
  margin-top: 20px;
}

.comment-item {
  border-bottom: 1px solid #eee;
  padding: 20px 0;
}

.comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  position: relative;
}

.comment-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  margin-left: 15px;
}

.comment-avatar i {
  font-size: 2em;
  color: #aaa;
}

.comment-author {
  font-weight: bold;
  color: var(--color-green);
}

.comment-date {
  font-size: 0.8em;
  color: #999;
}

.comment-body {
  margin-left: 50px;
}

/* Style spécifique pour une réponse (indentation) */
.comment-item.reply {
  margin-left: 30px;
  background-color: #fcfcfc;
  border-left: 3px solid var(--color-red);
  padding: 15px 0 15px 15px;
}

/* Bouton Supprimer Commentaire */
.delete-comment-btn {
  color: #aaa;
  margin-left: 20px;
}

.delete-comment-btn:hover {
  color: var(--color-red);
}

/* --- BOÎTE MODALE (Confirmation) --- */
.modal {
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: var(--color-white);
  padding: 30px;
  width: 80%;
  max-width: 400px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

#modal-message {
  font-size: 1.2em;
  margin-bottom: 20px;
  font-weight: bold;
}

.modal-actions button {
  margin: 0 10px;
  min-width: 100px;
}

/* --- MEDIA QUERIES --- */
@media (max-width: 767px) {
  .article-title {
    font-size: 1.8em;
  }

  .article-meta-group {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-buttons {
    margin-top: 15px;
    width: 100%;
    justify-content: space-between;
  }

  .btn-icon {
    flex-grow: 1;
    text-align: center;
  }

  .comment-body {
    margin-left: 0;
    padding-top: 5px;
  }

  .comment-item.reply {
    margin-left: 10px;
  }
}
