/* Popup RéservPro natif pour l’éditeur de service. */
html.rp-popup-open,
body.rp-popup-open,
html.rp-ajax-popup-open,
body.rp-ajax-popup-open {
  overflow: hidden !important;
}

.rp-service-popup[hidden] {
  display: none !important;
}

.rp-service-popup {
  position: fixed;
  z-index: 100000;
  inset: 0;
  box-sizing: border-box;
  padding: 10px;
  font-family: Arial, Helvetica, sans-serif;
}

.rp-service-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 38, 52, .48);
  backdrop-filter: blur(2px);
}

.rp-service-popup__panel {
  --rp-popup-primary: var(--rp-account-primary, #1e6ba5);
  position: fixed;
  z-index: 1;
  top: 10px;
  left: 10px;
  display: flex;
  width: calc(100vw - 20px);
  height: calc(100vh - 20px);
  height: calc(100dvh - 20px);
  max-width: calc(100vw - 4px);
  max-height: calc(100vh - 4px);
  max-height: calc(100dvh - 4px);
  overflow: hidden;
  flex-direction: column;
  box-sizing: border-box;
  min-width: 300px;
  min-height: 300px;
  border: 1px solid #c9dce6;
  border-radius: 16px;
  color: #173d4b;
  background: #fff;
  box-shadow: 0 24px 70px rgba(16, 48, 66, .3);
}

.rp-service-popup__header {
  position: relative;
  z-index: 3;
  display: flex;
  min-height: 66px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-sizing: border-box;
  padding: 9px 12px 9px 14px;
  border-bottom: 1px solid #d5e3ea;
  background: #fff;
  box-shadow: 0 5px 16px rgba(25, 62, 85, .08);
}

.rp-service-popup__identity {
  display: flex;
  min-width: 0;
  max-width: calc(100% - 100px);
  flex: 1 1 auto;
  align-items: center;
  gap: 11px;
}

.rp-service-popup__identity > div {
  min-width: 0;
}

.rp-service-popup__title-icon {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 10px;
  color: #087ca7;
  background: #e8f5f9;
  font-size: 17px;
}

.rp-service-popup__eyebrow {
  display: block;
  margin-bottom: 2px;
  color: #66808c;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  line-height: 1.15;
  text-transform: uppercase;
}

.rp-service-popup__identity h2 {
  overflow: hidden;
  margin: 0;
  color: #193f50;
  font-size: clamp(17px, 2vw, 23px);
  font-weight: 800;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rp-service-popup__tools {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
}

.rp-popup-icon-action {
  display: inline-grid !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px;
  flex: 0 0 40px;
  place-items: center;
  box-sizing: border-box;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #c5d9e2;
  border-radius: 9px;
  color: #1e6b91 !important;
  background: #fff !important;
  font: inherit;
  font-size: 15px !important;
  line-height: 1;
  text-decoration: none !important;
  cursor: pointer;
  touch-action: none;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.rp-popup-icon-action:hover,
.rp-popup-icon-action:focus-visible {
  border-color: #78adc2;
  color: #0c5575 !important;
  background: #e8f4f8 !important;
  outline: 0;
  transform: translateY(-1px);
}

.rp-popup-icon-action[data-rp-popup-action="close"] {
  color: #9a3535 !important;
}

.rp-popup-icon-action[data-rp-popup-action="close"]:hover,
.rp-popup-icon-action[data-rp-popup-action="close"]:focus-visible {
  border-color: #d69a9a;
  background: #fff1f1 !important;
}

.rp-service-popup.is-dragging,
.rp-service-popup.is-dragging * {
  cursor: move !important;
  user-select: none !important;
}

.rp-service-popup.is-resizing,
.rp-service-popup.is-resizing * {
  cursor: nwse-resize !important;
  user-select: none !important;
}

.rp-service-popup.is-dragging .rp-service-popup__frame,
.rp-service-popup.is-resizing .rp-service-popup__frame {
  pointer-events: none;
}

.rp-service-popup__viewport {
  position: relative;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
  background: #f4f8fa;
}

.rp-service-popup__frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

/* Fenêtre AJAX générique : remplace progressivement les hs.htmlExpand AJAX. */
.rp-ajax-popup-workspace[hidden] {
  display: none !important;
}

.rp-ajax-popup-workspace {
  position: fixed;
  z-index: 100000;
  inset: 0;
  pointer-events: none;
}

.rp-ajax-popup__panel {
  min-height: 220px;
  pointer-events: auto;
  transition: box-shadow .16s ease, border-color .16s ease;
}

.rp-ajax-popup__panel.is-active {
  border-color: #9fc6d6;
  box-shadow: 0 26px 78px rgba(12, 43, 61, .34);
}

.rp-ajax-popup__panel.is-auto-sizing {
  transition:
    width .3s cubic-bezier(.22, .8, .3, 1),
    height .3s cubic-bezier(.22, .8, .3, 1),
    left .3s cubic-bezier(.22, .8, .3, 1),
    top .3s cubic-bezier(.22, .8, .3, 1),
    box-shadow .16s ease,
    border-color .16s ease;
}

.rp-ajax-popup__panel .rp-service-popup__identity {
  max-width: none;
}

.rp-ajax-popup__subtitle {
  overflow: hidden;
  max-width: min(620px, 55vw);
  margin: 2px 0 0;
  color: #6a818c;
  font-size: 11px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rp-ajax-popup__subtitle[hidden] {
  display: none;
}

.rp-ajax-popup__content {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 12px;
  overflow: auto;
  overscroll-behavior: contain;
  background: #f4f8fa;
}

.rp-ajax-popup__document {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.rp-ajax-popup__panel.is-iframe .rp-ajax-popup__content {
  padding: 0;
  overflow: hidden;
  background: #fff;
}

.rp-ajax-popup__frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.rp-ajax-popup__document img,
.rp-ajax-popup__document video,
.rp-ajax-popup__document iframe {
  max-width: 100%;
}

.rp-ajax-popup__document .highslide-header,
.rp-ajax-popup__document .highslide-footer,
.rp-ajax-popup__document .highslide-controls {
  display: none !important;
}

.rp-ajax-popup-workspace.is-dragging,
.rp-ajax-popup-workspace.is-dragging * {
  cursor: move !important;
  user-select: none !important;
}

.rp-ajax-popup-workspace.is-resizing,
.rp-ajax-popup-workspace.is-resizing * {
  cursor: nwse-resize !important;
  user-select: none !important;
}

.rp-ajax-popup-workspace.is-dragging .rp-ajax-popup__content,
.rp-ajax-popup-workspace.is-resizing .rp-ajax-popup__content {
  pointer-events: none;
}

/* Fenêtre de facture AJAX : fixe et non modale. */
.rp-invoice-popup-workspace[hidden] {
  display: none !important;
}

.rp-invoice-popup-workspace {
  position: fixed;
  z-index: 100000;
  inset: 0;
  pointer-events: none;
}

.rp-invoice-popup__panel {
  pointer-events: auto;
  overflow: visible;
  transition: box-shadow .16s ease, border-color .16s ease;
}

.rp-invoice-popup__panel > .rp-service-popup__header {
  border-radius: 15px 15px 0 0;
}

.rp-invoice-popup__panel > .rp-service-popup__viewport {
  border-radius: 0 0 15px 15px;
}

.rp-invoice-popup__panel.is-auto-sizing {
  transition:
    width .34s cubic-bezier(.22, .8, .3, 1),
    height .34s cubic-bezier(.22, .8, .3, 1),
    left .34s cubic-bezier(.22, .8, .3, 1),
    top .34s cubic-bezier(.22, .8, .3, 1),
    box-shadow .16s ease,
    border-color .16s ease;
}

.rp-invoice-popup__panel.is-active {
  border-color: #9fc6d6;
  box-shadow: 0 26px 78px rgba(12, 43, 61, .34);
}

.rp-invoice-popup__panel .rp-service-popup__identity {
  max-width: none;
}

.rp-invoice-popup__panel .rp-service-popup__tools {
  min-width: 0;
  max-width: 72%;
  padding: 2px;
  flex-wrap: nowrap;
}

.rp-invoice-popup__header-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.rp-invoice-popup__header-action i {
  margin: 0 !important;
}

.rp-invoice-popup__content .rp-invoice-toolbar--hosted-popup {
  display: none !important;
}

.rp-invoice-popup__product-code-tools {
  position: relative;
  display: block;
  width: 170px;
  height: 42px;
  min-width: 126px;
  flex: 0 1 170px;
}

.rp-invoice-popup__product-code-tools .rp-product-code-input {
  width: 100% !important;
  height: 42px;
  box-sizing: border-box;
  margin: 0 !important;
  padding: 9px 44px 9px 11px !important;
  border: 1px solid #bfd3de;
  border-radius: 9px;
  color: #173d4b;
  background: #fff;
  font: inherit;
  box-shadow: none;
}

.rp-invoice-popup__product-code-tools .rp-product-code-input:focus {
  border-color: #58a1bd;
  outline: 3px solid rgba(8, 124, 167, .14);
}

.rp-invoice-popup__product-code-tools .rp-product-code-submit {
  position: absolute;
  z-index: 2;
  top: 4px;
  right: 4px;
  display: inline-grid;
  width: 34px !important;
  height: 34px;
  min-width: 34px !important;
  min-height: 34px;
  margin: 0 !important;
  padding: 0 !important;
  place-items: center;
  border: 0;
  border-radius: 7px;
  color: #096f98;
  background: #e8f3f7;
  cursor: pointer;
}

.rp-invoice-popup__product-code-tools .rp-product-code-result:empty {
  display: none;
}

.rp-invoice-popup__product-code-tools .rp-product-code-result:not(:empty) {
  position: absolute;
  z-index: 50;
  top: calc(100% + 5px);
  left: 0;
  width: max-content;
  max-width: min(300px, 80vw);
  padding: 7px 9px;
  border: 1px solid #e8c6c2;
  border-radius: 7px;
  background: #fff8f7;
  box-shadow: 0 5px 15px rgba(48, 61, 70, .13);
  font-size: .78rem;
  line-height: 1.3;
}

.rp-invoice-popup__content {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 12px 12px 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #f4f8fa;
}

.rp-invoice-popup__content > .rp-invoice-app {
  min-height: 100%;
}

.rp-invoice-popup-workspace.is-dragging,
.rp-invoice-popup-workspace.is-dragging * {
  cursor: move !important;
  user-select: none !important;
}

.rp-invoice-popup-workspace.is-resizing,
.rp-invoice-popup-workspace.is-resizing * {
  cursor: nwse-resize !important;
  user-select: none !important;
}

.rp-invoice-popup-workspace.is-dragging .rp-invoice-popup__content,
.rp-invoice-popup-workspace.is-resizing .rp-invoice-popup__content {
  pointer-events: none;
}

/* Aperçu AJAX d'une réservation : même fenêtre native, format plus compact. */
.rp-reservation-popup-workspace[hidden] {
  display: none !important;
}

.rp-reservation-popup-workspace {
  position: fixed;
  z-index: 100000;
  inset: 0;
  pointer-events: none;
}

.rp-reservation-popup__panel {
  --rp-theme-primary: var(--rp-account-primary, var(--rp-main, #1e6ba5));
  --rp-theme-primary-hover: var(--rp-account-primary-hover, var(--rp-main-dark, #15577f));
  --rp-theme-primary-soft: var(--rp-soft, #eef7fa);
  --rp-theme-primary-contrast: var(--rp-account-primary-contrast, #fff);
  --rp-theme-border: var(--rp-line, #d7e4e9);
  min-height: 220px;
  pointer-events: auto;
  transition: box-shadow .16s ease, border-color .16s ease;
}

.rp-reservation-popup__panel.is-auto-sizing {
  transition:
    width .3s cubic-bezier(.22, .8, .3, 1),
    height .3s cubic-bezier(.22, .8, .3, 1),
    left .3s cubic-bezier(.22, .8, .3, 1),
    top .3s cubic-bezier(.22, .8, .3, 1),
    box-shadow .16s ease,
    border-color .16s ease;
}

.rp-reservation-popup__panel.is-active {
  border-color: #9fc6d6;
  box-shadow: 0 26px 78px rgba(12, 43, 61, .34);
}

.rp-reservation-popup__panel .rp-service-popup__identity {
  max-width: none;
}

.rp-reservation-popup__subtitle {
  overflow: hidden;
  max-width: min(620px, 55vw);
  margin: 2px 0 0;
  color: #6a818c;
  font-size: 11px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rp-reservation-popup__subtitle[hidden] {
  display: none;
}

.rp-reservation-popup__filter[hidden],
.rp-reservation-popup__filter-empty[hidden],
.rp-reservation-popup__content .rp-reservation-card[hidden] {
  display: none !important;
}

.rp-reservation-popup__filter {
  display: flex;
  height: 40px;
  min-width: 190px;
  align-items: center;
  gap: 7px;
  box-sizing: border-box;
  padding: 0 7px 0 11px;
  border: 1px solid #c9dce5;
  border-radius: 9px;
  color: #66808c;
  background: #f8fbfc;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.rp-reservation-popup__filter:focus-within {
  border-color: #68a7bf;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(30, 107, 165, .11);
}

.rp-reservation-popup__filter > i {
  flex: 0 0 auto;
  color: #4287a3;
  font-size: 12px;
}

.rp-reservation-popup__filter input {
  width: 125px;
  min-width: 0;
  height: 30px;
  flex: 1 1 auto;
  box-sizing: border-box;
  padding: 0;
  border: 0;
  outline: 0;
  color: #234552;
  background: transparent;
  font: inherit;
  font-size: 12px;
}

.rp-reservation-popup__filter input::placeholder {
  color: #8ca0a9;
}

.rp-reservation-popup__filter input::-webkit-search-cancel-button {
  display: none;
}

.rp-reservation-popup__filter [data-rp-reservation-filter-count] {
  flex: 0 0 auto;
  color: #718892;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.rp-reservation-popup__filter button {
  display: inline-grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  box-sizing: border-box;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: #6d838d;
  background: #e8f1f4;
  font-size: 10px;
  cursor: pointer;
}

.rp-reservation-popup__filter button[hidden] {
  display: none !important;
}

.rp-reservation-popup__filter button:hover,
.rp-reservation-popup__filter button:focus-visible {
  color: #9a3535;
  background: #fff0f0;
  outline: 0;
}

.rp-reservation-popup__content {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: flex-start;
  justify-content: center;
  box-sizing: border-box;
  padding: 12px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #f4f8fa;
}

.rp-reservation-popup__panel.is-editor .rp-reservation-popup__content {
  display: block;
  padding: 0;
  overflow: hidden;
  background: #fff;
}

.rp-reservation-popup__editor-frame {
  display: block;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  border: 0;
  background: #fff;
}

.rp-reservation-popup__content .contenthi,
.rp-reservation-popup__content .rp-reservation-card {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

.rp-reservation-popup__content .contenthi {
  flex: 0 1 var(--rp-reservation-card-max-width, 1060px);
  min-height: 0 !important;
  margin: 0 auto !important;
}

.rp-reservation-popup__content .contenthi > #pdispo,
.rp-reservation-popup__content .contenthi .subcreserv {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

.rp-reservation-popup__filter-empty {
  display: flex;
  min-height: 110px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-sizing: border-box;
  padding: 20px;
  border: 1px dashed #c9dce5;
  border-radius: 12px;
  color: #6c838d;
  background: #f8fbfc;
  font-size: 13px;
  text-align: center;
}

.rp-reservation-popup__filter-empty i {
  color: #3985a2;
}

/* Chargement compact : le X est immédiatement accessible, puis la fenêtre s'ouvre sur la fiche. */
.rp-reservation-popup__panel.is-loading .rp-service-popup__loading,
.rp-reservation-popup__panel.has-load-error .rp-service-popup__loading {
  padding: 14px;
}

.rp-reservation-popup__panel.is-loading .rp-service-loader,
.rp-reservation-popup__panel.has-load-error .rp-service-loader {
  display: grid;
  width: min(420px, 100%);
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 0 14px;
  padding: 15px 17px;
  border-radius: 15px;
  text-align: left;
}

.rp-reservation-popup__panel.is-loading .rp-service-loader__visual,
.rp-reservation-popup__panel.has-load-error .rp-service-loader__visual {
  width: 50px;
  height: 50px;
  grid-row: 1 / span 2;
  margin: 0;
  border-radius: 15px;
  font-size: 18px;
}

.rp-reservation-popup__panel.is-loading .rp-service-loader__visual > span,
.rp-reservation-popup__panel.has-load-error .rp-service-loader__visual > span {
  inset: -3px;
  border-width: 2px;
  border-radius: 18px;
}

.rp-reservation-popup__panel.is-loading .rp-service-loader__eyebrow,
.rp-reservation-popup__panel.has-load-error .rp-service-loader__eyebrow {
  margin-bottom: 3px;
  font-size: 8px;
}

.rp-reservation-popup__panel.is-loading .rp-service-loader__copy strong,
.rp-reservation-popup__panel.has-load-error .rp-service-loader__copy strong {
  font-size: 14px;
}

.rp-reservation-popup__panel.is-loading .rp-service-loader__copy p,
.rp-reservation-popup__panel.has-load-error .rp-service-loader__copy p {
  overflow: hidden;
  margin: 3px 0 0;
  font-size: 10px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rp-reservation-popup__panel.is-loading .rp-service-loader__progress,
.rp-reservation-popup__panel.has-load-error .rp-service-loader__progress {
  width: 100%;
  grid-column: 2;
  margin: 9px 0 0;
}

.rp-reservation-popup__panel.is-loading .rp-service-loader__status,
.rp-reservation-popup__panel.has-load-error .rp-service-loader__status {
  display: none;
}

.rp-reservation-popup-workspace.is-dragging,
.rp-reservation-popup-workspace.is-dragging * {
  cursor: move !important;
  user-select: none !important;
}

.rp-reservation-popup-workspace.is-resizing,
.rp-reservation-popup-workspace.is-resizing * {
  cursor: nwse-resize !important;
  user-select: none !important;
}

.rp-reservation-popup-workspace.is-dragging .rp-reservation-popup__content,
.rp-reservation-popup-workspace.is-resizing .rp-reservation-popup__content {
  pointer-events: none;
}

/* Fiche client AJAX : même coque que la facture, contenu natif sans iframe. */
.rp-client-popup-workspace[hidden] {
  display: none !important;
}

.rp-client-popup-workspace {
  position: fixed;
  z-index: 100000;
  inset: 0;
  pointer-events: none;
}

.rp-client-popup__panel {
  pointer-events: auto;
  transition: box-shadow .16s ease, border-color .16s ease;
}

.rp-client-popup__panel.is-active {
  border-color: #9fc6d6;
  box-shadow: 0 26px 78px rgba(12, 43, 61, .34);
}

.rp-client-popup__panel .rp-service-popup__identity {
  max-width: none;
}

.rp-client-popup__panel .rp-service-popup__tools {
  min-width: 0;
  max-width: 58%;
  padding: 2px;
  flex-wrap: nowrap;
}

.rp-client-popup__subtitle {
  overflow: hidden;
  max-width: min(620px, 48vw);
  margin: 2px 0 0;
  color: #6a818c;
  font-size: 11px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rp-client-popup__subtitle[hidden] {
  display: none;
}

.rp-client-popup__header-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.rp-client-popup__header-action i {
  margin: 0 !important;
}

.rp-client-popup__content {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 10px 12px 16px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #f4f8fa;
}

.rp-client-popup__content > .fiche_client.autoupdate[data-modele="detail_client"] {
  width: 100% !important;
  height: auto !important;
  min-height: 100%;
  box-sizing: border-box;
  margin: 0;
  background: transparent;
}

.rp-client-popup__content .modal-header-container {
  top: -10px !important;
  margin: -10px -12px 10px;
  border: 0;
  border-bottom: 1px solid #d5e3ea;
  border-radius: 0;
  box-shadow: 0 5px 16px rgba(25, 62, 85, .08);
}

.rp-client-popup__content .modal-header-top {
  display: none !important;
}

.rp-client-popup__content form.fiche_client {
  width: 100%;
  min-height: 100%;
  box-sizing: border-box;
  margin: 0;
}

.rp-client-popup__content .client-details-container {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.rp-client-popup__content .tabs,
.rp-client-popup__content .client-tab-content,
.rp-client-popup__content .dashboard-grid,
.rp-client-popup__content .dashboard-block {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.rp-client-popup__content .dashboard-grid {
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}

.rp-client-popup__footer[hidden] {
  display: none !important;
}

.rp-client-popup__footer {
  justify-content: flex-end;
  min-height: 64px;
  padding: 8px 18px 8px 14px;
}

.rp-client-popup__footer-content {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  box-sizing: border-box;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.rp-client-popup__footer-content .button {
  min-height: 42px;
  margin: 0;
  padding: 9px 20px;
  border: 1px solid #0d759f;
  border-radius: 9px;
  color: #fff;
  background: var(--rp-popup-primary, #1e6ba5);
  font-weight: 700;
  cursor: pointer;
}

.rp-client-popup-workspace.is-dragging,
.rp-client-popup-workspace.is-dragging * {
  cursor: move !important;
  user-select: none !important;
}

.rp-client-popup-workspace.is-resizing,
.rp-client-popup-workspace.is-resizing * {
  cursor: nwse-resize !important;
  user-select: none !important;
}

.rp-client-popup-workspace.is-dragging .rp-client-popup__content,
.rp-client-popup-workspace.is-resizing .rp-client-popup__content {
  pointer-events: none;
}

.rp-service-popup__loading {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 24px;
  color: #315565;
  background:
    radial-gradient(circle at 50% 38%, rgba(25, 145, 184, .11), transparent 30%),
    linear-gradient(145deg, #f8fbfc 0%, #eef6f9 100%);
}

.rp-service-popup.is-loading .rp-service-popup__loading {
  display: flex;
}

.rp-invoice-popup__panel.is-loading .rp-service-popup__loading {
  display: flex;
}

.rp-client-popup__panel.is-loading .rp-service-popup__loading {
  display: flex;
}

.rp-reservation-popup__panel.is-loading .rp-service-popup__loading {
  display: flex;
}

.rp-ajax-popup__panel.is-loading .rp-service-popup__loading {
  display: flex;
}

.rp-service-popup.has-load-error .rp-service-popup__loading {
  display: flex;
}

.rp-invoice-popup__panel.has-load-error .rp-service-popup__loading {
  display: flex;
}

.rp-client-popup__panel.has-load-error .rp-service-popup__loading {
  display: flex;
}

.rp-reservation-popup__panel.has-load-error .rp-service-popup__loading {
  display: flex;
}

.rp-ajax-popup__panel.has-load-error .rp-service-popup__loading {
  display: flex;
}

.rp-service-loader {
  position: relative;
  display: flex;
  width: min(440px, 100%);
  align-items: center;
  flex-direction: column;
  box-sizing: border-box;
  padding: 32px 34px 27px;
  overflow: hidden;
  border: 1px solid rgba(188, 214, 225, .9);
  border-radius: 20px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 22px 55px rgba(25, 69, 89, .13), inset 0 1px 0 #fff;
  text-align: center;
  backdrop-filter: blur(12px);
}

.rp-service-loader::before {
  position: absolute;
  top: -70px;
  left: 50%;
  width: 250px;
  height: 150px;
  border-radius: 50%;
  background: rgba(var(--rp-account-primary-rgb, 30, 107, 165), .08);
  content: "";
  filter: blur(12px);
  transform: translateX(-50%);
}

.rp-service-loader__visual {
  position: relative;
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 22px;
  color: var(--rp-popup-primary, #1e6ba5);
  background: linear-gradient(145deg, #f4fbfd, #e5f3f8);
  box-shadow: 0 10px 24px rgba(30, 107, 165, .15), inset 0 0 0 1px rgba(126, 181, 204, .22);
  font-size: 26px;
}

.rp-service-loader__visual > span {
  position: absolute;
  inset: -5px;
  border: 3px solid rgba(var(--rp-account-primary-rgb, 30, 107, 165), .12);
  border-top-color: var(--rp-popup-primary, #1e6ba5);
  border-right-color: #20a6c2;
  border-radius: 25px;
  animation: rpServiceLoaderSpin 1.15s cubic-bezier(.55, .15, .45, .85) infinite;
}

.rp-service-loader__visual > i {
  position: relative;
  animation: rpServiceLoaderIcon 1.7s ease-in-out infinite;
}

.rp-service-loader__copy {
  position: relative;
}

.rp-service-loader__eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--rp-popup-primary, #1e6ba5);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.rp-service-loader__copy strong {
  display: block;
  color: #173f51;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.25;
}

.rp-service-loader__copy p {
  max-width: 340px;
  margin: 8px auto 0;
  color: #6b828d;
  font-size: 13px;
  line-height: 1.45;
}

.rp-service-loader__progress {
  position: relative;
  width: 100%;
  height: 5px;
  margin: 23px 0 13px;
  overflow: hidden;
  border-radius: 99px;
  background: #e8f0f4;
}

.rp-service-loader__progress > span {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -42%;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, #63bdd1, var(--rp-popup-primary, #1e6ba5), #20a6c2);
  box-shadow: 0 0 11px rgba(30, 107, 165, .28);
  animation: rpServiceLoaderProgress 1.35s ease-in-out infinite;
}

.rp-service-loader__status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #66808c;
  font-size: 11px;
  font-weight: 700;
}

.rp-service-loader__status > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #29a879;
  box-shadow: 0 0 0 4px rgba(41, 168, 121, .11);
  animation: rpServiceLoaderPulse 1.25s ease-in-out infinite;
}

.rp-service-popup.has-load-error .rp-service-loader__visual,
.rp-client-popup__panel.has-load-error .rp-service-loader__visual,
.rp-ajax-popup__panel.has-load-error .rp-service-loader__visual {
  color: #a53b3b;
  background: #fff1f1;
  box-shadow: inset 0 0 0 1px #f0cccc;
}

.rp-service-popup.has-load-error .rp-service-loader__visual > span,
.rp-client-popup__panel.has-load-error .rp-service-loader__visual > span,
.rp-ajax-popup__panel.has-load-error .rp-service-loader__visual > span {
  border-color: #e4bcbc;
  animation: none;
}

.rp-service-popup.has-load-error .rp-service-loader__visual > i,
.rp-client-popup__panel.has-load-error .rp-service-loader__visual > i,
.rp-ajax-popup__panel.has-load-error .rp-service-loader__visual > i {
  animation: none;
}

.rp-service-popup.has-load-error .rp-service-loader__progress,
.rp-client-popup__panel.has-load-error .rp-service-loader__progress,
.rp-ajax-popup__panel.has-load-error .rp-service-loader__progress {
  display: none;
}

.rp-service-popup.has-load-error .rp-service-loader__status,
.rp-client-popup__panel.has-load-error .rp-service-loader__status,
.rp-ajax-popup__panel.has-load-error .rp-service-loader__status {
  margin-top: 18px;
  color: #a33d3d;
}

.rp-service-popup.has-load-error .rp-service-loader__status > i,
.rp-client-popup__panel.has-load-error .rp-service-loader__status > i,
.rp-ajax-popup__panel.has-load-error .rp-service-loader__status > i {
  background: #c35050;
  box-shadow: 0 0 0 4px rgba(195, 80, 80, .11);
  animation: none;
}

@keyframes rpServiceLoaderSpin {
  to { transform: rotate(360deg); }
}

@keyframes rpServiceLoaderIcon {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2px) scale(1.04); }
}

@keyframes rpServiceLoaderProgress {
  0% { left: -42%; }
  55%, 100% { left: 100%; }
}

@keyframes rpServiceLoaderPulse {
  0%, 100% { opacity: .65; transform: scale(.9); }
  50% { opacity: 1; transform: scale(1.08); }
}

.rp-service-popup__footer {
  position: relative;
  z-index: 3;
  display: flex;
  min-height: 70px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-sizing: border-box;
  padding: 10px 34px 10px 14px;
  border-top: 1px solid #cbdce5;
  background: #fff;
  box-shadow: 0 -7px 20px rgba(18, 56, 76, .09);
}

.rp-service-popup__resize-handle {
  position: absolute;
  z-index: 6;
  right: 5px;
  bottom: 5px;
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(151, 185, 199, .72);
  border-radius: 8px;
  color: #33748f;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 3px 9px rgba(24, 63, 83, .12);
  font-size: 12px;
  cursor: nwse-resize;
  opacity: .78;
  touch-action: none;
  transition: opacity .16s ease, color .16s ease, border-color .16s ease, background .16s ease;
}

.rp-service-popup__resize-handle > i {
  pointer-events: none;
}

.rp-invoice-popup__panel > .rp-service-popup__resize-handle {
  right: -2px;
  bottom: -2px;
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  font-size: 10px;
  line-height: 1;
}

.rp-invoice-popup__panel > .rp-service-popup__resize-handle > i {
  font-size: inherit;
}

.rp-service-popup__resize-handle:hover,
.rp-service-popup__resize-handle:focus-visible {
  color: #176b8d;
  border-color: #78adc2;
  background: #e9f4f8;
  opacity: 1;
  outline: 0;
}

.rp-service-popup__footer p {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #69808b;
  font-size: 12px;
  font-weight: 600;
}

.rp-service-popup__footer p i {
  color: var(--rp-popup-primary);
}

.rp-service-popup__footer-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 9px;
}

.rp-service-popup__footer button {
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  margin: 0;
  padding: 9px 18px;
  border: 1px solid #bfd1dc;
  border-radius: 9px;
  color: #315a6c;
  background: #fff;
  font: 700 14px/1.1 Arial, sans-serif;
  cursor: pointer;
}

.rp-service-popup__footer button:hover,
.rp-service-popup__footer button:focus-visible {
  border-color: #91b4c4;
  background: #f1f7f9;
  outline: 0;
  transform: translateY(-1px);
}

.rp-service-popup__footer .rp-service-popup__save {
  min-width: 146px;
  border-color: #1e6ba5;
  color: #fff;
  background: var(--rp-popup-primary);
  box-shadow: 0 5px 15px rgba(30, 107, 165, .22);
}

.rp-service-popup__footer .rp-service-popup__save:hover,
.rp-service-popup__footer .rp-service-popup__save:focus-visible {
  color: #fff;
  background: #185d91;
}

.rp-service-popup__save:disabled {
  opacity: .68;
  cursor: wait;
  transform: none !important;
}

/* Le document dans l’iframe gère ses propres sections et dépendances. */
.rp-modif-global-container {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 100%;
  padding: 10px 18px 28px;
  color: #173d4b;
  background: #fff;
}

.rp-modif-global-container.is-popup-editor {
  --rp-editor-primary: var(--rp-account-primary, #1e6ba5);
  --rp-editor-ink: #173d4b;
  --rp-editor-muted: #617985;
  --rp-editor-border: #d2e0e7;
}

.rp-modif-global-container .rp-modif-form,
.rp-modif-global-container .se_section {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
}

.rp-modif-global-container .rp-service-schedule {
  width: 100%;
  margin: 18px 0 28px;
}

.rp-modif-global-container.is-popup-editor .rp-modif-header,
.rp-modif-global-container.is-popup-editor .rp-modif-header.sticky-on,
.rp-modif-global-container.is-popup-editor .rp-modif-header.sticky-off {
  position: sticky !important;
  z-index: 1000 !important;
  top: 0 !important;
  right: auto !important;
  left: auto !important;
  display: block !important;
  box-sizing: border-box;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 0 !important;
  margin: -10px -18px 22px !important;
  padding: 0 !important;
  transform: none !important;
  border-bottom: 1px solid var(--rp-editor-border);
  background: rgba(255, 255, 255, .98) !important;
  box-shadow: 0 7px 24px rgba(24, 61, 78, .11) !important;
}

.is-popup-editor .rp-modif-header-title {
  display: none !important;
}

.is-popup-editor .rp-modif-tabs {
  display: flex;
  overflow-x: auto;
  align-items: center;
  gap: 7px;
  box-sizing: border-box;
  width: 100%;
  min-height: 58px;
  padding: 8px 18px 9px;
  scrollbar-color: #b7cbd6 transparent;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.is-popup-editor .rp-modif-tabs .section_button {
  position: relative;
  display: inline-flex !important;
  width: auto !important;
  min-width: max-content;
  min-height: 40px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-sizing: border-box;
  margin: 0 !important;
  padding: 9px 12px !important;
  border: 1px solid #d3e0e7;
  border-radius: 10px;
  color: #41616f !important;
  background: #f8fbfc;
  box-shadow: none !important;
  font-weight: 700;
  text-decoration: none !important;
  transition: border-color .15s ease, background .15s ease, color .15s ease, transform .15s ease;
}

.is-popup-editor .rp-modif-tabs .section_button i {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  color: #5e7d8b;
  font-size: 14px;
}

.is-popup-editor .rp-modif-tabs .section_button span {
  position: static !important;
  display: inline !important;
  width: auto !important;
  color: inherit !important;
  font-size: 12px;
  line-height: 1.15;
  transform: none !important;
  white-space: nowrap;
}

.is-popup-editor .rp-modif-tabs .section_button:hover,
.is-popup-editor .rp-modif-tabs .section_button:focus-visible {
  border-color: #90bacd;
  color: #1f5c76 !important;
  background: #eef7fa;
  outline: none;
  transform: translateY(-1px);
}

.is-popup-editor .rp-modif-tabs .section_button.selected {
  border-color: var(--rp-editor-primary);
  color: var(--rp-editor-primary) !important;
  background: #eaf4fa;
  box-shadow: inset 0 -2px 0 var(--rp-editor-primary) !important;
}

.is-popup-editor .rp-modif-tabs .section_button.selected i {
  color: var(--rp-editor-primary);
}

.rp-modif-global-container.is-popup-editor .se_section {
  padding-top: 18px !important;
}

.rp-modif-global-container.is-popup-editor .rp-schedule-savebar {
  display: none;
}

.rp-modif-native-actions {
  position: absolute !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  clip: rect(0 0 0 0) !important;
  border: 0 !important;
}

@media (max-width: 800px) {
  .is-popup-editor .rp-modif-tabs {
    display: none !important;
  }

  .is-popup-editor .rp-modif-mobile-nav {
    display: block !important;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 9px 12px 10px;
  }

  .is-popup-editor .rp-modif-mobile-nav select {
    min-height: 44px;
    border-color: #bfd2dc;
    border-radius: 10px;
    color: var(--rp-editor-ink);
    background-color: #f8fbfc;
    font-size: 15px;
  }

  .rp-service-popup__footer p {
    display: none;
  }

  .rp-service-popup__footer-actions {
    width: 100%;
  }

  .rp-service-popup__footer-actions button {
    flex: 1 1 0;
  }
}

@media (max-width: 700px) {
  .rp-service-popup {
    padding: 0;
  }

  .rp-service-popup__panel {
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-width: 0;
    min-height: 0;
    border: 0;
    border-radius: 0;
  }

  .rp-service-popup__header {
    min-height: 60px;
    gap: 8px;
    padding: max(7px, env(safe-area-inset-top)) max(7px, env(safe-area-inset-right)) 7px max(9px, env(safe-area-inset-left));
  }

  .rp-service-popup__title-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .rp-service-popup__identity {
    max-width: calc(100% - 52px);
    flex: 1 1 auto;
  }

  .rp-service-popup__eyebrow {
    display: none;
  }

  .rp-service-popup__identity h2 {
    font-size: 17px;
  }

  .rp-service-popup__tools {
    gap: 5px;
  }

  .rp-invoice-popup__panel .rp-service-popup__tools {
    max-width: calc(100% - 116px);
  }

  .rp-client-popup__panel .rp-service-popup__tools {
    max-width: calc(100% - 108px);
  }

  .rp-reservation-popup__panel .rp-service-popup__tools {
    max-width: calc(100% - 108px);
  }

  .rp-reservation-popup__filter {
    min-width: 120px;
    gap: 5px;
    padding-right: 6px;
    padding-left: 8px;
  }

  .rp-reservation-popup__filter input {
    width: 70px;
  }

  .rp-reservation-popup__filter [data-rp-reservation-filter-count] {
    display: none;
  }

  .rp-invoice-popup__header-actions {
    gap: 5px;
  }

  .rp-client-popup__header-actions {
    gap: 5px;
  }

  .rp-client-popup__header-actions .rp-client-popup__header-action:nth-child(n+3) {
    display: none !important;
  }

  .rp-client-popup__subtitle {
    display: none;
  }

  .rp-reservation-popup__subtitle {
    display: none;
  }

  .rp-ajax-popup__subtitle {
    display: none;
  }

  .rp-invoice-popup__product-code-tools {
    display: none;
  }

  .rp-popup-icon-action {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px;
    flex-basis: 38px;
  }

  .rp-popup-icon-action[data-rp-popup-action="move"] {
    display: none !important;
  }

  .rp-service-popup__resize-handle {
    display: none;
  }

  .rp-service-popup__footer {
    min-height: 65px;
    padding: 8px max(9px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(9px, env(safe-area-inset-left));
  }

  .rp-service-popup__footer button {
    padding: 9px 11px;
  }

  .rp-client-popup__content {
    padding: 7px 7px 12px;
  }

  .rp-reservation-popup__content {
    padding: 7px;
  }

  .rp-ajax-popup__content {
    padding: 7px;
  }

  .rp-client-popup__content .modal-header-container {
    top: -7px !important;
    margin: -7px -7px 8px;
  }

  .rp-client-popup__footer {
    min-height: 62px;
    padding-right: max(12px, env(safe-area-inset-right));
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    padding-left: max(12px, env(safe-area-inset-left));
  }

  .rp-client-popup__footer-content .button {
    min-height: 44px;
  }

  .rp-service-popup__loading {
    padding: 16px;
  }

  .rp-service-loader {
    padding: 25px 20px 22px;
    border-radius: 17px;
  }

  .rp-service-loader__visual {
    width: 68px;
    height: 68px;
    margin-bottom: 15px;
    border-radius: 19px;
    font-size: 23px;
  }

  .rp-service-loader__visual > span {
    border-radius: 22px;
  }

  .rp-service-loader__copy strong {
    font-size: 17px;
  }

  .rp-service-loader__progress {
    margin-top: 19px;
  }

  .rp-modif-global-container {
    padding: 4px 7px 18px;
  }

  .rp-modif-global-container.is-popup-editor .rp-modif-header,
  .rp-modif-global-container.is-popup-editor .rp-modif-header.sticky-on,
  .rp-modif-global-container.is-popup-editor .rp-modif-header.sticky-off {
    margin: -4px -7px 16px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rp-invoice-popup__panel.is-auto-sizing,
  .rp-reservation-popup__panel.is-auto-sizing {
    transition: none;
  }

  .rp-service-loader__visual > span,
  .rp-service-loader__visual > i,
  .rp-service-loader__progress > span,
  .rp-service-loader__status > i {
    animation-duration: 2.8s;
  }
}

/* Templates and captions retained by old page markup; the native viewer reads their text. */
#contentplan.highslide-html-content, .highslide-caption, .hidden-container[id^="hslide"] { display: none; }
