/* Largeur personnalisée — le conteneur parent ne doit pas bloquer (ex. svc-step__icon 120px) */
.akar-editable-img.has-custom-width {
  height: auto !important;
  max-width: none !important;
}

.svc-step__icon:has(.has-custom-width),
.product-card__media:has(.has-custom-width),
.svc-catalogue__visual:has(.has-custom-width),
.zones__map:has(.has-custom-width) {
  width: auto !important;
  height: auto !important;
  max-width: none;
}

/* Éditeur d’images de contenu */
body.akar-img-edit-mode .akar-editable-img.is-img-editable {
  cursor: pointer;
  outline: 2px dashed rgba(79, 171, 156, 0.85);
  outline-offset: 3px;
  transition: outline-color 0.15s ease;
}

body.akar-img-edit-mode .akar-editable-img.is-img-selected {
  outline-color: var(--coral, #e74c33);
  outline-width: 3px;
}

.akar-img-editor {
  position: fixed;
  top: 32px;
  right: 16px;
  z-index: 100001;
  width: min(300px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  border: 1px solid #e0dbd6;
  font-size: 0.88rem;
  color: #2a2a2a;
}

.admin-bar .akar-img-editor {
  top: 46px;
}

.akar-img-editor__head {
  padding: 14px 16px 8px;
  border-bottom: 1px solid #eee;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.akar-img-editor__head strong {
  font-size: 1rem;
  color: #4fab9c;
}

.akar-img-editor__page {
  font-size: 0.82rem;
  color: #777;
}

.akar-img-editor__hint {
  margin: 0;
  padding: 10px 16px;
  color: #666;
  line-height: 1.45;
  font-size: 0.82rem;
}

.akar-img-editor__actions {
  padding: 0 16px 12px;
}

.akar-img-editor__selected {
  padding: 12px 16px;
  border-top: 1px solid #eee;
  background: #faf8f6;
}

.akar-img-editor__selected h3 {
  margin: 0 0 8px;
  font-size: 0.9rem;
}

.akar-img-editor__id {
  margin: 0 0 10px;
  font-size: 0.78rem;
  color: #888;
  word-break: break-all;
}

.akar-img-editor__field {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
  font-size: 0.8rem;
}

.akar-img-editor__field input[type="range"] {
  width: 100%;
  accent-color: #4fab9c;
}

.akar-img-editor__range-label output {
  font-weight: 700;
  color: #4fab9c;
}

.akar-img-editor__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.akar-img-editor__reset {
  background: #fff;
  color: #666;
  border: 1.5px solid #ccc;
}

.akar-img-editor__delete {
  width: 100%;
  margin-top: 8px;
  background: #fff;
  color: #c0392b;
  border: 1.5px solid #c0392b;
}

/* Emplacement après suppression (mode édition) */
body.akar-img-edit-mode .akar-img-slot {
  display: block;
  width: 100%;
  max-width: 320px;
  min-height: 120px;
  margin: 12px auto;
  padding: 24px 16px;
  border: 2px dashed #c0392b;
  border-radius: 12px;
  background: #fff5f4;
  color: #c0392b;
  font: inherit;
  font-size: 0.88rem;
  line-height: 1.4;
  cursor: pointer;
  text-align: center;
}

body.akar-img-edit-mode .akar-img-slot:hover,
body.akar-img-edit-mode .akar-img-slot.is-img-selected {
  border-color: #4fab9c;
  background: #e8f6f3;
  color: #459488;
}

.akar-img-editor__status {
  margin: 0;
  padding: 10px 16px;
  font-size: 0.8rem;
  min-height: 1.2em;
}

.akar-img-editor__status.is-ok {
  color: #459488;
  font-weight: 600;
}

.akar-img-editor__status.is-err {
  color: #c0392b;
  font-weight: 600;
}

.akar-img-editor__foot {
  padding: 12px 16px 14px;
  border-top: 1px solid #eee;
}

.akar-img-editor__exit {
  color: #666;
  font-size: 0.82rem;
  text-decoration: underline;
}

@media (max-width: 600px) {
  .akar-img-editor {
    right: 8px;
    left: 8px;
    width: auto;
  }
}
