
/* ================================================================
   DIRECT-XML — THEME ISOLATION RESET (Phase 1.1)
   Disconnects ALL plugin typography from the WP active theme.
   Base: Arial, 15px, #333, line-height 1.5
   ================================================================ */

/* --- Root reset on the plugin wrapper --- */
/* Exclude icon fonts (Ionicons, FontAwesome, etc.) from the font reset */
.dxml-plugin,
.dxml-plugin *:not(.ion):not([class*="ion-"]):not([class*="fa-"]):not([class*="icon-"]),
.dxml-plugin *:not(.ion):not([class*="ion-"]):not([class*="fa-"]):not([class*="icon-"])::before,
.dxml-plugin *:not(.ion):not([class*="ion-"]):not([class*="fa-"]):not([class*="icon-"])::after {
  font-family: Arial, Helvetica, sans-serif !important;
  box-sizing: border-box;
}
.dxml-plugin *{
  box-sizing: border-box;
}
.dxml-plugin {
  font-size: 15px !important;
  line-height: 1.5 !important;
  color: #333 !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Icons: grey by default, black on hover --- */
.dxml-plugin .ion,
.dxml-plugin [class*="ion-"],
.dxml-plugin [class*="fa-"],
.dxml-plugin [class*="icon-"] {
  color: #999 !important;
  transition: color 0.2s ease;
  font-size: inherit;
}
.dxml-plugin .ion:hover,
.dxml-plugin [class*="ion-"]:hover,
.dxml-plugin [class*="fa-"]:hover,
.dxml-plugin [class*="icon-"]:hover {
  color: #222 !important;
}
/* --- Form header icons (back arrow + share) — larger --- */
.dxml-plugin .dxml-sharearticle {
  font-size: 32px !important;
}
.dxml-plugin .dxml-iconback {
  font-size: 32px !important;
}
/* --- Complex field icon (eraser / clean) — larger & darker --- */
.dxml-plugin .dxml-contchampico {
  margin-left: 8px !important;
}
.dxml-plugin .dxml-iconchamp {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.dxml-plugin .dxml-iconchamp .ion,
.dxml-plugin .dxml-iconchamp [class*="ion-"],
.dxml-plugin .dxml-iconchamp [class*="fa-"] {
  font-size: 22px !important;
  color: #444 !important;
  line-height: 1 !important;
  vertical-align: middle !important;
  cursor: pointer;
}
.dxml-plugin .dxml-iconchamp .ion:hover,
.dxml-plugin .dxml-iconchamp [class*="ion-"]:hover,
.dxml-plugin .dxml-iconchamp [class*="fa-"]:hover {
  color: #111 !important;
}

/* --- Character counters (compteurs de signes) --- */
.dxml-plugin .dxml-compteur {
  border-radius: 6px !important;
  overflow: hidden;
}
.dxml-plugin .dxml-comptsign {
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  line-height: 27px !important;
  text-align: center !important;
  margin: 0 !important;
  padding: 0 !important;
}
.dxml-plugin .colorError {
  background-color: #E53935 !important;
  border-radius: 6px !important;
  color: #fff !important;
}
.dxml-plugin .colorAccepted {
  background-color: #FF8000 !important;
  border-radius: 6px !important;
  color: #fff !important;
}
.dxml-plugin .colorOkay {
  background-color: #4CD964 !important;
  border-radius: 6px !important;
  color: #fff !important;
}

/* --- Complex field style buttons (B, i, style tags) --- */
.dxml-plugin .dxml-champstyle {
  width: 30px !important;
  height: 30px !important;
  background-color: #808080 !important;
  color: #fff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 6px !important;
  margin: 3px 5px !important;
  cursor: pointer;
}
.dxml-plugin .dxml-champstyle:hover {
  background-color: #555 !important;
}
.dxml-plugin .dxml-champbold {
  font-size: 16px !important;
  font-weight: 700 !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
  color: #fff !important;
}
.dxml-plugin .dxml-champital {
  font-size: 16px !important;
  font-weight: 500 !important;
  font-style: italic !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
  color: #fff !important;
}
/* Style tag buttons (Inter, etc.) — uniform color from parent */
.dxml-plugin .dxml-champstyle2 {
  height: 30px !important;
  border-radius: 6px !important;
  margin: 3px 5px !important;
  overflow: hidden !important;
  opacity: 1 !important;
}
.dxml-plugin .dxml-champstyle2:hover {
  opacity: 0.85 !important;
}
.dxml-plugin .dxml-champstylebouton {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #fff !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 30px !important;
  text-align: center !important;
  border-radius: 6px !important;
}

/* --- Total character counter — center text --- */
.dxml-plugin .dxml-comptotal {
  align-items: center !important;
  border-radius: 6px !important;
}
.dxml-plugin .dxml-textcompgen {
  line-height: 32px !important;
  text-align: center !important;
  width: 100% !important;
}
/* --- Save button — green like OK buttons --- */
.dxml-plugin .dxml-boutvalart,
.dxml-plugin p.dxml-boutvalart {
  background-color: #4CD964 !important;
  border-color: #4CD964 !important;
  color: #fff !important;
  border-radius: 8px !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
}
.dxml-plugin .dxml-boutvalart:hover,
.dxml-plugin p.dxml-boutvalart:hover {
  background-color: #3AAF4C !important;
  border-color: #3AAF4C !important;
  color: #fff !important;
}

/* --- Headings --- */
.dxml-plugin h1 { font-size: 26px !important; font-weight: 700 !important; margin: 0 0 10px 0 !important; line-height: 1.3 !important; color: #333 !important; }
.dxml-plugin h2 { font-size: 22px !important; font-weight: 700 !important; margin: 0 0 8px 0 !important; line-height: 1.3 !important; color: #333 !important; }
.dxml-plugin h3 { font-size: 18px !important; font-weight: 600 !important; margin: 0 0 6px 0 !important; line-height: 1.4 !important; color: #333 !important; }
.dxml-plugin h4 { font-size: 16px !important; font-weight: 600 !important; margin: 0 0 4px 0 !important; line-height: 1.4 !important; color: #333 !important; }
.dxml-plugin h5 { font-size: 15px !important; font-weight: 600 !important; margin: 0 0 4px 0 !important; line-height: 1.4 !important; color: #333 !important; }
.dxml-plugin h6 { font-size: 14px !important; font-weight: 600 !important; margin: 0 0 4px 0 !important; line-height: 1.4 !important; color: #333 !important; }

/* --- Paragraphs, labels, spans, links --- */
.dxml-plugin p,
.dxml-plugin label,
.dxml-plugin span,
.dxml-plugin div,
.dxml-plugin li,
.dxml-plugin td,
.dxml-plugin th {
  font-size: inherit !important;
  line-height: inherit !important;
  color: inherit !important;
}
.dxml-plugin a {
  font-size: inherit !important;
  color: #0073aa !important;
  text-decoration: none !important;
}
.dxml-plugin a:hover {
  color: #005177 !important;
}

/* --- Form elements --- */
.dxml-plugin input[type="text"],
.dxml-plugin input[type="email"],
.dxml-plugin input[type="url"],
.dxml-plugin input[type="password"],
.dxml-plugin input[type="search"],
.dxml-plugin input[type="number"],
.dxml-plugin input[type="tel"],
.dxml-plugin input[type="date"],
.dxml-plugin select,
.dxml-plugin textarea {
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 15px !important;
  line-height: 1.5 !important;
  color: #333 !important;
  border: 1px solid #ced4da !important;
  border-radius: 4px !important;
  padding: 6px 10px !important;
  background-color: #fff !important;
  max-width: 100%;
}
.dxml-plugin input:focus,
.dxml-plugin select:focus,
.dxml-plugin textarea:focus {
  border-color: #80bdff !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.15) !important;
}

/* --- Buttons base --- */
.dxml-plugin .btn,
.dxml-plugin button {
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  text-align: center !important;
  padding: 8px 20px !important;
}

/* --- Save / OK buttons → green --- */
.dxml-plugin .btn-success,
.dxml-plugin .btn-primary,
.dxml-plugin .dxml-butonactivtok,
.dxml-plugin .dxml-btn-save {
  background-color: #4CD964 !important;
  border-color: #4CD964 !important;
  color: #fff !important;
}
.dxml-plugin .btn-success:hover,
.dxml-plugin .btn-primary:hover,
.dxml-plugin .dxml-butonactivtok:hover,
.dxml-plugin .dxml-btn-save:hover {
  background-color: #3AAF4C !important;
  border-color: #3AAF4C !important;
  color: #fff !important;
}

/* ─── Bootbox buttons — harmonised neutral grey (matching confirm modals) ─── */
body .bootbox .btn,
body .bootbox button.btn,
body .modal .modal-footer .btn {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  padding: 10px 28px !important;
  min-width: 120px !important;
  border: none !important;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none !important;
  line-height: 1.4 !important;
}
/* OK / Confirm button — neutral grey (not green) */
body .bootbox .btn-primary,
body .bootbox .btn-success,
body .bootbox .bootbox-accept {
  background-color: #e0e0e0 !important;
  border-color: #e0e0e0 !important;
  color: #333 !important;
}
body .bootbox .btn-primary:hover,
body .bootbox .btn-success:hover,
body .bootbox .bootbox-accept:hover {
  background-color: #d0d0d0 !important;
  border-color: #d0d0d0 !important;
  color: #222 !important;
  transform: translateY(-1px);
}
body .bootbox .btn-primary:active,
body .bootbox .btn-success:active,
body .bootbox .bootbox-accept:active {
  background-color: #bbb !important;
  color: #222 !important;
  transform: none;
}
/* Cancel button — lighter grey */
body .bootbox .btn-default,
body .bootbox .btn-secondary,
body .bootbox .bootbox-cancel {
  background-color: #f0f0f0 !important;
  border-color: #f0f0f0 !important;
  color: #666 !important;
}
body .bootbox .btn-default:hover,
body .bootbox .btn-secondary:hover,
body .bootbox .bootbox-cancel:hover {
  background-color: #e0e0e0 !important;
  border-color: #e0e0e0 !important;
  color: #333 !important;
}
/* Body text — tall, centred, padded */
body .bootbox .bootbox-body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  color: #333 !important;
  text-align: center !important;
  min-height: 80px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 30px 40px !important;
  line-height: 1.6 !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
}

/* ─── Harmonised Confirm/Alert Modals (matching AI modal style) ──── */

/* Card container — white, rounded, no border, no padding */
.dxml-divalerte,
.dxml-plugin .dxml-divalerte {
  border-radius: 12px !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3) !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  background: #fff !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Bootstrap .modal-content — ensure rounded corners, no border, no internal padding */
.dxml-plugin .modal-dialog .dxml-divalerte.modal-content,
.dxml-plugin .dxml-divalerte.modal-content,
.dxml-divalerte.modal-content {
  border: none !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Force dxml-plugin internal modals to be full-viewport centered overlays
   (they are nested inside Bootstrap grid columns which constrain positioning) */
.dxml-plugin .modal.fade,
.dxml-plugin .modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 10500 !important;
  overflow: hidden;
}
.dxml-plugin .modal.fade.in,
.dxml-plugin .modal.in,
.dxml-plugin .modal.show {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.dxml-plugin .modal .modal-dialog,
.dxml-plugin .modal .modal-dialog-centered {
  margin: 0 auto !important;
  max-width: 500px !important;
  width: 90% !important;
}

/* Inner wrapper — remove old border + padding */
.dxml-divbordactive,
.dxml-plugin .dxml-divbordactive {
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
}
.dxml-divbordalerte,
.dxml-plugin .dxml-divbordalerte {
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
}

/* Close button area (top-right ×) */
.dxml-divmodalx {
  height: auto !important;
  text-align: right !important;
  padding: 16px 20px 0 20px !important;
}
/* Hide the ion-close-circled icon glyph, replace with pure × character */
.dxml-logoalertex,
.dxml-logoalertex.ion-close-circled,
.dxml-logoalertex.ion.ion-close-circled {
  font-size: 0 !important;
  color: transparent !important;
  display: inline-block !important;
  width: 28px !important;
  height: 28px !important;
  position: relative !important;
  cursor: pointer;
  vertical-align: middle;
  background: none !important;
  border: none !important;
}
/* Draw a clean × via ::before */
.dxml-logoalertex::before {
  content: "\00D7" !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 28px !important;
  color: #bbb !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  line-height: 1 !important;
  transition: color 0.2s;
}
.dxml-logoalertex:hover::before {
  color: #666 !important;
}
.dxml-logoalertex:active::before {
  color: #333 !important;
}

/* Message text area — taller, centered, text contained with margins */
.dxml-divtxtalert {
  min-height: 120px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 30px 40px 32px 40px !important;
}
.dxml-txtalerte,
.dxml-txtalerte.myFont {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  color: #333 !important;
  text-align: center !important;
  line-height: 1.6 !important;
  max-width: 100% !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
}

/* Footer / button area — grey background bar, flush to bottom */
.dxml-divboutmodal {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  padding: 16px 24px !important;
  margin: 0 !important;
  background: #fafafa !important;
  border-top: 1px solid #eee !important;
  border-radius: 0 0 12px 12px !important;
}
/* Also for alert variant */
.dxml-divbutonalert {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  padding: 16px 24px !important;
  background: #fafafa !important;
  border-top: 1px solid #eee !important;
  flex-direction: row !important;
}

/* OK / action button — neutral grey, matching AI cancel style */
.dxml-butonactivtok,
.dxml-plugin .dxml-butonactivtok,
a.dxml-butonactivtok {
  width: auto !important;
  min-width: 120px !important;
  height: auto !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  background-color: #e0e0e0 !important;
  color: #333 !important;
  padding: 10px 28px !important;
  border-radius: 8px !important;
  border: none !important;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none !important;
  display: inline-block !important;
  text-align: center !important;
  line-height: 1.4 !important;
}
.dxml-butonactivtok:hover,
.dxml-plugin .dxml-butonactivtok:hover,
a.dxml-butonactivtok:hover {
  background-color: #d0d0d0 !important;
  color: #222 !important;
  transform: translateY(-1px);
}
.dxml-butonactivtok:active,
a.dxml-butonactivtok:active {
  background-color: #bbb !important;
  color: #222 !important;
  transform: none;
}

/* Alert OK button (red/warning variant) */
.dxml-butonalertok,
.dxml-plugin .dxml-butonalertok,
a.dxml-butonalertok {
  width: auto !important;
  min-width: 120px !important;
  height: auto !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  background-color: #e0e0e0 !important;
  color: #333 !important;
  padding: 10px 28px !important;
  border-radius: 8px !important;
  border: none !important;
  margin: 0 !important;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none !important;
  display: inline-block !important;
  text-align: center !important;
  line-height: 1.4 !important;
}
.dxml-butonalertok:hover,
a.dxml-butonalertok:hover {
  background-color: #d0d0d0 !important;
  color: #222 !important;
}

/* Bouton OK text in dialogs — ensure white → dark on grey bg */
.dxml-divboutmodal a:not([href]):not([tabindex]) {
  color: #333 !important;
  text-decoration: none !important;
}
.dxml-divboutmodal a,
.dxml-divboutmodal a:hover,
.dxml-divboutmodal a:focus {
  color: #333 !important;
  text-decoration: none !important;
}

/* --- Field title bar (label + counter) — spacing below --- */
.dxml-plugin .dxml-divtitrechamp {
  margin-bottom: 6px !important;
}

/* --- Duplicate "+" button — larger & centered --- */
.dxml-plugin .dxml-iconaddtext {
  font-size: 32px !important;
  color: #999 !important;
  cursor: pointer;
  transition: color 0.2s ease;
  display: block;
  text-align: center;
}
.dxml-plugin .dxml-iconaddtext:hover {
  color: #333 !important;
}

/* --- Phase 1.1 — WYSIWYG contenteditable editor --- */
.dxml-plugin .dxml-wysiwyg-editor {
  min-height: 180px;
  max-height: none;
  overflow-y: auto;
  resize: vertical;
  padding: 8px 12px !important;
  border: 1px solid #ced4da !important;
  border-radius: 5px !important;
  background-color: #fff !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 15px !important;
  line-height: 1.5 !important;
  color: #333 !important;
  text-align: left !important;
  white-space: pre-wrap;
  word-wrap: break-word;
  outline: none;
  cursor: text;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.dxml-plugin .dxml-wysiwyg-editor:focus {
  border-color: #80bdff !important;
  box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25) !important;
}
.dxml-plugin .dxml-wysiwyg-editor:empty::before {
  content: attr(data-placeholder);
  color: #aaa;
  font-style: italic;
}
/* Hidden textarea (still in DOM for FormData) */
.dxml-plugin .dxml-wysiwyg-hidden {
  display: none !important;
}

/* ================================================================
   END RESET — Below: plugin-specific styles
   ================================================================ */

/* --- .myFont override (was theme-dependent) --- */
.dxml-plugin .myFont {
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 15px !important;
}

.dxml-txtemplate {
  font-weight: 400;
  font-size: 18px;
  margin: 0;
}
.dxml-datetemplate {
  text-align: center;
  margin-bottom: 0px;
  margin-left: 10px;
  font-weight: 400;
  font-size: 14px;
  min-width: 100px;
}
.dxml-txtcontact {
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  padding-bottom: 0px;
  margin-bottom: 0px;
}
.dxml-widget-style {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
  border-radius: 5px;
  border: 1px solid #ced4da !important;
}
.dxml-plugin .dxml-boutonselect,
.dxml-plugin a.dxml-boutonselect {
  height: 30px;
  width: 150px;
  background-color: #2196F3 !important;
  border-color: #2196F3 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  margin: 0px 10px;
  border-radius: 8px !important;
  padding: 0 10px !important;
  color: #fff !important;
  line-height: 30px !important;
  text-align: center !important;
  display: inline-block !important;
}
.dxml-plugin .dxml-boutonselect:active,
.dxml-plugin a.dxml-boutonselect:active {
  background-color: #0D47A1 !important;
}
.dxml-plugin .dxml-boutonselect:hover,
.dxml-plugin a.dxml-boutonselect:hover {
  background-color: #1565C0 !important;
  color: #fff !important;
}

/* Image field: remove double margin when title is inside dxml-divimage */
.dxml-divimage .dxml-divtitrechamp {
  margin-top: 0;
}

.dxml-plugin .modal-backdrop {
  z-index: -1 !important;
  background-color: inherit !important;
}

.dxml-plugin .champFlex {
  display: flex;
}

.dxml-cadrepage {
  border-style: solid;
  border-color: rgba(28, 28, 28, 0.10) !important;
  z-index: 10;
  position: relative;
  overflow: hidden;
  background-image: url("images/page00.jpg");
  width: 827px;
  height: 585px;
  background-size: cover;
  margin: 0px;
  padding: 0px;
  border-width: 1px;
}

@media (max-width: 991px) {
  .dxml-divpage02 {}
  .dxml-cadrepage {
    width: 600px;
    height: 424px;
    background-size: cover;
  }
}

@media (max-width: 767px) {
  .dxml-divpage02 {}
  .dxml-cadrepage {
    width: 429px;
    height: 304px;
    background-size: cover;
  }
}

@media (max-width: 575px) {
  .dxml-divpage02 {}
  .dxml-cadrepage {
    width: 150px;
    height: 106px;
    background-size: cover;
  }
}

body .modal .modal-dialog .modal-content {
  background-clip: padding-box;
  background-color: #FFFFFF;
  border: none !important;
  border-radius: 12px !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3) !important;
  outline: 0 none;
  position: relative;
  overflow: hidden !important;
}

.dxml-plugin .btn-lg, .dxml-plugin .btn-group-lg > .btn {
  padding: 10px 16px;
  border-radius: 6px;
}

.dxml-plugin .btn {
  display: inline-block;
  margin-bottom: 0;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  touch-action: manipulation;
  cursor: pointer;
  user-select: none;
  background-image: none;
  border: 1px solid transparent;
  border-radius: 8px;
}

.dxml-plugin .modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100% !important;
  pointer-events: auto;
  background-color: #fff;
  background-clip: padding-box;
  border: none !important;
  border-radius: 12px !important;
  outline: 0;
  margin: 0 !important;
  overflow: hidden !important;
}

/* ─── Phase 1.1 fix : modal-backdrop is injected into <body> by Bootstrap,
   outside .dxml-plugin — so we target it at body level ─────────────────── */
body > .modal-backdrop {
  z-index: -1 !important;
  background-color: transparent !important;
  opacity: 0 !important;
}

/* ===== Bootbox / modal dialogs — harmonised design (matching AI modal) ===== */
body .bootbox .modal-dialog {
  display: flex !important;
  align-items: center !important;
  min-height: calc(100vh - 60px) !important;
  margin: 30px auto !important;
  max-width: 500px !important;
}
/* Card — white, rounded 12px, strong shadow, NO internal padding */
body .bootbox .modal-content {
  border-radius: 12px !important;
  border: none !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3) !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  overflow: hidden !important;
  background: #fff !important;
}
/* Header (contains close ×) — white bg, no border */
body .bootbox .modal-header {
  background: #fff !important;
  border-bottom: none !important;
  padding: 16px 20px 0 20px !important;
}
/* Body — tall centred text area (min-height handled in .bootbox-body above) */
body .bootbox .modal-body {
  padding: 16px 20px 0 20px !important;
  background: #fff !important;
  position: relative !important;
}
/* When close button is inside modal-body (no title), position it top-right */
body .bootbox .modal-body > .bootbox-close-button {
  position: absolute !important;
  top: 12px !important;
  right: 16px !important;
  float: none !important;
  z-index: 10 !important;
  margin-top: 0 !important;
}
/* Footer — grey bar flush to bottom with rounded corners */
body .bootbox .modal-footer {
  background: #fafafa !important;
  border-top: 1px solid #eee !important;
  border-radius: 0 0 12px 12px !important;
  justify-content: center !important;
  padding: 16px 24px !important;
  margin: 0 !important;
  gap: 12px !important;
}
/* Close button (×) — grey on white, no background block */
body .bootbox .close,
body .bootbox button.close,
body .bootbox .bootbox-close-button,
body .bootbox a.bootbox-close-button {
  opacity: 1 !important;
  font-size: 0 !important;              /* hide dashicons text */
  color: transparent !important;
  text-shadow: none !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
  float: right !important;
  display: inline-block !important;
  width: 28px !important;
  height: 28px !important;
  position: relative !important;
  cursor: pointer;
  transition: color 0.2s;
  text-decoration: none !important;
}
/* Draw × via ::before (same as dxml-logoalertex) */
body .bootbox .close::before,
body .bootbox .bootbox-close-button::before {
  content: "\00D7" !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 28px !important;
  color: #bbb !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  line-height: 1 !important;
  transition: color 0.2s;
}
body .bootbox .close:hover::before,
body .bootbox .bootbox-close-button:hover::before {
  color: #666 !important;
}
body .bootbox .close:active::before,
body .bootbox .bootbox-close-button:active::before {
  color: #333 !important;
}

/* ─── Exception: dialog_template_box / dialog_field_box_display are EDIT modals,
   not simple confirms — restore standard layout for them ─── */
body .bootbox.dialog_template_box .modal-dialog,
body .bootbox.dialog_template_post_link .modal-dialog,
body .bootbox.dialog_field_box_display .modal-dialog {
  max-width: 900px !important;
}
body .bootbox.dialog_template_box .modal-content,
body .bootbox.dialog_template_post_link .modal-content,
body .bootbox.dialog_field_box_display .modal-content {
  padding: 20px !important;
}
body .bootbox.dialog_template_box .modal-body,
body .bootbox.dialog_template_post_link .modal-body,
body .bootbox.dialog_field_box_display .modal-body {
  padding: 0 !important;
  position: static !important;
}
body .bootbox.dialog_template_box .bootbox-body,
body .bootbox.dialog_template_post_link .bootbox-body,
body .bootbox.dialog_field_box_display .bootbox-body {
  min-height: auto !important;
  display: block !important;
  padding: 0 !important;
  text-align: left !important;
}
body .bootbox.dialog_template_box .modal-footer,
body .bootbox.dialog_template_post_link .modal-footer,
body .bootbox.dialog_field_box_display .modal-footer {
  background: transparent !important;
  border-top: none !important;
  border-radius: 0 !important;
}
/* Restore close button for edit modals — use dashicons normally */
body .bootbox.dialog_template_box .bootbox-close-button,
body .bootbox.dialog_template_post_link .bootbox-close-button,
body .bootbox.dialog_field_box_display .bootbox-close-button {
  font-size: 20px !important;
  color: #999 !important;
  width: auto !important;
  height: auto !important;
}
body .bootbox.dialog_template_box .bootbox-close-button::before,
body .bootbox.dialog_template_post_link .bootbox-close-button::before,
body .bootbox.dialog_field_box_display .bootbox-close-button::before {
  content: none !important;
}

/* ─── Phase 1.1 fix : template zone overlay positioning ─────────────────── */
.dxml-plugin .dxml-cadrepage {
  position: relative !important;
  overflow: visible !important;
}
.dxml-plugin #template_zone_region_front {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  margin: 0 !important;
  z-index: 20;
}
.dxml-plugin #one_template_zone {
  position: absolute !important;
  margin-top: 0 !important;
  opacity: 0.15;
  cursor: pointer;
  z-index: 21;
}
.dxml-plugin #one_template_zone:hover {
  opacity: 0.35;
  background-color: #ff0000;
  border-color: #ff0000;
}

/* ===== Zone click transitions (Phase 1.1) ===== */
/* Transitions handled via jQuery.animate() in front.js */

/* ===== Chemin de fer : reduce gap between thumbnail and section number ===== */
.dxml-plugin .dxml-control2-1 {
  align-items: center;
}
.dxml-plugin .dxml-posecdf {
  height: auto;
  padding: 2px 5px 4px 5px;
  gap: 1px;
  align-items: center;
}
.dxml-plugin .dxml-posecdf span.actAsDiv.grpelem {
  height: 0;
  overflow: hidden;
  line-height: 0;
  font-size: 0 !important;
}
.dxml-plugin .dxml-nbrcdf {
  margin: 0;
  padding: 2px 0 0 0;
  line-height: 1.2;
}
