/* style.css - Styles principaux pour GoatPress */

/* regarder graph-card le commentaire, pour avoir la primary dans le bord droit*/

/* Variables de thème */
:root {
  /* Couleurs de base du thème */
  --primary-100: #e9d8fd;
  --primary-200: #d6bcfa;
  --primary-300: #b794f4;
  --primary-400: #9f7aea;
  --primary-500: #805ad5;
  --primary-600: #6b46c1;
  --primary-700: #553c9a;
  --primary-800: #44337a;
  --primary-900: #322659;

  /* Thème sombre (défaut) */
  --bg: #111827;
  --card: #1f2937;
  --input: #374151;
  --input-border: #4b5563;
  --text-body: #f3f4f6;
  --text-muted: #9ca3af;
  --separator: #4b5563;
  --card-border: #374151;
  --wp-badge: #2d3748;
  --wp-logo: #b794f4;

  /* Variables pour les effets - ajustées pour moins de diffusion */
  --primary-shadow: rgba(128, 90, 213, 0.2);
  --primary-shadow-strong: rgba(128, 90, 213, 0.4);
  --primary-glow: rgba(128, 90, 213, 0.4);
  --shadow-sm: 0 1px 20px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.2);

  /* Variables RGB pour usage avec rgba() */
  --primary-rgb: 128, 90, 213;
  --spinner-border: rgba(255, 255, 255, 0.3);
  --spinner-accent: #fff;


  --sidebar-width: 280px;
  --header-height: 64px;
  --sidebar-icon-size: 20px;
  
  /* Card & space styling */
  --card-radius: 10px;
  --element-radius: 8px;
  --standard-spacing: 24px;
  --standard-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Thème clair */
[data-theme="light"] {
  --bg: #f5f5f7;
  --card: #ffffff;
  --input: #f8f8fa;
  --input-border: #e2e2e7;
  --text-body: #333340;
  --text-muted: #6d6d8a;
  --separator: #e5e5ec;
  --card-border: #e5e5ec;
  --wp-badge: #f0f0f5;
  --wp-logo: #555;

  /* Couleurs primaires pour le mode clair */
  --primary-100: #f2effb;
  --primary-200: #e4ddf7;
  --primary-300: #c9bced;
  --primary-400: #ac99e6;
  --primary-500: #8a76d2;
  --primary-600: #7057be;
  --primary-700: #5c45a6;
  --primary-800: #4a3787;
  --primary-900: #3b2c69;

  /* Variables d'effets adaptées - réduites pour moins de diffusion */
  --primary-shadow: rgba(138, 118, 210, 0.2);
  --primary-shadow-strong: rgba(138, 118, 210, 0.4);
  --primary-glow: rgba(138, 118, 210, 0.4);

  /* Variables RGB pour usage avec rgba() */
  --primary-rgb: 138, 118, 210;
}



/* Styles de base */
body {
  background-color: var(--bg);
  color: var(--text-body);
  font-family: 'Poppins', sans-serif;
}

        /* Refined text */
        h1, h2, h3, h4, h5, h6 {
          font-weight: 600;
          letter-spacing: -0.01em;
      }

/* Classes d'application des variables de couleur */
.bg-card {
  background-color: var(--card);
}

.border-card-border {
  border-color: var(--card-border);
}

.bg-input {
  background-color: var(--input);
}

.border-input-border {
  border-color: var(--input-border);
}

.text-body {
  color: var(--text-body);
}

.text-muted {
  color: var(--text-muted);
}

.border-separator {
  border-color: var(--separator);
}

.bg-wp-badge {
  background-color: var(--wp-badge);
}

/* Effet de lueur pour logo */
.glow-logo {
  filter: drop-shadow(0 0 8px var(--primary-glow));
}

/* Transition pour le changement de thème */
body,
input,
button,
.network-animation,
svg,
.text-muted,
.bg-card {
  transition: all 0.3s ease;
}

/* Accessibilité */
input:focus,
button:focus {
  outline: none;
}

/* Support pour cacher/montrer des éléments selon le thème */
/* Affichage conditionnel basé sur le thème */
[data-theme="dark"] .light {
  display: none !important;
}

[data-theme="dark"] .dark {
  display: block !important;
}

[data-theme="light"] .light {
  display: block !important;
}

[data-theme="light"] .dark {
  display: none !important;
}

/* Support spécifique pour les icônes de thème */
.dark\:block {
  display: none;
}

.light\:block {
  display: none;
}

[data-theme="dark"] .dark\:block {
  display: block !important;
}

[data-theme="light"] .light\:block {
  display: block !important;
}

[data-theme="dark"] .dark\:hidden {
  display: none !important;
}

[data-theme="light"] .light\:hidden {
  display: none !important;
}



/* PROFILE */

.profile-card {
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.profile-card:hover {
  box-shadow: var(--shadow-md);
}


.section-header::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(to right, var(--primary-500), var(--primary-300));
  border-radius: 3px;
}

.form-group {
  margin-bottom: 0.5rem;
}

.form-input {
  transition: all 0.2s ease;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  width: 100%;
  background-color: var(--input);
  border: 1px solid var(--input-border);
}

.form-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--primary-500);
  border-color: transparent;

}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-body);
  font-size: 0.875rem;
}

.form-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.375rem;
}

.toggle-section {
  transition: all 0.3s ease;
}

.toggle-section:hover {
  background-color: var(--bg);
}

.toggle-icon {
  transition: transform 0.3s ease;
}

.rotate-icon {
  transform: rotate(180deg);
}

.btn {
  transition: all 0.3s ease;
  border-radius: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}



        /* Consistent button styling */
        button, 
        .btn, 
        a.btn {
            transition: all 0.2s ease;
        }
        
/* Button styles */
.btn-primary {
  background-color: var(--primary-500);
  color: white;
  border-radius: var(--element-radius);
  padding: 0.5rem 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background-color: var(--primary-600);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--input);
  color: var(--text-body);
}

.btn-secondary:hover {
  background-color: var(--input-border);
}

.slide-down {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.slide-down.open {
  max-height: 1000px;
}

.password-strength-bar {
  height: 4px;
  border-radius: 2px;
  background-color: var(--input-border);
  margin-top: 0.5rem;
  overflow: hidden;
}

.password-strength-progress {
  height: 100%;
  width: 0;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.copy-animation {
  position: relative;
  overflow: hidden;
}

.copy-animation::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, transparent, var(--primary-200), transparent);
  transform: translateX(-100%);
}

.copy-animation.animate::after {
  animation: shine 0.75s;
}

@keyframes shine {
  to {
    transform: translateX(100%);
  }
}

.avatar-container {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: bold;
  color: white;
  margin: 0 auto 1.5rem;
  box-shadow: 0 4px 12px var(--primary-shadow);
}

.avatar-container-background{
  background: linear-gradient(to bottom right, var(--primary-400), var(--primary-600));
}

.profile-header {
  text-align: center;
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--separator);
}

/* Animation pour les icônes de section */
.section-icon {
  transition: all 0.3s ease;
}

.section-container:hover .section-icon {
  transform: scale(1.1);
}




.animate-float {
  animation: float 6s ease-in-out infinite;
}

.blob {
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation: morph 10s linear infinite alternate;
}


/* SITES */

/* Styles cohérents avec le dashboard et profile */
.site-card {
  overflow: hidden;
  border-radius: 1rem;
  transition: all 0.3s ease;
}

.site-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.site-card-banner {
  height: 100px;
  /* Augmenter la hauteur pour accommoder la favicon complète */
  position: relative;
  overflow: visible;
  /* Permettre aux éléments de déborder */
  isolation: isolate;
  /* Assure une isolation de blending */

}

.site-card-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.7) 100%),
    linear-gradient(to bottom right, var(--primary-500), var(--primary-700));
  opacity: 0.4;
  z-index: 0;

}



.site-card-banner::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E") center center;
  opacity: 0.5;
  z-index: 0;
}

.site-favicon {
  width: 48px;
  height: 48px;
  position: absolute;
  top: 60px;
  /* Position à partir du haut au lieu du bas */
  left: 24px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  z-index: 10;
  /* Augmenter le z-index pour être au-dessus de tout */
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--card);
  border: 2px solid var(--card-border);
  overflow: hidden;
  font-weight: bold;
  font-size: 1.2rem;
  color: var(--primary-500);
}

.site-favicon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}


.section-header::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(to right, var(--primary-500), var(--primary-300));
  border-radius: 3px;
}



/* Styles pour le modal */
.modal-backdrop {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-container {
  transform: translateY(-20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.modal.active .modal-backdrop {
  opacity: 1;
  visibility: visible;
}

.modal.active .modal-container {
  transform: translateY(0);
  opacity: 1;
}

/* Styles du formulaire */

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-body);
  font-size: 0.875rem;
}

.form-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.375rem;
}

.form-input {
  transition: all 0.2s ease;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  width: 100%;
  background-color: var(--input);
  border: 1px solid var(--input-border);
}

.form-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--primary-500);
  border-color: transparent;
}

.form-input.error {
  border-color: rgb(239, 68, 68);
}

/* Effet de hover sur les boutons d'action */
.action-button {
  transition: all 0.2s ease;
  border-radius: 0.375rem;
}

.action-button:hover {
  transform: translateY(-2px);
}

/* Styles pour les badges de statut */
.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  position: absolute;
  right: 12px;
  top: 12px;
  max-width: 45%;
  white-space: nowrap;
  overflow: hidden;
}

.status-badge-active {
  background-color: rgba(16, 185, 129, 0.1);
  color: #10B981;
}

.status-badge-inactive {
  background-color: rgba(107, 114, 128, 0.1);
  color: #6B7280;
}

.status-badge-warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: #F59E0B;
}

.badge-active {
  background-color: rgba(74, 222, 128, 0.2);
  color: rgb(74, 222, 128);
}

.badge-inactive {
  background-color: rgba(239, 68, 68, 0.2);
  color: rgb(239, 68, 68);
}

/* Styling des inputs additionnels */
.additional-input {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.sortable-ghost {
  opacity: 0.3;
}

.sortable-drag {
  box-shadow: var(--shadow-md);
}

/* Tabs Styles */
.tab-button {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.tab-button:hover {
  color: var(--body);
}

.tab-button.active {
  color: var(--primary-500);
  border-bottom-color: var(--primary-500);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* Styles pour les tooltips */
.tooltip {
  position: relative;
}

.tooltip-text {
  visibility: hidden;
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--card);
  color: var(--text-body);
  text-align: center;
  padding: 0.5rem 0.75rem;
  border-radius: 0.25rem;
  width: max-content;
  max-width: 200px;
  font-size: 0.75rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 10;
  border: 1px solid var(--input-border);
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

.tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--card) transparent transparent transparent;
}

/* Loading overlay */
#loadingOverlay {
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  /* Caché par défaut */
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
}

#loadingOverlay.show {
  display: flex;
  /* Devient visible uniquement avec la classe show */
}

.loading-content {
  background-color: var(--card);
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
}

.loading-spinner {
  border: 3px solid rgba(128, 90, 213, 0.2);
  border-top: 3px solid var(--primary-500);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
  margin-right: 1rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Message styles */
.success-message {
  background-color: rgba(74, 222, 128, 0.1);
  border: 1px solid rgb(74, 222, 128);
  color: rgb(74, 222, 128);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

.error-message {
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgb(239, 68, 68);
  color: rgb(239, 68, 68);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

/* Custom checkbox style */
.custom-checkbox-container {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 0.5rem;
}

.custom-checkbox-input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.custom-checkbox-label {
  display: flex;
  align-items: center;
  user-select: none;
  cursor: pointer;
}

.custom-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background-color: var(--input);
  border: 1px solid var(--input-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.5rem;
  transition: all 0.2s ease;
  position: relative;
}

.custom-checkbox.checked {
  background-color: var(--primary-500);
  border-color: var(--primary-600);
}

.custom-checkbox.checked::after {
  content: '✓';
  color: white;
  font-size: 0.85rem;
  font-weight: bold;
}

.custom-checkbox-container:hover .custom-checkbox {
  border-color: var(--primary-400);
  box-shadow: 0 0 0 1px var(--primary-shadow);
}

/* Style pour texte tronqué */
.truncated-text {
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
}

/* Style pour titre tronqué avec contrainte pour le badge */
.truncated-title {
  max-width: 50%;
  /* Limiter à 50% pour s'assurer qu'il ne touche pas le badge */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
}

/* Animation pour les messages système qui apparaissent et disparaissent */
.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

.fade-out {
  animation: fadeOut 0.5s ease forwards;
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

/* BASE */

/* Structure principale */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.content-wrapper {
  display: flex;
  flex: 1;
}

        /* Header improvements */
        .header {
          height: var(--header-height);
          background-color: var(--card);
          border-bottom: 1px solid var(--card-border);
          display: flex;
          align-items: center;
          padding: 0 24px;
      }
/* Logo animé - effet subtil */
.logo-container {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.logo-container:hover .logo-icon {
  fill: var(--primary-400);
  filter: brightness(1.1);
}

.logo-icon {
  transition: all 0.3s ease;
}

.logo-container:hover svg {
  transform: scale(1.05) translateY(-2px);
}

/* Sidebar design amélioré */
.sidebar {
  background: var(--card);
  border-right: 1px solid var(--card-border);
  transition: all 0.3s ease;
  width: 280px;
  display: flex;
  flex-direction: column;
}

/* Navigation améliorée */
.nav-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 4px;
  transition: all 0.2s ease;
}

.nav-item:hover {
  background-color: rgba(100, 100, 150, 0.1);
}

.nav-item.active {
  background-color: rgba(102, 126, 234, 0.1);
  color: var(--primary-500);
  font-weight: 500;
}

.nav-item i {
  font-size: var(--sidebar-icon-size);
  width: 20px;
  text-align: center;
  margin-right: 16px;
}


.nav-icon {
  transition: all 0.3s ease;
}


.nav-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--primary-500);
}

/* Menu utilisateur amélioré */
.user-menu {
  transition: all 0.3s ease;
  border-radius: 0.75rem;
  overflow: hidden;
}

.user-menu:hover {
  background: rgba(var(--primary-rgb), 0.08);
}

/* User avatar styles */
.user-avatar {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
}

.user-menu:hover .user-avatar {
  transform: scale(1.05);
}

/* Dropdown styles */
.dropdown-menu {
  background-color: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform-origin: top right;
  opacity: 0;
  transform: scale(0.95);
}

.dropdown-menu.active {
  opacity: 1;
  transform: scale(1);
}


.dropdown-item {
  transition: background-color 0.2s ease;
}

.dropdown-item:hover {
  background-color: rgba(100, 100, 150, 0.1);
}

/* Theme toggle amélioré */
.theme-toggle {
  position: relative;
  height: 36px;
  width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  overflow: hidden;
}

.theme-toggle:hover {
  background-color: rgba(var(--primary-rgb), 0.1);
  transform: rotate(10deg);
}

.theme-toggle:active {
  transform: scale(0.9);
}

.theme-toggle i {
  transition: all 0.3s ease;
}

/* Animation pour le changement de thème */
.theme-toggle::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 50%;
  opacity: 0;
  transition: all 0.5s ease;
}

.theme-toggle:active::before {
  opacity: 1;
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.5), rgba(var(--primary-rgb), 0) 70%);
  animation: ripple 0.6s ease-out;
}

.theme-transition {
  transition: background-color 0.5s ease, color 0.5s ease;
}

@keyframes ripple {
  0% {
    transform: scale(0.1);
    opacity: 0.5;
  }

  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* Section catégories de navigation */
.nav-section {
  padding: 0 16px;
  margin-bottom: 24px;
}

.nav-section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  padding-left: 16px;
  font-weight: 500;
}

/* Mobile menu amélioré */
.mobile-menu {
  overflow-x: auto;
  scrollbar-width: none;
  /* Pour Firefox */
  -ms-overflow-style: none;
  /* Pour IE et Edge */
}

.mobile-menu::-webkit-scrollbar {
  display: none;
  /* Pour Chrome, Safari et Opera */
}

.mobile-nav-item {
  transition: all 0.3s ease;
  white-space: nowrap;
}

.mobile-nav-item:hover {
  transform: translateY(-2px);
}

/* Footer styles */
.footer {
  background-color: var(--card);
  border-top: 1px solid var(--card-border);
  padding: 16px 24px;
}

/* Effet de badge */
.badge-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  height: 8px;
  width: 8px;
  border-radius: 50%;
  background-color: var(--primary-500);
  animation: pulse 2s infinite;
}

/*
            @keyframes pulse {
                0% { box-shadow: 0 0 0 0 rgba(128, 90, 213, 0.7); }
                70% { box-shadow: 0 0 0 6px rgba(128, 90, 213, 0); }
                100% { box-shadow: 0 0 0 0 rgba(128, 90, 213, 0); }
            }
            */

/* Animation subtile de l'arrière-plan réseau */
.network-bg {
  opacity: 0.6;
  filter: blur(10px);
  z-index: -1;
}

/* Version badge */
.version-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  background: linear-gradient(to right, var(--primary-500), var(--primary-600));
  color: white;
  border-radius: 12px;
  font-weight: 500;
}










/* Articles */

/* Modal animations */
#articleViewModal .modal-container {
  transform: translateY(-20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#articleViewModal.active .modal-container {
  opacity: 1;
  transform: translateY(0);
}

#articleViewModal .modal-backdrop {
  opacity: 0;
  transition: opacity 0.3s ease;
}

#articleViewModal.active .modal-backdrop {
  opacity: 1;
}

/* Improved list icons */
.table-row-image {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-row-image i {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.table-row:hover .table-row-image i {
  transform: scale(1.15);
}

/* Stats Cards */
.stat-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  height: 100%;
}

.stat-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.stat-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(100, 100, 255, 0.1);
}

.stat-card-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.stat-card-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--body);
  line-height: 1.2;
}

.stat-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--separator);
}

/* Article cards */
.article-card {
  overflow: hidden;
  transition: all 0.3s ease;
  border-radius: 1rem;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.article-card-header {
  height: 100px;
  position: relative;
  overflow: hidden;

}

.article-card-banner {
  height: 100px;
  /* Augmenter la hauteur pour accommoder la favicon complète */
  position: relative;
  overflow: visible;
  /* Permettre aux éléments de déborder */
  isolation: isolate;
  /* Assure une isolation de blending */

}

.article-card-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.7) 100%),
    linear-gradient(to bottom right, var(--primary-500), var(--primary-700));
  opacity: 0.4;
  z-index: 0;

}


.article-card-banner::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E") center center;
  opacity: 0.5;
  z-index: 0;
}

.article-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.article-card:hover .article-card-image {
  transform: scale(1.05);
}

.article-card-site {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
}

.article-card-site-favicon {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background-color: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  border: 1px solid var(--card-border);
  overflow: hidden;
}

.article-card-site-favicon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.article-card-site-name {
  font-size: 0.75rem;
  font-weight: 500;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.article-card-title {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  z-index: 2;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-content {
  padding: 1rem;
}

.article-card-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.article-card-description {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.article-card-description::after {
  content: " [...]";
  position: absolute;
  right: 0;
  bottom: 0;
  padding-left: 3px;
  background-color: var(--card);
  color: var(--primary-500);
}

.article-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--separator);
}

/* Tags & categories */
.article-tag {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  background-color: var(--primary-100);
  color: var(--primary-700);
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
  transition: all 0.2s ease;
}

.article-tag:hover {
  background-color: var(--primary-200);
}

/* Boutons Standard */
.btn-gradient-primary {
  background: linear-gradient(to right, var(--primary-600), var(--primary-500));
  color: white;
  transition: all 0.3s ease;
}

.btn-gradient-primary:hover {
  background: linear-gradient(to right, var(--primary-700), var(--primary-600));
  box-shadow: 0 4px 12px var(--primary-shadow);
}

/* Table styles */
.table-row {
  transition: all 0.3s ease;
}

.table-row:hover {
  background-color: var(--input);
}

.table-row-image {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  overflow: hidden;
}

.table-row-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Section headers */
.section-header {
  position: relative;
  font-weight: 600;
  color: var(--body);
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.section-header i {
  color: var(--primary-500);
  margin-right: 8px;
}


.section-header::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(to right, var(--primary-500), var(--primary-300));
  border-radius: 3px;
}


/* Empty state styles */
.empty-state {
  border: 2px dashed var(--separator);
  transition: all 0.3s ease;
  border-radius: 1rem;
  padding: 3rem 2rem;
  text-align: center;
  background-color: var(--card);
}

.empty-state:hover {
  border-color: var(--primary-500);
  background-color: rgba(var(--primary-rgb), 0.05);
}


.pulse-anim {
  animation: pulse 2s infinite;
}

/* View modes */
.view-toggle {
  display: flex;
  align-items: center;
  background-color: var(--input);
  border-radius: 0.5rem;
  padding: 0.25rem;
}

.view-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
  color: var(--text-muted);
}

.view-toggle-btn.active {
  background-color: var(--primary-500);
  color: white;
}

/* Pagination */
.pagination-item {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.pagination-item.active {
  background-color: var(--primary-500);
  color: white;
}

.pagination-item:not(.active):hover {
  background-color: var(--input);
}

/* Loading animation */
.skeleton-loader {
  position: relative;
  overflow: hidden;
  background-color: var(--input);
  border-radius: 0.5rem;
}

.skeleton-loader::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform: translateX(-100%);
  background-image: linear-gradient(90deg,
      rgba(255, 255, 255, 0) 0,
      rgba(255, 255, 255, 0.1) 20%,
      rgba(255, 255, 255, 0.2) 60%,
      rgba(255, 255, 255, 0));
  animation: shimmer 2s infinite;
}


.animate-fade-in {
  animation: fadeInUp 0.5s ease forwards;
}

/* Floating write button */
.floating-write-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 40;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  box-shadow: 0 4px 12px var(--primary-shadow-strong);
}

.floating-write-btn:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 6px 16px var(--primary-shadow-strong);
}

/* Filter pills */
.filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid var(--separator);
}

.filter-pill:hover {
  border-color: var(--primary-400);
}

.filter-pill.active {
  background-color: var(--primary-500);
  color: white;
  border-color: var(--primary-600);
}


/* ######### DASHBOARD ########## */


.quick-action {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-action:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.activity-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--separator);
  transition: background-color 0.2s ease;
}

.activity-item:hover {
  background-color: rgba(100, 100, 255, 0.05);
}

.activity-item:last-child {
  border-bottom: none;
}

.graph-card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
}

.graph-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /*background: radial-gradient(circle at top right, var(--primary-500) 0%, transparent 50%);*/
  opacity: 0.05;
  z-index: 0;
}

.period-tab {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
}

.period-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary-500);
  animation: slideIn 0.3s ease-out;
}


/* Custom scrollbar for dashboard sections */
.custom-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: var(--primary-300) var(--input);
}

.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: var(--input);
  border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background-color: var(--primary-300);
  border-radius: 3px;
}




/* Two-column layout with fixed height for dashboard cards */
.dashboard-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 1024px) {
  .dashboard-row {
    grid-template-columns: 2fr 1fr;
  }
}

.dashboard-col {
  padding: 0 0.75rem;
  margin-bottom: 1.5rem;
  width: 100%;
}

.dashboard-card {
  background-color: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--standard-shadow);
  transition: all 0.25s ease;
}


.dashboard-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

#siteFilter {
  cursor: pointer;
  position: relative;
  z-index: 10;
}


/* Activity scrollable container with fixed height */
.activity-container {
  overflow-y: auto;
}

/* Chart container with fixed height */
.chart-container {
  height: 350px;
}

/* Responsive layout */
@media (min-width: 1024px) {
  .dashboard-col-main {
    width: 66.666667%;
  }

  .dashboard-col-side {
    width: 33.333333%;
  }
}

/* Fix for table responsiveness */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Table Styles */
.dashboard-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.dashboard-table th {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--separator);
}

        /* Table styles refinement */
        table {
          border-collapse: separate;
          border-spacing: 0;
      }
      
      table th {
          font-weight: 500;
          text-transform: uppercase;
          letter-spacing: 0.03em;
          font-size: 0.75rem;
          color: var(--muted);
      }

.dashboard-table td {
  padding: 16px;
  font-size: 14px;
  color: var(--body);
  border-bottom: 1px solid var(--separator);
}

.dashboard-table tr:hover {
  background-color: rgba(100, 100, 255, 0.05);
}

.dashboard-table tr:last-child td {
  border-bottom: none;
}



.pulse-dot {
  animation: pulse 2s infinite;
}


/* #############  NEW ARTICLE  ############*/


.editor-container {
  min-height: 400px;
  border: 1px solid var(--separator);
  border-radius: 0.5rem;
  overflow: hidden;
}

.title-character-count {
  transition: color 0.3s ease;
}

.title-character-count.warning {
  color: #f59e0b;
}

.title-character-count.error {
  color: #ef4444;
}

/* Custom switch styling */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 21px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--input);
  border: 1px solid var(--input-border);
  transition: .4s;
  border-radius: 34px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 15px;
  width: 15px;
  left: 2px;
  bottom: 2px;
  background-color: var(--text-muted);
  transition: .4s;
  border-radius: 50%;
}

input:checked+.toggle-slider {
  background-color: var(--primary-500);
  border-color: var(--primary-600);
}

input:focus+.toggle-slider {
  box-shadow: 0 0 1px var(--primary-500);
}

input:checked+.toggle-slider:before {
  transform: translateX(17px);
  background-color: white;
}

/* Animation pour les sections */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.accordion-content.open {
  max-height: 2000px;
}

/* Rotation de l'icône d'accordéon */
.accordion-toggle-icon {
  transition: transform 0.3s ease;
}

.accordion-toggle-icon.open {
  transform: rotate(180deg);
}

/* Ajustements pour mobiles */
@media (max-width: 640px) {
  .editor-container {
    min-height: 300px;
  }
}


/* Styles pour les badges de catégories */
/* Styles pour les badges de catégories */
.category-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background-color: var(--primary-100);
  color: var(--primary-600);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  max-width: 100%;
  transition: all 0.2s ease;
  border: 1px solid var(--primary-300);
  font-weight: 500;
}

.category-badge:hover {
  background-color: var(--primary-200);
}

.category-badge .badge-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-badge .badge-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.5rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background-color: var(--primary-200);
  color: var(--primary-600);
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-badge .badge-remove:hover {
  background-color: var(--primary-300);
  color: var(--primary-700);
}

.category-badge .badge-remove:hover {
  color: var(--primary-600);
}

textarea.form-input {
  min-height: 80px;
  overflow-y: hidden;
  resize: vertical;
}

.gutenberg-editor-container {
  height: 100%;
  min-height: 400px;
  border: 1px solid var(--separator);
  background: var(--card);
  color: var(--text-body);
  overflow: auto;
}

/* Préserver les styles WordPress tout en s'intégrant à votre design */
.gutenberg-editor-container .wp-block {
  max-width: 100%;
  font-family: inherit;
  line-height: 1.5;
}

.gutenberg-editor-container .block-editor-block-list__layout {
  padding: 0 16px;
}

.gutenberg-editor-container .block-editor-block-list__layout .block-editor-block-list__block {
  margin: 0;
}


/* Styles pour les compteurs de caractères */
/* Rouge pour trop court ou trop long */
.title-character-count.too-short,
.title-character-count.too-long,
.meta-character-count.too-short,
.meta-character-count.too-long {
  color: #ef4444;
}

/* Jaune pour limite approximative */
.title-character-count.warning-short,
.title-character-count.warning-long,
.meta-character-count.warning-short,
.meta-character-count.warning-long {
  color: #f59e0b;
}

/* Vert pour longueur optimale */
.title-character-count.optimal,
.meta-character-count.optimal {
  color: #10b981;
}




.editor-toolbar {
  display: flex;
  justify-content: flex-end;
  background: var(--card);
  padding: 8px;
  border: 1px solid var(--input-border);
  border-bottom: none;
}

.preview-btn {
  cursor: pointer;
}

#wordpress-preview-container {
  z-index: 9999;
}


.editor-layout {
  display: flex;
  flex-direction: column;
  height: 600px;
  border: 1px solid var(--separator);
  border-radius: 0.5rem;
  overflow: hidden;
  background-color: var(--card);
}

@media (min-width: 768px) {
  .editor-layout {
    flex-direction: row;
  }
}

.editor-panel {
  flex: 1;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  background-color: var(--card);
  border-right: none;
  /* Supprime la bordure droite qui cause la barre blanche */
}


.preview-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--card);
  overflow-y: auto;
}

.editor-panel-header,
.preview-header {
  padding: 8px 16px;
  border-bottom: 1px solid var(--separator);
  background: var(--card);
}

#editor-wrapper {
  background-color: var(--card);
}

.CodeMirror {
  height: 100% !important;
  font-size: 14px;
  border-right: none !important;
  width: 100%;
}

/* Correction pour l'éditeur et la prévisualisation */
.editor-content-wrapper {
  height: 100%;
  overflow: hidden;
}

/* Ajustement pour le mode sombre - éditeur principal */
[data-theme="dark"] .CodeMirror {
  background-color: var(--input);
  color: var(--text-body);
  border: none;
}

/* Correction pour les numéros de ligne en mode sombre */
[data-theme="dark"] .CodeMirror-gutters {
  background-color: var(--input);
  border-right: 1px solid var(--separator);
}

[data-theme="dark"] .CodeMirror-linenumber {
  color: var(--text-muted);
}



/* Correction pour les tableaux en mode sombre dans l'aperçu WordPress */
[data-theme="dark"] #live-preview table {
  border-collapse: collapse;
  width: 100%;
  color: var(--text-body);
  border: 1px solid var(--separator);
}

[data-theme="dark"] #live-preview th {
  background-color: #2c3e50 !important;
  /* Couleur plus foncée pour les en-têtes */
  color: white !important;
  font-weight: 600;
  padding: 8px 12px;
  text-align: left;
  border: 1px solid var(--separator);
}

[data-theme="dark"] #live-preview td {
  border: 1px solid #4a5568;
  padding: 8px;
  background-color: #374151;
}

[data-theme="dark"] #live-preview tr:nth-child(even) td {
  background-color: #2d3748;
}

/* Préservation des styles pour la prévisualisation */
[data-theme="dark"] .wordpress-content {
  color: var(--text-body);
  background-color: var(--card);
}

[data-theme="dark"] #live-preview td,
[data-theme="dark"] #live-preview th {
  text-align: center;
}



.preview-header {
  padding: 8px 16px;
  border-bottom: 1px solid var(--separator);
  background: var(--card);
}

.wordpress-content {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  color: var(--text-body);
  line-height: 1.8;
}

.wordpress-content h1,
.wordpress-content h2,
.wordpress-content h3,
.wordpress-content h4,
.wordpress-content h5,
.wordpress-content h6 {
  font-weight: 600;
  margin-top: 1em;
  margin-bottom: 0.5em;
}

.wordpress-content h2 {
  font-size: 1.75em;
}

.wordpress-content h3 {
  font-size: 1.5em;
}

.wordpress-content p {
  margin-bottom: 1em;
}

.wordpress-content blockquote {
  border-left: 4px solid var(--primary-500);
  padding-left: 1em;
  margin: 1em 0;
  color: var(--text-muted);
}

.wordpress-content ul,
.wordpress-content ol {
  margin-left: 1.5em;
  margin-bottom: 1em;
}

#editor-hint {
  background-color: var(--input);
}

[data-theme="dark"] #editor-hint {
  background-color: var(--input);
}

#editor-hint .hint-message {
  background: transparent;
}


/* Delete confirmation modal animations */
#deleteConfirmModal .modal-container {
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#deleteConfirmModal.active .modal-container {
  opacity: 1;
  transform: scale(1);
}

#deleteConfirmModal .modal-backdrop {
  opacity: 0;
  transition: opacity 0.3s ease;
}

#deleteConfirmModal.active .modal-backdrop {
  opacity: 1;
}



/* ########## SUPPORT ############# */


.priority-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.priority-low {
  background-color: rgba(74, 222, 128, 0.2);
  color: rgb(74, 222, 128);
}

.priority-medium {
  background-color: rgba(250, 204, 21, 0.2);
  color: rgb(250, 204, 21);
}

.priority-high {
  background-color: rgba(239, 68, 68, 0.2);
  color: rgb(239, 68, 68);
}

.priority-urgent {
  background-color: rgba(239, 68, 68, 0.8);
  color: white;
}

.status-open {
  background-color: rgba(59, 130, 246, 0.2);
  color: rgb(59, 130, 246);
}

.status-in_progress {
  background-color: rgba(139, 92, 246, 0.2);
  color: rgb(139, 92, 246);
}

.status-resolved {
  background-color: rgba(16, 185, 129, 0.2);
  color: rgb(16, 185, 129);
}

.status-closed {
  background-color: rgba(107, 114, 128, 0.2);
  color: rgb(107, 114, 128);
}

.message-container {
  max-height: 500px;
  overflow-y: auto;
}

.user-message,
.admin-message {
  max-width: 85%;
  margin-bottom: 1rem;
  position: relative;

}

.user-message {
  margin-right: auto;
}

.admin-message {
  margin-left: auto;
  background-color: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.2);
}

.message-time {
  position: absolute;
  bottom: -0.5rem;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.user-message .message-time {
  right: 0.5rem;
}

.admin-message .message-time {
  left: 0.5rem;
}

.ticket-container {
  max-height: 700px;
  overflow-y: auto;
}


.no-transition {
  transition: none !important;
  transform: translateY(0) !important;
  opacity: 1 !important;
}






#sidebar {
  width: var(--sidebar-width);
  background-color: var(--card);
  border-right: 1px solid var(--card-border);
  transition: transform 0.3s ease;
}

.sidebar-brand {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 24px;
  border-bottom: 1px solid var(--card-border);
}

.sidebar-brand svg {
  width: 32px;
  height: 32px;
}

/* Status indicators */
.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}


.status-active {
  background-color: #10B981;
}

.status-inactive {
  background-color: #6B7280;
}

.status-warning {
  background-color: #F59E0B;
}

.status-error {
  background-color: #EF4444;
}


        /* Network animation adjustment */
        .network-animation {
          opacity: 0.02;
      }
      
      /* Global improvements */
      .dashboard-card,
      .quick-action,
      .stat-card {
          border-radius: var(--card-radius);
          box-shadow: var(--standard-shadow);
          transition: all 0.2s ease;
      }
      
      .dashboard-card:hover,
      .quick-action:hover,
      .stat-card:hover {
          transform: translateY(-2px);
          box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
      }


            
        /* Main content area */
        .main-content {
          margin-left: 0;
          transition: margin-left 0.3s ease;
          min-height: 100vh;
          display: flex;
          flex-direction: column;
      }
      
      @media (min-width: 1024px) {
          .main-content {
              margin-left: var(--sidebar-width);
          }
      }
      