/* Styles pour le plugin WP Business Model Canvas */
:root {
  --admin-red_light-rating: #ff4b6b21;
  --admin-orange_light-rating: #f1894921;
  --admin-blue_light-rating: #62aadd21;
  --admin-green_light-rating: #86c17121;

  --admin-red-rating: #ff4b6b;
  --admin-orange-rating: #f18949;
  --admin-blue-rating: #62aadd;
  --admin-green-rating: #86c171;

  /* Couleurs du dashboard */
  --dashboard-primary: #ff4b6b;
  --dashboard-orange: #f18949;
  --dashboard-dark-blue: #153ca8;
  --dashboard-blue: #62aadd;
  --dashboard-green: #86c171;
  --dashboard-light-orange: #fde0c2;
  --dashboard-light-pink: #ffdde2;
  --dashboard-light-green: #e0f2d9;
  --dashboard-light-blue: #e3f2fd;
  --dashboard-light-grey: #f8f9fa;
  --dashboard-border: #ecf0f1;
  --dashboard-text: #2f52a0;
  --dashboard-text-light: #666666;
}

[data-section="key_partners"],
[data-section="key_activities"],
[data-section="key_resources"] {
  --edit-view-color: var(--dashboard-primary);
}

[data-section="value_proposition"] {
  --edit-view-color: var(--dashboard-green);
}

[data-section="customer_relationships"],
[data-section="channels"],
[data-section="customer_segments"] {
  --edit-view-color: var(--dashboard-orange);
}

[data-section="cost_structure"],
[data-section="revenue_streams"] {
  --edit-view-color: var(--dashboard-blue);
}

/* ========================================
   LOADERS POUR DOCUMENTS
   ======================================== */

/* Loader principal pour les documents */
.documents-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: #666;
}

.documents-loader .loader-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007cba;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

.documents-loader .loader-text {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
}

.documents-loader .loader-subtext {
  font-size: 12px;
  color: #999;
}

/* Loader pour la grille de documents */
.documents-grid.loading {
  position: relative;
  min-height: 200px;
}

.documents-grid.loading::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.documents-grid.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: center center;
  width: 30px;
  height: 30px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #007cba;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 11;
}

/* Loader pour la liste de documents */
.documents-list.loading {
  position: relative;
  min-height: 100px;
}

.documents-list.loading::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.documents-list.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 25px;
  height: 25px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #007cba;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 11;
}

/* Loader pour les fichiers */

.files-list {
  margin-top: 14px;
}

.files-list.loading {
  position: relative;
  min-height: 80px;
}

.files-list.loading::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.files-list.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #007cba;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 11;
}

/* Loader avec texte personnalisé */
.loader-with-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: #666;
}

.loader-with-text .spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #007cba;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
}

.loader-with-text .text {
  font-size: 14px;
  color: #666;
}

/* Animation de pulsation pour les boutons de chargement */
.btn-loading {
  position: relative;
  pointer-events: none;
}

.btn-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  /* transform: translate(-50%, -50%); */
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.btn-loading .btn-text {
  opacity: 0;
}

/* Variables CSS */

/* Indicateur de chargement pour les vues AJAX */
.canvas-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  font-size: 16px;
  color: var(--text-muted);
  background: var(--light-gray);
  border-radius: 8px;
  margin: 20px 0;
}

.canvas-loading::before {
  content: "";
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

:root {
  --primary-color: #0073aa;
  --secondary-color: #005177;
  --success-color: #28a745;
  --error-color: #dc3545;
  --warning-color: #ffc107;
  --light-gray: #f8f9fa;
  --border-color: #dee2e6;
  --text-color: #333;
  --text-muted: #6c757d;

  --green-color: #86c171;
  --blue-color: #62aadd;
  --orange-color: #f18949;

  --wp--style--global--content-size: unset;
  --wp--style--global--wide-size: unset;
}

/* ========================================
   MENU UTILISATEUR AVEC AVATAR
   ======================================== */

/* .wp-bmc-user-menu {
  position: relative;
  display: inline-block;
}

.wp-bmc-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #ff4b6b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(255, 75, 107, 0.3);
}

.wp-bmc-user-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(255, 75, 107, 0.4);
}

.wp-bmc-user-initials {
  color: white;
  font-weight: bold;
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.wp-bmc-user-dropdown {
  position: absolute;
  top: 50px;
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  min-width: 280px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.wp-bmc-user-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.wp-bmc-user-dropdown-header {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.wp-bmc-user-dropdown-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #ff4b6b;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wp-bmc-user-dropdown-initials {
  color: white;
  font-weight: bold;
  font-size: 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.wp-bmc-user-dropdown-info {
  flex: 1;
  min-width: 0;
}

.wp-bmc-user-dropdown-name {
  font-size: 16px;
  font-weight: 600;
  color: #2f52a0;
  margin-bottom: 4px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.wp-bmc-user-dropdown-email {
  font-size: 14px;
  color: #666666;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.wp-bmc-user-dropdown-separator {
  height: 1px;
  background-color: #ecf0f1;
  margin: 0 20px;
}

.wp-bmc-user-dropdown-actions {
  padding: 8px 0;
}

.wp-bmc-user-dropdown-action {
  width: 100%;
  padding: 12px 20px;
  border: none;
  background: none;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-size: 14px;
  color: #2f52a0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.wp-bmc-user-dropdown-action:hover {
  background-color: #f8f9fa;
}

.wp-bmc-user-dropdown-action i {
  width: 16px;
  text-align: center;
  color: #62aadd;
}

/* Responsive */
@media (max-width: 768px) {
  .wp-bmc-user-dropdown {
    right: -20px;
    min-width: 260px;
  }
  
  .wp-bmc-user-dropdown-header {
    padding: 16px;
  }
  
  .wp-bmc-user-dropdown-action {
    padding: 10px 16px;
  }
}

@media (max-width: 480px) {
  .wp-bmc-user-dropdown {
    right: -40px;
    min-width: 240px;
  }
  
  .wp-bmc-user-dropdown-header {
    padding: 12px;
  }
  
  .wp-bmc-user-dropdown-action {
    padding: 8px 12px;
    font-size: 13px;
  }
  
  .wp-bmc-user-dropdown-name {
    font-size: 14px;
  }
  
  .wp-bmc-user-dropdown-email {
    font-size: 12px;
  }
} */

.business-model-canvas #lqd-contents-wrap {
  width: 100%;
  margin: 0 auto;
  padding: 0;
  background: var(--dashboard-dark-blue);
}

#wp-bmc-generate-pdf{
  margin-top: 32px;
}

.wp-bmc-canvas-container,
.wp-bmc-dashboard {
  padding-top: 150px;
  margin-inline: auto;
}

/* Styles généraux */
.wp-bmc-container {
  max-width: 1400px;
  margin: 200px auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

.wp-bmc-form {
  background: var(--light-gray);
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: var(--text-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.form-group small {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 5px;
  display: block;
}

.form-group .password-input-container {
  display: flex;
  align-items: center;
}

/* Boutons */
.btn-primary,
.wp-bmc-form button[type="submit"] {
  background: var(--primary-color);
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.btn-primary:hover,
.wp-bmc-form button[type="submit"]:hover {
  background: var(--secondary-color);
}

.btn-secondary {
  background: var(--text-muted);
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.3s ease;
}

.btn-secondary:hover {
  background: #5a6268;
}

.logout-btn {
  background: var(--error-color);
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.logout-btn:hover {
  background: #c82333;
}

/* Messages */
.wp-bmc-message {
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 4px;
  border-left: 4px solid;
}

.wp-bmc-message.success {
  background: #d4edda;
  color: #155724;
  border-left-color: var(--success-color);
}

.wp-bmc-message.error {
  background: #f8d7da;
  color: #721c24;
  border-left-color: var(--error-color);
}

/* Tableau de bord */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  flex-direction: column;
  gap: 12px;
}

.dashboard-header h2 {
  margin: 0;
  color: white;
  font-weight: 400;
  font-size: 36px;
}

.dashboard-header h3 {
  color: white;
  font-size: 24px;
}

.user-info {
  text-align: right;
}

.user-info p {
  margin: 0 0 10px 0;
  font-weight: 600;
}

.projects-section h3 {
  color: var(--text-color);
  margin-bottom: 20px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.project-card {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-left: 4px solid var(--primary-color);
}

.project-card h4 {
  margin: 0 0 10px 0;
  color: var(--primary-color);
}

.project-card p {
  color: var(--text-muted);
  margin-bottom: 15px;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.status {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.status.draft {
  background: var(--warning-color);
  color: #856404;
}

.status.published {
  background: var(--success-color);
  color: white;
}

.date {
  color: var(--text-muted);
  font-size: 14px;
}

.btn-edit {
  background: var(--primary-color);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
  display: inline-block;
}

.btn-edit:hover {
  background: var(--secondary-color);
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-content h3 {
  margin: 0 0 20px 0;
  color: var(--primary-color);
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* Canvas Business Model */
.canvas-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
}

.canvas-header h2 {
  margin: 0;
  color: var(--primary-color);
}

.canvas-actions {
  display: flex;
  gap: 10px;

  a {
    color: white;
    text-decoration: underline;
    transition: all 0.3s ease;

    &:hover {
      text-decoration: none;
      color: white;
    }
  }
}

.canvas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 15px;
  max-width: 1000px;
  margin: 0 auto;
  background: var(--dashboard-dark-blue);
}

.canvas-section {
  background: white;
  border-radius: 8px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
}

.canvas-section.overview-status {
  padding: 32px;

  h3 {
    margin-bottom: 20px;
    text-transform: initial;
    text-wrap: balance;
    width: 80%;
    margin-inline: auto;
  }
}

.canvas-section .canvas-section-header {
  padding: 32px 15px;
}
.canvas-section[data-color="green"] .canvas-section-header {
  background: var(--admin-green-rating);
}
.canvas-section[data-color="orange"] .canvas-section-header {
  background: var(--admin-orange-rating);
}
.canvas-section[data-color="blue"] .canvas-section-header {
  background: var(--admin-blue-rating);
}
.canvas-section[data-color="red"] .canvas-section-header {
  background: var(--admin-red-rating);
}

.canvas-section h3 {
  margin: 0 0 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: white;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.canvas-input {
  flex: 1;
  border: none;
  resize: none;
  font-size: 12px;
  line-height: 1.4;
  background: transparent;
}

.canvas-input:focus {
  outline: none;
  background: #f8f9fa;
}

/* Sections spécifiques du canvas */
.key-partners {
  grid-column: 1;
  grid-row: 1;
  background: #e3f2fd;
}

.key-activities {
  grid-column: 2;
  grid-row: 1;
  background: #f3e5f5;
}

.key-resources {
  grid-column: 3;
  grid-row: 1;
  background: #e8f5e8;
}

.value-proposition {
  grid-column: 2;
  grid-row: 2;
}

.customer-relationships {
  grid-column: 1;
  grid-row: 2;
  background: #fce4ec;
}

.channels {
  grid-column: 3;
  grid-row: 2;
  background: #f1f8e9;
}

.customer-segments {
  grid-column: 1;
  grid-row: 3;
  background: #e0f2f1;
}

.cost-structure {
  grid-column: 2;
  grid-row: 3;
  background: #fafafa;
}

.revenue-streams {
  grid-column: 3;
  grid-row: 3;
  background: #fff8e1;
}

.canvas-section-footer {
  background-color: white;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-radius: 0 0 20px 20px;
}

/* Responsive */
@media (max-width: 768px) {
  .canvas-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .canvas-section {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  .dashboard-header {
    flex-direction: column;
    text-align: center;
  }

  .user-info {
    text-align: center;
    margin-top: 15px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .canvas-header {
    flex-direction: column;
    gap: 15px;
  }

  .canvas-actions {
    flex-direction: column;
    width: 100%;
  }
}

/* Liens */
.form-links {
  margin-top: 20px;
  text-align: center;
}

.form-links a {
  color: var(--primary-color);
  text-decoration: none;
}

.form-links a:hover {
  text-decoration: underline;
}

/* ========================================
   DASHBOARD - NOUVELLES VUES
   ======================================== */

/* Header du dashboard */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
}

.dashboard-header h1 {
  margin: 0;
  color: var(--primary-color);
  font-size: 2.5em;
  font-weight: 700;
}

.user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.user-info span {
  font-size: 16px;
  color: var(--text-color);
}

/* Section sans projet */
.no-project-section {
  text-align: center;
  padding: 60px 20px;
  background: var(--light-gray);
  border-radius: 12px;
  margin-bottom: 30px;
  max-width: 600px;
  margin-inline: auto;
}

.welcome-message h2 {
  color: var(--primary-color);
  margin-bottom: 20px;
  font-size: 2em;
}

.welcome-message p {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 40px;
  line-height: 1.6;
}

.create-first-canvas {
  max-width: 500px;
  margin: 0 auto;
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.create-first-canvas h3 {
  color: var(--text-color);
  margin-bottom: 25px;
  font-size: 1.5em;
}

/* Contrôles du canvas */
.canvas-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
}

.view-toggle {
  display: flex;
  gap: 10px;
  outline: 2px solid white;
  border-radius: 99px;
  outline-offset: -2px;
}

.view-toggle button {
  padding: 10px 20px;
  border: none;
  font-size: 22px;
  background: transparent;
  color: white;
  border-radius: 99px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  z-index: 1;
}

.view-toggle button.wp-bmc-btn-primary {
  background: var(--dashboard-primary);
  color: white;
}

.view-toggle button:hover {
  background: var(--dashboard-primary);
  color: white;
}
.view-toggle button:focus {
  outline: none;
}

.canvas-actions {
  display: flex;
  gap: 15px;
}

/* Vue synthétique */
.canvas-synthetic {
  margin-bottom: 30px;
}

.synthetic-grid {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.synthetic-section {
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.synthetic-section:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.synthetic-section h3 {
  margin: 0 0 15px 0;
  color: var(--primary-color);
  font-size: 1.2em;
  font-weight: 600;
  text-align: center;
}

.synthetic-section.value-proposition {
  grid-column: 2;
  background: #fff3e0;
  border-color: var(--primary-color);
  border-width: 3px;
}

.synthetic-section.value-proposition h3 {
  color: var(--secondary-color);
  font-size: 1.4em;
}

.synthetic-section.customer-segments {
  grid-column: 1;
  background: #e0f2f1;
}

.synthetic-section.revenue-streams {
  grid-column: 3;
  background: #fff8e1;
}

/* Vue globale (utilise les styles existants du canvas) */
.canvas-global {
  margin-bottom: 30px;
}

/* Footer du canvas */
.canvas-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: var(--light-gray);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-muted);
}

.auto-save-status {
  font-weight: 600;
}

/* Icônes d'aide */
.help-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 18px;
  font-size: 12px;
  margin-left: 8px;
  cursor: help;
  font-weight: bold;
}

.help-icon:hover {
  background: var(--secondary-color);
}

/* Responsive pour les nouvelles vues */
@media (max-width: 768px) {
  .dashboard-header {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .user-info {
    align-items: center;
  }

  .canvas-controls {
    flex-direction: column;
    gap: 20px;
  }

  .view-toggle {
    width: 100%;
    justify-content: center;
  }

  .canvas-actions {
    width: 100%;
    justify-content: center;
  }

  .synthetic-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .synthetic-section {
    grid-column: 1 !important;
  }

  .canvas-footer {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

/* ========================================
   HARMONISATION DES STYLES DASHBOARD/CANVAS
   ======================================== */

/* Styles communs pour les sections de contenu */
.canvas-section,
.synthetic-section {
  background: white;
  transition: all 0.3s ease;
  border-radius: 26px;
  position: relative;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  grid-column: 1/4;
  grid-row: 1;
}

.canvas-section .overview-status {
  padding: 32px;
}

.canvas-section-header {
  border-radius: 20px 20px 0 0;
}

/* Titres des sections */
.canvas-section h3,
.synthetic-section h3 {
  margin: 0;
  color: white;
  font-size: 1.2em;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.canvas-section h4,
.synthetic-section h4 {
  margin: 0;
  color: var(--dashboard-text);
  padding: 24px;
  padding-bottom: 0;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
}

/* Contenu des sections */
.canvas-textarea,
.canvas-content {
  padding: 24px;
  background: white;
  font-family: var(--font-primary);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.2;
  color: black;
  overflow-wrap: break-word;
  word-wrap: break-word;
  resize: none;
  outline: none;
}

.canvas-section-footer {
  padding: 24px;
  margin-top: auto;
}

.canvas-textarea:focus,
.canvas-content:focus {
  background: #fafafa;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.canvas-textarea:disabled {
  background-color: #f8f9fa;
  color: var(--text-color);
  cursor: not-allowed;
  opacity: 0.8;
}

/* Fichiers attachés - Style harmonisé */
.canvas-files {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
}

.canvas-files h4 {
  margin: 0 0 10px 0;
  font-size: 12px;
}

/* ========================================
   POPUP DE CHANGEMENT DE MOT DE PASSE
   ======================================== */

#wp-bmc-change-password-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#wp-bmc-change-password-popup .popup-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

#wp-bmc-change-password-popup .popup-content {
  position: relative;
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

#wp-bmc-change-password-popup .popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 24px 0 24px;
  border-bottom: 1px solid var(--dashboard-border);
  margin-bottom: 24px;
}

#wp-bmc-change-password-popup .popup-header h3 {
  margin: 0;
  color: var(--dashboard-text);
  font-size: 24px;
  font-weight: 600;
}

#wp-bmc-change-password-popup .popup-close {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--dashboard-text-light);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

#wp-bmc-change-password-popup .popup-close:hover {
  background: var(--dashboard-light-grey);
  color: var(--dashboard-text);
}

#wp-bmc-change-password-popup .popup-body {
  padding: 0 24px 24px 24px;
}

.change-password-info {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--dashboard-light-blue);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 24px;
  border-left: 4px solid var(--dashboard-blue);
}

.change-password-info .info-icon {
  color: var(--dashboard-blue);
  font-size: 24px;
  margin-top: 2px;
}

.change-password-info p {
  margin: 0;
  color: var(--dashboard-text);
  line-height: 1.5;
  font-size: 16px;
}

.change-password-form .form-group {
  margin-bottom: 20px;
  position: relative;
}

.change-password-form .form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--dashboard-text);
  font-weight: 500;
  font-size: 14px;
}

.change-password-form .form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--dashboard-border);
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.2s ease;
  background: white;
  box-sizing: border-box;
}

.change-password-form .form-group input:focus {
  outline: none;
  border-color: var(--dashboard-blue);
  box-shadow: 0 0 0 3px rgba(98, 170, 221, 0.1);
}

.change-password-form .form-group input.error {
  border-color: var(--dashboard-primary);
  box-shadow: 0 0 0 3px rgba(255, 75, 107, 0.1);
}

.change-password-form .form-group .show-password {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--dashboard-text-light);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s ease;
}

.change-password-form .form-group .show-password:hover {
  color: var(--dashboard-text);
}

.change-password-form .form-group .password-help {
  display: block;
  margin-top: 6px;
  color: var(--dashboard-text-light);
  font-size: 12px;
}

.change-password-form .form-actions {
  margin-top: 32px;
  text-align: center;
}

.change-password-form .wp-bmc-btn {
  min-width: 200px;
  position: relative;
  overflow: hidden;
}

.change-password-form .btn-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.change-password-form .loader-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Responsive */
@media (max-width: 768px) {
  #wp-bmc-change-password-popup .popup-content {
    width: 95%;
    margin: 20px;
  }

  #wp-bmc-change-password-popup .popup-header,
  #wp-bmc-change-password-popup .popup-body {
    padding-left: 20px;
    padding-right: 20px;
  }

  .change-password-info {
    flex-direction: column;
    text-align: center;
  }

  .change-password-form .wp-bmc-btn {
    width: 100%;
    min-width: auto;
  }
}

.canvas-files .files-list {
  max-height: 100px;
  overflow-y: auto;
}

.canvas-files .file-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  margin-bottom: 5px;
  background: var(--light-gray);
  border-radius: 6px;
  font-size: 12px;
  transition: background-color 0.3s ease;
}

.canvas-files .file-item:hover {
  background: #e9ecef;
}

.canvas-files .file-item i.fa-file {
  color: var(--primary-color);
  margin-right: 10px;
  font-size: 14px;
}

.canvas-files .file-name {
  flex: 1;
  color: var(--text-color);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.canvas-files .file-view-btn {
  color: var(--primary-color);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.3s ease;
  margin-left: 10px;
  font-size: 12px;
}

.canvas-files .file-view-btn:hover {
  background: var(--primary-color);
  color: white;
}

.canvas-files .no-files {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  padding: 15px;
  background: var(--light-gray);
  border-radius: 6px;
  margin: 0;
}

/* Boutons d'édition - Style harmonisé */
.edit-brick-btn-container {
  display: flex;
  gap: 10px;
}
.edit-brick-btn {
  position: relative;
  padding: 16px;
  border: none;
  border-radius: 50%;
  background: currentColor;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
[data-color="red"] .edit-brick-btn {
  background: var(--admin-red-rating);
}
[data-color="orange"] .edit-brick-btn {
  background: var(--admin-orange-rating);
}
[data-color="blue"] .edit-brick-btn {
  background: var(--admin-blue-rating);
}
[data-color="green"] .edit-brick-btn {
  background: var(--admin-green-rating);
}

.edit-brick-btn:hover {
  transform: scale(1.01);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Bouton de notation pour les admins */
.rate-brick-btn {
  position: relative;
  padding: 16px;
  border: none;
  border-radius: 50%;
  background: var(--edit-view-color);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.rate-brick-btn:hover {
  background: var(--edit-view-color);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.rate-brick-btn.disabled {
  background: var(--edit-view-color);
  color: white;
  cursor: not-allowed;
  opacity: 0.6;
}

.rate-brick-btn.rated {
  background: var(--edit-view-color);
  color: #333;
}

/* Grilles harmonisées */
.canvas-grid,
.synthetic-grid {
  display: grid;
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.canvas-grid,
.synthetic-grid {
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(4, auto);
}

/* Responsive harmonisé */
@media (max-width: 768px) {
  .canvas-grid,
  .synthetic-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .canvas-section,
  .synthetic-section {
    grid-column: 1 !important;
    grid-row: auto !important;
    min-height: 120px;
  }

  .canvas-section h3,
  .synthetic-section h3 {
    font-size: 1.1em;
  }

  .edit-brick-btn {
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
  }

  .canvas-files .file-item {
    padding: 6px 10px;
    font-size: 11px;
  }
}

/* Popup principale */
.wp-bmc-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: none;
}

.popup-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

.popup-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  max-width: 90%;
  max-height: 90%;
  width: 800px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 1px solid var(--border-color);
  background: white;
}

.popup-header h3 {
  margin: 0;
  color: var(--dashboard-text);
  font-size: 1.5em;
  font-weight: 600;
}

.popup-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.popup-close:hover {
  background: var(--error-color);
  color: white;
}

.popup-body {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
  max-height: 60vh;
}

.popup-footer {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  padding: 20px 30px;
  border-top: 1px solid var(--border-color);
  background: var(--light-gray);
}

.popup-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.popup-btn-primary {
  background: var(--primary-color);
  color: white;
}

.popup-btn-primary:hover {
  background: var(--secondary-color);
}

.popup-btn-secondary {
  background: var(--text-muted);
  color: white;
}

.popup-btn-secondary:hover {
  background: #5a6268;
}

/* Sections de la popup */
.popup-section {
  margin-bottom: 30px;
}

.popup-section:last-child {
  margin-bottom: 0;
}

.popup-section label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--text-color);
}

/* Grading modal */
.grading-modal .popup-content {
  width: 500px;
}

.grading-modal .popup-header {
  flex-direction: column;
  align-items: flex-start;
  gap: 0px;
}

.grading-modal .popup-close {
  position: absolute;
  right: 20px;
  top: 20px;
}

.grading-modal .section-title {
  font-weight: 600;
  color: #aaaaaa;
  font-size: 20px;
}

.grading-modal :is(#rating, #comment) {
  width: 100%;
}

.grading-modal #rating {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  border-radius: 4px;
  background: #e0e0e0;
  outline: none;
  position: relative;
}

.grading-modal #rating::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--edit-view-color);
  cursor: pointer;
  box-shadow: none;
  position: relative;
  z-index: 2;
}

.grading-modal #rating::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--edit-view-color);
  cursor: pointer;
  box-shadow: none;
  border: none;
  position: relative;
  z-index: 2;
}

.grading-modal #rating::-webkit-slider-track {
  height: 10px;
  border-radius: 4px;
  background: #e0e0e0;
}

.grading-modal #rating::-moz-range-track {
  height: 10px;
  border-radius: 4px;
  background: #e0e0e0;
  border: none;
}

/* Conteneur du slider avec progression */
.grading-modal .rating-slider-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

/* Wrapper pour le slider pour calculer sa largeur */
.grading-modal .rating-slider-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.grading-modal .rating-slider-wrapper::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  height: 10px;
  border-radius: 4px;
  background: var(--edit-view-color);
  width: var(--slider-progress, 50%);
  pointer-events: none;
  z-index: 1;
}

.grading-modal #comment {
  padding: 16px;
  background-color: #fafafa;
  border: none;
  border-radius: 20px;
  box-sizing: border-box;
  resize: vertical;
}

.grading-modal .grading-actions {
  display: flex;
  justify-content: flex-end;
}

.grading-modal .rating-display {
  flex-wrap: nowrap;
}

/* Éditeur WYSIWYG */
#wysiwyg-editor {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  min-height: 300px;
}

.wysiwyg-content{
  font-family: var(--font-primary) !important;

  p, *{
    font-family: var(--font-primary) !important;
    font-size: inherit !important;
  }
}

.simple-editor {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
}

.editor-toolbar {
  display: flex;
  gap: 5px;
  padding: 10px;
  background: var(--light-gray);
  border-bottom: 1px solid var(--border-color);
}

.toolbar-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-color);
  background: white;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.toolbar-btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.editor-content {
  padding: 15px;
  min-height: 250px;
  outline: none;
  font-family: var(--font-primary) !important;

  line-height: 1.6;

  p, *{
    font-family: var(--font-primary) !important;
    font-size: inherit !important;
  }
}

.editor-content:focus {
  background: #fafafa;
}

/* Styles spécifiques pour les boutons dans la popup */
.popup-section .add-file-btn,
.popup-section .view-documents-btn {
  padding: 10px 20px;
  border: 2px solid var(--primary-color);
  background: white;
  color: var(--primary-color);
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.popup-section .add-file-btn:hover,
.popup-section .view-documents-btn:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3);
}

.popup-section .add-file-btn i,
.popup-section .view-documents-btn i {
  font-size: 16px;
}

.files-list,
.documents-list,
#files-list,
#documents-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: white;
}

.file-item,
.document-item,
#files-list .file-item,
#documents-list .document-item {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.3s ease;
}

.file-item:last-child,
.document-item:last-child,
#files-list .file-item:last-child,
#documents-list .document-item:last-child {
  border-bottom: none;
}

.file-item:hover,
.document-item:hover,
#files-list .file-item:hover,
#documents-list .document-item:hover {
  background: var(--light-gray);
}

.file-icon,
.document-icon {
  width: 40px;
  height: 40px;
  background: var(--light-gray);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  color: var(--primary-color);
}

.file-info,
.document-info {
  flex: 1;
}

.file-name,
.document-title {
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 2px;
}

.file-size,
.document-description {
  font-size: 12px;
  color: var(--text-muted);
}

.file-actions,
.document-actions {
  display: flex;
  gap: 5px;
}

.file-action-btn,
.document-action-btn,
#files-list .file-action-btn,
#documents-list .document-action-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.file-action-btn[data-action="view"],
#files-list .file-action-btn[data-action="view"] {
  background: var(--primary-color);
  color: white;
}

.file-action-btn[data-action="delete"],
#files-list .file-action-btn[data-action="delete"] {
  background: var(--error-color);
  color: white;
}

.document-action-btn,
#documents-list .document-action-btn {
  background: var(--primary-color);
  color: white;
  padding: 6px 12px;
  width: auto;
  font-size: 12px;
}

.file-action-btn:hover,
.document-action-btn:hover,
#files-list .file-action-btn:hover,
#documents-list .document-action-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.no-files,
.no-documents {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
}

/* Documents popup */
.documents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  max-height: 400px;
  overflow-y: auto;
}

/* Responsive pour les popups */
@media (max-width: 768px) {
  .popup-content {
    width: 95%;
    max-height: 95%;
  }

  .popup-header,
  .popup-body,
  .popup-footer {
    padding: 15px;
  }

  .popup-body {
    max-height: 50vh;
  }

  .files-header,
  .documents-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .add-file-btn,
  .view-documents-btn {
    width: 100%;
  }

  .documents-grid {
    grid-template-columns: 1fr;
  }

  .file-item,
  .document-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .file-actions,
  .document-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* État popup ouvert */
body.popup-open {
  overflow: hidden;
}

/* Styles pour la popup de notation */
.rating-slider-container {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.rating-slider {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: var(--light-gray);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.rating-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--edit-view-color);
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.rating-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--edit-view-color);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.rating-display {
  font-size: 24px;
  font-weight: 700;
  color: var(--edit-view-color);
  text-align: center;
}

#rating-comment {
  width: auto;
  padding: 24px;
  font-size: 18px;
  background: var(--edit-view-color);
  border-radius: 20px;
  color: white;
  flex: 1;
  text-align: left;
  line-break: anywhere;
}

#rating-comment p {
  margin: 0;
}

#rating-comment:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

#current-rating-display {
  background: var(--light-gray);
  padding: 15px;
  border-radius: 6px;
  border-left: 4px solid var(--edit-view-color);
}

#current-rating-display p {
  margin: 0;
  color: var(--text-muted);
  font-style: italic;
}

#current-rating-display .rating-info {
  margin-top: 10px;
}

#current-rating-display .rating-score {
  font-size: 18px;
  font-weight: 700;
  color: var(--edit-view-color);
}

#current-rating-display .rating-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 5px;
}

/* Indicateur admin */
.admin-indicator {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--primary-color);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }
  50% {
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.4);
  }
  100% {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }
}

/* Affichage des notes en lecture seule pour les utilisateurs */
.admin-rating-display {
  margin-top: 15px;
  font-size: 14px;
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
}

[data-color="green"] .admin-rating-display .rating-score {
  color: var(--admin-green-rating);
  background: var(--admin-green_light-rating);
}

[data-color="orange"] .admin-rating-display .rating-score {
  color: var(--admin-orange-rating);
  background: var(--admin-orange_light-rating);
}

[data-color="blue"] .admin-rating-display .rating-score {
  color: var(--admin-blue-rating);
  background: var(--admin-blue_light-rating);
}

[data-color="red"] .admin-rating-display .rating-score {
  color: var(--admin-red-rating);
  background: var(--admin-red_light-rating);
}

.need-grading {
  border: 5px solid var(--admin-red-rating);

  &::before {
    position: absolute;
    content: "";
    top: -24px;
    right: -24px;
    width: 60px;
    height: 60px;
    background-color: var(--admin-red-rating);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='27' height='27' viewBox='0 0 24 24'><path fill='white' d='m14.43 10l-1.47-4.84c-.29-.95-1.63-.95-1.91 0L9.57 10H5.12c-.97 0-1.37 1.25-.58 1.81l3.64 2.6l-1.43 4.61c-.29.93.79 1.68 1.56 1.09l3.69-2.8l3.69 2.81c.77.59 1.85-.16 1.56-1.09l-1.43-4.61l3.64-2.6c.79-.57.39-1.81-.58-1.81h-4.45z'></path></svg>");
    background-size: 40px;
    background-position: center 8px;
    background-repeat: no-repeat;
    border-radius: 50%;
    z-index: 1;
  }
}

.rating-section {
  display: flex;
  padding: 32px;
  flex-direction: column;
  gap: 16px;
}

.rating-display {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
}

.rating-meta {
  width: 100%;
  display: flex;
  gap: 12px;
  font-size: 18px;
  font-weight: 400;
}

.rating-score {
  position: relative;
  font-weight: 600;
  border-radius: 99px;
  padding: 10px;
  display: grid;
  grid-template-columns: 35px 35px;
  grid-template-rows: 35px 35px;
  width: 90px;
  height: 90px;

  background-color: color-mix(in srgb, var(--edit-view-color) 30%, transparent);

  color: var(--edit-view-color);

  &:before {
    content: "";
    position: absolute;
    background-color: currentColor;
    top: 0;
    left: 50%;
    width: 1px;
    height: 100%;
    border-radius: 99px;
    transform: rotate(45deg) translate(-2px, 0px) scaleY(0.6);
    transform-origin: center center;
  }
}

.rating-score-number {
  font-size: 30px;
  grid-column: 1;
  grid-row: 1;
  text-align: center;
  display: flex;
  align-items: baseline;
  justify-content: center;
}

.rating-score-total {
  font-size: 30px;
  grid-column: 2;
  grid-row: 2;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: left;
}

.admin-rating-display .rating-comment {
  margin: 8px 0;
  font-style: italic;
  color: var(--text-color);
  line-height: 1.4;
  background: white;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.admin-rating-display .rating-date {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
  font-style: italic;
}

/* Animation pour l'apparition des notes */
.admin-rating-display {
  animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Styles pour l'indicateur de demande de notation */
.grading-request-indicator {
  position: absolute;
  top: -20px;
  right: -20px;
  display: inline-block;
  margin-left: 0px;
  color: #ffc107;
  font-size: 26px;
  background: #ffc107;
  color: white;
  border-radius: 50%;
  padding: 4px;
  cursor: help;
}

/* =====================
   STYLES SINGLE CANVAS
   ===================== */

#wp-bmc-edit-view {
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: 32px;
  background: var(--dashboard-dark-blue);
}

.edit-view-container {
  grid-column: 1/4;
  grid-row: 1;
  border-radius: 20px;
  overflow: hidden;
  background-color: white;
}
.edit-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 46px;
  background-color: var(--edit-view-color);

  button {
    background-color: transparent;
    border: none;
    color: white;
    font-size: 24px;
    font-weight: 600;
    cursor: pointer;
  }

  h2 {
    color: white;
    margin: 0;
    margin-inline: auto;
    font-weight: 400;
    font-size: 36px;
    text-transform: uppercase;
  }
}
.edit-content {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.sub-section {
#edit-section-placeholder{
  p{
    margin-bottom: 20px;
  }
}
  p {
    margin: 0;
    color: var(--dashboard-text);
    font-size: 28px;
    font-weight: 400;
    line-height: 1.2;
    text-wrap: pretty;
    flex: 1;
  }
}

.btn-outline:disabled{
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  &:hover{
    cursor: not-allowed;
  pointer-events: none;
  }
}

.btn-outline.disabled{
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  &:hover{
    cursor: not-allowed;
  pointer-events: none;
  }
}

.btn-outline {
  padding: 10px 20px;
  outline: 1px solid var(--edit-view-color, var(--dashboard-primary));
  border: none;
  background: white;
  color: var(--edit-view-color, var(--dashboard-primary));
  border-radius: 99px;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  line-height: 1.2;
}

.btn-outline.--icon-bg {
  padding: 6px 20px 6px 10px;
  i {
    background-color: var(--edit-view-color, var(--dashboard-primary));
    color: white;
    border-radius: 99px;
    padding: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

.btn-outline:hover {
  background: var(--edit-view-color, var(--dashboard-primary));
  color: white;
  cursor: pointer;
}

.bmc-btn-solid {
  background: var(--edit-view-color, var(--dashboard-primary));
  color: white;
  cursor: pointer;
  border: none;
  border-radius: 99px;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: 400;
  transition: all 0.3s ease;
  line-height: 1.2;
}

.sub-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-direction: column-reverse;
  gap: 30px;
}

.edit-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  padding: 0 32px;
}

.history-section {
  grid-column: 1/3;
  grid-row: 2;
  border-radius: 20px;
  background-color: white;
  padding: 32px;
}

.todo-section {
  grid-column: 3/4;
  grid-row: 2;
  border-radius: 20px;
  background-color: var(--edit-view-color);
  padding: 32px;
}

/* ========================================
   STYLES POUR LES RÉVISIONS
   ======================================== */

.history-section header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.history-section header h4 {
  margin: 0;
  font-size: 32px;
  font-weight: 600;
  color: var(--dashboard-text);
}

.no-revisions {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

.no-revisions i {
  font-size: 2rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.no-revisions p {
  margin: 0.5rem 0;
  font-weight: 500;
}

.no-revisions small {
  font-size: 0.875rem;
  opacity: 0.7;
}

.revisions-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.revision-item {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  transition: all 0.2s ease;
}

.revision-item:hover {
  border-color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.revision-header {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  gap: 24px;
}

.revision-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.revision-number {
  font-weight: 600;
  color: var(--text-color);
  font-size: 0.875rem;
}

.revision-date {
  font-size: 16px;
  color: var(--text-muted);
}

.revision-reason {
  display: flex;
  align-items: center;
}

.reason-badge {
  padding: 16px;
  border-radius: 20px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  line-break: anywhere;
  background-color: #f6f6f6;
  color: #7c7c7c;
}

.reason-grading_request {
  background: var(--orange-light);
  color: var(--orange-dark);
}

.reason-manual {
  background: var(--blue-light);
  color: var(--blue-dark);
}

.reason-auto_save {
  background: var(--green-light);
  color: var(--green-dark);
}

.revision-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.view-revision-btn {
  font-size: 16px;
  padding: 10px 20px;
  margin-bottom: 12px;
}

/* Popup de révision */
.revision-popup {
  max-width: 800px;
  max-height: 90vh;
}

.revision-popup .popup-body {
  max-height: 60vh;
  overflow-y: auto;
}

.revision-info {
  background: var(--gray-light);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.revision-meta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.revision-date {
  font-weight: 500;
  color: var(--text-color);
}

.revision-reason {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.revision-content {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  min-height: 200px;
}

.revision-content.empty-content {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-style: italic;
}

/* Styles pour les informations de notation dans les révisions */
.revision-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.revision-score {
  background: var(--edit-view-color);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.revision-admin {
  font-size: 16px;
  color: var(--text-muted);
}

.revision-rating-info {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--light-green);
  border-radius: 8px;
  border-left: 3px solid var(--edit-view-color);
}

.revision-score-display {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.revision-score-display .score {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--edit-view-color);
}

.revision-score-display .admin-name {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.revision-comment-display p {
  margin: 0;
  font-style: italic;
  color: var(--text-color);
}

/* Styles pour le graphique de progression du projet */
.overview-status .chart {
  position: relative;
  width: 200px;
  height: 120px;
  margin: 0 auto 60px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.overview-status h3 {
  color: var(--dashboard-text);
}

.progress-svg {
  width: 200px;
  height: 100px;
}

.progress-circle {
  animation: progress-animation 2s ease-in-out forwards;
}

@keyframes progress-animation {
  from {
    stroke-dashoffset: 251.33;
  }
  to {
    stroke-dashoffset: var(--progress-offset);
  }
}

.progress-text {
  font-size: 24px;
  font-weight: bold;
  fill: #003366;
  font-family: Arial, sans-serif;
}

.overview-status .action-plan {
  list-style: none;
  padding: 0;
  margin: 0;
}

.overview-status .action-plan li {
  padding: 8px 0;
  border-bottom: 1px solid #ffffff18;
}

.overview-status .action-plan li:first-child {
  border-top: 1px solid #ffffff18;
}

/* ========================================
   STYLES POUR LE PLAN D'ACTION GLOBAL
   ======================================== */

.action-plan-info {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  border-radius: 20px;
  background-color: var(--dashboard-primary);
  padding: 28px;
}

.action-plan-info h4 {
  color: white;
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 20px;
  padding: 0;
}

.action-plan-info ul {
  width: 100%;
}

.action-plan-info i {
  margin-right: 0.5rem;
  color: var(--dashboard-blue);
}

.action-plan {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 300px;
  overflow-y: auto;
}

.action-plan .todo-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  margin-bottom: 0;
  transition: all 0.2s ease;
}

.action-plan .todo-item.completed {
  opacity: 0.6;
  background: var(--light-grey);
}

.action-plan .todo-item.completed .todo-text {
  text-decoration: line-through;
}

.action-plan .todo-content {
  display: flex;
  align-items: center;
  flex: 1;
}

.todo-content .todo-checkbox {
  margin-right: 0.75rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.action-plan .todo-text {
  font-size: 0.9rem;
  color: white;
  line-height: 1.4;
}

.action-plan .todo-section-badge {
  font-size: 0.75rem;
  color: white;
  background: var(--light-blue);
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.action-plan .no-todos {
  text-align: center;
  padding: 2rem;
}

.action-plan .no-todos i {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--dashboard-green);
}

.action-plan .no-todos p {
  margin: 0 0 0.5rem 0;
  font-weight: 500;
}

.action-plan .no-todos small {
  font-size: 0.8rem;
}

/* Scrollbar personnalisée pour la liste */
.action-plan::-webkit-scrollbar {
  width: 6px;
}

.action-plan::-webkit-scrollbar-track {
  background: var(--light-grey);
  border-radius: 3px;
}

.action-plan::-webkit-scrollbar-thumb {
  background: var(--dashboard-blue);
  border-radius: 3px;
}

.action-plan::-webkit-scrollbar-thumb:hover {
  background: var(--dashboard-dark-blue);
}

/* ========================================
   STYLES POUR LES TODOS
   ======================================== */

.todo-section header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.todo-section h4 {
  margin: 0;
  color: white;
  font-size: 32px;
  font-weight: 600;
}

.todo-stats {
  display: flex;
  align-items: center;
}

/* Indicateur de sauvegarde */
.save-indicator {
  font-size: 0.8em;
  color: white;
  margin-left: 0;
  font-weight: 400;
  padding-top: 10px;
  animation: pulse 1.5s infinite;
}

.save-indicator i {
  font-size: 0.6em;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

.todo-count {
  font-size: 0.875rem;
  color: white;
  font-weight: 500;
}

.todo-add-form {
  margin-bottom: 1rem;
}

.todo-input-group {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.todo-input-group input {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  border: none;
  transition: border-color 0.2s ease;
}

.todo-input-group input:focus {
  outline: none;
  border-color: var(--dashboard-primary);
  box-shadow: 0 0 0 3px rgba(255, 75, 107, 0.1);
}

.todo-input-group button {
  padding: 0.75rem;
  background: var(--dashboard-dark-blue);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
}

.todo-input-group button:hover {
  background: var(--dashboard-dark-blue);
}

.todo-input-group button:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
}

.todo-list-container {
  position: relative;
}

.todo-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;

}

.todo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  transition: all 0.2s ease;
  padding: 4px 0;
  border-bottom: 1px solid var(--border-color);
  &:last-child {
    border-bottom: none;
  }
}

.todo-item:hover {
  border-color: var(--dashboard-primary);
  box-shadow: 0 2px 8px rgba(255, 75, 107, 0.1);
}

.todo-item.completed {
  background: var(--light-green);
  border-color: var(--dashboard-green);
  border: none;
  order: 99;
}

.todo-item.completed .todo-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

.todo-content {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
}

.todo-edit-input{
  flex: 1;
  border: none;
  padding: 8px;
  margin-right: 6px;
  border-radius: 6px;
}

.todo-edit-actions{
  display: flex;
  gap: 4px;
  margin: 0;

  button{
    border: none;
    padding: 0;
    width: 32px;
    height: 32px;
    color: white;
    border-radius: 6px;

  
    &.todo-save-edit{
      background-color: var(--dashboard-blue);
    }

    &.todo-cancel-edit{
      background-color: var(--dashboard-primary);
    }
  }
}

.todo-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--dashboard-green);
}

.todo-text {
  font-size: 18px;
  color: white;
  line-height: 1.4;
  word-break: break-word;
}

.todo-actions {
  display: flex;
  gap: 0.25rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.todo-item:hover .todo-actions {
  opacity: 1;
}

.todo-edit-btn,
.todo-delete-btn {
  padding: 0.5rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.todo-edit-btn {
  background: var(--dashboard-blue);
  color: white;
}

.todo-edit-btn:hover {
  background: #4a8bc4;
}

.todo-delete-btn {
  background: var(--dashboard-primary);
  color: white;
}

.todo-delete-btn:hover {
  background: #e03d5a;
}

.no-todos {
  text-align: center;
  padding: 2rem;
  color: white;
}

.no-todos i {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  color: var(--dashboard-green);
}

.no-todos p {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  font-weight: 500;
}

.no-todos small {
  font-size: 0.875rem;
  line-height: 1.2;
  text-wrap: balance;
  display: block;
}

/* Animation pour l'ajout/suppression de tâches */
.todo-item {
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   LOADERS ET INDICATEURS DE CHARGEMENT
   ======================================== */

/* Loader principal */
.wp-bmc-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #6c757d;
  font-size: 14px;
  gap: 15px;
}

.wp-bmc-loader span {
  margin-top: 10px;
  font-weight: 500;
}

/* Spinner animation */
.loader-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #e9ecef;
  border-top: 3px solid #007cba;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Loader pour les boutons */
.btn-loader {
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
}

.btn-loader .loader-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid #ffffff;
  margin-right: 8px;
}

/* Indicateur de sauvegarde flottant */
.saving-indicator {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  z-index: 10000;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  animation: slideInRight 0.3s ease-out;
}

.saving-indicator .loader-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid #ffffff;
  margin-right: 10px;
}

/* Animation pour les loaders */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Loader pour les sections spécifiques */
#files-list .wp-bmc-loader,
#documents-list .wp-bmc-loader,
#documents-grid .wp-bmc-loader,
#revisions-list .wp-bmc-loader,
#rating-section .wp-bmc-loader,
#todo-list .wp-bmc-loader {
  min-height: 100px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px dashed #dee2e6;
}

/* Loader pour le canvas */
.canvas-container .wp-bmc-loader {
  min-height: 300px;
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 12px;
}

/* États de chargement pour les boutons */
button:disabled .loader-spinner {
  animation: spin 1s linear infinite;
}

/* Loader compact pour les petites zones */
.wp-bmc-loader.compact {
  padding: 20px;
  min-height: auto;
}

.wp-bmc-loader.compact .loader-spinner {
  width: 20px;
  height: 20px;
}

/* Loader inline pour les boutons */
.wp-bmc-loader-inline {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

/* ========================================
   BOUTON GÉNÉRATION PDF
   ======================================== */

.canvas-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.canvas-actions {
  display: flex;
  gap: 10px;
}

#wp-bmc-generate-pdf:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

#wp-bmc-generate-pdf .fas {
  font-size: 16px;
}

/* Loader dans le bouton PDF */
#wp-bmc-generate-pdf .btn-loader {
  margin-right: 8px;
}

#wp-bmc-generate-pdf .btn-loader .loader-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid #ffffff;
}

/* Responsive pour les contrôles canvas */
@media (max-width: 768px) {
  .canvas-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .view-toggle {
    display: flex;
    justify-content: center;
  }

  .canvas-actions {
    justify-content: center;
  }

  #wp-bmc-generate-pdf {
    width: 100%;
    justify-content: center;
  }
}

/* Responsive design pour les todos */
@media (max-width: 768px) {
  .todo-section {
    padding: 1rem;
  }

  .todo-section header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .todo-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .todo-content {
    width: 100%;
  }

  .todo-actions {
    opacity: 1;
    align-self: flex-end;
  }

  .todo-input-group {
    flex-direction: column;
  }

  .todo-input-group input {
    width: 100%;
  }

  .todo-input-group button {
    width: 100%;
  }
}


/* FORMS */

.wp-bmc-form{
  display: flex;
  flex-direction: column;
  max-width: 600px;

  .form-group.form-group input {
    width: -webkit-fill-available;
    margin: 0;
  }

  .field-error{
    font-size: 14px;
    padding: 8px 2px;
    color: var(--dashboard-primary);
  }

  .show-password{
    position: absolute;
    right: 20px;
    top: 8px;
    padding: 0;
    background: unset;
    color: black;
    &:hover{
      background: none;
      color: black;
    }
  }


  .form-links{
    font-size: 18px;
    margin-top: 0;
    p{
      margin: 0;
      margin-bottom: 8px;
    }
  }
  .password-input-container{
    position: relative;
    flex-direction: column;
    align-items: flex-start;

  }
}
