/* /var/www/amisphereV3/actus-web/css/style.css */

:root {
  --primary: #4CAF50;
  --primary-light: #81C784;
  --primary-dark: #2E7D32;
  --secondary: #FF9800;
  --background: #f5f5f5;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-light: #666666;
  --text-lighter: #999999;
  --border: #e0e0e0;
  --error: #f44336;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-width: 300px;
  --header-height: 60px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ========================================
   SIDEBAR
   ======================================== */

.sidebar {
  position: fixed;
  top: 0;
  left: -320px;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transition: left 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sidebar.open {
  left: 0;
}

.sidebar-header {
  display: flex;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}

.logo {
  font-size: 28px;
  margin-right: 10px;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
}

.close-btn {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 28px;
  color: white;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.close-btn:hover {
  opacity: 1;
}

.sidebar-section {
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-text {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 12px;
}

.sidebar-footer {
  margin-top: auto;
  padding: 20px;
  background: var(--background);
  text-align: center;
}

.sidebar-footer p {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 10px;
}

.sidebar-links {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.sidebar-links a {
  font-size: 12px;
  color: var(--text-lighter);
  text-decoration: none;
}

.sidebar-links a:hover {
  color: var(--primary);
}

/* Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.overlay.visible {
  opacity: 1;
  visibility: visible;
}

/* ========================================
   CATEGORIES
   ======================================== */

.categories-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s;
  border: 2px solid transparent;
}

.category-item:hover {
  background: var(--background);
}

.category-item.active {
  background: var(--primary-light);
  background: rgba(76, 175, 80, 0.15);
  border-color: var(--primary);
}

.category-icon {
  font-size: 18px;
  margin-right: 10px;
}

.category-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

.category-check {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.category-item.active .category-check {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* ========================================
   AUTH
   ======================================== */

.user-card {
  display: flex;
  align-items: center;
  padding: 12px;
  background: var(--background);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  margin-right: 12px;
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 600;
  font-size: 14px;
}

.user-email {
  font-size: 12px;
  color: var(--text-light);
}

.message {
  font-size: 13px;
  margin-top: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
}

.message.success {
  background: #E8F5E9;
  color: var(--primary-dark);
}

.message.error {
  background: #FFEBEE;
  color: var(--error);
}

/* ========================================
   HEADER
   ======================================== */

.header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  padding: 0 16px;
  height: var(--header-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.menu-btn {
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s;
}

.header-title {
  display: flex;
  align-items: center;
  font-size: 20px;
  font-weight: 700;
  margin-left: 10px;
  color: var(--primary-dark);
}

.logo-small {
  font-size: 24px;
  margin-right: 8px;
}

.header-actions {
  margin-left: auto;
}

/* ========================================
   MAIN
   ======================================== */

.main {
  max-width: 680px;
  margin: 0 auto;
  padding-bottom: 40px;
}

/* Active filters */
.active-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.filter-label {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 500;
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(76, 175, 80, 0.15);
  border-radius: 20px;
  font-size: 13px;
  color: var(--primary-dark);
}

.filter-tag-remove {
  cursor: pointer;
  opacity: 0.7;
}

.filter-tag-remove:hover {
  opacity: 1;
}

/* ========================================
   POSTS
   ======================================== */

.posts-container {
  padding: 16px;
}

.posts-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.post-card:hover {
  box-shadow: var(--shadow-lg);
}

.post-header {
  display: flex;
  align-items: center;
  padding: 16px;
}

.post-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 18px;
  margin-right: 12px;
}

.post-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.post-meta {
  flex: 1;
}

.post-author {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}

.post-group {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
}

.post-group:hover {
  text-decoration: underline;
}

.post-date {
  font-size: 12px;
  color: var(--text-lighter);
  margin-left: auto;
}

.post-content {
  padding: 0 16px 16px;
}

.post-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  word-wrap: break-word;
}

.post-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  margin-top: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.post-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 12px;
}

.post-category {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.post-actions {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  gap: 20px;
}

.post-action {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-light);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.post-action:hover {
  background: var(--background);
  color: var(--text);
}

.post-action.seeded {
  color: var(--primary);
  background: rgba(76, 175, 80, 0.1);
}

.post-action .seed-icon {
  font-size: 18px;
}

.post-action .count {
  font-weight: 600;
}

.share-btn {
  margin-left: auto;
}

/* Share dropdown */
.share-dropdown {
  position: relative;
}

.share-menu {
  position: absolute;
  bottom: 100%;
  right: 0;
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 8px 0;
  min-width: 180px;
  display: none;
  z-index: 10;
}

.share-dropdown.open .share-menu {
  display: block;
}

.share-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  transition: background 0.2s;
}

.share-option:hover {
  background: var(--background);
}

/* ========================================
   LOADING & EMPTY
   ======================================== */

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px;
  color: var(--text-light);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  font-size: 64px;
  display: block;
  margin-bottom: 16px;
}

.empty-state p {
  font-size: 16px;
  color: var(--text-light);
}

.empty-subtitle {
  font-size: 14px !important;
  color: var(--text-lighter) !important;
  margin-top: 8px;
}

.load-more {
  display: block;
  width: 100%;
  margin-top: 20px;
}

/* ========================================
   MODAL
   ======================================== */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: var(--surface);
  border-radius: var(--radius);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--background);
  border: none;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  z-index: 10;
}

.modal-close:hover {
  background: var(--border);
}

/* Comments section in modal */
.comments-section {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.comments-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.comment-form {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.comment-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  resize: none;
}

.comment-input:focus {
  outline: none;
  border-color: var(--primary);
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comment-item {
  display: flex;
  gap: 12px;
}

.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.comment-body {
  flex: 1;
}

.comment-author {
  font-weight: 600;
  font-size: 14px;
}

.comment-date {
  font-size: 12px;
  color: var(--text-lighter);
  margin-left: 8px;
}

.comment-text {
  font-size: 14px;
  margin-top: 4px;
  color: var(--text);
}

/* ========================================
   TOAST
   ======================================== */

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  z-index: 3000;
  animation: slideUp 0.3s ease;
}

.toast.hidden {
  display: none;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ========================================
   BUTTONS & INPUTS
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  width: 100%;
}

.btn-small {
  padding: 8px 16px;
  font-size: 13px;
  width: auto;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--secondary);
  color: white;
}

.btn-secondary:hover {
  background: #F57C00;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 10px;
  transition: border-color 0.2s;
}

.input:focus {
  outline: none;
  border-color: var(--primary);
}

.hidden {
  display: none !important;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (min-width: 768px) {
  .sidebar {
    left: 0;
    box-shadow: none;
    border-right: 1px solid var(--border);
  }
  
  .close-btn {
    display: none;
  }
  
  .overlay {
    display: none !important;
  }
  
  .main {
    margin-left: var(--sidebar-width);
    max-width: calc(100% - var(--sidebar-width));
    padding: 0 20px 40px;
  }
  
  .menu-btn {
    display: none;
  }
  
  .header {
    padding-left: 20px;
  }
  
  .header-title {
    margin-left: 0;
  }
  
  .posts-container {
    padding: 20px 0;
  }
}

@media (min-width: 1024px) {
  .main {
    max-width: 860px;
    margin-left: calc((100% - 860px) / 2 + var(--sidebar-width) / 2);
  }
}

@media (min-width: 1400px) {
  .main {
    max-width: 1000px;
    margin-left: calc((100% - 1000px) / 2 + var(--sidebar-width) / 2);
  }
}

@media (min-width: 1800px) {
  .main {
    max-width: 1200px;
    margin-left: calc((100% - 1200px) / 2 + var(--sidebar-width) / 2);
  }
}

/* ========================================
   GALERIE MULTI-IMAGES
   ======================================== */

.post-gallery {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.gallery-2 {
  grid-template-columns: 1fr 1fr;
}

.gallery-3 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.gallery-3 .gallery-item:first-child {
  grid-row: span 2;
}

.gallery-4 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.gallery-item {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  background: var(--background);
  aspect-ratio: 1;
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}

.gallery-item:hover img,
.gallery-item:hover video {
  transform: scale(1.05);
}

.gallery-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}

.gallery-more {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 28px;
  font-weight: 600;
}

/* ========================================
   VIDEO
   ======================================== */

.post-video {
  width: 100%;
  max-height: 500px;
  border-radius: var(--radius-sm);
  background: #000;
  margin-top: 12px;
}

/* ========================================
   LIGHTBOX
   ======================================== */

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3000;
  display: none;
}

.lightbox.visible {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.95);
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  z-index: 1;
}

.lightbox-media img,
.lightbox-media video {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 36px;
  cursor: pointer;
  z-index: 10;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  font-size: 48px;
  padding: 20px 15px;
  cursor: pointer;
  transition: background 0.2s;
}

.lightbox-nav:hover {
  background: rgba(255,255,255,0.3);
}

.lightbox-prev {
  left: -80px;
}

.lightbox-next {
  right: -80px;
}

.lightbox-counter {
  text-align: center;
  color: white;
  margin-top: 15px;
  font-size: 14px;
}

@media (max-width: 768px) {
  .lightbox-nav {
    padding: 10px;
    font-size: 32px;
  }
  
  .lightbox-prev {
    left: 10px;
  }
  
  .lightbox-next {
    right: 10px;
  }
}
/* Bouton connexion header */
.btn-small.btn-primary {
  background: var(--primary-dark);
}

/* Tooltip lien magique */
.magic-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}
.magic-link-row .btn {
  flex: 1;
}
.tooltip-wrapper {
  position: relative;
  flex-shrink: 0;
}
.tooltip-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-light);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.tooltip-bubble {
  display: none;
  position: absolute;
  bottom: 130%;
  right: 0;
  width: 220px;
  background: var(--text);
  color: white;
  font-size: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  line-height: 1.5;
  z-index: 10;
}
.tooltip-wrapper:hover .tooltip-bubble {
  display: block;
}

/* Catégories améliorées */
.category-item {
  border-radius: 20px !important;
}
.categories-list {
  gap: 6px !important;
}
/* À ajouter à la fin de /var/www/amisphereV3/amisphereV3/actus-web/css/style.css */

/* ========================================
   COMMENTAIRES INLINE
   ======================================== */

.inline-comments {
  border-top: 1px solid var(--border);
  background: #fafafa;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.inline-comments-inner {
  padding: 12px 16px 16px;
}

/* Formulaire */
.inline-comment-form {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.inline-comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.inline-comment-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 6px 6px 14px;
  gap: 6px;
  transition: border-color 0.2s;
}

.inline-comment-input-wrap:focus-within {
  border-color: var(--primary);
}

.inline-comment-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  background: transparent;
  color: var(--text);
}

.inline-comment-send {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  color: white;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

.inline-comment-send:hover {
  background: var(--primary-dark);
}

.inline-login-prompt {
  font-size: 13px;
  color: var(--text-light);
}

.inline-login-prompt a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

/* Liste commentaires */
.inline-comment-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inline-comment-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.inline-comment-avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.inline-comment-bubble {
  background: white;
  border-radius: 12px;
  padding: 8px 12px;
  flex: 1;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.inline-comment-author {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  display: block;
  margin-bottom: 2px;
}

.inline-comment-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

.inline-comment-date {
  font-size: 11px;
  color: var(--text-lighter);
  display: block;
  margin-top: 4px;
}

.inline-comments-loading {
  display: flex;
  justify-content: center;
  padding: 10px;
}

.spinner-sm {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.no-comments {
  font-size: 13px;
  color: var(--text-lighter);
  text-align: center;
  padding: 8px 0;
}

.post-read-more {
  display: inline;
  background: none;
  border: none;
  padding: 0;
  margin-left: 2px;
  color: var(--primary, #2E7D32);
  font-size: inherit;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.post-read-more:hover {
  text-decoration: underline;
}

.hidden {
  display: none !important;
}
/* =============================================
   À ajouter dans style.css
   Rendu contenu riche : TinyMCE, code iframe, documents
   ============================================= */

/* Contenu HTML riche TinyMCE */
.post-rich-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 12px;
}
.post-rich-text h1, .post-rich-text h2, .post-rich-text h3 {
  font-weight: 700;
  margin: 16px 0 8px;
  line-height: 1.3;
}
.post-rich-text h1 { font-size: 22px; }
.post-rich-text h2 { font-size: 18px; }
.post-rich-text h3 { font-size: 16px; }
.post-rich-text p { margin-bottom: 10px; }
.post-rich-text ul, .post-rich-text ol {
  padding-left: 20px;
  margin-bottom: 10px;
}
.post-rich-text li { margin-bottom: 4px; }
.post-rich-text a { color: var(--primary); }
.post-rich-text strong { font-weight: 700; }
.post-rich-text em { font-style: italic; }
.post-rich-text blockquote {
  border-left: 3px solid var(--primary-light);
  padding-left: 14px;
  color: var(--text-light);
  margin: 12px 0;
}

/* Bloc code sandboxé */
.post-code-block {
  border: 1px solid var(--border, #e5e7eb);
  border-top: 3px solid #60a5fa;
  margin: 12px 0;
  background: #f8fafc;
  border-radius: 4px;
  overflow: hidden;
}
.post-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.post-code-lang {
  font-family: monospace;
  font-size: 11px;
  font-weight: 600;
  color: #60a5fa;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.post-code-toggle {
  font-size: 12px;
  font-weight: 600;
  background: none;
  border: 1px solid var(--border, #e5e7eb);
  color: var(--text-light, #6b7280);
  padding: 4px 12px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
}
.post-code-toggle:hover {
  border-color: #60a5fa;
  color: #60a5fa;
}
.post-code-frame {
  width: 100%;
  height: 300px;
  border: none;
  display: block;
  background: white;
}
.post-code-frame.hidden { display: none; }

/* Documents joints */
.post-docs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}
.post-doc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
  background: #f8fafc;
  transition: background 0.15s, border-color 0.15s;
}
.post-doc-item:hover {
  background: #f0fdf4;
  border-color: var(--primary, #2E7D32);
}
.post-doc-icon { font-size: 18px; flex-shrink: 0; }
.post-doc-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.post-doc-dl {
  font-size: 14px;
  color: var(--primary, #2E7D32);
  flex-shrink: 0;
}

/* =============================================
   À ajouter dans style.css
   Rendu contenu riche : TinyMCE, code iframe, documents
   ============================================= */

/* Contenu HTML riche TinyMCE */
.post-rich-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 12px;
}
.post-rich-text h1, .post-rich-text h2, .post-rich-text h3 {
  font-weight: 700;
  margin: 16px 0 8px;
  line-height: 1.3;
}
.post-rich-text h1 { font-size: 22px; }
.post-rich-text h2 { font-size: 18px; }
.post-rich-text h3 { font-size: 16px; }
.post-rich-text p { margin-bottom: 10px; }
.post-rich-text ul, .post-rich-text ol {
  padding-left: 20px;
  margin-bottom: 10px;
}
.post-rich-text li { margin-bottom: 4px; }
.post-rich-text a { color: var(--primary); }
.post-rich-text strong { font-weight: 700; }
.post-rich-text em { font-style: italic; }
.post-rich-text blockquote {
  border-left: 3px solid var(--primary-light);
  padding-left: 14px;
  color: var(--text-light);
  margin: 12px 0;
}

/* Bloc code sandboxé */
.post-code-block {
  border: 1px solid var(--border, #e5e7eb);
  border-top: 3px solid #60a5fa;
  margin: 12px 0;
  background: #f8fafc;
  border-radius: 4px;
  overflow: hidden;
}
.post-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.post-code-lang {
  font-family: monospace;
  font-size: 11px;
  font-weight: 600;
  color: #60a5fa;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.post-code-toggle {
  font-size: 12px;
  font-weight: 600;
  background: none;
  border: 1px solid var(--border, #e5e7eb);
  color: var(--text-light, #6b7280);
  padding: 4px 12px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
}
.post-code-toggle:hover {
  border-color: #60a5fa;
  color: #60a5fa;
}
.post-code-frame {
  width: 100%;
  height: 300px;
  border: none;
  display: block;
  background: white;
}
.post-code-frame.hidden { display: none; }

/* Documents joints */
.post-docs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}
.post-doc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
  background: #f8fafc;
  transition: background 0.15s, border-color 0.15s;
}
.post-doc-item:hover {
  background: #f0fdf4;
  border-color: var(--primary, #2E7D32);
}
.post-doc-icon { font-size: 18px; flex-shrink: 0; }
.post-doc-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.post-doc-dl {
  font-size: 14px;
  color: var(--primary, #2E7D32);
  flex-shrink: 0;
}

/* =============================================
   Médias — images inline et vidéos
   ============================================= */

/* Grille images */
.post-media {
  display: grid;
  gap: 4px;
  margin: 12px 0;
  border-radius: 10px;
  overflow: hidden;
}
.post-media-single {
  grid-template-columns: 1fr;
}
.post-media-double {
  grid-template-columns: 1fr 1fr;
}
.post-media-grid {
  grid-template-columns: 1fr 1fr;
}
.post-media-grid .post-media-item:first-child:nth-last-child(3),
.post-media-grid .post-media-item:first-child:nth-last-child(3) ~ .post-media-item {
  /* 3 images : première prend toute la largeur */
}
.post-media-grid .post-media-item:first-child:nth-last-child(odd) {
  grid-column: 1 / -1;
}

.post-media-item {
  display: block;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #f0f0f0;
}
.post-media-single .post-media-item {
  aspect-ratio: unset;
  max-height: 480px;
}
.post-media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.post-media-item:hover img {
  transform: scale(1.02);
}

/* Vidéo */
.post-video-wrap {
  margin: 12px 0;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}
.post-video {
  width: 100%;
  max-height: 400px;
  display: block;
}
/* =============================================
   À ajouter dans style.css
   Rendu contenu riche : TinyMCE, code iframe, documents
   ============================================= */

/* Contenu HTML riche TinyMCE */
.post-rich-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 12px;
}
.post-rich-text h1, .post-rich-text h2, .post-rich-text h3 {
  font-weight: 700;
  margin: 16px 0 8px;
  line-height: 1.3;
}
.post-rich-text h1 { font-size: 22px; }
.post-rich-text h2 { font-size: 18px; }
.post-rich-text h3 { font-size: 16px; }
.post-rich-text p { margin-bottom: 10px; }
.post-rich-text ul, .post-rich-text ol {
  padding-left: 20px;
  margin-bottom: 10px;
}
.post-rich-text li { margin-bottom: 4px; }
.post-rich-text a { color: var(--primary); }
.post-rich-text strong { font-weight: 700; }
.post-rich-text em { font-style: italic; }
.post-rich-text blockquote {
  border-left: 3px solid var(--primary-light);
  padding-left: 14px;
  color: var(--text-light);
  margin: 12px 0;
}

/* Bloc code sandboxé */
.post-code-block {
  border: 1px solid var(--border, #e5e7eb);
  border-top: 3px solid #60a5fa;
  margin: 12px 0;
  background: #f8fafc;
  border-radius: 4px;
  overflow: hidden;
}
.post-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.post-code-lang {
  font-family: monospace;
  font-size: 11px;
  font-weight: 600;
  color: #60a5fa;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.post-code-toggle {
  font-size: 12px;
  font-weight: 600;
  background: none;
  border: 1px solid var(--border, #e5e7eb);
  color: var(--text-light, #6b7280);
  padding: 4px 12px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
}
.post-code-toggle:hover {
  border-color: #60a5fa;
  color: #60a5fa;
}
.post-code-frame {
  width: 100%;
  height: 300px;
  border: none;
  display: block;
  background: white;
}
.post-code-frame.hidden { display: none; }

/* Documents joints */
.post-docs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}
.post-doc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
  background: #f8fafc;
  transition: background 0.15s, border-color 0.15s;
}
.post-doc-item:hover {
  background: #f0fdf4;
  border-color: var(--primary, #2E7D32);
}
.post-doc-icon { font-size: 18px; flex-shrink: 0; }
.post-doc-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.post-doc-dl {
  font-size: 14px;
  color: var(--primary, #2E7D32);
  flex-shrink: 0;
}

/* =============================================
   Médias — images inline et vidéos
   ============================================= */

/* Grille images */
.post-media {
  display: grid;
  gap: 4px;
  margin: 12px 0;
  border-radius: 10px;
  overflow: hidden;
}
.post-media-single {
  grid-template-columns: 1fr;
}
.post-media-double {
  grid-template-columns: 1fr 1fr;
}
.post-media-grid {
  grid-template-columns: 1fr 1fr;
}
.post-media-grid .post-media-item:first-child:nth-last-child(3),
.post-media-grid .post-media-item:first-child:nth-last-child(3) ~ .post-media-item {
  /* 3 images : première prend toute la largeur */
}
.post-media-grid .post-media-item:first-child:nth-last-child(odd) {
  grid-column: 1 / -1;
}

.post-media-item {
  display: block;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #f0f0f0;
}
.post-media-single .post-media-item {
  aspect-ratio: unset;
  max-height: 480px;
}
.post-media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.post-media-item:hover img {
  transform: scale(1.02);
}

/* Vidéo */
.post-video-wrap {
  margin: 12px 0;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}
.post-video {
  width: 100%;
  max-height: 400px;
  display: block;
}

/* ——— Boutons admin dans le fil ——— */
.admin-edit-btn,
.admin-delete-btn {
  opacity: 0.4;
  transition: opacity 0.2s;
  font-size: 14px;
  padding: 4px 8px;
}

.admin-edit-btn:hover { opacity: 1; }
.admin-delete-btn:hover { opacity: 1; color: #c0392b; }

/* ——— iframe article HTML complet ——— */
.post-html-frame-wrap {
  margin: 12px 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border, #e5e7eb);
}

.post-html-frame {
  width: 100%;
  border: none;
  display: block;
  min-height: 200px;
}
/* =============================================
   À ajouter dans style.css
   Rendu contenu riche : TinyMCE, code iframe, documents
   ============================================= */

/* Contenu HTML riche TinyMCE */
.post-rich-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 12px;
}
.post-rich-text h1, .post-rich-text h2, .post-rich-text h3 {
  font-weight: 700;
  margin: 16px 0 8px;
  line-height: 1.3;
}
.post-rich-text h1 { font-size: 22px; }
.post-rich-text h2 { font-size: 18px; }
.post-rich-text h3 { font-size: 16px; }
.post-rich-text p { margin-bottom: 10px; }
.post-rich-text ul, .post-rich-text ol {
  padding-left: 20px;
  margin-bottom: 10px;
}
.post-rich-text li { margin-bottom: 4px; }
.post-rich-text a { color: var(--primary); }
.post-rich-text strong { font-weight: 700; }
.post-rich-text em { font-style: italic; }
.post-rich-text blockquote {
  border-left: 3px solid var(--primary-light);
  padding-left: 14px;
  color: var(--text-light);
  margin: 12px 0;
}

/* Bloc code sandboxé */
.post-code-block {
  border: 1px solid var(--border, #e5e7eb);
  border-top: 3px solid #60a5fa;
  margin: 12px 0;
  background: #f8fafc;
  border-radius: 4px;
  overflow: hidden;
}
.post-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.post-code-lang {
  font-family: monospace;
  font-size: 11px;
  font-weight: 600;
  color: #60a5fa;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.post-code-toggle {
  font-size: 12px;
  font-weight: 600;
  background: none;
  border: 1px solid var(--border, #e5e7eb);
  color: var(--text-light, #6b7280);
  padding: 4px 12px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
}
.post-code-toggle:hover {
  border-color: #60a5fa;
  color: #60a5fa;
}
.post-code-frame {
  width: 100%;
  height: 300px;
  border: none;
  display: block;
  background: white;
}
.post-code-frame.hidden { display: none; }

/* Documents joints */
.post-docs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}
.post-doc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
  background: #f8fafc;
  transition: background 0.15s, border-color 0.15s;
}
.post-doc-item:hover {
  background: #f0fdf4;
  border-color: var(--primary, #2E7D32);
}
.post-doc-icon { font-size: 18px; flex-shrink: 0; }
.post-doc-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.post-doc-dl {
  font-size: 14px;
  color: var(--primary, #2E7D32);
  flex-shrink: 0;
}

/* =============================================
   Médias — images inline et vidéos
   ============================================= */

/* Grille images */
.post-media {
  display: grid;
  gap: 4px;
  margin: 12px 0;
  border-radius: 10px;
  overflow: hidden;
}
.post-media-single {
  grid-template-columns: 1fr;
}
.post-media-double {
  grid-template-columns: 1fr 1fr;
}
.post-media-grid {
  grid-template-columns: 1fr 1fr;
}
.post-media-grid .post-media-item:first-child:nth-last-child(3),
.post-media-grid .post-media-item:first-child:nth-last-child(3) ~ .post-media-item {
  /* 3 images : première prend toute la largeur */
}
.post-media-grid .post-media-item:first-child:nth-last-child(odd) {
  grid-column: 1 / -1;
}

.post-media-item {
  display: block;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #f0f0f0;
}
.post-media-single .post-media-item {
  aspect-ratio: unset;
  max-height: 480px;
}
.post-media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.post-media-item:hover img {
  transform: scale(1.02);
}

/* Vidéo */
.post-video-wrap {
  margin: 12px 0;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}
.post-video {
  width: 100%;
  max-height: 400px;
  display: block;
}

/* ——— Boutons admin dans le fil ——— */
.admin-edit-btn,
.admin-delete-btn {
  opacity: 0.4;
  transition: opacity 0.2s;
  font-size: 14px;
  padding: 4px 8px;
}

.admin-edit-btn:hover { opacity: 1; }
.admin-delete-btn:hover { opacity: 1; color: #c0392b; }

/* ——— iframe article HTML complet ——— */
.post-html-frame-wrap {
  margin: 12px 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border, #e5e7eb);
}

.post-html-frame {
  width: 100%;
  border: none;
  display: block;
  min-height: 200px;
}

/* ——— Bouton En savoir plus ——— */
.post-article-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text, #1a1a1a);
  margin-bottom: 12px;
  line-height: 1.4;
}

.frame-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--primary, #3a7d44), #2d6a4f);
  border: none;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(58,125,68,0.25);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.frame-toggle-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(58,125,68,0.35);
}

.frame-toggle-btn:active {
  transform: translateY(0);
}

.frame-toggle-icon { font-size: 15px; }
.frame-toggle-label { flex: 1; }
.frame-toggle-arrow {
  font-size: 14px;
  opacity: 0.8;
  transition: transform 0.2s;
}

.frame-toggle-btn:hover .frame-toggle-arrow {
  transform: translateX(3px);
}

.post-html-frame-wrap.collapsed {
  border: none;
  background: transparent;
}

.post-html-frame-wrap:not(.collapsed) .frame-toggle-btn {
  background: linear-gradient(135deg, #666, #444);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
/* =============================================
   À ajouter dans style.css
   Rendu contenu riche : TinyMCE, code iframe, documents
   ============================================= */

/* Contenu HTML riche TinyMCE */
.post-rich-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 12px;
}
.post-rich-text h1, .post-rich-text h2, .post-rich-text h3 {
  font-weight: 700;
  margin: 16px 0 8px;
  line-height: 1.3;
}
.post-rich-text h1 { font-size: 22px; }
.post-rich-text h2 { font-size: 18px; }
.post-rich-text h3 { font-size: 16px; }
.post-rich-text p { margin-bottom: 10px; }
.post-rich-text ul, .post-rich-text ol {
  padding-left: 20px;
  margin-bottom: 10px;
}
.post-rich-text li { margin-bottom: 4px; }
.post-rich-text a { color: var(--primary); }
.post-rich-text strong { font-weight: 700; }
.post-rich-text em { font-style: italic; }
.post-rich-text blockquote {
  border-left: 3px solid var(--primary-light);
  padding-left: 14px;
  color: var(--text-light);
  margin: 12px 0;
}

/* Bloc code sandboxé */
.post-code-block {
  border: 1px solid var(--border, #e5e7eb);
  border-top: 3px solid #60a5fa;
  margin: 12px 0;
  background: #f8fafc;
  border-radius: 4px;
  overflow: hidden;
}
.post-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.post-code-lang {
  font-family: monospace;
  font-size: 11px;
  font-weight: 600;
  color: #60a5fa;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.post-code-toggle {
  font-size: 12px;
  font-weight: 600;
  background: none;
  border: 1px solid var(--border, #e5e7eb);
  color: var(--text-light, #6b7280);
  padding: 4px 12px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
}
.post-code-toggle:hover {
  border-color: #60a5fa;
  color: #60a5fa;
}
.post-code-frame {
  width: 100%;
  height: 300px;
  border: none;
  display: block;
  background: white;
}
.post-code-frame.hidden { display: none; }

/* Documents joints */
.post-docs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}
.post-doc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
  background: #f8fafc;
  transition: background 0.15s, border-color 0.15s;
}
.post-doc-item:hover {
  background: #f0fdf4;
  border-color: var(--primary, #2E7D32);
}
.post-doc-icon { font-size: 18px; flex-shrink: 0; }
.post-doc-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.post-doc-dl {
  font-size: 14px;
  color: var(--primary, #2E7D32);
  flex-shrink: 0;
}

/* =============================================
   Médias — images inline et vidéos
   ============================================= */

/* Grille images */
.post-media {
  display: grid;
  gap: 4px;
  margin: 12px 0;
  border-radius: 10px;
  overflow: hidden;
}
.post-media-single {
  grid-template-columns: 1fr;
}
.post-media-double {
  grid-template-columns: 1fr 1fr;
}
.post-media-grid {
  grid-template-columns: 1fr 1fr;
}
.post-media-grid .post-media-item:first-child:nth-last-child(3),
.post-media-grid .post-media-item:first-child:nth-last-child(3) ~ .post-media-item {
  /* 3 images : première prend toute la largeur */
}
.post-media-grid .post-media-item:first-child:nth-last-child(odd) {
  grid-column: 1 / -1;
}

.post-media-item {
  display: block;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #f0f0f0;
}
.post-media-single .post-media-item {
  aspect-ratio: unset;
  max-height: 480px;
}
.post-media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.post-media-item:hover img {
  transform: scale(1.02);
}

/* Vidéo */
.post-video-wrap {
  margin: 12px 0;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}
.post-video {
  width: 100%;
  max-height: 400px;
  display: block;
}

/* ——— Boutons admin dans le fil ——— */
.admin-edit-btn,
.admin-delete-btn {
  opacity: 0.4;
  transition: opacity 0.2s;
  font-size: 14px;
  padding: 4px 8px;
}

.admin-edit-btn:hover { opacity: 1; }
.admin-delete-btn:hover { opacity: 1; color: #c0392b; }

/* ——— iframe article HTML complet ——— */
.post-html-frame-wrap {
  margin: 12px 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border, #e5e7eb);
}

.post-html-frame {
  width: 100%;
  border: none;
  display: block;
  min-height: 200px;
}

/* ——— Bouton En savoir plus ——— */
.post-article-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text, #1a1a1a);
  margin-bottom: 12px;
  line-height: 1.4;
}

.frame-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--primary, #3a7d44), #2d6a4f);
  border: none;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(58,125,68,0.25);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.frame-toggle-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(58,125,68,0.35);
}

.frame-toggle-btn:active {
  transform: translateY(0);
}

.frame-toggle-icon { font-size: 15px; }
.frame-toggle-label { flex: 1; }
.frame-toggle-arrow {
  font-size: 14px;
  opacity: 0.8;
  transition: transform 0.2s;
}

.frame-toggle-btn:hover .frame-toggle-arrow {
  transform: translateX(3px);
}

.post-html-frame-wrap.collapsed {
  border: none;
  background: transparent;
}

.post-html-frame-wrap:not(.collapsed) .frame-toggle-btn {
  background: linear-gradient(135deg, #666, #444);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
/* /var/www/amisphereV3/amisphereV3/actus-web/css/style.css */
/* ========================================
   ABONNEMENTS NOTIFICATIONS
   ======================================== */

.category-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.category-row .category-item {
  flex: 1;
}

.subscribe-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: var(--text-lighter);
  opacity: 0.5;
}

.subscribe-btn:hover {
  opacity: 1;
  border-color: var(--primary);
  background: rgba(76, 175, 80, 0.08);
  transform: scale(1.1);
}

.subscribe-btn.subscribed {
  opacity: 1;
  border-color: var(--primary);
  background: rgba(76, 175, 80, 0.12);
  color: var(--primary-dark);
}

.subscribe-btn.subscribed:hover {
  background: rgba(244, 67, 54, 0.08);
  border-color: var(--error);
}
/* /var/www/amisphereV3/amisphereV3/actus-web/css/style.css */
/* À ajouter à la fin du fichier */

/* ========================================
   ACCORDION CATÉGORIES
   ======================================== */

.category-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.has-children {
  padding-right: 4px !important;
}

.accordion-toggle {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 10px;
  color: var(--text-lighter);
  padding: 2px 4px;
  margin-left: 4px;
  border-radius: 4px;
  transition: all 0.2s;
  line-height: 1;
}

.accordion-toggle:hover {
  background: rgba(0,0,0,0.06);
  color: var(--text);
}

/* Sous-catégories */
.subcategories {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding-left: 8px;
  border-left: 2px solid var(--border);
  margin-left: 14px;
  overflow: hidden;
  animation: slideDown 0.2s ease;
}

.subcategories.open {
  display: flex;
}

.subcategory-row .category-item {
  font-size: 13px;
  padding: 8px 10px;
}

.subcategory-item {
  opacity: 0.85;
}

.subcategory-item:hover {
  opacity: 1;
}

.subcategory-item.active {
  opacity: 1;
}

.subcategory-indent {
  font-size: 11px;
  color: var(--text-lighter);
  margin-right: 4px;
  flex-shrink: 0;
}

/* Bandeau info */
.categories-info {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(76, 175, 80, 0.08);
  border: 1px solid rgba(76, 175, 80, 0.25);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.5;
}

.categories-info-icon {
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}

.categories-info-close {
  flex-shrink: 0;
  margin-left: auto;
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-lighter);
  line-height: 1;
  padding: 0 2px;
}

.categories-info-close:hover {
  color: var(--text);
}
/* ---------------------------------------------------------------------------
   Bande d'accueil
   Le fil etant la page d'accueil, il doit se presenter — mais une fois. Elle se
   referme, et le navigateur retient le choix.
--------------------------------------------------------------------------- */
.accueil {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 16px 20px 0;
  padding: 20px 22px;
  border: 1px solid #dfe6e0;
  border-radius: 12px;
  background: #f4f8f4;
}
.accueil.hidden { display: none; }
.accueil-texte { flex: 1; min-width: 0; }
.accueil h2 {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 6px;
  color: #22302a;
  line-height: 1.25;
}
.accueil p {
  font-size: 14.5px;
  line-height: 1.55;
  color: #55635b;
  margin: 0 0 14px;
  max-width: 62ch;
}
.accueil-liens { display: flex; flex-wrap: wrap; gap: 8px; }
.accueil-liens .btn {
  background: #fff;
  border: 1px solid #cfdad2;
  color: #2f5940;
  font-weight: 600;
  text-decoration: none;
}
.accueil-liens .btn:first-child {
  background: #4a7c59;
  border-color: #4a7c59;
  color: #fff;
}
.accueil-fermer {
  flex: 0 0 auto;
  background: none;
  border: 0;
  font-size: 22px;
  line-height: 1;
  color: #8a968c;
  cursor: pointer;
  padding: 0 2px;
}
@media (max-width: 600px) {
  .accueil { margin: 12px; padding: 16px; }
  .accueil h2 { font-size: 17px; }
}

/* ---------------------------------------------------------------------------
   Empreinte et mode léger
   Le poids annoncé est lu sur le disque par le serveur : on ne montre jamais
   un chiffre approximatif sur un mur qui parle de sobriété.
--------------------------------------------------------------------------- */
.empreinte {
  flex: 0 0 auto;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 3px 7px;
  border-radius: 3px;
  margin-right: 8px;
  cursor: help;
}
.empreinte-legere  { background: #e4f0e8; color: #2f6b4f; }
.empreinte-moyenne { background: #f7efdc; color: #8a6212; }
.empreinte-lourde  { background: #f8e8e2; color: #9b3e28; }

.leger-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #cfdad2;
  color: #55635b;
  font-weight: 600;
}
.leger-btn .leger-point {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cfdad2;
  display: block;
}
.leger-btn.actif {
  background: #2f6b4f;
  border-color: #2f6b4f;
  color: #fff;
}
.leger-btn.actif .leger-point { background: #fff; }

.medias-en-attente {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0;
  padding: 13px 14px;
  border: 1px dashed #cfdad2;
  border-radius: 8px;
  background: #f6f8f5;
}
.medias-en-attente-texte { font-size: 13.5px; color: #55635b; }
.medias-en-attente-texte b { color: #22302a; }
.medias-en-attente-btn {
  border: 1px solid #4a7c59;
  background: #fff;
  color: #2f5940;
  font-size: 13px;
  font-weight: 700;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  white-space: nowrap;
}
.medias-en-attente-btn:hover { background: #4a7c59; color: #fff; }

/* ---------------------------------------------------------------------------
   Panneau d'inscription
   Il s'ouvre au clic sur « commenter », jamais à l'arrivée : quelqu'un qui a
   quelque chose à dire accepte de donner son nom, un visiteur qui découvre non.
--------------------------------------------------------------------------- */
.rejoindre-voile {
  position: fixed;
  inset: 0;
  background: rgba(20, 28, 23, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 2000;
}
.rejoindre-voile.hidden { display: none; }
.rejoindre-boite {
  position: relative;
  background: #fff;
  border-radius: 14px;
  padding: 26px 24px 22px;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
}
.rejoindre-fermer {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: 0;
  font-size: 26px;
  line-height: 1;
  color: #8a968c;
  cursor: pointer;
}
.rejoindre-boite h2 {
  font-size: 20px;
  font-weight: 700;
  color: #22302a;
  margin: 0 0 8px;
  line-height: 1.25;
  padding-right: 24px;
}
.rejoindre-sous { font-size: 14.5px; color: #55635b; margin: 0 0 16px; line-height: 1.5; }
.rejoindre-graines {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #edf3ee;
  color: #2f5940;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 8px;
  padding: 11px 13px;
  margin: 0 0 16px;
}
.rejoindre-graines.hidden { display: none; }
.rejoindre-boite label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: #22302a;
  margin: 0 0 5px;
}
.rejoindre-boite input {
  width: 100%;
  border: 1.5px solid #e3e8e4;
  border-radius: 9px;
  padding: 12px 13px;
  font-size: 15.5px;
  font-family: inherit;
  color: #22302a;
  margin-bottom: 12px;
  background: #fff;
}
.rejoindre-boite input:focus {
  outline: 2px solid #4a7c59;
  outline-offset: 1px;
  border-color: #4a7c59;
}
.rejoindre-indice { font-size: 12.5px; color: #71807a; margin: -8px 0 12px; }
.rejoindre-envoyer {
  width: 100%;
  background: #4a7c59;
  color: #fff;
  border: 0;
  border-radius: 9px;
  padding: 13px;
  font-size: 15.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.rejoindre-envoyer:disabled { opacity: .6; cursor: default; }
.rejoindre-message { font-size: 13.5px; margin: 10px 0 0; min-height: 18px; }
.rejoindre-message.erreur { color: #9b2c22; }
.rejoindre-message.reussi { color: #2f6b4f; }
.rejoindre-echelle {
  border-top: 1px solid #e3e8e4;
  margin-top: 18px;
  padding-top: 15px;
}
.rejoindre-echelle-titre {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #71807a;
  margin: 0 0 9px;
}
.rejoindre-echelle p { font-size: 13.5px; color: #55635b; margin: 0 0 7px; line-height: 1.45; }
.rejoindre-echelle b { color: #22302a; }
.rejoindre-echelle .plus-tard { opacity: .62; }
.rejoindre-legal {
  font-size: 12px;
  color: #71807a;
  line-height: 1.5;
  margin: 14px 0 0;
}
