
/* ================================================================
   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 icons (wand + printer) — larger & darker --- */
.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-"] {
  font-size: 24px !important;
  color: #333 !important;
  line-height: 1 !important;
  vertical-align: middle !important;
}
.dxml-plugin .dxml-iconchamp .ion:hover,
.dxml-plugin .dxml-iconchamp [class*="ion-"]:hover {
  color: #000 !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: #333 !important;
  color: #fff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 6px !important;
  margin: 8px 5px !important;
  cursor: pointer;
}
.dxml-plugin .dxml-champstyle:hover {
  background-color: #111 !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: 8px 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;
  background-color: inherit !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;
}

/* --- Also target buttons outside .dxml-plugin (bootbox modals in body) --- */
body .bootbox .btn,
body .bootbox button,
body .modal .modal-footer .btn {
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  padding: 8px 28px !important;
  min-width: 80px !important;
}
body .bootbox .btn-primary,
body .bootbox .btn-success,
body .bootbox .bootbox-accept,
body .modal .btn-primary {
  background-color: #4CD964 !important;
  border-color: #4CD964 !important;
  color: #fff !important;
}
body .bootbox .btn-primary:hover,
body .bootbox .btn-success:hover,
body .bootbox .bootbox-accept:hover,
body .modal .btn-primary:hover {
  background-color: #3AAF4C !important;
  border-color: #3AAF4C !important;
  color: #fff !important;
}
body .bootbox .btn-default,
body .bootbox .btn-secondary,
body .bootbox .bootbox-cancel,
body .modal .btn-secondary {
  background-color: #e0e0e0 !important;
  border-color: #e0e0e0 !important;
  color: #333 !important;
}
body .bootbox .btn-default:hover,
body .bootbox .btn-secondary:hover,
body .bootbox .bootbox-cancel:hover,
body .modal .btn-secondary:hover {
  background-color: #ccc !important;
  border-color: #ccc !important;
}
body .bootbox .bootbox-body,
body .modal .modal-body {
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 15px !important;
  color: #333 !important;
  text-align: center !important;
  padding: 15px 10px !important;
}

/* --- Custom dialog buttons (dxml-butonactivtok / dxml-butonalertok) --- */
.dxml-butonactivtok {
  width: 100px;
  height: 40px;
  font-weight: 700;
  font-size: 16px;
  background-color: #4CD964;
  padding: 5px 5px;
  border-radius: 8px;
  color: #fff;
}
.dxml-butonactivtok:hover {
  background-color: #3AAF4C !important;
  color: #fff !important;
}
.dxml-butonalertok {
  width: 100px;
  height: 40px;
  font-weight: 700;
  font-size: 16px;
  background-color: #4CD964 !important;
  border-radius: 8px !important;
  color: #fff !important;
  margin-right: 40%;
  margin-left: 40%;
  padding: 5px 5px;
}
.dxml-butonalertok:hover {
  background-color: #3AAF4C !important;
  color: #fff !important;
}

/* --- Custom dialog styling --- */
.dxml-divalerte,
.dxml-plugin .dxml-divalerte {
  border-radius: 14px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12) !important;
  border: none !important;
}
.dxml-divbordactive,
.dxml-plugin .dxml-divbordactive {
  border-radius: 12px !important;
}
.dxml-divbordalerte,
.dxml-plugin .dxml-divbordalerte {
  border-radius: 12px !important;
}
.dxml-txtalerte {
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  color: #333 !important;
}

/* --- Bouton OK text in dialogs --- */
.dxml-divboutmodal a:not([href]):not([tabindex]) {
  color: white;
  text-decoration: none;
}

/* --- Phase 1.1 — WYSIWYG contenteditable editor --- */
.dxml-plugin .dxml-wysiwyg-editor {
  min-height: 180px;
  max-height: 400px;
  overflow-y: auto;
  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-bottom: 0px;
}
.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: #4CD964 !important;
  border-color: #4CD964 !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: #2E9E3E !important;
}
.dxml-plugin .dxml-boutonselect:hover,
.dxml-plugin a.dxml-boutonselect:hover {
  background-color: #3AAF4C !important;
  color: #fff !important;
}

.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: 0px solid black;
  border-radius: 13px !important;
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
  outline: 0 none;
  position: relative;
}

.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%;
  pointer-events: auto;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid rgba(0, 0, 0, .2);
  border-radius: .3rem;
  outline: 0;
  margin: 5%;
  max-width: 90%;
}

/* ─── 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 centering (Phase 1.1) ===== */
body .bootbox .modal-dialog,
body .modal .modal-dialog {
  display: flex !important;
  align-items: center !important;
  min-height: calc(100vh - 60px) !important;
  margin: 30px auto !important;
  max-width: 500px !important;
}
body .bootbox .modal-content,
body .modal .modal-content {
  border-radius: 12px !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12) !important;
  padding: 20px !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}
body .bootbox .modal-footer,
body .modal .modal-footer {
  border-top: none !important;
  justify-content: center !important;
  padding: 10px 0 5px 0 !important;
}
body .bootbox .close,
body .modal .close {
  opacity: 0.5 !important;
  font-size: 20px !important;
}
body .bootbox .close:hover,
body .modal .close:hover {
  opacity: 0.8 !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;
}
