/* Styles pour les favoris */
.favorites-dropdown-content {
  max-height: 400px;
  overflow-y: auto;
  min-width: 280px;
  padding: 0;
  margin-bottom: 16px;
}

.favorites-dropdown-content .dropdown-item {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0.75rem 1.5rem;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}

/* Style spécial pour le dernier élément de la liste */
.favorites-dropdown-content .last-favorite-item {
  margin-bottom: 16px !important;
  padding-bottom: 16px !important;
}

.favorites-dropdown-content .dropdown-item:hover {
  background-color: var(--bs-tertiary-bg);
  border-left-color: var(--bs-warning);
}

.favorites-dropdown-content .dropdown-item .small {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* Style du header du dropdown */
.dropdown-menu .radius-8.bg-warning-50 {
  background-color: rgba(255, 193, 7, 0.1);
  border-bottom: 1px solid rgba(255, 193, 7, 0.2);
}

/* Style du footer du dropdown */
.favorites-dropdown-content .dropdown-footer {
  padding: 0.75rem;
  text-align: center;
  border-top: 1px solid var(--bs-border-color);
  background-color: var(--bs-tertiary-bg);
  opacity: 0.9;
}

/* ==============================================
   FormBuilder - Scrolls indépendants
   ============================================== */

/* Container principal avec hauteur fixe */
.formbuilder-container {
    height: calc(100vh - 180px);
    min-height: 600px;
    overflow: hidden;
}

/* Trois colonnes avec hauteur fixe */
.formbuilder-sidebar-left,
.formbuilder-sidebar-right,
.formbuilder-main-canvas {
    height: calc(100vh - 180px);
    display: flex;
    flex-direction: column;
}

/* Card bodies avec scroll indépendant */
.formbuilder-sidebar-left .card-body,
.formbuilder-sidebar-right .card-body,
.formbuilder-main-canvas .card-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 transparent;
}

/* Scrollbars WebKit */
.formbuilder-sidebar-left .card-body::-webkit-scrollbar,
.formbuilder-sidebar-right .card-body::-webkit-scrollbar,
.formbuilder-main-canvas .card-body::-webkit-scrollbar {
    width: 8px;
}

.formbuilder-sidebar-left .card-body::-webkit-scrollbar-thumb,
.formbuilder-sidebar-right .card-body::-webkit-scrollbar-thumb,
.formbuilder-main-canvas .card-body::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

/* Headers fixes */
.formbuilder-sidebar-left .card-header,
.formbuilder-sidebar-right .card-header,
.formbuilder-main-canvas .card-header {
    flex-shrink: 0;
}

/* ==============================================
   FormBuilder Loader - Interface de chargement
   ============================================== */

.formbuilder-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.98) 100%);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.formbuilder-loader-content {
    text-align: center;
    max-width: 480px;
    padding: 2rem;
}

/* Icône principale avec animation */
.formbuilder-loader-icon {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.formbuilder-loader-icon .main-icon {
    font-size: 4rem;
    color: var(--bs-primary);
    animation: pulse 2s ease-in-out infinite;
}

.loading-ring {
    position: absolute;
    top: -8px;
    left: -8px;
    width: calc(100% + 16px);
    height: calc(100% + 16px);
    border: 2px solid transparent;
    border-top: 2px solid var(--bs-primary);
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

/* Textes du loader */
.loader-title {
    color: var(--bs-dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.loader-subtitle {
    color: var(--bs-secondary);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* Barre de progression */
.progress-container {
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background-color: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--bs-primary), var(--bs-info));
    border-radius: 3px;
    width: 0%;
    transition: width 0.8s ease;
}

.progress-text {
    font-size: 0.85rem;
    color: var(--bs-secondary);
    font-weight: 500;
}

/* Étapes de progression */
.progress-steps {
    text-align: left;
    space-y: 0.75rem;
}

.progress-step {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    opacity: 0.4;
}

.progress-step.active {
    opacity: 1;
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    border-left: 3px solid var(--bs-primary);
}

.progress-step.completed {
    opacity: 0.8;
    background-color: rgba(var(--bs-success-rgb), 0.05);
}

.progress-step.completed .step-icon iconify-icon {
    color: var(--bs-success);
}

.step-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

.step-icon iconify-icon {
    font-size: 1.25rem;
    color: var(--bs-secondary);
    transition: color 0.3s ease;
}

.progress-step.active .step-icon iconify-icon {
    color: var(--bs-primary);
    animation: pulse 1.5s ease-in-out infinite;
}

.step-content {
    flex: 1;
}

.step-title {
    font-weight: 600;
    color: var(--bs-dark);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.step-desc {
    font-size: 0.8rem;
    color: var(--bs-secondary);
    line-height: 1.3;
}

/* Message de conseil */
.loader-tip {
    margin-top: 1.5rem;
    padding: 0.75rem;
    background-color: rgba(var(--bs-info-rgb), 0.1);
    border-radius: 0.375rem;
    color: var(--bs-info-text-emphasis);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

/* Mode sombre */
@media (prefers-color-scheme: dark) {
    .formbuilder-loader-overlay {
        background: linear-gradient(135deg, rgba(13,17,23,0.98) 0%, rgba(22,27,34,0.98) 100%);
    }
    
    .loader-title {
        color: #f0f6fc;
    }
    
    .loader-subtitle {
        color: #8b949e;
    }
    
    .progress-bar {
        background-color: #30363d;
    }
    
    .step-title {
        color: #f0f6fc;
    }
    
    .step-desc {
        color: #8b949e;
    }
}

/* Responsive */
@media (max-width: 991.98px) {
    .formbuilder-container,
    .formbuilder-sidebar-left,
    .formbuilder-sidebar-right,
    .formbuilder-main-canvas {
        height: auto;
    }
    
    .formbuilder-sidebar-left .card-body,
    .formbuilder-sidebar-right .card-body,
    .formbuilder-main-canvas .card-body {
        overflow: visible;
    }
}

/* Styles pour les notifications toast */
.toast-container {
  z-index: 1060;
}

.toast {
  opacity: 1;
  border: none;
  background-color: var(--bs-body-bg);
  box-shadow: 0 .5rem 1rem rgba(0,0,0,.15);
}

.toast-success .toast-header {
  background-color: #dff3e3;
  color: #28a745;
}

.toast-info .toast-header {
  background-color: #e0f1ff;
  color: #0d6efd;
}

.toast-warning .toast-header {
  background-color: #fff4e0;
  color: #ffc107;
}

.toast-error .toast-header {
  background-color: #ffe0e3;
  color: #dc3545;
}

/* ==========================================
   THEME ROSE
   ========================================== */

[data-theme="rose"] {
  --primary-50: #fff1f8;
  --primary-100: #ffe4f2;
  --primary-200: #ffcbe6;
  --primary-300: #ffadd8;
  --primary-400: #ff84c3;
  --primary-500: #f35aa7;
  --primary-600: #e83e9f;
  --primary-700: #c72f86;
  --primary-800: #a82670;
  --primary-900: #8a1f5c;

  --brand: var(--primary-600);
  --button-secondary: var(--primary-50);
  --black: var(--dark-2);
  --white: var(--base);
  --bg-color: #fff7fb;
  --text-primary-light: #3a2130;
  --text-secondary-light: #74455f;
  --text-secondary-dark: #ffd9ec;
  --input-form-light: #d8a9c3;
  --input-form-dark: #b06a8f;
  --input-bg: #fff1f8;
  --input-stroke: #eac0d6;
  --border-color: rgba(232, 62, 159, 0.22);
}

[data-theme="rose"] .search-highlight {
  background-color: #ffd6ec;
  color: #7a2357;
}

[data-theme-toggle][aria-label="rose"]::after {
  color: #e83e9f;
}

[data-theme="violet"] {
  --primary-50: #f5f1ff;
  --primary-100: #ede5ff;
  --primary-200: #dac8ff;
  --primary-300: #c3a4ff;
  --primary-400: #a67bff;
  --primary-500: #8b5cf6;
  --primary-600: #7c3aed;
  --primary-700: #6d28d9;
  --primary-800: #5b21b6;
  --primary-900: #4c1d95;

  --brand: var(--primary-600);
  --button-secondary: var(--primary-50);
  --black: var(--dark-2);
  --white: var(--base);
  --bg-color: #faf7ff;
  --text-primary-light: #2f234a;
  --text-secondary-light: #5f4b88;
  --text-secondary-dark: #ddcffd;
  --input-form-light: #c4b3ec;
  --input-form-dark: #8f78c9;
  --input-bg: #f6f1ff;
  --input-stroke: #d8c7f4;
  --border-color: rgba(124, 58, 237, 0.24);
}

[data-theme-toggle][aria-label="violet"]::after {
  color: #7c3aed;
}

[data-theme="emerald"] {
  --primary-50: #ecfdf5;
  --primary-100: #d1fae5;
  --primary-200: #a7f3d0;
  --primary-300: #6ee7b7;
  --primary-400: #34d399;
  --primary-500: #10b981;
  --primary-600: #059669;
  --primary-700: #047857;
  --primary-800: #065f46;
  --primary-900: #064e3b;

  --brand: var(--primary-600);
  --button-secondary: var(--primary-50);
  --black: var(--dark-2);
  --white: var(--base);
  --bg-color: #f4fffb;
  --text-primary-light: #163a32;
  --text-secondary-light: #2f665a;
  --text-secondary-dark: #b7e9d6;
  --input-form-light: #9fd5c3;
  --input-form-dark: #4f927d;
  --input-bg: #edfff8;
  --input-stroke: #bfe8da;
  --border-color: rgba(5, 150, 105, 0.24);
}

[data-theme-toggle][aria-label="emerald"]::after {
  color: #059669;
}

[data-theme="sunset"] {
  --primary-50: #fff7ed;
  --primary-100: #ffedd5;
  --primary-200: #fed7aa;
  --primary-300: #fdba74;
  --primary-400: #fb923c;
  --primary-500: #f97316;
  --primary-600: #ea580c;
  --primary-700: #c2410c;
  --primary-800: #9a3412;
  --primary-900: #7c2d12;

  --brand: var(--primary-600);
  --button-secondary: var(--primary-50);
  --black: var(--dark-2);
  --white: var(--base);
  --bg-color: #fffbf7;
  --text-primary-light: #462918;
  --text-secondary-light: #7b4a2f;
  --text-secondary-dark: #f5d9c8;
  --input-form-light: #e3bfa7;
  --input-form-dark: #b57957;
  --input-bg: #fff4eb;
  --input-stroke: #f2cfb8;
  --border-color: rgba(234, 88, 12, 0.24);
}

[data-theme-toggle][aria-label="sunset"]::after {
  color: #ea580c;
}

/* ==========================================
   BACKGROUND ANIMATION (OPTIONNELLE)
   ========================================== */

.c6-bg-animation-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1040;
  opacity: 0;
  transition: opacity 0.35s ease;
  overflow: hidden;
  will-change: opacity;
  mix-blend-mode: normal;
}

.c6-bg-animation-layer.is-active {
  opacity: 0.3;
}

.c6-bg-animation-layer::before,
.c6-bg-animation-layer::after {
  content: "";
  position: absolute;
  inset: -25%;
  pointer-events: none;
  will-change: transform, background-position, opacity, filter;
}

.c6-bg-animation-rain::before {
  background-image: repeating-linear-gradient(
    180deg,
    rgba(110, 164, 255, 0.55) 0px,
    rgba(110, 164, 255, 0.55) 14px,
    transparent 14px,
    transparent 30px
  );
  background-size: 2px 30px;
  transform: rotate(14deg);
  animation: c6-bg-rain-fall-fast 1.1s linear infinite;
  opacity: 0.75;
}

.c6-bg-animation-rain::after {
  background-image: repeating-linear-gradient(
    180deg,
    rgba(148, 191, 255, 0.45) 0px,
    rgba(148, 191, 255, 0.45) 18px,
    transparent 18px,
    transparent 42px
  );
  background-size: 3px 42px;
  transform: rotate(10deg);
  filter: blur(0.5px);
  animation: c6-bg-rain-fall-slow 1.8s linear infinite;
  opacity: 0.5;
}

.c6-bg-animation-snow::before {
  background-image:
    radial-gradient(circle, rgba(110, 165, 255, 0.98) 1.6px, transparent 2.2px),
    radial-gradient(circle, rgba(156, 198, 255, 0.95) 2.2px, transparent 3px),
    radial-gradient(circle, rgba(214, 232, 255, 0.95) 2.5px, transparent 3.2px);
  background-size: 120px 120px, 180px 180px, 230px 230px;
  background-position: 0 0, 30px 90px, 100px 40px;
  animation: c6-bg-snow-fall-front 10s linear infinite;
  opacity: 1;
}

.c6-bg-animation-snow::after {
  background-image:
    radial-gradient(circle, rgba(93, 146, 235, 0.82) 1.2px, transparent 1.8px),
    radial-gradient(circle, rgba(185, 216, 255, 0.84) 1.7px, transparent 2.3px);
  background-size: 90px 90px, 140px 140px;
  background-position: 10px 20px, 60px 30px;
  animation: c6-bg-snow-fall-back 16s linear infinite;
  opacity: 0.85;
  filter: blur(0.2px);
}

.c6-bg-animation-shapes::before {
  background-image:
    radial-gradient(48% 42% at 18% 22%, rgba(72, 127, 255, 0.5) 0%, transparent 80%),
    radial-gradient(42% 38% at 80% 18%, rgba(232, 62, 159, 0.42) 0%, transparent 82%),
    radial-gradient(44% 40% at 72% 74%, rgba(16, 185, 129, 0.44) 0%, transparent 82%),
    radial-gradient(38% 34% at 28% 82%, rgba(234, 88, 12, 0.34) 0%, transparent 82%);
  filter: blur(26px) saturate(108%);
  transform: scale(1.05);
  animation: c6-bg-shapes-drift 20s ease-in-out infinite alternate;
  opacity: 0.9;
}

.c6-bg-animation-shapes::after {
  background-image:
    radial-gradient(36% 34% at 34% 38%, rgba(124, 58, 237, 0.26) 0%, transparent 80%),
    radial-gradient(30% 30% at 62% 56%, rgba(5, 150, 105, 0.22) 0%, transparent 80%);
  filter: blur(36px);
  transform: scale(1.08);
  animation: c6-bg-shapes-drift-reverse 26s ease-in-out infinite alternate;
  opacity: 0.65;
}

.c6-bg-animation-diagonals::before {
  background-image:
    repeating-linear-gradient(
      135deg,
      rgba(72, 127, 255, 0.3) 0px,
      rgba(72, 127, 255, 0.3) 2px,
      transparent 2px,
      transparent 16px
    ),
    linear-gradient(
      120deg,
      transparent 0%,
      rgba(72, 127, 255, 0.1) 42%,
      rgba(72, 127, 255, 0.22) 50%,
      rgba(72, 127, 255, 0.1) 58%,
      transparent 100%
    );
  animation: c6-bg-diagonals-slide 12s linear infinite;
  opacity: 0.75;
}

.c6-bg-animation-diagonals::after {
  background-image: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12) 0px,
    rgba(255, 255, 255, 0.12) 1px,
    transparent 1px,
    transparent 22px
  );
  animation: c6-bg-diagonals-slide-reverse 16s linear infinite;
  opacity: 0.45;
}

.c6-bg-animation-aurora::before {
  background:
    radial-gradient(56% 44% at 18% 26%, rgba(56, 189, 248, 0.5) 0%, transparent 78%),
    radial-gradient(52% 40% at 76% 22%, rgba(232, 121, 249, 0.42) 0%, transparent 80%),
    radial-gradient(58% 46% at 64% 80%, rgba(16, 185, 129, 0.4) 0%, transparent 82%);
  filter: blur(30px) saturate(112%);
  animation: c6-bg-aurora-drift 24s ease-in-out infinite alternate;
  opacity: 0.88;
}

.c6-bg-animation-aurora::after {
  background:
    radial-gradient(44% 34% at 34% 56%, rgba(59, 130, 246, 0.36) 0%, transparent 82%),
    radial-gradient(38% 30% at 82% 62%, rgba(14, 165, 233, 0.3) 0%, transparent 82%);
  filter: blur(42px);
  animation: c6-bg-aurora-drift-reverse 30s ease-in-out infinite alternate;
  opacity: 0.66;
}

.c6-bg-animation-orbs::before {
  background:
    radial-gradient(circle at 20% 28%, rgba(255, 255, 255, 0.34) 0 4%, transparent 15%),
    radial-gradient(circle at 74% 22%, rgba(255, 255, 255, 0.3) 0 5%, transparent 18%),
    radial-gradient(circle at 68% 78%, rgba(255, 255, 255, 0.25) 0 4.5%, transparent 17%),
    radial-gradient(circle at 32% 80%, rgba(255, 255, 255, 0.22) 0 4%, transparent 16%),
    radial-gradient(circle at 45% 48%, rgba(255, 255, 255, 0.18) 0 3.5%, transparent 14%);
  filter: blur(2px);
  animation: c6-bg-orbs-float 22s ease-in-out infinite alternate;
  opacity: 0.9;
}

.c6-bg-animation-orbs::after {
  background:
    radial-gradient(circle at 24% 34%, rgba(72, 127, 255, 0.22) 0 9%, transparent 20%),
    radial-gradient(circle at 78% 26%, rgba(232, 62, 159, 0.2) 0 10%, transparent 22%),
    radial-gradient(circle at 64% 76%, rgba(16, 185, 129, 0.2) 0 11%, transparent 22%);
  filter: blur(16px) saturate(108%);
  animation: c6-bg-orbs-float-reverse 28s ease-in-out infinite alternate;
  opacity: 0.64;
}

.c6-bg-animation-mesh::before {
  background:
    radial-gradient(140% 110% at 15% 18%, rgba(72, 127, 255, 0.36), transparent 60%),
    radial-gradient(120% 100% at 82% 28%, rgba(232, 62, 159, 0.3), transparent 62%),
    radial-gradient(120% 100% at 58% 86%, rgba(16, 185, 129, 0.24), transparent 64%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
  filter: blur(12px) saturate(114%);
  background-size: 130% 130%, 140% 140%, 150% 150%, 100% 100%;
  animation: c6-bg-mesh-shift 26s ease-in-out infinite alternate;
  opacity: 0.86;
}

.c6-bg-animation-mesh::after {
  background: conic-gradient(
    from 220deg at 50% 50%,
    rgba(72, 127, 255, 0.08),
    rgba(232, 62, 159, 0.08),
    rgba(16, 185, 129, 0.08),
    rgba(72, 127, 255, 0.08)
  );
  filter: blur(24px);
  animation: c6-bg-mesh-rotate 32s linear infinite;
  opacity: 0.6;
}

[data-theme="dark"] .c6-bg-animation-layer.is-active {
  opacity: 0.24;
}

[data-theme="dark"] .c6-bg-animation-rain::before,
[data-theme="dark"] .c6-bg-animation-rain::after,
[data-theme="dark"] .c6-bg-animation-diagonals::before,
[data-theme="dark"] .c6-bg-animation-diagonals::after {
  filter: brightness(1.25);
}

[data-theme="light"] .c6-bg-animation-snow::before,
[data-theme="light"] .c6-bg-animation-snow::after {
  filter: contrast(160%) brightness(1.08) drop-shadow(0 0 1px rgba(88, 145, 235, 0.55));
}

[data-theme="dark"] .c6-bg-animation-snow::before,
[data-theme="dark"] .c6-bg-animation-snow::after {
  filter: contrast(150%) brightness(1.25) drop-shadow(0 0 1px rgba(180, 214, 255, 0.45));
}

@keyframes c6-bg-rain-fall-fast {
  0% {
    background-position: 0 -420px;
  }
  100% {
    background-position: 0 420px;
  }
}

@keyframes c6-bg-rain-fall-slow {
  0% {
    background-position: 0 -360px;
  }
  100% {
    background-position: 0 360px;
  }
}

@keyframes c6-bg-snow-fall-front {
  0% {
    transform: translate3d(0, -8%, 0);
  }
  100% {
    transform: translate3d(-3%, 10%, 0);
  }
}

@keyframes c6-bg-snow-fall-back {
  0% {
    transform: translate3d(0, -10%, 0);
  }
  100% {
    transform: translate3d(4%, 12%, 0);
  }
}

@keyframes c6-bg-shapes-drift {
  0% {
    transform: translate3d(-1.5%, -1.2%, 0) scale(1.02) rotate(-2deg);
  }
  100% {
    transform: translate3d(1.8%, 1.4%, 0) scale(1.08) rotate(2deg);
  }
}

@keyframes c6-bg-shapes-drift-reverse {
  0% {
    transform: translate3d(1.2%, -1%, 0) scale(1.1) rotate(1.5deg);
  }
  100% {
    transform: translate3d(-1.6%, 1.1%, 0) scale(1.04) rotate(-1.5deg);
  }
}

@keyframes c6-bg-diagonals-slide {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 220px 0;
  }
}

@keyframes c6-bg-diagonals-slide-reverse {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: -180px 0;
  }
}

@keyframes c6-bg-aurora-drift {
  0% {
    transform: translate3d(-2%, -1.5%, 0) scale(1.02) rotate(-2deg);
  }
  100% {
    transform: translate3d(2.2%, 1.8%, 0) scale(1.08) rotate(2deg);
  }
}

@keyframes c6-bg-aurora-drift-reverse {
  0% {
    transform: translate3d(1.8%, -1.2%, 0) scale(1.1) rotate(2deg);
  }
  100% {
    transform: translate3d(-2%, 1.5%, 0) scale(1.03) rotate(-2deg);
  }
}

@keyframes c6-bg-orbs-float {
  0% {
    transform: translate3d(-1.5%, -1%, 0) scale(1.02);
  }
  100% {
    transform: translate3d(1.8%, 1.2%, 0) scale(1.08);
  }
}

@keyframes c6-bg-orbs-float-reverse {
  0% {
    transform: translate3d(1.2%, -1.2%, 0) scale(1.1);
  }
  100% {
    transform: translate3d(-1.6%, 1.4%, 0) scale(1.04);
  }
}

@keyframes c6-bg-mesh-shift {
  0% {
    background-position: 0% 0%, 100% 0%, 40% 100%, 0% 0%;
    transform: scale(1.02);
  }
  100% {
    background-position: 14% 8%, 84% 12%, 52% 86%, 0% 0%;
    transform: scale(1.08);
  }
}

@keyframes c6-bg-mesh-rotate {
  0% {
    transform: rotate(0deg) scale(1.02);
  }
  100% {
    transform: rotate(360deg) scale(1.1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .c6-bg-animation-layer::before,
  .c6-bg-animation-layer::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Style pour l'élément d'espacement */
.dropdown-spacer {
  height: 20px;
  width: 100%;
  display: block;
  background: transparent;
} 

/* ==========================================
   RECHERCHE GLOBALE
   ========================================== */

/* Conteneur de recherche globale */
.global-search-container {
    min-width: 280px;
    max-width: 400px;
}

/* Dropdown des résultats de recherche */
.global-search-dropdown {
    top: 100%;
    left: 0;
    right: 0;
    z-index: 9999;
    max-height: 400px;
    overflow-y: auto;
    margin-top: 4px;
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Positionnement de l'indicateur de chargement */
.global-search-loading {
    top: 50%;
    right: 40px;
    transform: translateY(-50%);
    z-index: 10;
}




/* Indicateur Ctrl+K dans le placeholder */
.navbar-search input:not(:focus)::placeholder {
    background: linear-gradient(90deg, transparent 70%, rgba(13, 110, 253, 0.1) 100%);
}

/* Style pour les éléments de résultats */
.search-result-item {
    transition: all 0.2s ease;
    cursor: pointer;
    border-left: 3px solid transparent;
    min-height: 48px;
}

.search-result-item:hover,
.search-result-item.active {
    background-color: rgba(13, 110, 253, 0.05);
    border-left-color: #0d6efd;
}

.search-result-item:last-child {
    border-bottom: none;
}

/* Header des résultats */
.search-results-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.search-query-badge {
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
    padding: 1px 4px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    border: 1px solid rgba(13, 110, 253, 0.2);
}

/* Footer des résultats */
.search-results-footer {
    background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Icônes des résultats */
.search-result-icon {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.search-result-icon-base {
    background-color: rgba(13, 110, 253, 0.1);
}

.search-result-icon-module {
    background-color: rgba(25, 135, 84, 0.1);
}

.search-result-icon-user {
    background-color: rgba(255, 193, 7, 0.1);
}

.search-result-icon-page {
    background-color: rgba(13, 202, 240, 0.1);
}

.search-result-icon-default {
    background-color: rgba(108, 117, 125, 0.1);
}

/* Badges pour les types */
.search-result-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1;
}

.search-badge-base {
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
    border: 1px solid rgba(13, 110, 253, 0.2);
}

.search-badge-module {
    background-color: rgba(25, 135, 84, 0.1);
    color: #198754;
    border: 1px solid rgba(25, 135, 84, 0.2);
}

.search-badge-user {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.search-badge-page {
    background-color: rgba(13, 202, 240, 0.1);
    color: #0dcaf0;
    border: 1px solid rgba(13, 202, 240, 0.2);
}

.search-badge-default {
    background-color: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    border: 1px solid rgba(108, 117, 125, 0.2);
}

/* Titre des résultats */
.search-result-title {
    font-size: 14px !important;
    font-weight: bold;
    color: #212529;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    max-width: 220px;
}

/* Preview du contenu de recherche */
.search-preview-content {
    font-size: 14px;
    line-height: 1.3;
    color: #6c757d;
    max-height: 2.4em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.search-highlight {
    background-color: #fff3cd;
    color: #664d03;
    padding: 1px 2px;
    border-radius: 2px;
    font-weight: 600;
    font-size: 14px;
}

/* Métadonnées des résultats */
.search-result-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #6c757d;
}

.search-result-id {
    color: #495057;
}

.search-result-id strong {
    color: #212529;
    font-weight: 600;
}

.search-result-separator {
    color: #dee2e6;
    font-weight: bold;
}

.search-result-source {
    color: #6c757d;
    font-style: italic;
}

/* Flèche de navigation */
.search-result-arrow {
    color: #adb5bd;
    font-size: 14px;
    transition: all 0.2s ease;
}

.search-result-item:hover .search-result-arrow {
    color: #0d6efd;
    transform: translateX(2px);
}

/* Animation d'apparition du dropdown */
.global-search-dropdown {
    animation: searchDropdownFadeIn 0.2s ease-out;
}

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

/* Responsive pour la recherche */
@media (max-width: 768px) {
    .global-search-container {
        min-width: 200px;
        max-width: 280px;
    }
    
    .navbar-search input {
        min-width: 200px;
    }
    
    .navbar-search input:focus {
        min-width: 250px;
    }
    
    .global-search-dropdown {
        max-height: 300px;
    }
    
    .search-result-item {
        min-height: 40px;
    }
}

/* État de focus pour l'accessibilité */
.search-result-item:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: -2px;
}

/* Scrollbar personnalisée pour les résultats */
.global-search-dropdown::-webkit-scrollbar {
    width: 6px;
}

.global-search-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.global-search-dropdown::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.global-search-dropdown::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Amélioration de l'indicateur de chargement */
.global-search-loading .spinner-border {
    width: 1rem;
    height: 1rem;
}

/* Style pour le message "Aucun résultat" */
.search-no-results {
    color: #6c757d;
}

.search-no-results-icon {
    font-size: 24px;
    color: #adb5bd;
}

.search-no-results-text {
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    margin-bottom: 2px;
}

.search-no-results-hint {
    font-size: 14px;
    color: #6c757d;
}

/* Style pour les erreurs de recherche */
.search-error {
    color: #dc3545;
}

.search-error-icon {
    font-size: 24px;
    color: #f5c2c7;
}

.search-error-text {
    font-size: 14px;
    font-weight: 500;
    color: #dc3545;
    margin-bottom: 2px;
}

.search-error-hint {
    font-size: 14px;
    color: #6c757d;
}

/* Amélioration des couleurs du thème sombre */
[data-theme="dark"] .global-search-dropdown .card {
    background-color: var(--bs-dark);
    border-color: var(--bs-gray-700);
}

[data-theme="dark"] .search-results-header {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%);
    border-bottom-color: var(--bs-gray-600);
}

[data-theme="dark"] .search-result-item:hover,
[data-theme="dark"] .search-result-item.active {
    background-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .search-highlight {
    background-color: rgba(255, 193, 7, 0.3);
    color: #fff;
}

[data-theme="dark"] .search-result-title {
    color: #e9ecef;
}

[data-theme="dark"] .search-preview-content {
    color: #adb5bd;
}

[data-theme="dark"] .search-result-meta {
    color: #6c757d;
}

[data-theme="dark"] .search-result-id {
    color: #adb5bd;
}

[data-theme="dark"] .search-result-id strong {
    color: #e9ecef;
}

[data-theme="dark"] .search-result-source {
    color: #6c757d;
}

[data-theme="dark"] .search-query-badge {
    background-color: rgba(13, 110, 253, 0.2);
    color: #6ba3f5;
    border-color: rgba(13, 110, 253, 0.3);
}

[data-theme="dark"] .search-no-results-text {
    color: #adb5bd;
}

[data-theme="dark"] .search-error-text {
    color: #f5c2c7;
}

/* ========================================== */ 

/* Raffinement visuel du listing de recherche globale */
.global-search-dropdown {
  overflow: hidden;
  max-height: none;
}

#search-results-content {
  display: flex;
  flex-direction: column;
}

.search-results-header,
.search-results-footer {
  padding: 0.55rem 0.7rem;
  background: var(--white);
}

.search-results-header {
  border-bottom: 1px solid var(--neutral-200);
}

.search-results-footer {
  border-top: 1px solid var(--neutral-200);
}

.search-results-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.search-results-stats {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-secondary-light);
  font-size: 0.76rem;
  font-weight: 600;
}

.search-results-stats-error {
  color: #dc3545;
}

.search-results-list {
  max-height: 350px;
  overflow-y: auto;
}

.search-result-item {
  padding: 0.62rem 0.72rem;
  border-left: 0;
  border-bottom: 1px solid var(--neutral-200);
  border-radius: 0;
}

.search-result-item:last-child {
  border-bottom: 0;
}

.search-result-layout {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.search-result-leading,
.search-result-trailing {
  flex-shrink: 0;
}

.search-result-main {
  min-width: 0;
  flex: 1;
}

.search-result-topline {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  margin-bottom: 0.16rem;
}

.search-result-title {
  max-width: none;
  flex: 1;
}

.search-preview-content {
  margin-bottom: 0.24rem;
}

.search-result-meta {
  font-size: 0.74rem;
  gap: 0.36rem;
}

.search-result-dot {
  opacity: 0.6;
}

.search-result-source {
  font-style: normal;
  opacity: 0.9;
}

.search-result-duplicate-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  min-width: 26px;
  padding: 0 0.38rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #0d6efd;
  background: rgba(13, 110, 253, 0.1);
  border: 1px solid rgba(13, 110, 253, 0.2);
}

.search-results-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.34rem;
  color: var(--text-secondary-light);
  font-size: 0.74rem;
  font-weight: 500;
}

.search-empty-state {
  padding: 0.95rem 0.8rem;
  text-align: center;
}

.search-no-results-icon,
.search-error-icon {
  margin-bottom: 0.35rem;
}

[data-theme="dark"] .search-results-header,
[data-theme="dark"] .search-results-footer {
  background: #161b22;
  border-color: rgba(163, 174, 208, 0.35);
}

[data-theme="dark"] .search-result-item {
  border-bottom-color: rgba(163, 174, 208, 0.25);
}

[data-theme="dark"] .search-result-duplicate-count {
  color: #9fc2ff;
  background: rgba(95, 149, 255, 0.2);
  border-color: rgba(95, 149, 255, 0.4);
}

/* ==========================================
   DARK MODE FIXES (Dashboard/readability)
   ========================================== */

/* Assure une lisibilité correcte des textes atténués en mode sombre */
[data-theme="dark"] .text-muted {
    color: var(--text-secondary-light) !important;
}

/* Les textes forcés en "dark" doivent rester clairs en mode sombre */
[data-theme="dark"] .text-dark {
    color: var(--text-primary-light) !important;
}

/* Harmonise la couleur du corps de texte si surchargée par des utilitaires */
[data-theme="dark"] .text-body {
    color: var(--text-secondary-light) !important;
}

/* ===================================================
   SECTIONS DE FORMULAIRE - Design amélioré
   =================================================== */

/* Headers de section - titre avec accent coloré */
.mb-4 .section-header,
.mb-3 .section-header,
.form-section .section-header {
  border: none;
  border-radius: 6px;
  padding: 0.4rem 0.625rem;
  margin-bottom: 0.375rem;
  border-bottom: none;
  background: linear-gradient(135deg, #edf2ff 0%, #f5f8ff 100%);
  border-left: 3px solid #487fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

/* Titre de section */
.section-header .section-title {
  font-weight: 700;
  color: #1e3a5f;
  font-size: 0.75rem;
  margin: 0;
  cursor: pointer;
  transition: color 0.15s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

/* Puce colorée avant le titre */
.section-header .section-title::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #487fff;
  flex-shrink: 0;
}

.section-header .section-title:hover {
  color: #487fff;
}

/* Bouton de toggle de section */
.section-header .section-toggle {
  border: none;
  background: rgba(72, 127, 255, 0.08);
  color: #487fff;
  border-radius: 4px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 0.875rem;
  transition: all 0.15s ease;
}

.section-header .section-toggle:hover {
  background: rgba(72, 127, 255, 0.15);
  color: #2563eb;
}

/* Conteneur de section avec carte distincte */
body[data-page="module-edit"] .form-section,
body[data-page="module-create"] .form-section,
body[data-page="module-edit"] .mb-3.form-section,
body[data-page="module-create"] .mb-3.form-section {
  background: #fafbfd !important;
  border: 1px solid #c5d0e0 !important;
  border-radius: 8px !important;
  padding: 0 0.75rem 0.5rem !important;
  margin-bottom: 0.5rem !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

body[data-page="module-edit"] .form-section:hover,
body[data-page="module-create"] .form-section:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
  border-color: #a8b8d0 !important;
}

/* Le header de section prend tout la largeur avec marge négative */
body[data-page="module-edit"] .form-section > .section-header,
body[data-page="module-create"] .form-section > .section-header {
  margin: 0 -0.75rem 0.375rem -0.75rem !important;
  padding: 0.4rem 0.75rem !important;
  border-radius: 7px 7px 0 0 !important;
  border-bottom: 1px solid #e3e8f0 !important;
}

/* Espacement interne des lignes de champs dans les sections */
body[data-page="module-edit"] .form-section > .row.g-2,
body[data-page="module-create"] .form-section > .row.g-2 {
  margin-top: 0 !important;
  --bs-gutter-y: 0.25rem;
}

/* Forcer les form-section à avoir un margin-bottom raisonnable */
body[data-page="module-edit"] div.mb-3.form-section,
body[data-page="module-create"] div.mb-3.form-section {
  margin-bottom: 0.5rem !important;
}

/* ==========================================
   RÉDUCTION GLOBALE DES TAILLES DE POLICE
   ========================================== */

/* Réduction globale de la police du body */
body {
  font-size: 0.9rem !important;
}

/* ==========================================
   SIDEBAR - RAFRAICHISSEMENT VISUEL
   ========================================== */

/* Entrées principales */
.sidebar-menu > li > a,
.sidebar-menu > li > div > a {
  color: var(--text-primary-light) !important;
  border-radius: 10px !important;
  min-height: 35px;
  padding: 0.44rem 0.62rem !important;
  background: rgba(72, 127, 255, 0.035);
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease,
    box-shadow 0.2s ease;
}

/* Espacement général du bloc menu */
.sidebar-menu-area {
  padding-top: 0.3rem;
  padding-bottom: 0.35rem;
}

.sidebar-menu {
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
}

.sidebar-menu > li {
  margin-bottom: 0.18rem;
}

.sidebar-menu > li > a:hover,
.sidebar-menu > li > div > a:hover {
  color: var(--brand) !important;
  background: rgba(72, 127, 255, 0.08);
  transform: translateX(2px);
}

/* Taille de police homogène */
.sidebar-menu li a {
  font-size: 0.78rem !important;
}

@media (min-width: 1400px) {
  .sidebar-menu li a {
    font-size: 0.83rem !important;
  }
}

/* Icônes */
.sidebar-menu li a .menu-icon {
  font-size: 0.95rem !important;
}

@media (min-width: 1650px) {
  .sidebar-menu li a .menu-icon {
    font-size: 1rem !important;
  }
}

.sidebar-menu li a i {
  font-size: 0.98rem !important;
}

/* Titres de groupes: plus lisibles */
.sidebar-menu .sidebar-menu-group-title {
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--neutral-500) !important;
  margin-top: 0.5rem !important;
  margin-bottom: 0.2rem !important;
  padding-inline: 0.3rem;
}

.sidebar-menu .sidebar-menu-group-title.sidebar-group-toggle {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 1.1rem;
}

.sidebar-menu .sidebar-menu-group-title.sidebar-group-toggle::after {
  content: "▾";
  position: absolute;
  right: 0.2rem;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  font-size: 0.66rem;
  opacity: 0.8;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.sidebar-menu .sidebar-menu-group-title.sidebar-group-toggle.collapsed::after {
  transform: translateY(-50%) rotate(-90deg);
  opacity: 0.7;
}

/* Boutons toggle sidebar */
.sidebar-toggle .icon,
.sidebar-mobile-toggle .icon {
  font-size: 1.25rem !important;
}

/* Sous-menu */
.sidebar-menu .sidebar-submenu {
  margin-top: 0.15rem;
  padding-top: 0.2rem !important;
  padding-bottom: 0;
  border-left: 1px dashed rgba(128, 142, 167, 0.35);
}

.sidebar-menu .sidebar-submenu li a {
  font-size: 0.72rem !important;
  color: var(--text-secondary-light) !important;
  border-radius: 8px !important;
  min-height: 30px;
  padding: 0.36rem 0.58rem !important;
  background: rgba(72, 127, 255, 0.03);
}

.sidebar-menu .sidebar-submenu li a:hover {
  color: var(--brand) !important;
  background: rgba(72, 127, 255, 0.08);
}

/* Lien actif simple */
.sidebar-menu li > a.active-page {
  background: linear-gradient(135deg, var(--brand), #5f95ff) !important;
  color: #fff !important;
  box-shadow: 0 6px 14px rgba(72, 127, 255, 0.28);
}

/* Dropdown ouvert/actif */
.sidebar-menu li.dropdown.dropdown-open > div,
.sidebar-menu li.dropdown.open > div {
  background: linear-gradient(135deg, var(--brand), #5f95ff) !important;
  color: #fff !important;
  border-radius: 10px;
  margin: 0 -0.2rem;
  padding-inline: 0.2rem;
  box-shadow: 0 6px 14px rgba(72, 127, 255, 0.25);
}

.sidebar-menu li.dropdown.dropdown-open > div a,
.sidebar-menu li.dropdown.open > div a {
  color: #fff !important;
}

.sidebar-menu li.dropdown.dropdown-open > div a:hover,
.sidebar-menu li.dropdown.open > div a:hover {
  color: rgba(255, 255, 255, 0.9) !important;
  background: transparent;
  transform: none;
}

.sidebar-menu li.dropdown.dropdown-open > div .sidebar-dropdown-chevron,
.sidebar-menu li.dropdown.open > div .sidebar-dropdown-chevron {
  color: #fff !important;
  border-radius: 8px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-menu li.dropdown.dropdown-open > div .sidebar-dropdown-chevron:hover,
.sidebar-menu li.dropdown.open > div .sidebar-dropdown-chevron:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff !important;
}

.sidebar-menu li.dropdown.dropdown-open > div .menu-icon,
.sidebar-menu li.dropdown.open > div .menu-icon {
  color: inherit !important;
}

.sidebar-menu li.dropdown.dropdown-open > div small,
.sidebar-menu li.dropdown.open > div small {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* Séparateur doux après un groupe déroulant ouvert */
.sidebar-menu li.dropdown.dropdown-open,
.sidebar-menu li.dropdown.open {
  border-bottom: 1px solid rgba(128, 142, 167, 0.24);
  padding-bottom: 0.35rem;
  margin-bottom: 0.2rem;
}

[data-theme="dark"] .sidebar-menu > li > a:hover,
[data-theme="dark"] .sidebar-menu > li > div > a:hover,
[data-theme="dark"] .sidebar-menu .sidebar-submenu li a:hover {
  background: rgba(95, 149, 255, 0.2);
}

[data-theme="dark"] .sidebar-menu > li > a,
[data-theme="dark"] .sidebar-menu > li > div > a {
  background: rgba(163, 174, 208, 0.08);
}

[data-theme="dark"] .sidebar-menu .sidebar-submenu li a {
  background: rgba(163, 174, 208, 0.06);
}

[data-theme="dark"] .sidebar-menu .sidebar-submenu {
  border-left-color: rgba(163, 174, 208, 0.35);
}

[data-theme="dark"] .sidebar-menu li.dropdown.dropdown-open,
[data-theme="dark"] .sidebar-menu li.dropdown.open {
  border-bottom-color: rgba(163, 174, 208, 0.35);
}

/* Ajustement des breadcrumbs */
.breadcrumb {
  font-size: 0.85rem !important;
}

/* Breadcrumb compact et discret */
.breadcrumb-container {
  padding: 0.25rem 0;
  margin-bottom: 0.5rem !important;
  margin-top: 0 !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  min-height: auto;
}

/* Réduire l'espace au-dessus du breadcrumb dans le dashboard */
.dashboard-main-body > .breadcrumb-container:first-child {
  margin-top: -0.5rem !important;
  padding-top: 0.25rem !important;
}

/* Ajuster le padding du dashboard-main-body pour le breadcrumb */
.dashboard-main-body {
  padding-top: 0.5rem !important;
}

@media (min-width: 1400px) {
  .dashboard-main-body {
    padding-top: 0.75rem !important;
  }
}

.page-title-text {
  font-size: 0.875rem;
  color: var(--bs-body-color);
  font-weight: 500;
  line-height: 1.2;
}

.favorite-star-btn {
  opacity: 0.7;
  transition: opacity 0.2s ease;
  padding: 0.125rem !important;
}

.favorite-star-btn:hover {
  opacity: 1;
}

.favorite-star-btn iconify-icon {
  width: 14px;
  height: 14px;
}

.breadcrumb-nav {
  font-size: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumb-nav li {
  display: flex;
  align-items: center;
}

.breadcrumb-nav li a {
  color: var(--bs-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 400;
}

.breadcrumb-nav li a:hover {
  color: var(--bs-primary);
}

.breadcrumb-nav li span.text-secondary-light {
  font-size: 0.7rem;
  opacity: 0.5;
  margin: 0 0.25rem;
}

.breadcrumb-nav li span.text-primary-light {
  color: var(--bs-body-color);
  font-weight: 400;
  font-size: 0.75rem;
}

.breadcrumb-nav iconify-icon {
  width: 12px;
  height: 12px;
  opacity: 0.6;
}

/* Ajustement des titres de page */
h1, .h1 {
  font-size: 1.5rem !important;
}

h2, .h2 {
  font-size: 1.25rem !important;
}

h3, .h3 {
  font-size: 1.1rem !important;
}

h4, .h4 {
  font-size: 1rem !important;
}

h5, .h5 {
  font-size: 0.9rem !important;
}

h6, .h6 {
  font-size: 0.85rem !important;
}

/* Ajustement des boutons */
.btn {
  font-size: 0.85rem !important;
}

.btn-sm {
  font-size: 0.75rem !important;
}

.btn-lg {
  font-size: 0.95rem !important;
}

/* Ajustement des badges */
.badge {
  font-size: 0.75rem !important;
}

/* Ajustement des inputs et formulaires */
.form-control,
.form-select {
  font-size: 0.85rem !important;
}

/* Ajustement des labels */
label {
  font-size: 0.85rem !important;
}

/* Ajustement des DataTables */
.dataTables_wrapper {
  font-size: 0.85rem !important;
}

.dataTables_wrapper table {
  font-size: 0.85rem !important;
}

/* Ajustement des cartes */
.card-title {
  font-size: 1rem !important;
}

.card-text {
  font-size: 0.85rem !important;
}

/* ==========================================
   ICONIFY ICON - ALIGNEMENT GLOBAL
   Résout définitivement les problèmes d'alignement
   des icônes iconify dans tous les contextes
   ========================================== */

/* Style de base pour toutes les icônes iconify */
iconify-icon {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1;
  flex-shrink: 0;
}

/* Dans les contextes flexbox, l'icône s'adapte */
.d-flex iconify-icon,
.d-inline-flex iconify-icon,
.btn iconify-icon,
.dropdown-item iconify-icon,
.nav-link iconify-icon,
.list-group-item iconify-icon,
.card-header iconify-icon,
.alert iconify-icon,
.badge iconify-icon {
  display: inline-flex !important;
  align-self: center;
}

/* Boutons avec icône et texte */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

/* Labels de formulaire avec icône */
label iconify-icon,
.form-check-label iconify-icon,
.form-label iconify-icon {
  margin-right: 0.25rem;
}

/* Titres avec icône */
h1 iconify-icon, h2 iconify-icon, h3 iconify-icon,
h4 iconify-icon, h5 iconify-icon, h6 iconify-icon,
.h1 iconify-icon, .h2 iconify-icon, .h3 iconify-icon,
.h4 iconify-icon, .h5 iconify-icon, .h6 iconify-icon {
  margin-right: 0.5rem;
}

/* Fix spécifique pour les conteneurs flex avec gap */
.d-flex.gap-1 iconify-icon,
.d-flex.gap-2 iconify-icon,
.d-flex.gap-3 iconify-icon,
.d-inline-flex.gap-1 iconify-icon,
.d-inline-flex.gap-2 iconify-icon,
.d-inline-flex.gap-3 iconify-icon {
  margin: 0;
}

/* Classe utilitaire pour forcer l'alignement */
.icon-align {
  display: inline-flex !important;
  align-items: center;
  gap: 0.375rem;
}

.icon-align iconify-icon {
  flex-shrink: 0;
}

/* Animation de rotation pour les icônes de chargement */
.animate-spin,
iconify-icon.animate-spin {
  animation: iconSpin 1s linear infinite;
}

@keyframes iconSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Tailles prédéfinies pour les icônes */
iconify-icon.icon-xs { font-size: 0.75rem; width: 0.75rem; height: 0.75rem; }
iconify-icon.icon-sm { font-size: 1rem; width: 1rem; height: 1rem; }
iconify-icon.icon-md { font-size: 1.25rem; width: 1.25rem; height: 1.25rem; }
iconify-icon.icon-lg { font-size: 1.5rem; width: 1.5rem; height: 1.5rem; }
iconify-icon.icon-xl { font-size: 2rem; width: 2rem; height: 2rem; }
iconify-icon.icon-2xl { font-size: 2.5rem; width: 2.5rem; height: 2.5rem; }

/* ==========================================
   FIN ICONIFY ICON
   ========================================== */

/* ==========================================
   DASHBOARD LIGHT MODE
   Allègement visuel de la shell après login
   ========================================== */

.navbar-header {
  height: 4rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--neutral-200);
}

.global-search-dropdown {
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.search-results-header,
.search-results-footer {
  background: var(--white);
}

.navbar-search input:not(:focus)::placeholder {
  background: transparent;
}

.dashboard-main .navbar-quick-actions .navbar-tool-notifications,
.dashboard-main .navbar-quick-actions .navbar-tool-favorites,
.dashboard-main .navbar-quick-actions .navbar-tool-bug {
  display: none;
}

@media (min-width: 1700px) {
  .dashboard-main .navbar-quick-actions .navbar-tool-notifications,
  .dashboard-main .navbar-quick-actions .navbar-tool-favorites,
  .dashboard-main .navbar-quick-actions .navbar-tool-bug {
    display: block;
  }
}

.dashboard-main .task-item,
.dashboard-main .create-step,
.dashboard-main .widget-type-card {
  animation: none !important;
}

.dashboard-main .widget-actions .btn:hover {
  transform: none !important;
}

/* ==========================================
   CHAT V2 - Interface et lanceur global
   ========================================== */

:root {
  --c6-chat-fab-size: 56px;
  --c6-chat-fab-bottom: 24px;
  --c6-chat-fab-right: 24px;
}

.c6-chat-layout {
  gap: 1rem;
  height: calc(100vh - 220px);
  min-height: 580px;
}

.c6-chat-panel {
  border: 1px solid var(--neutral-200);
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
}

.sidebar-menu a.has-chat-unread {
  position: relative;
}

.c6-chat-sidebar-badge {
  margin-left: 0.45rem;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #dc3545;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

.c6-chat-search {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--white);
}

.c6-chat-conversations .chat-sidebar-single {
  border-radius: 10px;
  margin: 0.2rem 0.6rem;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.c6-chat-conversations .chat-sidebar-single:hover {
  background: rgba(72, 127, 255, 0.08);
  transform: translateX(2px);
}

.c6-chat-conversations .chat-sidebar-single.user-online .img {
  position: relative;
}

.c6-chat-conversations .chat-sidebar-single.user-online .img::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #fff;
  background-color: var(--success-600, #16a34a);
}

.c6-chat-messages {
  background: linear-gradient(
    180deg,
    rgba(72, 127, 255, 0.02) 0%,
    rgba(72, 127, 255, 0) 200px
  );
  padding: 1.25rem 1.35rem;
}

.c6-chat-messages .chat-day-separator {
  position: sticky;
  top: 0.35rem;
  z-index: 1;
  display: flex;
  justify-content: center;
  margin: 0.45rem 0 0.65rem;
}

.c6-chat-messages .chat-day-separator span {
  background: rgba(15, 23, 42, 0.08);
  color: var(--text-secondary-light);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.2rem 0.62rem;
  backdrop-filter: blur(2px);
}

.c6-chat-messages .chat-single-message {
  width: auto;
  max-width: min(78%, 720px);
  align-items: flex-end;
  gap: 0.55rem;
}

.c6-chat-messages .chat-single-message + .chat-single-message {
  margin-top: 0.32rem;
}

.c6-chat-messages .chat-single-message.is-first {
  margin-top: 0.78rem;
}

.c6-chat-messages .chat-single-message .avatar {
  width: 28px;
  min-width: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary-light);
}

.c6-chat-messages .chat-single-message .avatar.avatar-spacer {
  visibility: hidden;
}

.c6-chat-messages .chat-single-message .chat-message-content {
  width: auto;
  max-width: 100%;
  padding: 0.62rem 0.78rem 0.42rem;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.08);
}

.c6-chat-messages .chat-single-message .chat-author {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-secondary-light);
}

.c6-chat-messages .chat-single-message .chat-message-text {
  line-height: 1.45;
  white-space: normal;
  word-break: break-word;
}

.c6-chat-messages .chat-single-message .chat-time {
  margin-top: 0.34rem;
  text-align: right;
  font-size: 0.68rem;
  opacity: 0.78;
}

.c6-chat-messages .chat-single-message.left .chat-message-content {
  border-radius: 14px 14px 14px 6px;
  background-color: var(--input-bg);
}

.c6-chat-messages .chat-single-message.right .chat-message-content {
  border-radius: 14px 14px 6px 14px;
  background: linear-gradient(135deg, #487fff, #3569db);
  color: #fff;
}

.c6-chat-messages .chat-single-message.right .chat-message-content .chat-time {
  color: rgba(255, 255, 255, 0.92);
}

.c6-chat-messages .chat-single-message.left.is-grouped .chat-message-content {
  border-top-left-radius: 8px;
}

.c6-chat-messages .chat-single-message.right.is-grouped .chat-message-content {
  border-top-right-radius: 8px;
}

.c6-chat-composer {
  border-top: 1px solid var(--neutral-200);
}

.c6-chat-fab {
  position: fixed;
  right: var(--c6-chat-fab-right);
  bottom: var(--c6-chat-fab-bottom);
  z-index: 1055;
}

/* Eviter le chevauchement avec la bulle DevTools en mode dev */
.c6-chat-fab.has-devtools {
  bottom: calc(var(--c6-chat-fab-bottom) + var(--c6-chat-fab-size) + 12px);
}

.c6-chat-fab-btn {
  width: var(--c6-chat-fab-size);
  height: var(--c6-chat-fab-size);
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #487fff, #3569db);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 30px rgba(53, 105, 219, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.c6-chat-fab-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(53, 105, 219, 0.4);
}

.c6-chat-fab-btn iconify-icon {
  font-size: 1.45rem;
}

.c6-chat-fab-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #dc3545;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  border: 2px solid #fff;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.c6-chat-fab-badge.is-visible {
  display: inline-flex;
}

.c6-chat-fab-panel {
  position: absolute;
  right: 0;
  bottom: calc(var(--c6-chat-fab-size) + 12px);
  width: min(360px, calc(100vw - 32px));
  max-height: 480px;
  overflow: hidden;
  border: 1px solid var(--neutral-200);
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 20px 40px rgba(2, 8, 23, 0.18);
  display: none;
}

.c6-chat-fab-panel.is-open {
  display: block;
}

.c6-chat-fab-head {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--neutral-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.c6-chat-fab-head-left {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.c6-chat-fab-head-left h6,
.c6-chat-fab-head-left small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.c6-chat-fab-back {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.c6-chat-fab-back:hover {
  background: rgba(72, 127, 255, 0.08);
}

.c6-chat-fab-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 0.5rem;
}

.c6-chat-fab-conversation {
  height: 360px;
  display: flex;
  flex-direction: column;
}

.c6-chat-fab-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.55rem;
  background: linear-gradient(
    180deg,
    rgba(72, 127, 255, 0.05) 0%,
    rgba(72, 127, 255, 0) 160px
  );
}

.c6-chat-fab-empty {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-secondary-light);
  font-size: 0.8rem;
}

.c6-chat-fab-message {
  display: flex;
  margin-bottom: 0.42rem;
}

.c6-chat-fab-message.is-own {
  justify-content: flex-end;
}

.c6-chat-fab-message-bubble {
  max-width: 82%;
  border-radius: 11px;
  padding: 0.44rem 0.6rem 0.32rem;
  background: var(--input-bg);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.c6-chat-fab-message.is-own .c6-chat-fab-message-bubble {
  background: linear-gradient(135deg, #487fff, #3569db);
  color: #fff;
}

.c6-chat-fab-message-bubble p {
  line-height: 1.35;
  word-break: break-word;
}

.c6-chat-fab-message-bubble small {
  margin-top: 0.18rem;
  display: block;
  text-align: right;
  font-size: 0.66rem;
  opacity: 0.78;
}

.c6-chat-fab-message.is-own .c6-chat-fab-message-bubble small {
  color: rgba(255, 255, 255, 0.92);
}

.c6-chat-fab-typing {
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  padding: 0.35rem 0.6rem;
  font-size: 0.72rem;
  color: var(--text-secondary-light);
  display: flex;
  align-items: center;
  gap: 0.42rem;
}

.c6-chat-fab-typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #487fff;
  opacity: 0.45;
  animation: c6-chat-fab-typing-pulse 1s ease-in-out infinite;
}

@keyframes c6-chat-fab-typing-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.38;
  }
  50% {
    transform: scale(1.4);
    opacity: 1;
  }
}

.c6-chat-fab-composer {
  border-top: 1px solid var(--neutral-200);
  padding: 0.5rem;
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
}

.c6-chat-fab-composer textarea {
  min-width: 0;
  resize: none;
  line-height: 1.35;
  max-height: 110px;
  overflow-y: hidden;
  padding-top: 0.38rem;
  padding-bottom: 0.38rem;
}

.c6-chat-fab-item {
  width: 100%;
  border: none;
  background: transparent;
  border-radius: 10px;
  padding: 0.6rem;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  transition: background-color 0.2s ease;
}

.c6-chat-fab-item:hover {
  background: rgba(72, 127, 255, 0.08);
}

.c6-chat-fab-item-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-primary-light);
}

.c6-chat-fab-item-message {
  font-size: 0.76rem;
  color: var(--text-secondary-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 190px;
}

.c6-chat-fab-item-meta {
  margin-left: auto;
  text-align: right;
}

.c6-chat-fab-item-unread {
  margin-top: 0.2rem;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ff9f1a;
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  padding: 0 4px;
}

.c6-chat-fab-footer {
  border-top: 1px solid var(--neutral-200);
  padding: 0.6rem;
}

[data-theme="dark"] .c6-chat-panel,
[data-theme="dark"] .c6-chat-fab-panel {
  border-color: rgba(163, 174, 208, 0.35);
  background: #161b22;
}

[data-theme="dark"] .c6-chat-search {
  background: #161b22;
}

[data-theme="dark"] .c6-chat-fab-back {
  color: #d8e0f3;
}

[data-theme="dark"] .c6-chat-fab-message-bubble {
  background: rgba(148, 163, 184, 0.16);
  color: #e2e8f0;
}

[data-theme="dark"] .c6-chat-fab-typing {
  border-top-color: rgba(148, 163, 184, 0.3);
  color: #cfd8ee;
}

[data-theme="dark"] .c6-chat-messages .chat-day-separator span {
  background: rgba(148, 163, 184, 0.2);
  color: #d8e0f3;
}

[data-theme="dark"] .c6-chat-messages .chat-single-message.left .chat-message-content {
  background: rgba(148, 163, 184, 0.13);
  color: #e2e8f0;
}

@media (max-width: 992px) {
  .c6-chat-layout {
    height: auto;
    min-height: 0;
  }

  .c6-chat-fab {
    right: 14px;
    bottom: 14px;
  }

  .c6-chat-fab.has-devtools {
    bottom: calc(14px + var(--c6-chat-fab-size) + 12px);
  }

  .c6-chat-messages .chat-single-message {
    max-width: 92%;
  }

  .c6-chat-fab-conversation {
    height: 340px;
  }
}

/* ==========================================
   IDLE SHEEP WALKER
   ========================================== */

.c6-idle-sheep {
  position: fixed;
  right: -210px;
  bottom: 16px;
  width: 145px;
  z-index: 1051;
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;
}

.c6-idle-sheep.is-visible {
  opacity: 1;
  animation: c6-idle-sheep-walk var(--c6-sheep-walk-duration, 14000ms) linear forwards;
}

.c6-idle-sheep-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.c6-sheep-shadow {
  fill: rgba(17, 24, 39, 0.18);
}

.c6-sheep-wool {
  fill: #f8fbff;
  stroke: #d4deee;
  stroke-width: 2;
}

.c6-sheep-wool-group {
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(var(--c6-sheep-wool-scale, 1));
  transition: transform 0.35s ease;
}

.c6-sheep-face {
  fill: #f2f6ff;
  stroke: #c4d2ea;
  stroke-width: 2;
}

.c6-sheep-tail {
  fill: #f8fbff;
  stroke: #d4deee;
  stroke-width: 2;
  transform-origin: 143px 61px;
  animation: c6-idle-sheep-tail-wag 0.4s ease-in-out infinite alternate;
}

.c6-sheep-ear {
  fill: #e8efff;
  stroke: #c4d2ea;
  stroke-width: 1.6;
}

.c6-sheep-eye-white {
  fill: #ffffff;
}

.c6-sheep-eye {
  fill: #243247;
}

.c6-sheep-eye-lid {
  fill: #f2f6ff;
  transform-origin: center;
  transform: scaleY(0);
}

.c6-sheep-eye-lid-left,
.c6-sheep-eye-lid-right {
  animation: c6-idle-sheep-blink 4.2s ease-in-out infinite;
}

.c6-sheep-brow {
  fill: none;
  stroke: #55677f;
  stroke-width: 1.4;
  stroke-linecap: round;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.c6-sheep-cheek {
  fill: #ffd4e2;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.c6-sheep-mouth {
  fill: none;
  stroke: #55677f;
  stroke-width: 1.6;
  stroke-linecap: round;
  display: none;
}

.c6-sheep-mouth-surprised {
  fill: #ffffff;
  stroke: #55677f;
}

.c6-idle-sheep.expr-smile .c6-sheep-mouth-smile,
.c6-idle-sheep.expr-happy .c6-sheep-mouth-happy,
.c6-idle-sheep.expr-surprised .c6-sheep-mouth-surprised,
.c6-idle-sheep.expr-sleepy .c6-sheep-mouth-sleepy {
  display: block;
}

.c6-idle-sheep.expr-happy .c6-sheep-cheek {
  transform: scale(1.15);
}

.c6-idle-sheep.expr-surprised .c6-sheep-brow-left {
  transform: translateY(-1.3px) rotate(-10deg);
}

.c6-idle-sheep.expr-surprised .c6-sheep-brow-right {
  transform: translateY(-1.3px) rotate(10deg);
}

.c6-idle-sheep.expr-surprised .c6-sheep-eye-white {
  transform: scale(1.08);
  transform-origin: center;
}

.c6-idle-sheep.expr-sleepy .c6-sheep-eye-white,
.c6-idle-sheep.expr-sleepy .c6-sheep-eye {
  opacity: 0;
}

.c6-idle-sheep.expr-sleepy .c6-sheep-eye-lid-left,
.c6-idle-sheep.expr-sleepy .c6-sheep-eye-lid-right {
  animation: none;
  transform: scaleY(1);
}

.c6-idle-sheep.expr-sleepy .c6-sheep-brow-left {
  transform: translateY(0.8px) rotate(8deg);
}

.c6-idle-sheep.expr-sleepy .c6-sheep-brow-right {
  transform: translateY(0.8px) rotate(-8deg);
}

.c6-sheep-leg {
  fill: #d8e3f5;
}

.c6-sheep-leg-front {
  transform-origin: 74px 82px;
  animation: c6-idle-sheep-leg-front 0.42s ease-in-out infinite alternate;
}

.c6-sheep-leg-back {
  transform-origin: 112px 82px;
  animation: c6-idle-sheep-leg-back 0.42s ease-in-out infinite alternate;
}

.c6-sheep-body-group {
  animation: c6-idle-sheep-bob 0.62s ease-in-out infinite alternate;
}

.c6-sheep-dust {
  fill: rgba(148, 163, 184, 0.5);
}

.c6-sheep-dust-1 {
  animation: c6-idle-sheep-dust 0.9s ease-out infinite;
}

.c6-sheep-dust-2 {
  animation: c6-idle-sheep-dust 0.9s ease-out 0.2s infinite;
}

.c6-sheep-dust-3 {
  animation: c6-idle-sheep-dust 0.9s ease-out 0.35s infinite;
}

@keyframes c6-idle-sheep-walk {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(calc(-100vw - 240px), 0, 0);
  }
}

@keyframes c6-idle-sheep-bob {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-2px);
  }
}

@keyframes c6-idle-sheep-leg-front {
  0% {
    transform: rotate(22deg) translateY(1px);
  }
  100% {
    transform: rotate(-24deg) translateY(-1px);
  }
}

@keyframes c6-idle-sheep-leg-back {
  0% {
    transform: rotate(-24deg) translateY(-1px);
  }
  100% {
    transform: rotate(22deg) translateY(1px);
  }
}

@keyframes c6-idle-sheep-tail-wag {
  0% {
    transform: rotate(12deg);
  }
  100% {
    transform: rotate(-14deg);
  }
}

@keyframes c6-idle-sheep-blink {
  0%,
  43%,
  46%,
  100% {
    transform: scaleY(0);
  }
  44%,
  45% {
    transform: scaleY(1);
  }
}

@keyframes c6-idle-sheep-dust {
  0% {
    opacity: 0.65;
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate3d(12px, -6px, 0) scale(1.35);
  }
}

@media (prefers-reduced-motion: reduce) {
  .c6-idle-sheep,
  .c6-idle-sheep.is-visible,
  .c6-sheep-leg-front,
  .c6-sheep-leg-back,
  .c6-sheep-body-group,
  .c6-sheep-tail,
  .c6-sheep-eye-lid-left,
  .c6-sheep-eye-lid-right,
  .c6-sheep-brow-left,
  .c6-sheep-brow-right,
  .c6-sheep-eye-white,
  .c6-sheep-cheek,
  .c6-sheep-wool-group,
  .c6-sheep-dust-1,
  .c6-sheep-dust-2,
  .c6-sheep-dust-3 {
    animation: none !important;
    transition: none !important;
  }
}

/* ==========================================
   EMAIL MESSAGING - Interface interne
   ========================================== */

.c6-email-workspace .c6-email-header {
  border: 1px solid var(--neutral-200);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(72, 127, 255, 0.06), rgba(72, 127, 255, 0.01));
}

.c6-email-workspace .c6-email-header-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(72, 127, 255, 0.15);
  color: #3569db;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.c6-email-workspace .c6-email-sidebar-card,
.c6-email-workspace .c6-email-thread-card,
.c6-email-workspace .c6-email-compose-panel {
  border: 1px solid var(--neutral-200);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.c6-email-workspace .c6-email-thread-card {
  min-height: 520px;
}

.c6-email-workspace .c6-email-compose-panel {
  animation: c6-email-compose-fade-in 0.18s ease-out;
}

.c6-email-workspace .c6-email-compose-standalone .card-body {
  min-height: 520px;
}

.c6-email-workspace #email-compose-to-results {
  max-height: 220px;
  overflow-y: auto;
}

.c6-email-workspace #email-compose-to-selected {
  padding: 0.5rem 0.65rem;
  background: rgba(72, 127, 255, 0.08);
  border: 1px dashed rgba(72, 127, 255, 0.35);
  border-radius: 8px;
}

.c6-email-workspace .c6-email-editor-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem;
  border: 1px solid var(--neutral-200);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #f8faff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.c6-email-workspace .c6-email-editor-group {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.c6-email-workspace .c6-email-editor-separator {
  width: 1px;
  height: 22px;
  background: rgba(15, 23, 42, 0.12);
}

.c6-email-workspace .c6-email-editor-toolbar .btn {
  min-width: 38px;
  height: 34px;
  justify-content: center;
  border-radius: 8px !important;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary-light);
  gap: 0;
  transition: all 0.15s ease;
}

.c6-email-workspace .c6-email-editor-toolbar .btn:hover {
  background: rgba(72, 127, 255, 0.1);
  color: #2d5fc9;
  border-color: rgba(72, 127, 255, 0.2);
}

.c6-email-workspace .c6-email-editor-toolbar .btn:active {
  background: rgba(72, 127, 255, 0.16);
}

.c6-email-workspace .c6-email-editor-toolbar .btn:focus-visible {
  outline: 2px solid rgba(72, 127, 255, 0.4);
  outline-offset: 0;
}

.c6-email-workspace .c6-email-editor {
  min-height: 240px;
  line-height: 1.45;
  padding: 0.9rem;
  overflow-y: auto;
  border-color: var(--neutral-300);
  border-radius: 10px;
  background: #ffffff;
}

.c6-email-workspace .c6-email-editor:focus {
  border-color: rgba(72, 127, 255, 0.45);
  box-shadow: 0 0 0 0.2rem rgba(72, 127, 255, 0.12);
}

.c6-email-workspace .c6-email-editor-toolbar .btn.is-active {
  background: rgba(72, 127, 255, 0.16);
  color: #1f4fb2;
  border-color: rgba(72, 127, 255, 0.32);
}

.c6-email-app #email-conversation-list .list-group-item.active {
  background: rgba(72, 127, 255, 0.12);
  color: inherit;
}

.c6-email-app #email-conversation-list .list-group-item {
  border-radius: 0;
}

#email-compose-body {
  overflow-y: auto;
  line-height: 1.45;
}

.email-message-body p:last-child {
  margin-bottom: 0;
}

@keyframes c6-email-compose-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

[data-theme="dark"] .c6-email-workspace .c6-email-header {
  border-color: rgba(163, 174, 208, 0.35);
  background: linear-gradient(135deg, rgba(95, 149, 255, 0.18), rgba(95, 149, 255, 0.04));
}

[data-theme="dark"] .c6-email-workspace .c6-email-sidebar-card,
[data-theme="dark"] .c6-email-workspace .c6-email-thread-card,
[data-theme="dark"] .c6-email-workspace .c6-email-compose-panel {
  border-color: rgba(163, 174, 208, 0.35);
  background: #161b22;
}

[data-theme="dark"] .c6-email-workspace #email-compose-to-selected {
  background: rgba(95, 149, 255, 0.18);
  border-color: rgba(95, 149, 255, 0.45);
}

[data-theme="dark"] .c6-email-workspace .c6-email-editor-toolbar {
  border-color: rgba(163, 174, 208, 0.35);
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.16), rgba(148, 163, 184, 0.08));
  box-shadow: none;
}

[data-theme="dark"] .c6-email-workspace .c6-email-editor-toolbar .btn {
  color: #dbe5f7;
}

[data-theme="dark"] .c6-email-workspace .c6-email-editor-toolbar .btn:hover {
  background: rgba(95, 149, 255, 0.26);
  color: #ffffff;
  border-color: rgba(95, 149, 255, 0.4);
}

[data-theme="dark"] .c6-email-workspace .c6-email-editor-separator {
  background: rgba(163, 174, 208, 0.35);
}

[data-theme="dark"] .c6-email-workspace .c6-email-editor-toolbar .btn.is-active {
  background: rgba(95, 149, 255, 0.34);
  color: #ffffff;
  border-color: rgba(95, 149, 255, 0.52);
}

[data-theme="dark"] .c6-email-workspace .c6-email-editor {
  background: #0f1723;
  border-color: rgba(163, 174, 208, 0.4);
  color: #e6edf7;
}

[data-theme="dark"] .c6-email-app #email-conversation-list .list-group-item.active {
  background: rgba(95, 149, 255, 0.2);
}
