/* Profils indépendants : aucun héritage ordinateur vers téléphone. */
[style*="--jv-offset-schema"], [style*="--jv-offset-preview"] {
  --jv-offset-profile-x: var(--jv-offset-desktop-x, 0px);
  --jv-offset-profile-y: var(--jv-offset-desktop-y, 0px);
  --jv-offset-profile-translate: var(--jv-offset-desktop-translate, none);
  --jv-offset-applied-x: var(--jv-offset-profile-x);
  --jv-offset-applied-y: var(--jv-offset-profile-y);
  --jv-offset-applied-translate: var(--jv-offset-profile-translate);
  translate: var(--jv-offset-applied-translate);
}
@media (max-width: 1024px) {
  [style*="--jv-offset-schema"], [style*="--jv-offset-preview"] {
    --jv-offset-profile-x: var(--jv-offset-tablet-x, 0px);
    --jv-offset-profile-y: var(--jv-offset-tablet-y, 0px);
    --jv-offset-profile-translate: var(--jv-offset-tablet-translate, none);
  }
}
@media (max-width: 640px) {
  [style*="--jv-offset-schema"], [style*="--jv-offset-preview"] {
    --jv-offset-profile-x: var(--jv-offset-mobile-x, 0px);
    --jv-offset-profile-y: var(--jv-offset-mobile-y, 0px);
    --jv-offset-profile-translate: var(--jv-offset-mobile-translate, none);
  }
}
/* Les décalages des petits textes/liens inline conservent le retour à la ligne. */
[style*="--jv-offset-inline:"] {
  position: relative;
  translate: none;
  left: calc(var(--jv-offset-inline-base-x, 0px) + var(--jv-offset-applied-x, 0px));
  top: calc(var(--jv-offset-inline-base-y, 0px) + var(--jv-offset-applied-y, 0px));
  right: auto;
  bottom: auto;
}
[style*="--jv-offset-preview:"] { transition: none !important; }
.individual-move-handle {
  position: fixed;
  z-index: 2147483000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid #fff;
  border-radius: 7px;
  color: #fff;
  background: #6d1d38;
  box-shadow: 0 2px 9px #0003;
  font: 600 13px/1.2 Arial, sans-serif;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.individual-move-handle:active { cursor: grabbing; }
.individual-move-handle:focus-visible, .element-move-buttons button:focus-visible {
  outline: 3px solid #1277a6;
  outline-offset: 3px;
}
.element-move-controls { margin: 14px 0; padding: 12px; border: 1px solid #dacfd4; border-radius: 8px; }
.element-move-controls > strong, .element-move-controls > label { display: block; margin-bottom: 8px; }
.element-move-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin: 9px 0; }
.element-move-buttons button { min-width: 34px; min-height: 34px; }
.element-move-help { margin: 7px 0 0; color: #625861; font-size: 12px; line-height: 1.45; }

/* V2: state of the selected element, independent of its surrounding section. */
[data-cms-element][data-cms-editing="false"]:is([data-cms-hidden="true"], [data-cms-deleted="true"]) {
  display: none !important;
}
.visual-page [data-cms-element][data-cms-editing="true"][data-cms-hidden="true"] {
  opacity: .42 !important;
  outline: 2px dashed #806129;
  outline-offset: 3px;
}
.visual-page [data-cms-element][data-cms-editing="true"][data-cms-deleted="true"] {
  opacity: .32 !important;
  outline: 2px dashed #a43b4c;
  outline-offset: 3px;
}
.visual-page [data-cms-element][data-cms-editing="true"][data-cms-selected="true"] {
  outline: 3px solid #77243c;
  outline-offset: 3px;
}
.element-actions {
  margin: 14px 0;
  padding: 12px;
  border: 1px solid #dacfd4;
  border-radius: 8px;
  background: #fffaf5;
}
.element-actions-summary { margin: 0 0 9px; font-size: 14px; line-height: 1.5; }
.element-action-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.element-action-buttons button { min-height: 36px; }
.element-action-buttons button:focus-visible { outline: 3px solid #1277a6; outline-offset: 3px; }
.element-action-buttons [data-jv-element-action="delete"] { color: #8f263b; border-color: #c58a96; }
.element-action-buttons button:disabled { opacity: .55; cursor: not-allowed; }
.element-actions-help, .element-actions-protection { margin: 9px 0 0; font-size: 13px; line-height: 1.5; color: #625861; }
.element-actions-protection { margin: 0 0 9px; color: #654b20; }

/* V3 : filtres à gauche, liste des pages à droite dans le sélecteur du CMS. */
.admin-app .studio-selector {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}
.admin-app .studio-selector > .page-browser {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
  gap: 24px;
  min-width: 0;
}
.admin-app .studio-selector > .page-browser > .form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
}
.admin-app .studio-selector > .page-browser > .form-grid > .field { margin: 0; }
.admin-app .studio-selector > .page-browser > .page-browser-tree {
  min-width: 0;
  margin: 0;
}
.admin-app .studio-selector > .row {
  flex-wrap: wrap;
  justify-content: flex-start;
}

/* Une largeur fixe pour l'icône évite aussi le retrait en cas d'ancien script en cache. */
.admin-app #jv-admin-files-link > button > :first-child {
  flex: 0 0 19px;
  width: 19px;
  min-width: 19px;
  height: 19px;
  color: #a7aaad;
}
.admin-app #jv-admin-files-link > button > span:last-child {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

/* Profils d'accès : contrôles natifs, libellés cliquables et portées explicites. */
.admin-app .user-access-form { min-width: 0; }
.admin-app .user-access-form > .field { display: flex; flex-direction: column; gap: 7px; }
.admin-app .user-access-form select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #8c8f94;
  border-radius: 4px;
  background: #fff;
  color: #1d2327;
  font: inherit;
}
.admin-app .permission-profile-summary,
.admin-app .permission-summary { font-size: 13px; line-height: 1.5; color: #50575e; }
.admin-app .permission-profile-summary {
  margin: 12px 0 18px;
  padding: 10px 12px;
  border-left: 3px solid #2271b1;
  background: #f0f6fc;
}
.admin-app .permission-groups { display: grid; gap: 16px; }
.admin-app .permission-group {
  min-width: 0;
  margin: 0;
  padding: 12px 14px 14px;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
}
.admin-app .permission-group legend { padding: 0 5px; font-size: 14px; font-weight: 600; }
.admin-app label.permission-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 8px 0;
  color: #1d2327;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 400;
  cursor: pointer;
}
.admin-app .permission-option input[type="checkbox"] {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 3px 0 0;
  accent-color: #2271b1;
}
.admin-app .permission-option-text { min-width: 0; overflow-wrap: anywhere; }
.admin-app .permission-option-text > span,
.admin-app .permission-option-text > small { display: block; }
.admin-app .permission-option-text > small { margin-top: 3px; color: #50575e; font-size: 12px; }
.admin-app .permission-scope {
  max-height: 240px;
  margin: 12px 0 0 24px;
  padding: 0 10px 0 12px;
  border-left: 2px solid #e0e1e3;
  overflow: auto;
}
.admin-app .permission-options { display: grid; gap: 2px; }
.admin-app .user-access-form :is(select,input,button):focus-visible {
  outline: 2px solid #2271b1;
  outline-offset: 2px;
}
.admin-app .user-access-form :disabled { cursor: not-allowed; }
.admin-app .user-row .permission-summary { margin: 4px 0 0; }
@media (max-width: 900px) {
  .admin-app .studio-selector > .page-browser {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
}
@media (max-width: 480px) {
  .admin-app .permission-group { padding: 10px; }
  .admin-app .permission-scope { margin-left: 8px; padding-left: 10px; }
}

/* Profils : identité personnelle, statut et droits conservés. */
.admin-app .profile-name-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}
.admin-app .profile-name-grid > .field { min-width: 0; }
.admin-app .user-profile-form { margin-bottom: 24px; }
.admin-app .user-profile-form input[readonly] { background: #f6f7f7; color: #50575e; }
.admin-app .user-profile-form :is(input,button):focus-visible {
  outline: 2px solid #2271b1;
  outline-offset: 2px;
}
.admin-app .user-row > div { min-width: 0; overflow-wrap: anywhere; }
.admin-app .user-row .user-identity-detail { color: #50575e; }
.admin-app .user-row .user-identity-email { color: #1d2327; }
@media (max-width: 600px) {
  .admin-app .profile-name-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-app .user-row { flex-wrap: wrap; }
  .admin-app .user-row > div { flex-basis: 100%; }
}

/* Contextual editor controls belong to the iframe section, never the public site. */
.visual-page .visual-section-toolbar {
  display: block;
  min-width: 0;
  padding: 10px;
  border-bottom: 1px solid #d6c7c7;
  color: #3a2930;
  font-family: Arial, sans-serif;
  font-size: 13px;
  line-height: 1.45;
}
.visual-page .visual-section-heading,
.visual-page .visual-local-heading,
.visual-page .visual-local-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}
.visual-page .visual-section-heading { justify-content: space-between; }
.visual-page .visual-section-heading > strong { overflow-wrap: anywhere; }
.visual-page .visual-section.is-selected > .visual-section-toolbar,
.visual-page .visual-special-surface > .visual-section-toolbar {
  position: sticky;
  top: 0;
  z-index: 210;
  max-height: 58vh;
  overflow: auto;
  box-shadow: 0 3px 10px #35162318;
}
.visual-page .visual-section-actions { margin-top: 7px; }
.visual-page .visual-section-actions > summary,
.visual-page .visual-context-details > summary {
  cursor: pointer;
  padding: 7px 0;
  font-weight: 600;
}
.visual-page .visual-section-actions > .visual-local-buttons { padding: 5px 0; }
.visual-page .visual-local-context {
  margin-top: 9px;
  padding: 10px;
  border: 1px solid #bda4ad;
  border-left: 3px solid #77243c;
  border-radius: 5px;
  background: #fff;
  min-width: 0;
}
.visual-page .visual-local-heading { justify-content: space-between; }
.visual-page .visual-context-details { border-top: 1px solid #e8dfe3; margin-top: 8px; }
.visual-page .visual-local-style { display: flex; flex-wrap: wrap; gap: 10px; padding: 8px 0; }
.visual-page .visual-local-style > .visual-local-buttons { flex-basis: 100%; }
.visual-page .visual-section-toolbar label { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 12px; }
.visual-page .visual-section-toolbar :is(input,select) {
  min-width: 0;
  max-width: 100%;
  padding: 6px;
  border: 1px solid #b9afb3;
  border-radius: 4px;
  background: #fff;
  color: #282828;
  font: inherit;
}
.visual-page .visual-section-toolbar input[type=number] { width: 90px; }
.visual-page .visual-section-toolbar input[type=color] { width: 48px; height: 34px; }
.visual-page .visual-section-toolbar :is(button,input,select,summary):focus-visible { outline: 2px solid #2271b1; outline-offset: 2px; }
.visual-page .visual-section-toolbar button[aria-pressed=true] { background: #77243c; color: #fff; }
.visual-page .visual-section-toolbar button:disabled { cursor: not-allowed; opacity: .55; }
.visual-page .visual-local-context .element-actions,
.visual-page .visual-local-context .element-inspector,
.visual-page .visual-local-context .element-move-controls {
  margin: 8px 0;
  padding: 8px;
  min-width: 0;
  max-width: 100%;
  box-shadow: none;
}
.visual-page .visual-local-context .element-inspector label { flex: 1 1 180px; max-width: 100%; }
.visual-page .visual-context-note,
.visual-page .visual-context-status { margin: 8px 0 0; color: #625861; font-size: 12px; }
.visual-page .visual-context-status { overflow-wrap: anywhere; }
.visual-page .visual-context-details > .layout-editor { max-height: 440px; overflow: auto; }
.visual-page .visual-special-surface { min-width: 0; }
@media (max-width: 600px) {
  .visual-page .visual-section-toolbar { padding: 8px; }
  .visual-page .visual-local-context { padding: 8px; }
  .visual-page .visual-local-style > label { flex: 1 1 110px; }
  .visual-page .visual-section-toolbar button { white-space: normal; }
}
/* Private editor UI only. Native public rendering remains unchanged. */
.editor-v5-creator { flex: 1 1 100%; box-sizing: border-box; width: 100%; min-width: 0; margin-top: 10px; padding: 14px; border: 1px solid #bbaab1; border-left: 4px solid #77243c; border-radius: 6px; background: #fff; color: #29232a; font: 14px/1.45 Arial,sans-serif; }
.editor-v5-creator-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.editor-v5-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:10px; }
.editor-v5-field { display:flex; flex-direction:column; gap:5px; min-width:0; }
.editor-v5-field:has(textarea) { grid-column:1/-1; }
.editor-v5-creator :is(input,select,textarea), .editor-v5-writer textarea { box-sizing:border-box; width:100%; min-width:0; max-width:100%; padding:8px; border:1px solid #aaa0a5; border-radius:4px; background:#fff; color:#29232a; font:inherit; }
.editor-v5-creator textarea,.editor-v5-writer textarea { resize:vertical; }
.editor-v5-creator > .editor-v5-field { max-width:330px; }
.editor-v5-help { margin:7px 0; font-size:12px; color:#655862; overflow-wrap:anywhere; }
.editor-v5-error { padding:9px; border-left:3px solid #a32c3d; color:#8b1525; background:#fff1f3; }
.editor-v5-buttons,.editor-v5-text-actions { display:flex; flex-wrap:wrap; align-items:center; gap:7px; margin-top:9px; }
.editor-v5-buttons button,.editor-v5-text-actions button,.editor-v5-creator-heading button { padding:8px 11px; border:1px solid #a78c97; border-radius:5px; background:#fff; color:#76223e; font:inherit; cursor:pointer; white-space:normal; }
.editor-v5-buttons .editor-v5-primary,.editor-v5-text-actions .editor-v5-edit-text { background:#76223e; color:#fff; border-color:#76223e; }
.editor-v5-creator button:disabled { cursor:wait; opacity:.6; }
.editor-v5-section-creation { margin-top:9px; padding-top:4px; border-top:1px solid #d8cdd2; }
.editor-v5-text-actions { padding:8px; border-radius:4px; background:#f8f3f5; }
.editor-v5-writer { box-sizing:border-box; max-width:calc(100vw - 24px); padding:12px; border:2px solid #77243c; border-radius:6px; background:#fff; color:#29232a; box-shadow:0 5px 24px #30202940; font:14px/1.4 Arial,sans-serif; }
.editor-v5-writer textarea { display:block; margin-top:8px; max-height:35vh; }
.editor-v5-writer button { font-size:12px; }
.editor-v5-creator :is(button,input,select,textarea):focus-visible,.editor-v5-writer :is(button,textarea):focus-visible { outline:2px solid #2271b1; outline-offset:2px; }
.visual-page [data-cms-field][contenteditable=true]:focus { outline:2px solid #2271b1; outline-offset:3px; cursor:text; }
@media(max-width:640px) { .editor-v5-fields { grid-template-columns:1fr; }.editor-v5-creator {padding:10px;}.editor-v5-buttons button {flex:1 1 auto;} }
/* Opening contextual tools must never change object or neighbour geometry. */
.visual-page .editor-v5-floating-toolbar {
  box-sizing:border-box;
  max-width:calc(100vw - 20px);
  margin:0;
  padding:10px;
  overflow:auto;
  overscroll-behavior:contain;
  border:1px solid #b49aa5;
  border-radius:7px;
  box-shadow:0 5px 22px #3516232b;
  background:#faf5f7;
}
.visual-page .visual-resize-tools {position:absolute;right:0;bottom:0;z-index:215;padding:0;}
.editor-v5-selection-hint {margin:7px 0;font-size:12px;color:#655862;}
html[data-cms-element-dragging="true"] .editor-v5-floating-toolbar {visibility:hidden!important;pointer-events:none;}
.visual-page .editor-v5-floating-toolbar .visual-section-heading > strong {flex:1 1 180px;}
/* The guide layer is created only inside CT's private editor iframe. */
.jv-v5-alignment-layer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 240;
  overflow: hidden;
  pointer-events: none !important;
  user-select: none;
}
.jv-v5-alignment-layer * { pointer-events: none !important; }
.jv-v5-alignment-center line,
.jv-v5-alignment-center circle {
  stroke: #6b4458;
  stroke-width: 1;
  fill: white;
  opacity: .85;
  vector-effect: non-scaling-stroke;
}
.jv-v5-alignment-guide line {
  stroke: #ba2466;
  stroke-width: 1.4;
  stroke-dasharray: 5 3;
  vector-effect: non-scaling-stroke;
}
.jv-v5-alignment-guide circle {
  stroke: #ba2466;
  stroke-width: 1.5;
  fill: white;
  vector-effect: non-scaling-stroke;
}
.jv-v5-alignment-layer[data-alignment-mode="free"] .jv-v5-alignment-guide { opacity: .55; }
.jv-v5-alignment-toggle {
  display: flex !important;
  align-items: center;
  gap: .45rem;
  margin: .5rem 0;
}
.jv-v5-alignment-toggle input { width: auto !important; margin: 0; }

