/* Styles propres à la page news_details.php (déplacés depuis le fichier PHP, sans modification). */
/* ====== STRUCTURE PRINCIPALE ====== */
.news-details {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
}

/* ====== EN-TÊTE ET IMAGE ====== */
.news-header {
  position: relative;
  margin-top: 100px;
}
.news-cover {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.news-header::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0.15));
}
.news-header h1 {
  position: absolute;
  bottom: 30px;
  left: 30px;
  color: #fff;
  font-size: 2rem;
  text-shadow: 0 3px 6px rgba(0,0,0,0.5);
  margin: 0;
  z-index: 2;
}
.news-header .meta {
  position: absolute;
  top: 20px;
  left: 30px;
  display: flex;
  gap: 12px;
  color: #ccc;
  font-size: 0.9rem;
  z-index: 2;
}

/* ====== CONTENU DE L’ARTICLE ====== */
.news-content {
  line-height: 1.7;
  color: #ddd;
  margin: 25px 0;
}
.news-content p {
  margin-bottom: 1em;
}

/* ====== ACTIONS / PARTAGE ====== */
.news-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  padding: 10px 18px;
  margin-bottom: 25px;
}
.news-actions .tts button {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: #eee;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s;
}
.news-actions .tts button:hover {
  color: #ff4d8d;
}
.news-actions .share {
  display: flex;
  align-items: center;
  gap: 8px;
}
.news-actions .share a,
.news-actions .share button {
  color: #ff4d8d;
  font-size: 1.2rem;
  transition: 0.2s;
}
.news-actions .share a:hover,
.news-actions .share button:hover {
  transform: scale(1.1);
  color: #fff;
}
.news-actions .tools button {
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  font-size: 1.4rem;
  transition: 0.2s;
}
.news-actions .tools button:hover {
  color: #ff4d8d;
}

/* ====== RÉACTIONS ====== */
.news-reactions {
  background: rgba(255,255,255,0.03);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  margin: 30px 0;
}
.news-reactions h4 {
  color: #fff;
  font-weight: 500;
  margin-bottom: 12px;
}
.reaction-buttons button {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  margin: 0 8px;
  transition: transform 0.2s, filter 0.2s;
}
.reaction-buttons button:hover {
  transform: scale(1.2);
  filter: brightness(1.2);
}
/* ====== SIDEBAR REWORK ====== */
.news-sidebar {
  display: flex;
  margin-top: 100px;
  flex-direction: column;
  gap: 24px;
}

.news-sidebar .widget {
  background: rgba(20, 20, 30, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 22px 20px;
  color: #eaeaea;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.news-sidebar .widget:hover {
  transform: translateY(-4px);
  border-color: rgba(255,77,141,0.3);
  box-shadow: 0 6px 20px rgba(255, 77, 141, 0.15);
}

.news-sidebar h4 {
  position: relative;
  font-family: 'Poppins', sans-serif;
  margin-bottom: 14px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  padding-left: 8px;
}

.news-sidebar h4::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, #ff4d8d, #a030ff);
}

/* QR & App badges */
.qr {
  width: 120px;
  margin: 12px auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(255,77,141,0.15);
  transition: transform .3s ease;
}
.qr:hover { transform: scale(1.05); }

.store-badge {
  width: 150px;
  display: block;
  margin: 10px auto 0;
  transition: opacity .3s ease, transform .3s ease;
}
.store-badge:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}
.tag {
  background: rgba(255,255,255,0.08);
  color: #ccc;
  padding: 6px 13px;
  border-radius: 40px;
  font-size: 0.82rem;
  letter-spacing: 0.2px;
  transition: all 0.3s ease;
  box-shadow: 0 0 0 rgba(255,77,141,0);
}
.tag:hover {
  background: linear-gradient(135deg, #ff4d8d, #9a3ef9);
  color: #fff;
  box-shadow: 0 0 10px rgba(255,77,141,0.4);
}

/* Lists (articles récents, derniers coms) */
.news-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.news-sidebar li {
  margin: 8px 0;
}

.news-sidebar li a {
  color: #ddd;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.news-sidebar li a:hover {
  color: #ff4d8d;
}

/* Derniers commentaires */
.news-sidebar .widget p {
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 8px 0;
  opacity: 0.85;
}

.news-sidebar .widget p strong {
  color: #fff;
}


/* ====== COMMENTAIRES ====== */
.news-comments {
  margin-top: 35px;
}
.comment-list .comment {
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.comment-list .comment strong {
  display: block;
  color: #fff;
  margin-bottom: 4px;
}
.comment-form {
  margin-top: 20px;
}
.comment-form input, .comment-form textarea {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: none;
  border-radius: 6px;
  color: #fff;
  padding: 10px;
  margin-bottom: 10px;
}
.comment-form textarea {
  min-height: 90px;
}
.comment-form button {
  background: linear-gradient(135deg, #ff4d8d, #7c1f3e);
  border: none;
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s;
}
.comment-form button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(255,77,141,0.4);
}

/* ====== RESPONSIVE ====== */
@media (max-width: 900px) {
  .news-details { grid-template-columns: 1fr; }
  .news-header h1 { font-size: 1.5rem; bottom: 20px; left: 20px; }
  .news-actions { flex-direction: column; align-items: flex-start; gap: 10px; }
  .news-reactions { padding: 12px; }
}


.tts-control {
  position: fixed;
  bottom: 20px;
  right: 25px;
  background: rgba(30, 30, 30, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 50px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 9999;
  box-shadow: 0 0 15px rgba(255,77,141,0.3);
  opacity: 1;
  transition: all 0.3s ease;
}
.tts-control.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
}
.tts-control button {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  transition: transform 0.2s, color 0.2s;
}
.tts-control button:hover {
  color: #ff4d8d;
  transform: scale(1.15);
}




.news-reactions {
  margin-top: 40px;
  text-align: center;
  color: #fff;
}

.news-reactions h4 {
  margin-bottom: 15px;
  font-size: 1.2rem;
}

.reaction-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.reaction-btn {
  position: relative;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 2rem;
  transition: transform 0.2s ease;
}

.reaction-btn:hover {
  transform: scale(1.15);
}

.count-bubble {
  position: absolute;
  top: -12px;
  right: -10px;
  background: #ff4d8d;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 50%;
  padding: 2px 6px;
  min-width: 20px;
  text-align: center;
  box-shadow: 0 0 6px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
}

.reaction-btn.active .count-bubble {
  transform: scale(1.2);
}

/* === Notifications bas-droite === */
#notif-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none; /* évite d'intercepter les clics du site */
}

.notification {
  background: rgba(20, 20, 20, 0.95);
  border-left: 4px solid #ff4d8d;
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 0.95rem;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 320px;
  pointer-events: auto;
}

.notification.show {
  opacity: 1;
  transform: translateY(0);
}

.notification.success { border-left-color: #4caf50; }
.notification.error { border-left-color: #e74c3c; }
.notification.info { border-left-color: #ff4d8d; }

.notification i {
  font-size: 1.3rem;
  color: #ff4d8d;
}







.news-comments {
  margin-top: 50px;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 20px 25px;
  color: #fff;
}

.news-comments h3 {
  margin-bottom: 15px;
  font-size: 1.3rem;
  font-weight: 600;
  color: #ff4d8d;
}

.comment-list {
  margin-bottom: 20px;
}

.comment {
  background: rgba(0,0,0,0.3);
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 10px;
  animation: fadeIn 0.4s ease;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  margin-bottom: 5px;
}

.comment-date {
  font-size: 0.8rem;
  opacity: 0.7;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-form input,
.comment-form textarea {
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  border-radius: 8px;
  padding: 10px;
  font-size: 0.9rem;
}

.comment-form button {
  align-self: flex-end;
  background: linear-gradient(90deg, #ff4d8d, #3e0070);
  border: none;
  border-radius: 8px;
  color: #fff;
  padding: 10px 20px;
  cursor: pointer;
  transition: transform 0.2s;
}

.comment-form button:hover {
  transform: scale(1.05);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.other-posts {
  margin-top: 50px;
  background: rgba(255,255,255,0.03);
  border-radius: 14px;
  padding: 25px;
}

.other-posts h4 {
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 20px;
  border-left: 4px solid #ff4d8d;
  padding-left: 10px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-post-item {
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.grid-post-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 15px rgba(255,77,141,0.25);
}

.grid-post-image img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.grid-post-body {
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.grid-post-title {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.grid-post-excerpt {
  font-size: 0.9rem;
  color: #bbb;
  flex-grow: 1;
}

.grid-post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.grid-post-meta .views {
  color: #ff4d8d;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.read-more {
  font-size: 0.85rem;
  color: #fff;
  background: linear-gradient(90deg, #ff4d8d, #3e0070);
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none;
  transition: 0.3s;
}
.read-more:hover {
  background: linear-gradient(90deg, #ff4d8d, #a400ff);
  transform: scale(1.05);
}

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

.search-widget form {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.search-widget input {
  flex: 1;
  padding: 8px 10px;
  border-radius: 6px;
  border: none;
  background: rgba(255,255,255,0.1);
  color: #fff;
  outline: none;
}
.search-widget button {
  background: linear-gradient(135deg, #3e0070, #7c3aed);
  border: none;
  color: #fff;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.3s;
}
.search-widget button:hover {
  opacity: 0.8;
}

/* === Popup des résultats === */
.search-results-modal {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: rgba(20, 20, 30, 0.96);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 16px;
  width: 320px;
  max-height: 60vh;
  overflow-y: auto;
  box-shadow: 0 6px 25px rgba(0,0,0,0.5);
  z-index: 9999;
  animation: fadeInUp .4s ease;
}
.search-results-modal h4 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: #fff;
}
.search-results-modal .result-item {
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  margin-bottom: 8px;
  padding: 8px;
  transition: background .3s;
}
.search-results-modal .result-item:hover {
  background: rgba(255,255,255,0.1);
}
.search-results-modal .result-item h5 {
  margin: 0;
  font-size: 0.95rem;
  color: #fff;
}
.search-results-modal .result-item p {
  font-size: 0.85rem;
  color: #ccc;
  margin-top: 4px;
}
@keyframes fadeInUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
/* === Version mobile : suppression du bandeau de dédicaces === */
@media (max-width: 768px) {
  .dedicace-bar {
    display: none !important;
  }
}

/* Boutons de partage : même allure que les liens, utilisables au clavier */
.news-actions .share button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  color: var(--color-pink);
}
.news-actions .share button[hidden] { display: none; }
.news-actions .share a:focus-visible,
.news-actions .share button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--border-radius-sm);
}
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
