.pdfb-canvas-margins-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.pdfb-canvas-margins-label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: #6c757d;
}

.pdfb-canvas-margins-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pdfb-canvas-margins-input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #ced4da;
  border-radius: 6px;
}

.pdfb-canvas-margins-unit {
  font-size: 11px;
  color: #6c757d;
}

.pdfb-canvas-margins-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.pdfb-canvas-margins-toggle-label {
  flex: 1;
  cursor: pointer;
  font-weight: 500;
}

.pdfb-info-box--spaced {
  margin-top: 10px;
}
/* PDF Builder Pro Admin Styles - Simplified */

/* ── Validation inline – champs formulaire ─────────────────────────── */
.pdfb-input-invalid {
  border-color: #d63638 !important;
  box-shadow: 0 0 0 1px #d63638 !important;
}

.pdfb-field-error {
  display: block;
  color: #d63638;
  font-size: 12px;
  margin-top: 4px;
  min-height: 16px;
}

.pdfb-field-error:empty {
  display: none;
}

/* Canvas Modal Styles - 👁️ Générer un aperçu */
.pdfb-canvas-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: modalFadeIn 0.2s ease-out;
}
.pdfb-canvas-modal-header {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    padding: 22px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 0;
}

.pdfb-canvas-modal-header h3 {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.02em;
}

.pdfb-canvas-modal-close {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    font-size: 20px;
    cursor: pointer;
    color: #475569;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    font-weight: 400;
    line-height: 1;
}

.pdfb-canvas-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #cbd5e1;
}

.pdfb-canvas-modal-body {
    padding: 15px;
    overflow-y: auto;
    flex: 1;
    background: #ffffff;
    overflow-x: hidden;
    min-height: 0;
}

.pdfb-canvas-modal-footer {
    border-top: 1px solid #e1e5e9;
    padding: 24px 32px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #f8f9fa;
    flex-shrink: 0;
    min-height: 80px;
}

.pdfb-canvas-modal-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    background: white;
    color: #333;
    transition: all 0.2s ease;
    min-width: 100px;
}

.pdfb-canvas-modal-btn:hover {
  background: #e9e9e9;
}

.pdfb-canvas-modal-btn-primary {
    background: #007cba;
    color: #ffffff;
    border-color: #0073aa;
}

.pdfb-canvas-modal-btn-primary:hover {
    background: #005a87;
    border-color: #005177;
    color: #ffffff;
}

.pdfb-canvas-modal-btn-secondary {
    background: #6c757d;
    border-color: #ccc;
    color: #ffffff;
}

.pdfb-canvas-modal-btn-secondary:hover {
    background: #5a6268;
    color: #ffffff;
}

.pdfb-canvas-modal-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Form Groups */
.pdfb-setting-group {
    margin-bottom: 20px;
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 5px;
    transition: all 0.2s ease;
    position: relative;
}

.pdfb-setting-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.pdfb-setting-input,
.pdfb-setting-textarea,
.pdfb-setting-select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  background: white;
  color: #333;
}

.pdfb-setting-input:focus,
.pdfb-setting-textarea:focus,
.pdfb-setting-select:focus {
  outline: none;
  border-color: #0073aa;
  box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.pdfb-setting-hint {
  font-size: 12px;
  color: #666;
  margin-top: 4px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.pdfb-pdf-preview-error {
  text-align: center;
  padding: 40px 20px;
  color: #721c24;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  margin: 20px 0;
}

.pdfb-pdf-preview-error p {
  margin: 0 0 10px;
  font-weight: bold;
}

.pdfb-error-message {
  font-family: monospace;
  background: #fff;
  padding: 10px;
  border-radius: 4px;
  border: 1px solid #dee2e6;
  word-break: break-all;
}

.pdfb-pdf-preview-error-close {
  background: #dc3545;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 15px;
}

.pdfb-pdf-preview-error-close:hover {
  background: #c82333;
}

/* Masquer les notifications WordPress et autres plugins dans le PDF Builder */
body.toplevel_page_wp-pdf-builder-pro .pdfb-notice,
body.toplevel_page_wp-pdf-builder-pro .pdfb-notice-info,
body.toplevel_page_wp-pdf-builder-pro .pdfb-notice-warning,
body.toplevel_page_wp-pdf-builder-pro .pdfb-notice-error,
body.toplevel_page_wp-pdf-builder-pro .pdfb-notice-success,
body.toplevel_page_wp-pdf-builder-pro .pdfb-updated,
body.toplevel_page_wp-pdf-builder-pro .pdfb-update-nag,
#wp-pdf-builder-pro-metabox .pdfb-notice,
#wp-pdf-builder-pro-metabox .pdfb-notice-info,
#wp-pdf-builder-pro-metabox .pdfb-notice-warning,
#wp-pdf-builder-pro-metabox .pdfb-notice-error,
#wp-pdf-builder-pro-metabox .pdfb-notice-success,
#wp-pdf-builder-pro-metabox .pdfb-updated,
#wp-pdf-builder-pro-metabox .pdfb-error {
  display: none !important;
}

/* Status Tags */
.pdfb-status-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.pdfb-status-new {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.pdfb-status-modified {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.pdfb-status-editing {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* Form Input Styles */
.pdfb-setting-input-disabled {
  background-color: #f5f5f5 !important;
  color: #999 !important;
  cursor: not-allowed !important;
  opacity: 0.6;
}

/* Dialog Styles */
.pdfb-modal-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px;
    margin: 0;
    margin-bottom: 0;
}

.pdfb-modal-settings-grid .pdfb-setting-group {
  grid-column: span 1;
}

/* Premium Badge */
.pdfb-premium-badge {
    display: inline-block;
    background: #fff3cd;
    color: #856404;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    margin-left: 8px;
    white-space: nowrap;
    border: 1px solid #ffeaa7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Header Notice for Premium Features */
.pdfb-premium-header-notice {
  display: inline-block;
  font-size: 12px;
}

/* Info Tooltip */
.pdfb-info-tooltip {
  display: inline-block;
  cursor: help;
  margin-left: 4px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  font-size: 14px;
}

/* Modal Styles */
.pdfb-modal-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

.pdfb-preview-modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 90vw;
    max-height: 90vh;
}

.pdfb-modal-header {
    padding: 20px;
    border-bottom: 1px solid #ddd;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pdfb-modal-toolbar {
    padding: 10px 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    gap: 8px;
    background: #f8f9fa;
}

.pdfb-modal-body {
    padding: 20px;
    overflow-y: auto;
}

/* Feature Icons */
.pdfb-feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

/* Template Styles */
.pdfb-templates-status-wrapper {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  background: #f8fafc;
}

.pdfb-templates-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.pdfb-custom-status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.pdfb-template-selector {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pdfb-template-selector:hover {
  border-color: #667eea;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.pdfb-template-preview {
    width: 100%;
    height: 150px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-align: center;
    margin-top: 10px;
}

.pdfb-template-preview-container {
  width: 120px;
  height: 80px;
  margin: 0 auto 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdfb-template-preview-mini {
  width: 80px;
  height: 60px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 3px;
}

.pdfb-no-template {
  margin: 0;
  padding: 16px;
  text-align: center;
  color: #999;
  font-size: 14px;
}

.pdfb-no-templates {
    padding: 40px;
    text-align: center;
    color: #666;
    font-size: 14px;
    font-style: italic;
}

.pdfb-templates-status-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}

/* Section Styles */
.pdfb-section-header {
  padding: 12px 0;
  border-bottom: 1px solid #e1e1e1;
  margin-bottom: 16px;
}

.pdfb-section-title {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
}

.pdfb-section-icon {
  font-size: 20px;
}

.pdfb-section-description {
  margin: 0;
  padding: 0;
  font-size: 14px;
  color: #666;
}

.pdfb-section-content {
  padding: 0;
  margin: 0;
}

/* Container and Footer Styles */
.pdfb-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.pdfb-footer-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.pdfb-footer-link {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #2271b1;
  text-decoration: none;
  font-size: 13px;
  transition: all 0.2s ease;
}

.pdfb-footer-link:hover {
  background: #f0f6fc;
  border-color: #2271b1;
  text-decoration: none;
}

/* === Extrait de settings-pdf-fixed.php === */

/* Layout flexbox pour les paramètres PDF avec aperçu */
.pdfb-pdf-settings-wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-start;
  flex-wrap: nowrap;
    margin-bottom: 30px;
}

.pdfb-pdf-settings-left {
    flex: 1;
    min-width: 0;
}

.pdfb-pdf-preview-panel {
    flex: 0 0 350px;
    background: linear-gradient(135deg, #667eea 0%, #5568d3 100%);
    border-radius: 12px;
    padding: 25px;
    color: white;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
    position: sticky;
    top: 20px;
}

.pdfb-pdf-preview-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pdfb-pdf-preview-canvas {
    background: white;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pdfb-pdf-preview-frame {
    width: 100%;
    aspect-ratio: var(--preview-ratio, 210/297);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #999;
    padding: 10px;
    text-align: center;
    position: relative;
}

.pdfb-pdf-preview-frame::before {
    content: attr(data-format);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.pdfb-pdf-preview-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    font-size: 13px;
}

.pdfb-pdf-info-item {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 12px;
    backdrop-filter: blur(10px);
}

.pdfb-pdf-info-label {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0.9;
    display: block;
    margin-bottom: 4px;
}

.pdfb-pdf-info-value {
    font-size: 14px;
    font-weight: 700;
    display: block;
}

.pdfb-pdf-quality-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.pdfb-pdf-quality-fill {
    height: 100%;
    background: #4ade80;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.pdfb-pdf-file-size {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    margin-top: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.pdfb-pdf-file-size-value {
    font-size: 18px;
    font-weight: 700;
    margin: 8px 0;
}

.pdfib-upgrade-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.64);
  backdrop-filter: blur(2px);
}

.pdfib-upgrade-modal-overlay.is-open {
  display: flex !important;
}

.pdfib-upgrade-modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  padding: 28px 24px 22px;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.32);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #0f172a;
}

.pdfib-upgrade-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: #334155;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.pdfib-upgrade-modal__badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pdfib-upgrade-modal h3 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.2;
}

.pdfib-upgrade-modal p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #475569;
}

.pdfib-upgrade-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.pdfib-upgrade-modal__actions .button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  font-weight: 600;
}

@media (max-width: 1100px) {
  .pdfb-pdf-settings-wrapper {
    flex-direction: column;
  }

  .pdfb-pdf-preview-panel {
    position: static;
    flex: 1;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .pdfb-pdf-settings-wrapper {
    flex-direction: column;
  }

  .pdfb-pdf-preview-panel {
    flex: 0 0 auto;
    width: 100%;
    position: static;
  }
}

/* === Extrait de settings-pdf.php === */

/* Layout flexbox pour les paramètres PDF avec aperçu */

@media (max-width: 1100px) {
  .pdfb-pdf-settings-wrapper {
    flex-direction: column;
  }

  .pdfb-pdf-preview-panel {
    position: static;
    flex: 1;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .pdfb-pdf-settings-wrapper {
    flex-direction: column;
  }

  .pdfb-pdf-preview-panel {
    flex: 0 0 auto;
    width: 100%;
    position: static;
  }
}

/* === Extrait de settings-general.php === */

/* Styles compressés pour l'onglet général */
.pdfb-general-settings {
  max-width: none;
}
.pdfb-settings-content {
  display: grid;
  gap: 1.5rem;
}
.pdfb-settings-card {
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}
.card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #f0f0f1;
  background: #fafafa;
}
.card-title {
  margin: 0;
  font-size: 1.1em;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.card-title .dashicons {
  color: #2271b1;
}
.card-content {
  padding: 1rem 1.5rem;
}
.pdfb-woo-info-compact {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.pdfb-woo-info-compact div {
  padding: 0.5rem;
  background: #f8f9fa;
  border-radius: 4px;
}
.pdfb-woo-notice {
  margin: 0;
  font-size: 0.9rem;
  color: #646970;
}
.form-grid-compact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}
.pdfb-pdf-form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.pdfb-pdf-form-field label {
  font-weight: 600;
  color: #1d2327;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.pdfb-pdf-form-field input {
  padding: 0.5rem;
  border: 1px solid #8c8f94;
  border-radius: 4px;
  font-size: 0.95rem;
}
.pdfb-pdf-form-field input:focus {
  outline: none;
  border-color: #2271b1;
  box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
}
.form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    text-align: center;
    display: flex;
    gap: 10px;
}
@media (max-width: 782px) {
  .form-grid-compact {
    grid-template-columns: 1fr;
  }
  .card-header,
  .card-content {
    padding: 1rem;
  }
}

/* === Extrait de settings-main.php === */

.pdfb-pdf-builder-floating-save {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

.pdfb-pdf-builder-save-btn {
    background: #2271b1;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    min-width: 120px;
    justify-content: center;
}

.pdfb-pdf-builder-save-btn:hover {
    background: #135e96;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.pdfb-pdf-builder-save-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pdfb-pdf-builder-save-btn.saving {
    background: #f39c12;
    cursor: not-allowed;
}

.pdfb-pdf-builder-save-btn.saved {
    background: #27ae60;
}

.pdfb-pdf-builder-save-btn.error {
    background: #e74c3c;
}

.pdfb-pdf-builder-save-btn:disabled,
.pdfb-pdf-builder-save-btn:disabled:hover {
    background: #8c8f94;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
}

.pdfb-pdf-builder-save-status {
    position: absolute;
    top: -40px;
    right: 0;
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.pdfb-pdf-builder-save-status.show {
    opacity: 1;
    transform: translateY(0);
}

.pdfb-pdf-builder-save-status.success {
    background: #27ae60;
}

.pdfb-pdf-builder-save-status.error {
    background: #e74c3c;
}

/* === Extrait de settings-cron.php === */

/* WP Cron Status Indicator Styles */
.pdfb-status-indicator {
  transition: background-color 0.3s ease;
}

.dashicons.spin {
  animation: spin 1s linear infinite;
}

.wp-cron-status-indicator .pdfb-status-good {
  background-color: #28a745 !important;
}

.wp-cron-status-indicator .pdfb-status-warning {
  background-color: #ffc107 !important;
}

.wp-cron-status-indicator .pdfb-status-error {
  background-color: #dc3545 !important;
}

/* === Extrait de settings-modals.php === */

/* ===== STYLES SOBRES ET PROFESSIONNELS ===== */

/* Styles de base des modals */

.pdfb-canvas-modal-container {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  max-width: 90vw;
  max-height: 90vh;
  width: 800px;
  min-height: 400px; /* Hauteur minimale pour s'assurer qu'il y a de l'espace pour le footer */
  overflow: hidden;
  animation: modalSlideIn 0.3s ease-out;
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

/* Animations d'entrée */
@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Header du modal */

/* Corps du modal */

/* Grille de paramètres harmonieuse */

/* Groupes de paramètres */

.pdfb-setting-group:hover {
  border-color: #6c757d;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pdfb-setting-group label {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 10px;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Styles pour les inputs */
.pdfb-setting-group input[type="text"],
.pdfb-setting-group input[type="number"],
.pdfb-setting-group input[type="color"],
.pdfb-setting-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s ease;
  background: white;
}

.pdfb-setting-group input:focus,
.pdfb-setting-group select:focus {
  outline: none;
  border-color: #6c757d;
  box-shadow: 0 0 0 3px rgba(108, 117, 125, 0.1);
}

/* Toggle switches améliorés */
.pdfb-toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    cursor: pointer;
    background: #dee2e6;
    border-radius: 12px;
    transition: 0.3s;
    border: 1px solid #adb5bd;
    vertical-align: middle;
}

.pdfb-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.pdfb-toggle-switch label,
.pdfb-toggle-switch span.pdfb-ts {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #dee2e6;
  border-radius: 12px; /* Moitié de la hauteur pour un cercle parfait */
  transition: 0.3s;
  border: 1px solid #adb5bd; /* Bordure subtile */
  height: 22px;
}

.pdfb-toggle-switch label:before,
.pdfb-toggle-switch span.pdfb-ts:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px; /* Ajusté pour centrer */
  top: 2px; /* Ajusté pour centrer */
  background: white;
  border-radius: 50%;
  transition: 0.3s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); /* Ombre subtile */
}

.pdfb-toggle-switch input:checked + label,
.pdfb-toggle-switch input:checked + span.pdfb-ts {
  background: #6c757d;
  border-color: #5a6268;
  height: 22px;
}

.pdfb-toggle-switch input:checked + label:before,
.pdfb-toggle-switch input:checked + span.pdfb-ts:before {
  transform: translateX(
    26px
  ); /* Translation ajustée pour la nouvelle largeur */
  vertical-align: middle;
}

/* Checkboxes améliorés */
.pdfb-setting-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #6c757d;
  border-radius: 4px;
  cursor: pointer;
}

/* Footer du modal */

.pdfb-canvas-modal-footer .button {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  min-width: 100px;
}

.pdfb-canvas-modal-cancel {
  background: #6c757d;
  color: white;
}

.pdfb-canvas-modal-cancel:hover {
  background: #5a6268;
}

.pdfb-canvas-modal-apply {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
}

.pdfb-canvas-modal-apply:hover {
  filter: brightness(1.08);
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

/* Styles pour les options premium */
.pdfb-premium-option {
  position: relative;
}

.pdfb-premium-option input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pdfb-premium-option input:disabled + span {
  color: #6c757d;
}

/* Info boxes */
.pdfb-setting-group .pdfb-info-box {
  margin-top: 16px;
  padding: 12px 16px;
  background: #e7f3ff;
  border: 1px solid #b3d9ff;
  border-radius: 8px;
  font-size: 13px;
  color: #1e5b8b;
  line-height: 1.4;
}

.pdfb-setting-group .pdfb-warning-box {
  margin-top: 16px;
  padding: 12px 16px;
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  font-size: 13px;
  color: #856404;
  line-height: 1.4;
}

/* Responsive */
@media (max-width: 768px) {
  .pdfb-canvas-modal-container {
    width: 95vw;
    margin: 20px;
  }

  .pdfb-canvas-modal-header,
  .pdfb-canvas-modal-body,
  .pdfb-canvas-modal-footer {
    padding: 20px;
  }

  .pdfb-modal-settings-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ── Full-width dans la grille ──────────────────────────────────── */
.pdfb-modal-settings-grid .pdfb-setting-group--full {
  grid-column: 1 / -1;
}

/* ── Champs premium désactivés ──────────────────────────────────── */
.pdfb-setting-group--premium {
  opacity: 0.5;
  pointer-events: none;
}

@keyframes pdfbCardRise {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pdfbPillPop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.pdfb-modal-settings-grid > .pdfb-setting-group {
  animation: pdfbCardRise 0.32s cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

.pdfb-modal-settings-grid > .pdfb-setting-group:nth-child(2) { animation-delay: 0.02s; }
.pdfb-modal-settings-grid > .pdfb-setting-group:nth-child(3) { animation-delay: 0.04s; }
.pdfb-modal-settings-grid > .pdfb-setting-group:nth-child(4) { animation-delay: 0.06s; }
.pdfb-modal-settings-grid > .pdfb-setting-group:nth-child(5) { animation-delay: 0.08s; }
.pdfb-modal-settings-grid > .pdfb-setting-group:nth-child(6) { animation-delay: 0.10s; }
.pdfb-modal-settings-grid > .pdfb-setting-group:nth-child(7) { animation-delay: 0.12s; }

.pdfb-setting-group {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.pdfb-setting-group:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(27, 31, 35, 0.08);
}

/* ── Rangée de pills ─────────────────────────────────────────────── */
.pdfb-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

/* ── Pill générique (radio ou checkbox) ─────────────────────────── */
.pdfb-pill-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: #fff;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #2c3338;
  margin-bottom: 0;
  transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
  animation: pdfbPillPop 0.28s cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

.pdfb-pill-option:hover {
  border-color: #2271b1;
  background: #f0f6fc;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(34, 113, 177, 0.12);
}

.pdfb-pill-option:has(input:checked) {
  background: #2271b1;
  border-color: #2271b1;
  color: #fff;
}

.pdfb-pill-option--soon,
.pdfb-pill-option--locked {
  opacity: 0.55;
  cursor: not-allowed;
  background: #f6f7f7;
  border-style: dashed;
}

.pdfb-pill-option--soon:hover,
.pdfb-pill-option--locked:hover {
  border-color: #c3c4c7;
  background: #f6f7f7;
}

.pdfb-pill-option input {
  margin: 0;
  pointer-events: none;
}

.pdfb-pill-row .pdfb-pill-option:nth-child(2) { animation-delay: 0.02s; }
.pdfb-pill-row .pdfb-pill-option:nth-child(3) { animation-delay: 0.04s; }
.pdfb-pill-row .pdfb-pill-option:nth-child(4) { animation-delay: 0.06s; }
.pdfb-pill-row .pdfb-pill-option:nth-child(5) { animation-delay: 0.08s; }
.pdfb-pill-row .pdfb-pill-option:nth-child(6) { animation-delay: 0.10s; }
.pdfb-pill-row .pdfb-pill-option:nth-child(7) { animation-delay: 0.12s; }

/* ── Badge « Bientôt » ───────────────────────────────────────────── */
.pdfb-soon-badge {
  display: inline-block;
  padding: 1px 5px;
  background: #e8f4fd;
  color: #0070c5;
  border: 1px solid #b3d9ff;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}


/* Styles pour les dimensions (affichage compact) */
.pdfb-dimensions-display-compact {
  background: #f8f9fa;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  padding: 12px 16px;
  text-align: center;
  margin-bottom: 0;
}

.pdfb-dimensions-value {
  font-size: 16px;
  font-weight: 600;
  font-family: "Monaco", "Menlo", monospace;
  color: #2c3e50;
  margin-bottom: 4px;
}

.pdfb-dimensions-format {
  font-size: 12px;
  color: #6c757d;
  opacity: 0.8;
}

/* === Extrait de settings-developpeur.php === */

/* Styles pour l'indicateur de statut du mode développeur */
.pdfb-developer-status-indicator {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  margin-left: 10px;
  transition: all 0.3s ease;
}

.pdfb-developer-status-active {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.pdfb-developer-status-inactive {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Styles pour les sections développeur */
.pdfb-developer-section-hidden {
  display: none !important;
}

/* Styles pour les toggles améliorés */

.pdfb-toggle-switch .pdfb-toggle-slider {
  position: absolute;
  height: 18px;
  width: 18px;
  left: 2px;
  top: 2px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.pdfb-toggle-switch input[type="checkbox"]:checked ~ .pdfb-toggle-slider {
  transform: translateX(26px);
}

/* Use JavaScript to add/remove class for background color */
.pdfb-toggle-switch.pdfb-checked {
  background: #667eea;
  border-color: #5a67d8;
}

.pdfb-toggle-switch input[type="checkbox"] {
  opacity: 0;
  width: 0;
  height: 0;
}

/* Amélioration du toggle */
.pdfb-toggle-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.pdfb-toggle-label {
  font-weight: 500;
  color: #333;
  font-size: 14px;
}

.pdfb-toggle-description {
  margin-top: 5px;
  font-size: 13px;
  color: #666;
  margin-left: 60px; /* Align with toggle */
}

/* Styles pour les champs développeur */
.pdfb-developer-field-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pdfb-developer-input {
  flex: 1;
  max-width: 300px;
}

.pdfb-developer-button {
  white-space: nowrap;
}

/* Styles pour les sections */

/* Styles pour les boutons développeur */
.button.button-secondary.pdfb-developer-button {
  background: #6c757d;
  border-color: #6c757d;
  color: white;
}

.button.button-secondary.pdfb-developer-button:hover {
  background: #5a6268;
  border-color: #5a6268;
}

.button.pdfb-button-link-delete {
  color: #dc3545;
}

.button.pdfb-button-link-delete:hover {
  color: #c82333;
  background: #f8d7da;
}

/* Styles pour les avertissements développeur */
.pdfb-developer-warning {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  color: #856404;
  font-weight: 500;
}

/* Styles pour le statut du mode test licence */
.pdfb-license-test-mode-status {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  margin-left: 10px;
  transition: all 0.3s ease;
}

.pdfb-license-test-mode-active {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.pdfb-license-test-mode-inactive {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Styles pour les champs de clé de licence */
.pdfb-license-test-key-input {
  flex: 1;
  max-width: 400px;
  font-family: monospace;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  padding: 8px 12px;
  border-radius: 4px;
}

/* Styles pour les éléments cachés */
.pdfb-hidden-element {
  display: none !important;
}

/* Styles pour les descriptions de mot de passe */
.pdfb-developer-password-set {
  color: #28a745 !important;
  font-weight: 500;
}

/* Styles pour les sections développeur */
section[id^="dev-"] {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

section[id^="dev-"] h3.pdfb-section-title {
  margin-top: 0;
  color: #495057;
}

/* Styles pour les tableaux de formulaire */
.pdfb-form-table th {
  width: 200px;
  padding-right: 20px;
  vertical-align: top;
  font-weight: 600;
}

.pdfb-form-table td {
  vertical-align: top;
}

/* Styles pour les statuts AJAX */
#license_key_status,
#check_expiration_status {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
}

/* Styles pour les conteneurs de statut base de données */
#database_status_container {
  margin-top: 15px;
}

#database_status {
  font-family: monospace;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  padding: 8px 12px;
  border-radius: 4px;
  display: inline-block;
}

/* Styles pour les boutons d'action développeur */
.pdfb-developer-action-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 15px;
}

/* Styles pour les logs développeur */
.pdfb-developer-logs {
  background: #2d3748;
  color: #e2e8f0;
  font-family: "Courier New", monospace;
  font-size: 12px;
  padding: 15px;
  border-radius: 6px;
  max-height: 400px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Styles pour les outils développeur */
.pdfb-developer-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

.pdfb-developer-tool-card {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}

.pdfb-developer-tool-card h4 {
  margin-top: 0;
  color: #495057;
}

.pdfb-developer-tool-card .button {
  margin-top: 10px;
}

/* Styles pour les raccourcis développeur */
.pdfb-developer-shortcuts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.pdfb-shortcut-item {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 15px;
  text-align: center;
}

.pdfb-shortcut-item h5 {
  margin-top: 0;
  color: #495057;
}

.pdfb-shortcut-key {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 4px 8px;
  font-family: monospace;
  font-weight: bold;
  color: #495057;
  display: inline-block;
  margin: 5px 0;
}

/* Styles pour la console développeur */
#developer_console_output {
  background: #1a202c;
  color: #e2e8f0;
  font-family: "Courier New", monospace;
  font-size: 12px;
  padding: 15px;
  border-radius: 6px;
  height: 300px;
  overflow-y: auto;
  white-space: pre-wrap;
  border: 1px solid #2d3748;
}

/* Styles pour les hooks développeur */
.pdfb-developer-hooks-list {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 15px;
  max-height: 300px;
  overflow-y: auto;
}

.pdfb-hook-item {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 10px;
  margin-bottom: 8px;
}

.pdfb-hook-item:last-child {
  margin-bottom: 0;
}

.pdfb-hook-name {
  font-family: monospace;
  font-weight: bold;
  color: #495057;
}

.pdfb-hook-description {
  font-size: 12px;
  color: #6c757d;
  margin-top: 4px;
}

/* Accordéon styles pour Hooks Disponibles */
.pdfb-accordion-item {
  border: 1px solid #dee2e6;
  border-radius: 6px;
  overflow: hidden;
}

.pdfb-accordion-toggle {
  width: 100%;
  text-align: left;
  background: linear-gradient(135deg, #667eea 0%, #5568d3 100%);
  color: white;
  border: none;
  padding: 15px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.pdfb-accordion-toggle:hover {
  background: linear-gradient(135deg, #5568d3 0%, #4557c0 100%);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.pdfb-accordion-icon {
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: 12px;
  margin-right: 10px;
}

.pdfb-accordion-toggle.open .pdfb-accordion-icon {
  transform: rotate(90deg);
}

.pdfb-accordion-content {
  background: white;
  max-height: 1000px;
  overflow: hidden;
  transition: all 0.3s ease;
  padding: 20px;
}

.pdfb-accordion-content.collapsed {
  max-height: 0;
  padding: 0 20px;
  display: none;
}

/* Styles pour les boutons de test des hooks */
.pdfb-hook-test-btn {
  background: linear-gradient(135deg, #667eea 0%, #5568d3 100%) !important;
  color: white !important;
  border: none !important;
  border-radius: 4px !important;
  padding: 5px 12px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2) !important;
}

.pdfb-hook-test-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #5568d3 0%, #4557c0 100%) !important;
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4) !important;
  transform: translateY(-2px) !important;
}

.pdfb-hook-test-btn:active:not(:disabled) {
  transform: translateY(0) !important;
}

.pdfb-hook-test-btn:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
}

/* === Extrait de settings-systeme.php === */

.pdfb-engine-status {
  display: inline-block;
  padding: 4px 12px;
  margin-left: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
  vertical-align: middle;
}

.pdfb-system-pdf-engine-section .form-table th {
  width: 200px;
  font-weight: 600;
}

.pdfb-system-pdf-engine-section .pdfb-toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
  vertical-align: middle;
}

.pdfb-system-pdf-engine-section .pdfb-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.pdfb-system-pdf-engine-section .pdfb-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 24px;
}

.pdfb-system-pdf-engine-section .pdfb-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.pdfb-system-pdf-engine-section input:checked + .pdfb-toggle-slider {
  background-color: #2271b1;
}

.pdfb-system-pdf-engine-section input:checked + .pdfb-toggle-slider:before {
  transform: translateX(26px);
}

#engine-test-result {
  margin-top: 15px;
  padding: 12px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.6;
}

#engine-test-result .notice {
  padding: 10px 15px;
  margin: 0;
}

/* Section Configuration moteur */
.pdfb-system-engine-config-section {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 25px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.pdfb-system-engine-config-section header {
  background: linear-gradient(135deg, #f5f7fa 0%, #e8ecef 100%);
  padding: 15px 20px;
  border-bottom: 1px solid #ddd;
}

.pdfb-system-engine-config-section header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #1d2327;
}

.pdfb-system-engine-config-section .pdfb-system-section-content {
  padding: 20px;
}

.pdfb-system-engine-config-section .form-table th {
  width: 200px;
  font-weight: 600;
}

.pdfb-system-engine-config-section .pdfb-toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
  vertical-align: middle;
}

.pdfb-system-engine-config-section .pdfb-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.pdfb-system-engine-config-section .pdfb-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 24px;
}

.pdfb-system-engine-config-section .pdfb-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.pdfb-system-engine-config-section input:checked + .pdfb-toggle-slider {
  background-color: #2271b1;
}

.pdfb-system-engine-config-section input:checked + .pdfb-toggle-slider:before {
  transform: translateX(26px);
}

.pdfb-puppeteer-config-row {
  transition:
    opacity 0.3s ease,
    height 0.3s ease;
}

.pdfb-backup-item-info {
  margin-bottom: 0 !important;
}

@keyframes pdfb-fadeInOut {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  20% {
    opacity: 1;
    transform: scale(1.1);
  }
  80% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.8);
  }
}

.pdfb-backup-count-plus-one {
  animation: pdfb-fadeInOut 3s ease-in-out;
}

/* === Extrait de settings-licence.php === */

/* Styles pour l'onglet licence ergonomique */
.pdfb-license-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  color: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-top: 1rem;
}

.pdfb-license-header-content h2 {
  margin: 0 0 0.5rem;
  font-size: 1.8rem;
  font-weight: 600;
}

.pdfb-license-header-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.pdfb-license-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.pdfb-license-status-badge.badge-premium {
  background: rgba(255, 255, 255, 0.25);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.pdfb-license-status-badge.badge-free {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.pdfb-license-subtitle {
  margin: 0;
  opacity: 0.9;
  font-size: 1rem;
}

.pdfb-license-icon {
  margin-right: 0.5rem;
  font-size: 1.5rem;
}

.pdfb-license-quick-actions {
  flex-shrink: 0;
}

.pdfb-license-btn-primary-large,
.pdfb-license-btn-secondary-large {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
}

.pdfb-license-btn-primary-large {
  background: #fff;
  color: #667eea;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pdfb-license-btn-primary-large:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.pdfb-license-btn-secondary-large {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.pdfb-license-btn-secondary-large:hover {
  background: rgba(255, 255, 255, 0.3);
}

.pdfb-license-btn-icon {
  margin-right: 0.5rem;
}

/* Dashboard de statut */
.pdfb-license-dashboard {
  margin-bottom: 2rem;
}

.pdfb-license-status-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-left: 4px solid #e0e0e0;
  transition: all 0.2s ease;
}

.pdfb-license-status-card.premium-active {
  border-left-color: #667eea;
  background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
}

.pdfb-license-status-card.free-mode {
  border-left-color: #6c757d;
}

.pdfb-license-status-card-header {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.pdfb-license-status-icon {
  font-size: 3rem;
  margin-right: 1rem;
}

.pdfb-license-status-info h3 {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
}

.pdfb-license-status-subtitle {
  margin: 0;
  color: #666;
  font-size: 1rem;
}

.pdfb-license-status-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pdfb-license-status-metrics {
  display: flex;
  gap: 2rem;
}

.pdfb-license-metric-item {
  text-align: center;
}

.pdfb-license-metric-label {
  display: block;
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.25rem;
}

.pdfb-license-metric-value {
  display: block;
  font-weight: 600;
  color: #333;
}

.pdfb-license-test-mode-banner {
  background: #fff3cd;
  color: #856404;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

/* Alertes */
.pdfb-license-alert-card {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pdfb-license-alert-card.warning {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  color: #856404;
}

.pdfb-license-alert-card.error {
  background: #f8d7da;
  border-left: 4px solid #dc3545;
  color: #721c24;
}

.pdfb-license-alert-icon {
  font-size: 1.5rem;
}

.pdfb-license-alert-content h4 {
  margin: 0 0 0.25rem;
  font-weight: 600;
}

.pdfb-license-alert-date {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  opacity: 0.8;
}

.pdfb-license-alert-actions {
  margin-left: auto;
}

.pdfb-license-btn-small {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pdfb-license-btn-small.primary {
  background: #007bff;
  color: white;
}

.pdfb-license-btn-small:hover {
  opacity: 0.9;
}

.pdfb-license-btn-primary {
  background: #667eea;
  color: white;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.pdfb-license-btn-primary:hover {
  background: #5568d3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.pdfb-license-btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pdfb-license-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.3);
}

.pdfb-license-support-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.pdfb-license-premium-features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.pdfb-license-premium-support {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(79, 172, 254, 0.3);
}

.pdfb-license-premium-promo {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.pdfb-license-premium-promo-content {
  padding: 1rem;
  text-align: center;
  position: relative;
  z-index: 2;
}

.pdfb-license-premium-cta {
  background: linear-gradient(45deg, #ff6b6b, #ffa500);
  color: white;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  padding: 0.6rem 1.2rem;
  display: inline-block;
}

.pdfb-license-premium-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6) !important;
}

.pdfb-license-test-key {
  font-family: "Courier New", monospace;
  background: #f8f9fa;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Section d'actions */
.pdfb-license-actions-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.pdfb-license-action-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 1px solid #e9ecef;
}

.pdfb-license-action-card.secondary {
  background: #f8f9fa;
  border-color: #dee2e6;
}

.pdfb-license-action-card-header h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
}

.pdfb-license-action-card-header p {
  margin: 0;
  color: #666;
}

.pdfb-license-action-icon {
  margin-right: 0.5rem;
}

.pdfb-license-input-group {
  margin-top: 1rem;
}

.pdfb-license-input-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #333;
}

.pdfb-license-input-with-button {
  display: flex;
  gap: 0.5rem;
}

.pdfb-license-input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 1rem;
}

.pdfb-license-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.25);
}

.pdfb-license-input-help {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: #666;
}

.pdfb-license-link-primary {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

.pdfb-license-link-primary:hover {
  text-decoration: underline;
}

.pdfb-license-dev-mode-status {
  margin-top: 1rem;
}

.pdfb-license-status-active,
.pdfb-license-status-inactive {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.pdfb-license-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.pdfb-license-status-dot.active {
  background: #28a745;
}

.pdfb-license-status-dot.inactive {
  background: #6c757d;
}

.pdfb-license-expiry-info {
  color: #666;
  font-size: 0.9rem;
}

/* Section détails */
.pdfb-license-details-section {
  margin-bottom: 1.25rem;
}

.pdfb-license-section-title {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  color: #444;
  font-weight: 600;
}

.pdfb-license-section-icon {
  margin-right: 0.4rem;
}

.pdfb-license-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.5rem;
}

.pdfb-license-detail-card {
  background: white;
  padding: 0.6rem 0.85rem;
  border-radius: 6px;
  box-shadow: none;
  border: 1px solid #e4e7ea;
}

.pdfb-license-detail-card h4 {
  margin: 0 0 0.2rem;
  font-size: 0.7rem;
  color: #888;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.pdfb-license-detail-value {
  margin: 0;
  font-size: 0.85rem;
  color: #333;
  word-break: break-all;
}

.pdfb-license-key,
.pdfb-test-key {
  font-family: "Courier New", monospace;
  background: #f8f9fa;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pdfb-license-copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 3px;
  transition: background 0.2s ease;
}

.pdfb-license-copy-btn:hover {
  background: #e9ecef;
}

.pdfb-license-test-badge {
  background: #fff3cd;
  color: #856404;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

.pdfb-license-status-badge.active {
  background: #d4edda;
  color: #155724;
}

.pdfb-license-status-badge.free {
  background: #e2e3e5;
  color: #383d41;
}

.pdfb-license-status-badge.test {
  background: #fff3cd;
  color: #856404;
}

/* Section fonctionnalités premium */
.pdfb-license-premium-features-section {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.pdfb-license-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.pdfb-license-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  transition: all 0.2s ease;
}

.pdfb-license-feature-item.unlocked {
  border-color: #28a745;
  background: #f8fff8;
}

.pdfb-license-feature-item.locked {
  opacity: 0.7;
}

.pdfb-license-feature-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.pdfb-license-feature-content h4 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  color: #333;
}

.pdfb-license-feature-content p {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
}

.pdfb-license-upgrade-prompt {
  text-align: center;
  padding: 2rem;
  background: white;
  border-radius: 8px;
  border: 2px solid #667eea;
}

.pdfb-license-upgrade-prompt h4 {
  margin: 0 0 0.5rem;
  color: #333;
  font-size: 1.25rem;
}

.pdfb-license-upgrade-prompt p {
  margin: 0 0 1.5rem;
  color: #666;
}

/* Responsive */
@media (max-width: 768px) {
  .pdfb-license-header {
    flex-direction: column;
    gap: 1rem;
  }

  .pdfb-license-quick-actions {
    align-self: stretch;
  }

  .pdfb-license-actions-section {
    grid-template-columns: 1fr;
  }

  .pdfb-license-status-details {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .pdfb-license-status-metrics {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .pdfb-features-grid,
  .pdfb-license-details-grid {
    grid-template-columns: 1fr;
  }

  .pdfb-license-alert-card {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .pdfb-license-alert-actions {
    margin-left: 0;
  }
}

@keyframes supportPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.pdfb-license-premium-support:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(79, 172, 254, 0.4) !important;
  transition: all 0.3s ease;
}

.pdfb-license-feature-item:hover {
  transform: translateY(-2px);
  transition: all 0.3s ease;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes rocketFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-5deg);
  }
  50% {
    transform: translateY(-10px) rotate(5deg);
  }
}

@keyframes textGlow {
  0% {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  }
  100% {
    text-shadow:
      0 2px 4px rgba(0, 0, 0, 0.3),
      0 0 20px rgba(255, 255, 255, 0.5);
  }
}

@keyframes particleFloat {
  0%,
  100% {
    transform: translateY(0) translateX(0);
    opacity: 0.6;
  }
  50% {
    transform: translateY(-20px) translateX(10px);
    opacity: 1;
  }
}

.pdfb-license-premium-cta:hover div {
  left: 100%;
}

/* ══════════════════════════════════════════════════════════════════
   CANVAS SETTINGS CARDS — Onglet Canvas & Design
   ══════════════════════════════════════════════════════════════════ */

@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pdfb-canvas-settings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 28px;
}

.pdfb-canvas-card {
  background: #ffffff;
  border: 1px solid #e8ecf0;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
  transition:
    transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.35s ease,
    border-color 0.25s ease;
  cursor: pointer;
  animation: cardEntrance 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.pdfb-canvas-card:nth-child(1) { animation-delay: 0.04s; }
.pdfb-canvas-card:nth-child(2) { animation-delay: 0.14s; }
.pdfb-canvas-card:nth-child(3) { animation-delay: 0.24s; }

/* Accent bar au sommet de chaque carte */
.pdfb-canvas-card::before {
  content: '';
  display: block;
  height: 4px;
  flex-shrink: 0;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.pdfb-canvas-card[data-category="affichage"]::before {
  background: linear-gradient(90deg, #667eea 0%, #a855f7 100%);
}

.pdfb-canvas-card[data-category="navigation"]::before {
  background: linear-gradient(90deg, #0ea5e9 0%, #2563eb 100%);
}

.pdfb-canvas-card[data-category="comportement"]::before {
  background: linear-gradient(90deg, #10b981 0%, #0891b2 100%);
}

.pdfb-canvas-card:hover {
  transform: translateY(-8px) scale(1.015);
  box-shadow:
    0 20px 56px rgba(102, 126, 234, 0.18),
    0 4px 16px rgba(0, 0, 0, 0.08);
  border-color: #c4b5fd;
}

.pdfb-canvas-card[data-category="navigation"]:hover {
  border-color: #93c5fd;
  box-shadow:
    0 20px 56px rgba(14, 165, 233, 0.18),
    0 4px 16px rgba(0, 0, 0, 0.08);
}

.pdfb-canvas-card[data-category="comportement"]:hover {
  border-color: #6ee7b7;
  box-shadow:
    0 20px 56px rgba(16, 185, 129, 0.18),
    0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Icône par carte */
.pdfb-canvas-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pdfb-canvas-card[data-category="navigation"] .pdfb-canvas-card-icon {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.pdfb-canvas-card[data-category="comportement"] .pdfb-canvas-card-icon {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.pdfb-canvas-card:hover .pdfb-canvas-card-icon {
  transform: scale(1.12) rotate(-4deg);
}

/* En-tête */
.pdfb-canvas-card-header {
  padding: 20px 22px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid #f1f5f9;
  transition: border-color 0.25s ease;
}

.pdfb-canvas-card:hover .pdfb-canvas-card-header {
  border-bottom-color: #e0e7ff;
}

.pdfb-canvas-card[data-category="navigation"]:hover .pdfb-canvas-card-header {
  border-bottom-color: #dbeafe;
}

.pdfb-canvas-card[data-category="comportement"]:hover .pdfb-canvas-card-header {
  border-bottom-color: #d1fae5;
}

.pdfb-canvas-card-header-text {
  flex: 1;
  min-width: 0;
}

.pdfb-canvas-card-header h4 {
  margin: 0 0 2px;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.pdfb-canvas-card-header-sub {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* Contenu */
.pdfb-canvas-card-content {
  padding: 16px 22px;
  flex: 1;
}

/* Badges de statistiques */
.pdfb-canvas-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.pdfb-canvas-stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 9px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  line-height: 1.4;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.pdfb-canvas-stat-badge--on {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.pdfb-canvas-card:hover .pdfb-canvas-stat-badge {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.pdfb-canvas-card-content p {
  margin: 0 0 5px;
  font-size: 13px;
  color: #475569;
  line-height: 1.6;
}

.pdfb-canvas-card-content p:last-child {
  margin-bottom: 0;
}

/* Actions */
.pdfb-canvas-card-actions {
  padding: 14px 22px 22px;
}

.pdfb-canvas-configure-btn {
  width: 100%;
  padding: 11px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition:
    transform 0.2s ease,
    box-shadow 0.25s ease,
    filter 0.2s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.pdfb-canvas-card[data-category="navigation"] .pdfb-canvas-configure-btn {
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
}

.pdfb-canvas-card[data-category="comportement"] .pdfb-canvas-configure-btn {
  background: linear-gradient(135deg, #10b981 0%, #0891b2 100%);
}

.pdfb-canvas-configure-btn::after {
  content: ' →';
  display: inline-block;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.pdfb-canvas-configure-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.42);
  filter: brightness(1.07);
  color: #ffffff;
}

.pdfb-canvas-configure-btn:hover::after {
  opacity: 1;
  transform: translateX(0);
}

.pdfb-canvas-configure-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

@media (max-width: 900px) {
  .pdfb-canvas-settings-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .pdfb-canvas-card:nth-child(2) { animation-delay: 0.08s; }
  .pdfb-canvas-card:nth-child(3) { animation-delay: 0.13s; }
}

/* ══════════════════════════════════════════════════════════════════
   MODAL AFFICHAGE — Sections, DPI, Format, Orientation, Premium
   ══════════════════════════════════════════════════════════════════ */

/* ── Section wrapper ────────────────────────────────────────────── */
.pdfb-modal-section {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid #f0f3f7;
}

.pdfb-modal-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.pdfb-modal-section-title {
  margin: 0 0 16px;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ── DPI Selector ───────────────────────────────────────────────── */
.pdfb-dpi-selector {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pdfb-dpi-option {
  cursor: pointer;
  display: inline-block;
}

.pdfb-dpi-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.pdfb-dpi-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 18px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease;
  user-select: none;
  min-width: 72px;
  text-align: center;
}

.pdfb-dpi-option:hover .pdfb-dpi-pill {
  border-color: #a5b4fc;
  background: #f0f1ff;
}

.pdfb-dpi-option input[type="radio"]:checked + .pdfb-dpi-pill {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
  color: white;
  box-shadow: 0 4px 14px rgba(102, 126, 234, 0.35);
}

.pdfb-dpi-value {
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.pdfb-dpi-desc {
  font-size: 10px;
  opacity: 0.7;
  line-height: 1;
}

.pdfb-dpi-option input[type="radio"]:checked + .pdfb-dpi-pill .pdfb-dpi-desc {
  opacity: 0.85;
}

.pdfb-dpi-option--premium {
  cursor: not-allowed;
}

.pdfb-dpi-option--premium .pdfb-dpi-pill {
  background: #f8f9fa;
  border-color: #e2e8f0;
  color: #adb5bd;
  position: relative;
}

.pdfb-dpi-option--premium:hover .pdfb-dpi-pill {
  border-color: #e2e8f0;
  background: #f8f9fa;
}

.pdfb-premium-lock {
  font-size: 11px;
  display: block;
  margin-top: 2px;
  line-height: 1;
}

/* ── Format Selector ────────────────────────────────────────────── */
.pdfb-format-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.pdfb-format-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 8px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  text-align: center;
}

.pdfb-format-card--active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
  color: white;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.35);
}

.pdfb-format-card--locked {
  background: #f8fafc;
  opacity: 0.75;
  cursor: not-allowed;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.pdfb-format-icon {
  font-size: 22px;
  line-height: 1;
}

.pdfb-format-name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.pdfb-format-dims {
  font-size: 11px;
  opacity: 0.7;
  line-height: 1;
}

.pdfb-format-card--active .pdfb-format-dims {
  color: rgba(255, 255, 255, 0.8);
  opacity: 1;
}

/* ── Badges Soon / Premium ──────────────────────────────────────── */
.pdfb-soon-badge {
  display: inline-block;
  padding: 2px 8px;
  background: #ffc107;
  color: #212529;
  border-radius: 20px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.4;
}

.pdfb-premium-badge {
  display: inline-block;
  padding: 2px 8px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-radius: 20px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.4;
}

/* ── Orientation Selector ───────────────────────────────────────── */
.pdfb-orientation-selector {
  display: flex;
  gap: 16px;
}

.pdfb-orientation-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 24px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  min-width: 110px;
  text-align: center;
}

.pdfb-orientation-card--active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
  color: white;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.35);
}

.pdfb-orientation-card--locked {
  background: #f8fafc;
  opacity: 0.75;
  cursor: not-allowed;
  flex-wrap: wrap;
}

.pdfb-orientation-icon {
  display: block;
  border: 3px solid currentColor;
  border-radius: 3px;
  background: transparent;
}

.pdfb-orientation-icon--portrait {
  width: 28px;
  height: 38px;
}

.pdfb-orientation-icon--landscape {
  width: 40px;
  height: 28px;
}

.pdfb-orientation-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

/* ── Premium section overlay ────────────────────────────────────── */
.pdfb-modal-premium-section {
  position: relative;
  border: 2px dashed #c4b5fd;
  border-radius: 14px;
  overflow: hidden;
  margin-top: 8px;
  background: #fafbff;
}

.pdfb-modal-premium-overlay {
  position: absolute;
  inset: 0;
  background: rgba(250, 248, 255, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 10;
  text-align: center;
  padding: 28px;
}

.pdfb-modal-premium-lock {
  font-size: 40px;
  display: block;
  animation: premiumPulseLock 2.5s ease-in-out infinite;
}

@keyframes premiumPulseLock {
  0%, 100% { transform: scale(1) rotate(0deg); }
  20% { transform: scale(1.12) rotate(-4deg); }
  40% { transform: scale(1.06) rotate(4deg); }
  60% { transform: scale(1.1) rotate(-2deg); }
  80% { transform: scale(1.04) rotate(2deg); }
}

.pdfb-modal-premium-overlay h4 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pdfb-modal-premium-overlay p {
  margin: 0;
  font-size: 13px;
  color: #64748b;
  max-width: 280px;
  line-height: 1.55;
}

.pdfb-modal-premium-cta {
  display: inline-block;
  padding: 11px 26px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white !important;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.pdfb-modal-premium-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.55);
  color: white !important;
  text-decoration: none;
}

.pdfb-modal-premium-fields {
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  min-height: 200px;
  filter: blur(3px);
  pointer-events: none;
  user-select: none;
}

/* ══════════════════════════════════════════════════════════════════
   LICENCE PAGE — améliorations visuelles
   ══════════════════════════════════════════════════════════════════ */

/* Animate header entry */
.pdfb-license-header {
  animation: licenseHeaderIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes licenseHeaderIn {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Premium badge improvements */
.pdfb-license-status-badge.badge-premium {
  background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
  color: #1a1a2e;
  border: none;
  box-shadow: 0 2px 12px rgba(247, 151, 30, 0.45);
  font-weight: 800;
  animation: badgePremiumShine 3s ease-in-out infinite;
}

@keyframes badgePremiumShine {
  0%, 100% { box-shadow: 0 2px 12px rgba(247, 151, 30, 0.45); }
  50% { box-shadow: 0 2px 20px rgba(255, 210, 0, 0.7); }
}

.pdfb-license-status-badge.badge-free {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(4px);
}

/* Action cards hover */
.pdfb-license-action-card {
  transition:
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease;
}

.pdfb-license-action-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

/* Table Gratuit vs Premium */
.premium-features-section {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e9ecef;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  padding: 0;
}

.premium-features-section h3.pdfb-section-title {
  margin: 0;
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.premium-features-section .widefat {
  border: none;
  border-radius: 0;
  margin: 0;
}

.premium-features-section .widefat thead tr th {
  background: #f8f6ff;
  color: #4a3f6b;
  font-weight: 700;
  font-size: 13px;
  padding: 12px 16px;
  border-bottom: 2px solid #e4e0f5;
}

.premium-features-section .widefat tbody tr:nth-child(odd) td {
  background: #fafbff;
}

.premium-features-section .widefat tbody tr:nth-child(even) td {
  background: #ffffff;
}

.premium-features-section .widefat td {
  padding: 10px 16px;
  border-bottom: 1px solid #f0ecff;
  font-size: 13px;
}

.premium-features-section .widefat tbody tr td:last-child {
  color: #764ba2;
  font-weight: 600;
}

.premium-features-section > .button.button-secondary,
.premium-features-section > button {
  margin: 12px 16px 16px;
}

/* Detail cards */
.pdfb-license-detail-card {
  background: #f8fafc;
  border: 1px solid #e8ecf0;
  border-radius: 10px;
  padding: 14px 18px;
  transition: all 0.2s ease;
}

.pdfb-license-detail-card:hover {
  background: #f0f4ff;
  border-color: #a5b4fc;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.12);
}

.pdfb-license-detail-card h4 {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.pdfb-license-detail-card .pdfb-license-detail-value {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
}

.license-days-ok { color: #16a34a !important; }
.license-days-warning { color: #ca8a04 !important; }
.license-days-error { color: #dc2626 !important; }
.license-days-neutral { color: #64748b !important; }

/* Expand button */
.pdfb-expand-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pdfb-expand-toggle:hover {
  background: #e8edf5;
  border-color: #a5b4fc;
  color: #3730a3;
}

.pdfb-chevron {
  transition: transform 0.3s ease;
  font-size: 11px;
  display: inline-block;
}

.pdfb-expand-toggle[aria-expanded="true"] .pdfb-chevron {
  transform: rotate(180deg);
}

.pdfb-license-premium-promo:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4) !important;
  transition: all 0.3s ease;
}

/* === Extrait de predefined-templates-manager.php === */

/* Styles de base inline pour la page des modèles prédéfinis */
.pdfb-pdf-builder-predefined-container {
  display: flex;
  gap: 30px;
  margin-top: 20px;
}
.pdfb-templates-list-section,
.pdfb-template-editor-section {
  flex: 1;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
}
.pdfb-templates-list-section {
  max-width: 400px;
}
.pdfb-template-editor-section {
  max-width: 600px;
}
.pdfb-templates-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.pdfb-templates-list {
  max-height: 600px;
  overflow-y: auto;
}
.pdfb-template-item {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  background: #fafafa;
  transition: all 0.3s ease;
}
.pdfb-template-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}
.pdfb-template-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}
.pdfb-template-header h3 {
  margin: 0;
  font-size: 16px;
  color: #23282d;
}
.pdfb-template-actions {
  display: flex;
  gap: 5px;
}
.pdfb-template-meta {
  margin-bottom: 10px;
}
.category {
  display: inline-block;
  background: #007cba;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.description {
  display: block;
  color: #666;
  font-size: 13px;
  line-height: 1.4;
}

.pdfb-template-preview img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}
.no-preview {
  padding: 20px;
  background: #f8f9fa;
  border-radius: 4px;
  color: #666;
  font-style: italic;
}
.form-row {
  margin-bottom: 20px;
}
.form-row label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
  color: #23282d;
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}
.pdfb-json-editor-container {
  position: relative;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}
.pdfb-json-editor-container textarea {
  border: none;
  border-radius: 0;
  margin: 0;
  padding: 12px;
  font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
  font-size: 13px;
  line-height: 1.4;
  resize: none;
  width: 100%;
  min-height: 300px;
}

.pdfb-pdf-builder-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdfb-pdf-builder-modal--hidden {
  display: none;
}

.pdfb-modal-header h3 {
  margin: 0;
}
.close-modal {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
}

/* Styles pour la modal d'aperçu améliorée */

.pdfb-preview-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.pdfb-zoom-controls,
.pdfb-rotation-controls,
.pdfb-download-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pdfb-control-btn {
  padding: 6px 12px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}
.pdfb-control-btn:hover {
  background: #f0f0f0;
  border-color: #bbb;
}
.pdfb-control-btn:active {
  background: #e0e0e0;
}
#zoom-level,
#rotation-angle {
  min-width: 50px;
  text-align: center;
  font-weight: bold;
}
.pdfb-preview-image-container {
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  border-radius: 4px;
}
.pdfb-preview-image-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
  cursor: move;
}
.pdfb-preview-loading {
  text-align: center;
  color: #666;
}
.pdfb-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: pdfb-spin 1s linear infinite;
    margin: 0 auto 10px;
}
@keyframes pdfb-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .pdfb-preview-modal-content {
    max-width: 95vw;
    max-height: 95vh;
  }
  .pdfb-preview-controls {
    flex-direction: column;
    gap: 10px;
  }
  .pdfb-zoom-controls,
  .pdfb-rotation-controls,
  .pdfb-download-controls {
    justify-content: center;
  }
  .pdfb-modal-toolbar {
    padding: 8px 15px;
  }
  .pdfb-modal-body {
    padding: 15px;
  }
  .pdfb-preview-image-container {
    min-height: 300px;
  }
}
@media (max-width: 480px) {
  .pdfb-control-btn {
    padding: 4px 8px;
    font-size: 12px;
  }
  #zoom-level,
  #rotation-angle {
    min-width: 40px;
    font-size: 12px;
  }
  .pdfb-preview-controls {
    gap: 8px;
  }
}

.pdfb-developer-login-container {
  max-width: 400px;
  margin: 50px auto;
  padding: 30px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-align: center;
}
.pdfb-developer-login-container h1 {
  color: #23282d;
  margin-bottom: 10px;
}
.pdfb-developer-login-container .description {
  color: #666;
  margin-bottom: 30px;
  font-size: 14px;
}
.pdfb-developer-login-form .form-row {
  margin-bottom: 20px;
  text-align: left;
}
.pdfb-developer-login-form label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
  color: #23282d;
}
.pdfb-developer-login-form input[type="password"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}
.pdfb-developer-login-form .button {
  width: 100%;
  padding: 12px;
  background: #007cba;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
}
.pdfb-developer-login-form .button:hover {
  background: #005a87;
}
.pdfb-login-message {
  margin-top: 15px;
  padding: 10px;
  border-radius: 4px;
  display: none;
}
.pdfb-login-message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
.pdfb-login-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* === Extrait de templates-page.php === */

/* Variables CSS pour la cohérence avec le reste du plugin */
:root {
  --pdf-primary: #007cba; /* Bleu WordPress */
  --pdf-success: #28a745; /* Vert succès */
  --pdf-danger: #dc3545; /* Rouge danger */
  --pdf-warning: #ffc107; /* Jaune warning */
  --pdf-secondary: #6c757d; /* Gris secondaire */
  --pdf-light: #f8f9fa; /* Fond clair */
  --pdf-border: #dee2e6; /* Bordure */
  --pdf-text: #495057; /* Texte principal */
}

.pdfb-template-modal {
  animation: modalFadeIn 0.3s ease-out;
}

.pdfb-template-modal-content {
  animation: modalSlideIn 0.3s ease-out;
}

.pdfb-template-modal-content input[type="checkbox"] {
  width: auto;
  margin: 0;
  accent-color: var(--pdf-primary);
}

.pdfb-template-modal-content select:hover,
.pdfb-template-modal-content input:hover,
.pdfb-template-modal-content textarea:hover {
  border-color: var(--pdf-primary);
}

.pdfb-template-modal-content select:focus,
.pdfb-template-modal-content input:focus,
.pdfb-template-modal-content textarea:focus {
  border-color: var(--pdf-primary);
  -webkit-box-shadow: 0 0 0 2px rgba(0, 123, 186, 0.25);
  -moz-box-shadow: 0 0 0 2px rgba(0, 123, 186, 0.25);
  -ms-box-shadow: 0 0 0 2px rgba(0, 123, 186, 0.25);
  -o-box-shadow: 0 0 0 2px rgba(0, 123, 186, 0.25);
  box-shadow: 0 0 0 2px rgba(0, 123, 186, 0.25);
  outline: none;
}

.button-danger {
  background: var(--pdf-danger) !important;
  border-color: var(--pdf-danger) !important;
  color: #fff !important;
}

.button-danger:hover {
  background: #c82333 !important;
  border-color: #bd2130 !important;
}

.button-success {
  background: var(--pdf-success) !important;
  border-color: var(--pdf-success) !important;
  color: #fff !important;
}

.button-success:hover {
  background: #218838 !important;
  border-color: #1e7e34 !important;
}

.button-warning {
  background: var(--pdf-warning) !important;
  border-color: var(--pdf-warning) !important;
  color: #212529 !important;
}

.button-warning:hover {
  background: #e0a800 !important;
  border-color: #d39e00 !important;
}

.pdfb-gallery-filter-btn.active {
  -webkit-box-shadow: 0 0 0 2px rgba(0, 123, 186, 0.5) !important;
  -moz-box-shadow: 0 0 0 2px rgba(0, 123, 186, 0.5) !important;
  -ms-box-shadow: 0 0 0 2px rgba(0, 123, 186, 0.5) !important;
  -o-box-shadow: 0 0 0 2px rgba(0, 123, 186, 0.5) !important;
  box-shadow: 0 0 0 2px rgba(0, 123, 186, 0.5) !important;
  font-weight: bold !important;
}

/* Styles pour les badges de type de template */
.pdfb-template-type-badge {
  background: var(--pdf-primary) !important;
}

.pdfb-template-type-badge.facture {
  background: #007cba !important;
}
.pdfb-template-type-badge.devis {
  background: #28a745 !important;
}
.pdfb-template-type-badge.commande {
  background: #ffc107 !important;
  color: #212529 !important;
}
.pdfb-template-type-badge.contrat {
  background: #dc3545 !important;
}
.pdfb-template-type-badge.newsletter {
  background: #6f42c1 !important;
}
.pdfb-template-type-badge.autre {
  background: var(--pdf-secondary) !important;
}

/* Styles pour les boutons de filtre de galerie */
.pdfb-gallery-filter-btn {
  font-size: 12px !important;
  padding: 8px 16px !important;
  border-radius: 20px !important;
  transition: all 0.2s ease !important;
}

.pdfb-gallery-filter-btn.facture {
  background: var(--pdf-primary) !important;
  border-color: var(--pdf-primary) !important;
  color: white !important;
}

.pdfb-gallery-filter-btn.devis {
  background: var(--pdf-success) !important;
  border-color: var(--pdf-success) !important;
  color: white !important;
}

.pdfb-gallery-filter-btn.commande {
  background: var(--pdf-warning) !important;
  border-color: var(--pdf-warning) !important;
  color: #212529 !important;
}

.pdfb-gallery-filter-btn.contrat {
  background: var(--pdf-danger) !important;
  border-color: var(--pdf-danger) !important;
  color: white !important;
}

.pdfb-gallery-filter-btn.newsletter {
  background: #6f42c1 !important;
  border-color: #6f42c1 !important;
  color: white !important;
}

/* Styles pour les éléments d'état */
.pdfb-template-status-active {
  color: var(--pdf-success) !important;
}
.pdfb-template-status-inactive {
  color: var(--pdf-secondary) !important;
}
.pdfb-template-status-error {
  color: var(--pdf-danger) !important;
}

/* Styles pour les modals de paramètres */
.pdfb-template-settings-section {
  border: 1px solid var(--pdf-border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  background: var(--pdf-light);
}

.pdfb-template-settings-section h4 {
  color: var(--pdf-text);
  margin-top: 0;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--pdf-primary);
  padding-bottom: 8px;
}

.pdfb-template-settings-field {
  margin-bottom: 15px;
}

.pdfb-template-settings-field label {
  display: block;
  font-weight: 600;
  color: var(--pdf-text);
  margin-bottom: 5px;
}

.pdfb-template-settings-field input[type="text"],
.pdfb-template-settings-field input[type="number"],
.pdfb-template-settings-field textarea,
.pdfb-template-settings-field select {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--pdf-border);
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.pdfb-template-settings-field input:focus,
.pdfb-template-settings-field textarea:focus,
.pdfb-template-settings-field select:focus {
  border-color: var(--pdf-primary);
  box-shadow: 0 0 0 2px rgba(0, 123, 186, 0.25);
  outline: none;
}

/* Styles spécifiques pour la modale des paramètres de template */
#template-settings-modal .pdfb-canvas-modal-container {
  min-height: 500px; /* S'assurer qu'il y a assez d'espace pour le contenu et le footer */
}

#template-settings-modal .pdfb-canvas-modal-footer {
  visibility: visible !important;
  opacity: 1 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 20px 32px !important;
  background: #f8f9fa !important;
  border-top: 1px solid #e1e5e9 !important;
  flex-shrink: 0 !important;
  min-height: 80px !important;
}

.pdfb-template-settings-footer-content {
  flex: 1;
  padding-right: 20px;
}

.pdfb-template-settings-footer-title {
  font-size: 16px;
  font-weight: 600;
  color: #23282d;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pdfb-template-settings-icon {
  font-size: 18px;
}

.pdfb-template-settings-footer-subtitle {
  font-size: 14px;
  color: #6c757d;
  font-style: italic;
}

.pdfb-template-settings-footer-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

/* Styles spécifiques pour forcer l'affichage du footer */
.pdfb-template-settings-modal-footer {
  visibility: visible !important;
  opacity: 1 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 20px 32px !important;
  background: #f8f9fa !important;
  border-top: 1px solid #e1e5e9 !important;
  flex-shrink: 0 !important;
  min-height: 80px !important;
  position: relative !important;
  z-index: 10 !important;
}

/* === Extrait de canvas-monitor-diagnostic.php === */

.card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin: 20px 0;
  padding: 20px;
}

.card h2 {
  margin-top: 0;
  color: #23282d;
}

.widefat {
  border: 1px solid #ddd;
  border-collapse: collapse;
  width: 100%;
}

.widefat td {
    padding: 8px 12px;
    border-bottom: 1px solid #ddd;
    vertical-align: middle;
}

.ul-disc {
  list-style-type: disc;
  padding-left: 20px;
}

.ul-disc li {
  margin: 5px 0;
}

/* === Extrait de admin-editor.php === */

.pdfb-pdf-builder-admin-container {
  margin: 0 -20px -20px;
  padding: 0;
}

.pdfb-pdf-builder-header {
  background: white;
  padding: 20px;
  border-bottom: 1px solid #e5e5e5;
  margin: 0 0 20px;
}

.pdfb-pdf-builder-header h1 {
  margin: 0 0 10px;
}

.pdfb-pdf-builder-root {
  background: white;
  min-height: 600px;
}

.pdfb-pdf-builder-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 600px;
  gap: 20px;
}

/* === Extrait de admin-system-check.php (styles page de vérification système) === */
.wrap h2,
.wrap h3 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.widefat th {
  font-weight: 600;
  background: #f9f9f9;
}

/* === Extrait de settings.php === */

.pdfb-tab-content {
  background: white;
  padding: 20px;
  margin-top: 0;
}

.pdfb-tab-pane {
  display: block;
}

.pdfb-about-box {
  background: #f9f9f9;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 5px;
  margin-top: 20px;
}

.pdfb-about-box ul {
  margin-left: 20px;
}

.pdfb-about-box li {
  margin-bottom: 8px;
}
/* === Extrait de PDF_Builder_Core.php et PDF_Builder_Order_Metabox.php === */
.pdfb-pdf-builder-card {
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.pdfb-pdf-builder-card h3 {
  margin-top: 0;
  color: #23282d;
}
.pdfb-recent-documents-container {
  margin-top: 20px;
}
@keyframes pdfb-pulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}
@keyframes pulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

/* === Maintenance Section Styling === */
.pdfb-system-maintenance-section,
.pdfb-system-backup-section {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.pdfb-system-maintenance-section header,
.pdfb-system-backup-section header {
  background: linear-gradient(135deg, #f5f7fa 0%, #e8ecef 100%);
  padding: 15px 20px;
  border-bottom: 1px solid #ddd;
}

.pdfb-system-maintenance-section header h3,
.pdfb-system-backup-section header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #1d2327;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pdfb-system-maintenance-section .pdfb-system-section-content,
.pdfb-system-backup-section .pdfb-system-section-content {
  padding: 20px;
}

/* === Settings Tabs Navigation Styling === */
.pdfb-nav-tab-wrapper {
  background: #464647;
  border-radius: 12px;
  margin-bottom: 2rem;
  padding: 0;
  box-shadow: 0 4px 6px rgba(102, 126, 234, 0.2);
  overflow: hidden;
  border: none;
}

.pdfb-tabs-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.pdfb-nav-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 16px;
  color: rgba(255, 255, 255, 0.8);
  background: transparent;
  border: none;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: background-color 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}

.pdfb-nav-tab .pdfb-tab-icon {
  font-size: 16px;
}

.pdfb-nav-tab .pdfb-tab-text {
  display: none;
}

.pdfb-nav-tab:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.pdfb-nav-tab.pdfb-nav-tab-active {
  background: rgba(255, 255, 255, 0.25);
  color: white;
}

/* Responsive: Show text on larger screens */
@media (min-width: 768px) {
  .pdfb-nav-tab {
    gap: 8px;
    padding: 14px 18px;
  }

  .pdfb-nav-tab .pdfb-tab-text {
    display: inline;
  }
}

/* ============================================================
   CLASSES MANQUANTES / ALIAS — settings pages
   ============================================================ */

/* Wrapper principal du contenu des onglets */
.settings-content-wrapper {
  margin-top: 0;
}

/* Section de chaque onglet (ex: settings-general, settings-contenu…) */
.settings-section {
  margin: 0;
}

/* Grille de cartes dans un onglet (alias de .pdfb-settings-content) */
.settings-content {
  display: grid;
  gap: 1.5rem;
}

/* Alias pdfib- pour les classes settings */
.pdfib-settings-section {
  margin: 0 0 24px;
}

.pdfib-settings-section__header {
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--pdf-primary, #007cba);
}

.pdfib-settings-section__header h3 {
  margin: 0;
  font-size: 1.2em;
  font-weight: 600;
  color: var(--pdf-text, #1d2327);
}

/* Carte settings avec préfixe pdfib- (alias de .pdfb-settings-card) */
.pdfib-settings-card {
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  padding: 20px;
  margin-bottom: 20px;
}

.pdfib-settings-card--security {
  border-left: 4px solid var(--pdf-primary, #007cba);
}

.pdfib-settings-card--gdpr {
  border-left: 4px solid #6f42c1;
}

/* Badge de statut (pdfib-status-badge) */
.pdfib-status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  background: var(--pdf-secondary, #6c757d);
}

.pdfib-status-badge.active,
.pdfib-status-badge--active {
  background: var(--pdf-success, #28a745);
}

.pdfib-status-badge.inactive,
.pdfib-status-badge--inactive {
  background: var(--pdf-secondary, #6c757d);
}

/* Panneau GDPR */
.pdfib-gdpr-panel {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
}

.pdfib-gdpr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.pdfib-gdpr-actions__group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Header de section canvas */
.pdfib-canvas-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #dee2e6;
}

.pdfib-canvas-section-header h3 {
  margin: 0;
  font-size: 1.1em;
  font-weight: 600;
}

/* Section canvas onglet contenu */
.contenu-canvas-section {
  margin-bottom: 24px;
}

.contenu-settings {
  /* wrapper générique de l'onglet contenu */
  margin-bottom: 0;
}

/* Section PDF config */
.pdf-section {
  margin-bottom: 24px;
}

/* Info-box inline */
.info-box {
  padding: 10px 14px;
  background: #fff3cd;
  border: 1px solid #f39c12;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.5;
  color: #664d03;
}

/* Licence */
.license-main-title {
  font-size: 1.4em;
  font-weight: 700;
  color: var(--pdf-text, #1d2327);
  margin-bottom: 16px;
}

.premium-features-section {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 12px;
  padding: 24px;
  color: #fff;
  margin-top: 24px;
}

.premium-features-section h3,
.premium-features-section h4 {
  color: #fff;
}

/* Toggle-switch (alias de .pdfb-toggle-switch) */
.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 500;
  color: #333;
  font-size: 14px;
}

.toggle-switch input[type="checkbox"] {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  background: #ccc;
  border-radius: 12px;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.toggle-slider::after {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

input[type="checkbox"]:checked + .toggle-slider {
  background: var(--pdf-primary, #007cba);
}

input[type="checkbox"]:checked + .toggle-slider::after {
  transform: translateX(20px);
}

/* Responsive settings-content */
@media (max-width: 768px) {
  .settings-content {
    grid-template-columns: 1fr;
  }
  .pdfib-gdpr-actions {
    flex-direction: column;
  }
}
