/*
 * Éditeur sur-page de la page Prestations (visible uniquement pour un
 * administrateur connecté). Aucune influence sur le rendu public : ces styles
 * ne s'appliquent qu'en mode édition (classe .lua-editing sur <body>) ou aux
 * éléments d'interface injectés (barre d'outils, contrôles).
 */

/* Barre d'outils flottante */
.lua-ed-toolbar {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100000;
  display: flex;
  gap: 8px;
  align-items: center;
  background: #2b2320;
  color: #fff;
  padding: 10px 12px;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}
.lua-ed-toolbar button {
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
}
.lua-ed-btn-primary { background: #b08968; color: #fff; }
.lua-ed-btn-primary:hover { background: #9c785a; }
.lua-ed-btn-ghost { background: rgba(255, 255, 255, 0.14); color: #fff; }
.lua-ed-btn-ghost:hover { background: rgba(255, 255, 255, 0.24); }
.lua-ed-toolbar .lua-ed-hint { opacity: 0.75; padding: 0 4px; }

/* Contrôles par bloc (dupliquer / supprimer) */
.lua-ed-ctrl {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 5000;
  display: flex;
  gap: 6px;
}
.lua-ed-ctrl button {
  border: none;
  cursor: pointer;
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.lua-ed-dup { background: #6b8e5a; color: #fff; }
.lua-ed-del { background: #b5544a; color: #fff; }
.lua-ed-ctrl-cat button { padding: 6px 11px; font-size: 13px; }

/* Mode édition : repères visuels + garde-fous */
.lua-editing .builder-inner-section,
.lua-editing .builder-top-section { position: relative; }
.lua-editing [contenteditable="true"] {
  outline: 2px dashed rgba(176, 137, 104, 0.7);
  outline-offset: 2px;
  cursor: text;
}
.lua-editing [contenteditable="true"]:focus {
  outline: 2px solid #b08968;
  background: rgba(176, 137, 104, 0.06);
}
/* En édition, on neutralise les liens/boutons pour éviter toute navigation. */
.lua-editing a,
.lua-editing .builder-widget-button a { pointer-events: none; }
/* …sauf nos propres contrôles. */
.lua-editing .lua-ed-ctrl,
.lua-editing .lua-ed-toolbar { pointer-events: auto; }

/* Bandeau de statut (sauvegarde) */
.lua-ed-flash {
  position: fixed;
  left: 50%;
  bottom: 78px;
  transform: translateX(-50%);
  z-index: 100001;
  background: #256029;
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.lua-ed-flash[data-ok="0"] { background: #8a1c13; }
