/* ============================================================================
   BUILDER DE SITES — éditeur drag-and-drop
   Interface : palette de blocs (gauche) · canvas (centre) · propriétés (droite)
   + barre du bas (fil d'ariane + aperçu multi-appareils).
   Réutilise les variables :root du panel (--brand, --surface, --border…).
   ============================================================================ */

/* Plein écran : l'éditeur sort du gabarit habituel du panel. */
.builder {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  grid-template-rows: 56px 1fr 48px;
  grid-template-columns: 248px 1fr 300px;
  transition: grid-template-columns .18s ease;
  grid-template-areas:
    "top     top    top"
    "palette canvas props"
    "bottom  bottom bottom";
  background: var(--paper);
  font-family: var(--font-body);
  --bld-accent: var(--brand);
}

/* ---- Aucune sélection : le panneau propriétés reste caché, le canvas prend sa place ---- */
.builder.bld-no-select {
  grid-template-columns: 248px 1fr 0;
}
.bld-no-select .bld-props {
  overflow: hidden;
  border-left: none;
  pointer-events: none;
}

/* ---- Mode aperçu plein écran (sans les contrôles d'édition) ---- */
.builder.bld-preview-mode {
  grid-template-columns: 1fr;
  grid-template-areas: "top" "canvas";
  grid-template-rows: 56px 1fr;
}
.bld-preview-mode .bld-palette,
.bld-preview-mode .bld-props,
.bld-preview-mode .bld-bottom { display: none; }
.bld-preview-mode .bld-node-bar,
.bld-preview-mode .bld-node::before,
.bld-preview-mode .bld-node-flags,
.bld-preview-mode .bld-rz,
.bld-preview-mode .bld-drop { display: none !important; }
.bld-preview-mode .bld-node { outline: none !important; }
.bld-preview-mode .bld-node-hidden { display: none !important; }
.bld-preview-mode .bpv-col { outline: none; }
.bld-preview-mode .bld-editable { cursor: default; }

/* ---- États d'un bloc : masqué / verrouillé ---- */
.bld-node-hidden > section, .bld-node-hidden > footer,
.bld-node-hidden > .bpv-seo { opacity: .38; }
.bld-node-flags {
  position: absolute; top: 6px; left: 96px; z-index: 3; display: flex; gap: 4px;
}
.bld-node-flags .bld-flag {
  width: 22px; height: 22px; border-radius: 6px; display: flex; align-items: center; justify-content: center;
  background: rgba(20,20,40,.72); color: #fff;
}
.bld-node-flags .bld-flag svg { width: 13px; height: 13px; }

/* ---- Interrupteurs (verrouiller / masquer) ---- */
.bld-toggle { display: flex; align-items: center; gap: 9px; cursor: pointer; margin: 8px 0; font-size: 12.5px; color: var(--text-soft); }
.bld-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.bld-toggle-track {
  flex: 0 0 auto; width: 34px; height: 20px; border-radius: 11px; background: var(--border-strong);
  position: relative; transition: background .15s;
}
.bld-toggle-track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.bld-toggle input:checked + .bld-toggle-track { background: var(--brand); }
.bld-toggle input:checked + .bld-toggle-track::after { transform: translateX(14px); }
.bld-toggle-txt { line-height: 1.3; }

/* ---- Boutons compacts (copier / coller) ---- */
.bld-btn-row { display: flex; gap: 8px; margin-top: 10px; }
.bld-convert { padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--brand-tint); }

/* --- Sélecteur de variantes de disposition (panneau + modale) --- */
.bld-var-wrap { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.bld-var-titre { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); margin-bottom: 8px; }
.bld-var-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bld-var { display: flex; flex-direction: column; gap: 5px; padding: 6px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); cursor: pointer; font: inherit; transition: border-color .12s, box-shadow .12s; }
.bld-var:hover { border-color: var(--brand); }
.bld-var.active { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-light); }
.bld-var-vue { display: block; border-radius: 5px; overflow: hidden; }
.bld-var-vue svg { display: block; width: 100%; height: auto; }
.bld-var-nom { font-size: 11.5px; color: var(--text-soft); text-align: center; }
.bld-var.active .bld-var-nom { color: var(--brand-dark); font-weight: 600; }

/* Modale de choix au premier ajout */
.bld-modal-fond { position: fixed; inset: 0; z-index: 100; background: rgba(20,20,35,.5); display: flex; align-items: center; justify-content: center; padding: 24px; }
.bld-modal { background: var(--surface); border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.3); max-width: 640px; width: 100%; max-height: 84vh; display: flex; flex-direction: column; overflow: hidden; }
.bld-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.bld-modal-head h3 { margin: 0; font-size: 16px; }
.bld-modal-x { border: 0; background: transparent; font-size: 24px; line-height: 1; color: var(--text-faint); cursor: pointer; padding: 0 4px; }
.bld-modal-x:hover { color: var(--text); }
.bld-modal-corps { padding: 18px 20px; overflow-y: auto; }
.bld-var-grille-modal { grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.bld-var-lg { padding: 8px; }
.bld-var-lg .bld-var-nom { font-size: 12.5px; }
@media (max-width: 560px) { .bld-var-grille-modal { grid-template-columns: 1fr 1fr; } }
.bld-convert .bld-add-item { margin: 0 0 8px; }
.bld-mini-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 10px; border-radius: 9px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font-size: 12.5px; cursor: pointer;
}
.bld-mini-btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.bld-mini-btn:disabled { opacity: .5; cursor: not-allowed; }
.bld-mini-btn svg { width: 14px; height: 14px; }

/* ---- Barre du haut ---- */
.bld-top {
  grid-area: top;
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.bld-top .bld-back {
  width: 34px; height: 34px; padding: 0; justify-content: center;
  font-size: 18px; line-height: 1; color: var(--text-soft);
}
.bld-top .bld-logo {
  font-family: var(--font-display); font-weight: 600; font-size: 14.5px;
  letter-spacing: -.01em; white-space: nowrap;
}
.bld-top .bld-name {
  flex: 1; max-width: 300px;
  padding: 7px 11px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 13.5px; background: var(--paper); color: var(--text);
}
.bld-top .bld-name:focus { outline: none; border-color: var(--brand-light); box-shadow: 0 0 0 3px var(--brand-tint); }

/* ----------------------------------------------------------------------
   SÉLECTEUR DE PAGE — menu déroulant dans la barre du haut
   (façon Webflow/Wix : bascule rapide + gestion complète des pages)
   ---------------------------------------------------------------------- */
.bld-page-select { position: relative; flex: 0 0 auto; }
.bld-page-select-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--paper); color: var(--text); font-size: 13px; font-weight: 600;
  cursor: pointer; max-width: 200px; transition: .13s;
}
.bld-page-select-btn:hover { border-color: var(--brand-light); }
.bld-page-select.is-open .bld-page-select-btn { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.bld-page-select-btn svg:first-child { width: 15px; height: 15px; flex: 0 0 auto; color: var(--text-soft); }
.bld-page-select-label {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px;
}
.bld-page-select-chevron { width: 13px; height: 13px; flex: 0 0 auto; color: var(--text-soft); transition: transform .15s; }
.bld-page-select.is-open .bld-page-select-chevron { transform: rotate(180deg); }

.bld-page-menu {
  display: none;
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
  width: 280px; max-height: 70vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 28px -8px rgba(20,20,60,.25);
  padding: 8px;
}
.bld-page-select.is-open .bld-page-menu { display: block; }
.bld-page-menu-titre {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-faint); padding: 4px 8px 8px;
}
.bld-page-menu-list { display: flex; flex-direction: column; gap: 3px; }

.bld-page-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 6px 7px 4px; border-radius: 8px; cursor: pointer; transition: .12s;
  border: 1px solid transparent;
}
.bld-page-item:hover { background: var(--paper); }
.bld-page-item.active { background: var(--brand-tint); border-color: var(--brand-light); }
.bld-page-item.active .bld-page-item-name { color: var(--brand-dark); font-weight: 600; }
.bld-page-item[draggable="true"] { cursor: grab; }
.bld-page-item.dragging { opacity: .45; cursor: grabbing; }
.bld-page-item.drop-avant { box-shadow: 0 -3px 0 var(--brand); }
.bld-page-item.drop-apres { box-shadow: 0 3px 0 var(--brand); }
.bld-page-item-grip { width: 15px; height: 15px; flex: 0 0 auto; color: var(--text-faint); }
.bld-page-item-grip svg { width: 100%; height: 100%; }
.bld-page-item-name {
  flex: 1; font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bld-page-home { color: var(--brand); }
.bld-page-item-actions { display: none; align-items: center; gap: 2px; flex: 0 0 auto; }
.bld-page-item:hover .bld-page-item-actions, .bld-page-item.active .bld-page-item-actions { display: inline-flex; }
.bld-page-item-act {
  width: 24px; height: 24px; border: none; border-radius: 6px; background: none;
  color: var(--text-soft); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.bld-page-item-act svg { width: 13px; height: 13px; }
.bld-page-item-act:hover { background: var(--surface); color: var(--brand); }
.bld-page-item-act-danger:hover { color: var(--danger); }

.bld-page-menu-add {
  width: 100%; margin-top: 8px; padding: 9px; border-radius: 8px;
  border: 1px dashed var(--border-strong); background: none; color: var(--brand);
  font-size: 12.5px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.bld-page-menu-add svg { width: 13px; height: 13px; }
.bld-page-menu-add:hover { border-color: var(--brand); background: var(--brand-tint); }
.bld-top .bld-spacer { flex: 1; }
.bld-top .bld-status {
  font-size: 12px; color: var(--text-faint); display: inline-flex; align-items: center; gap: 6px;
  padding-right: 4px;
}
.bld-top .bld-status::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-faint); flex: 0 0 auto;
}
.bld-top .bld-status.saved { color: var(--success); }
.bld-top .bld-status.saved::before { background: var(--success); }

.bld-btn {
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font-size: 13px; font-weight: 500;
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: .15s ease; text-decoration: none; white-space: nowrap;
}
.bld-btn:hover { background: var(--paper); border-color: var(--brand-light); }
.bld-btn svg { width: 15px; height: 15px; }
.bld-btn-primary { background: var(--brand); color: #fff; border-color: transparent; }
.bld-btn-primary:hover { background: var(--brand-dark); border-color: transparent; }
.bld-btn:disabled { opacity: .5; cursor: not-allowed; }
.bld-icon-btn { padding: 8px 10px; font-size: 16px; line-height: 1; min-width: 34px; text-align: center; }

/* ============================================================================
   PALETTE DE BLOCS (gauche) — recherche + grille de tuiles colorées
   ============================================================================ */
.bld-palette {
  grid-area: palette;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  min-height: 0;
  padding: 14px 12px 24px;
}
.bld-palette > h4 {
  font-family: var(--font-display); font-size: 10.5px; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase; color: var(--text-faint);
  margin: 4px 2px 12px;
}

/* Champ de recherche de blocs. */
.bld-search {
  position: relative; margin-bottom: 16px;
}
.bld-search svg {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--text-faint); pointer-events: none;
}
.bld-search input {
  width: 100%; padding: 9px 11px 9px 33px;
  border: 1px solid var(--border); border-radius: 9px;
  font-size: 13px; background: var(--paper); color: var(--text);
}
.bld-search input:focus { outline: none; border-color: var(--brand-light); box-shadow: 0 0 0 3px var(--brand-tint); }

/* Catégorie + grille de tuiles. */
.bld-cat { margin-bottom: 18px; }
.bld-cat.is-hidden { display: none; }
.bld-cat-titre {
  width: 100%; border: none; background: none; padding: 0; cursor: pointer;
  font-family: inherit;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-soft); margin: 0 2px 9px; display: flex; align-items: center; gap: 7px;
}
.bld-cat-titre:hover { color: var(--text); }
.bld-cat-titre::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.bld-cat-chevron {
  width: 13px; height: 13px; flex: 0 0 auto; color: var(--text-faint);
  transition: transform .15s ease;
}
.bld-cat.bld-cat-closed .bld-cat-chevron { transform: rotate(-90deg); }
.bld-cat.bld-cat-closed:not(.bld-cat-force-open) .bld-cat-grid { display: none; }
.bld-cat.bld-cat-closed:not(.bld-cat-force-open) .bld-cat-titre { margin-bottom: 0; }
.bld-cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Tuile de bloc : icône dans un carré coloré + libellé dessous. */
.bld-block-src {
  --tile: var(--brand);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 8px; text-align: center;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); cursor: grab; user-select: none;
  font-size: 12px; font-weight: 500; color: var(--text); line-height: 1.25;
  transition: .13s ease; min-height: 74px;
}
.bld-block-src:hover {
  border-color: color-mix(in srgb, var(--tile) 55%, var(--border));
  background: color-mix(in srgb, var(--tile) 7%, var(--surface));
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -10px color-mix(in srgb, var(--tile) 80%, transparent);
}
.bld-block-src:active { cursor: grabbing; transform: none; }
.bld-block-src.is-hidden { display: none; }
.bld-block-src .bic {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--tile); color: #fff;
  box-shadow: inset 0 -2px 6px rgba(0,0,0,.14);
}
.bld-block-src .bic svg { width: 19px; height: 19px; }
.bld-block-src .bld-block-nom { display: block; }

/* Icône de catégorie devant le titre. */
.bld-cat-ic {
  width: 22px; height: 22px; flex: 0 0 auto; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--tile, var(--brand)) 16%, transparent);
  color: var(--tile, var(--brand));
}
.bld-cat-ic svg { width: 14px; height: 14px; }
.bld-cat-fav .bld-cat-ic { background: #fdf1d6; color: #e0a400; }

/* Étoile d'épinglage (favoris), en haut à droite de la tuile. */
.bld-block-src { position: relative; }
.bld-pin {
  position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; padding: 0;
  border: 0; background: none; cursor: pointer; color: var(--text-faint);
  opacity: 0; transition: opacity .12s, color .12s, transform .12s;
}
.bld-block-src:hover .bld-pin { opacity: .65; }
.bld-pin:hover { color: #e0a400; transform: scale(1.15); opacity: 1; }
.bld-pin svg { width: 15px; height: 15px; }
.bld-pin.on { opacity: 1; color: #e8a900; }
.bld-pin.on svg { fill: #e8a900; }

/* Badge « Modèle » sur les tuiles de structures pré-remplies. */
.bld-block-badge {
  position: absolute; top: 5px; left: 5px; font-size: 8.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; padding: 2px 5px; border-radius: 6px;
  background: color-mix(in srgb, var(--tile) 18%, transparent); color: var(--tile);
}

/* Bulle d'aperçu réaliste au survol d'une tuile. */
.bld-tip {
  position: fixed; z-index: 90; width: 200px; pointer-events: none;
  background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 8px;
  box-shadow: 0 16px 40px rgba(0,0,0,.22); color: var(--brand);
}
.bld-tip-svg { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--border); }
.bld-tip-nom {
  text-align: center; font-size: 12px; font-weight: 600; color: var(--text); padding: 7px 4px 2px;
}
.bld-search-empty {
  display: none; text-align: center; color: var(--text-faint);
  font-size: 12.5px; padding: 24px 8px; line-height: 1.5;
}
.bld-search-empty.is-visible { display: block; }

/* ============================================================================
   CANVAS (centre)
   ============================================================================ */
.bld-canvas {
  grid-area: canvas;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  padding: 0;
  display: flex; flex-direction: column; align-items: stretch;
  background: #eceef2;
}
/* Le cadre du site ne déborde jamais horizontalement du canvas. */
.bld-frame { max-width: 100%; }
.bld-frame img, .bld-frame video, .bld-frame iframe { max-width: 100%; }

/* Le cadre du site (aperçu WYSIWYG). Sa largeur suit l'appareil sélectionné.
   C'est ce cadre qui défile désormais (pas le canvas qui l'entoure). */
.bld-frame {
  width: 100%; max-width: none;
  background: #fff;
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  transition: max-width .25s ease;
  margin: 0 auto;
}
/* En mode ordinateur, le site occupe toute la largeur du canvas (comme la maquette).
   Tablette / mobile : on centre un cadre plus étroit avec un peu d'air autour. */
.bld-frame[data-device="tablet"],
.bld-frame[data-device="mobile"] {
  margin: 22px auto; border-radius: 14px; flex: 0 1 auto; min-height: 480px; max-height: 100%;
  box-shadow: 0 18px 60px -24px rgba(20,20,60,.42), 0 3px 12px -6px rgba(20,20,60,.16);
}
.bld-frame[data-device="tablet"] { max-width: 720px; }
.bld-frame[data-device="mobile"] { max-width: 390px; }

/* Un bloc posé sur le canvas : cliquable, réordonnable, supprimable. */
.bld-node {
  position: relative;
  outline: 2px solid transparent; outline-offset: -2px;
  transition: outline-color .12s ease;
}
.bld-node:hover { outline-color: var(--brand-light); }
.bld-node.selected { outline-color: var(--brand); }

/* Étiquette du type de bloc (coin haut-gauche), comme sur la maquette. */
.bld-node::before {
  content: attr(data-label);
  position: absolute; top: 6px; left: 6px; z-index: 3;
  padding: 3px 9px; border-radius: 7px;
  background: rgba(20,20,40,.72); color: #fff;
  font-size: 10.5px; font-weight: 600; letter-spacing: .02em;
  opacity: 0; transform: translateY(-2px); transition: .12s ease;
  pointer-events: none;
}
.bld-node:hover::before, .bld-node.selected::before { opacity: 1; transform: none; }
.bld-node.selected::before { background: var(--brand); }

/* Barre d'actions contextuelle du bloc (coin haut-droit). */
.bld-node .bld-node-bar {
  position: absolute; top: 6px; right: 6px; z-index: 3;
  display: none; gap: 4px;
  background: rgba(20,20,40,.72); padding: 4px; border-radius: 9px;
  backdrop-filter: blur(4px);
}
.bld-node:hover .bld-node-bar,
.bld-node.selected .bld-node-bar { display: flex; }
.bld-node.selected .bld-node-bar { background: var(--brand); }
.bld-node-bar button {
  width: 26px; height: 26px; border-radius: 7px; cursor: pointer;
  border: none; background: transparent; color: #fff;
  display: flex; align-items: center; justify-content: center; transition: .12s;
}
.bld-node-bar button:hover { background: rgba(255,255,255,.22); }
.bld-node-bar button.del:hover { background: var(--danger); }
.bld-node-bar button svg { width: 15px; height: 15px; }

/* Zone de dépôt entre blocs pendant un drag. */
.bld-drop {
  height: 0; transition: height .12s ease;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  position: relative;
}
.bld-drop.over { height: 8px; }
/* PENDANT UN GLISSER-DÉPOSER : toutes les zones de dépôt deviennent visibles et
   faciles à viser. Sans ça, elles restent à 0px (le :hover CSS ne se déclenche
   pas de façon fiable pendant un drag natif) et le drop est quasi impossible. */
.builder.bld-drag-actif .bld-drop {
  height: 22px; margin: 3px 0;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  opacity: .5; outline: 1px dashed var(--brand); outline-offset: -3px; border-radius: 4px;
}
.builder.bld-drag-actif .bld-drop.over {
  height: 30px; opacity: 1;
  background: var(--brand-tint, rgba(108,78,224,.22)); outline-style: solid;
}
.builder.bld-drag-actif .bpv-col .bld-drop { height: 18px; }
/* Bouton « + » d'insertion rapide : masqué, révélé au survol de la zone. */
.bld-drop-plus {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 26px; height: 26px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .12s, transform .12s; z-index: 6; box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.bld-drop-plus svg { width: 15px; height: 15px; }
.bld-drop:hover { height: 26px; }
.bld-drop:hover .bld-drop-plus { opacity: 1; }
/* Pendant un drag, on cache le bouton + pour ne pas gêner la cible de dépôt. */
.builder.bld-drag-actif .bld-drop-plus { display: none; }
.bld-drop-plus:hover { transform: translate(-50%, -50%) scale(1.12); }
.bld-drop-plus-grand { position: static; transform: none; width: 42px; height: 42px; opacity: 1; margin-top: 8px; }
.bld-drop-plus-grand svg { width: 20px; height: 20px; }
.bld-drop-plus-grand:hover { transform: scale(1.08); }
.bld-preview-mode .bld-drop-plus { display: none; }

/* Popover d'insertion rapide (sélecteur de bloc au clic sur +). */
.bld-inserer {
  position: absolute; z-index: 95; width: 300px; max-height: 60vh; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 18px 48px rgba(0,0,0,.24); display: flex; flex-direction: column;
}
.bld-inserer-head { padding: 10px; border-bottom: 1px solid var(--border); }
.bld-inserer-q { width: 100%; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: 9px; font: inherit; font-size: 13.5px; }
.bld-inserer-corps { overflow-y: auto; padding: 8px; }
.bld-inserer-cat { margin-bottom: 10px; }
.bld-inserer-titre { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); padding: 4px 6px; }
.bld-inserer-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.bld-inserer-item {
  display: flex; align-items: center; gap: 8px; text-align: left; border: 1px solid var(--border);
  background: var(--paper); border-radius: 9px; padding: 9px 10px; font: inherit; font-size: 12.5px;
  color: var(--text); cursor: pointer; transition: border-color .1s, background .1s;
}
.bld-inserer-item:hover { border-color: var(--brand); background: var(--brand-tint); }
.bld-inserer-ic { display: inline-flex; flex: 0 0 auto; }
.bld-inserer-ic svg { width: 16px; height: 16px; }

/* Zone de dépôt d'une page vide. Le frame étant pleine largeur, on ajoute
   une marge interne pour que le cadre en pointillés ne colle pas aux panneaux. */
.bld-drop-empty {
  height: auto; min-height: 300px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; text-align: center;
  border: 2px dashed var(--border-strong); border-radius: 14px;
  color: var(--text-faint); font-size: 14px; line-height: 1.6; padding: 40px 24px;
  background: transparent;
  margin: 32px;
}
.bld-drop-empty strong { color: var(--text-soft); font-size: 15px; }
.bld-drop-empty.over {
  border-color: var(--brand); color: var(--brand);
  background: var(--brand-tint);
}

/* Poignée de déplacement (glisser le bloc). */
.bld-node-bar button.drag { cursor: grab; }
.bld-node-bar button.drag:active { cursor: grabbing; }

/* Poignées de redimensionnement (largeur / hauteur) du bloc sélectionné. */
.bld-rz { position: absolute; z-index: 4; display: none; background: var(--brand); }
.bld-node.selected > .bld-rz { display: block; }
.bld-rz-x {
  top: 50%; right: -3px; width: 6px; height: 42px; transform: translateY(-50%);
  border-radius: 4px; cursor: ew-resize; box-shadow: 0 0 0 2px var(--surface);
}
.bld-rz-y {
  left: 50%; bottom: -3px; height: 6px; width: 42px; transform: translateX(-50%);
  border-radius: 4px; cursor: ns-resize; box-shadow: 0 0 0 2px var(--surface);
}
body.bld-resizing { user-select: none; cursor: grabbing; }
body.bld-resizing iframe { pointer-events: none; }

/* Conteneur : colonnes qui accueillent d'autres blocs (imbrication). */
.bpv-conteneur { padding: 24px 20px; }
.bpv-cols-wrap { display: grid; align-items: start; }
.bpv-col {
  min-height: 60px; border-radius: 12px;
  outline: 1px dashed var(--border-strong); outline-offset: -1px;
  padding: 4px;
}
.bpv-col > .bld-node { outline-offset: -2px; }
/* Zones de dépôt à l'intérieur d'une colonne. */
.bpv-col .bld-drop { height: 4px; border-radius: 4px; }
.bpv-col .bld-drop.over { height: 10px; }
.bld-drop-vide {
  height: auto; min-height: 52px; background: transparent;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; color: var(--text-faint); font-size: 12px;
}
.bld-drop-vide::before { content: "Déposez un bloc ici"; }
.bld-drop-vide.over { min-height: 60px; background: var(--brand-tint); color: var(--brand); }
.bld-drop-vide.over::before { content: "Relâchez pour ajouter"; }

/* ============================================================================
   PANNEAU PROPRIÉTÉS (droite) — inspecteur sectionné
   ============================================================================ */
.bld-props {
  grid-area: props;
  background: var(--surface);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  min-height: 0;
}
.bld-props-head {
  position: sticky; top: 0; z-index: 2;
  padding: 16px 16px 12px; background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.bld-props-head h4 {
  font-family: var(--font-display); font-size: 14px; font-weight: 600;
  display: flex; align-items: center; gap: 9px; margin: 0;
}
.bld-props-head h4 .bld-props-ico {
  width: 26px; height: 26px; border-radius: 7px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-tint); color: var(--brand-dark);
}
.bld-props-head h4 .bld-props-ico svg { width: 15px; height: 15px; }
.bld-props-head .bld-props-sub { font-size: 11.5px; color: var(--text-faint); margin-top: 3px; }
.bld-props-body { padding: 6px 16px 40px; }
.bld-empty {
  color: var(--text-faint); font-size: 13px; line-height: 1.55; margin-top: 18px;
  text-align: center; padding: 20px 8px;
}
.bld-empty svg { width: 34px; height: 34px; color: var(--border-strong); margin-bottom: 10px; }

/* Bouton de retour vers les réglages de la page / du site (panneau bloc). */
.bld-back-site {
  display: flex; align-items: center; gap: 6px; width: 100%;
  border: 0; border-bottom: 1px solid var(--border); background: var(--paper);
  padding: 11px 16px; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--brand-dark);
}
.bld-back-site:hover { background: var(--brand-tint); }
.bld-back-site svg { width: 15px; height: 15px; transform: rotate(90deg); }

/* Section repliable de l'inspecteur. */
.bld-sec { border-bottom: 1px solid var(--border); }
.bld-sec:last-child { border-bottom: none; }
.bld-sec-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 13px 2px; background: none; border: none; cursor: pointer;
  font-family: var(--font-display); font-size: 11px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--text-soft);
}
.bld-sec-head:hover { color: var(--text); }
.bld-sec-head .chev { transition: transform .18s ease; color: var(--text-faint); }
.bld-sec-head .chev svg { width: 15px; height: 15px; }
.bld-sec.collapsed .chev { transform: rotate(-90deg); }
.bld-sec-body { padding: 2px 2px 16px; }
.bld-sec.collapsed .bld-sec-body { display: none; }

.bld-field { margin-bottom: 13px; }
.bld-field:last-child { margin-bottom: 0; }
.bld-field > label {
  display: block; font-size: 12px; font-weight: 500; color: var(--text-soft); margin-bottom: 5px;
}
.bld-field input[type="text"],
.bld-field input[type="url"],
.bld-field input[type="email"],
.bld-field input[type="number"],
.bld-field textarea,
.bld-field select {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; font-family: var(--font-body); background: var(--paper); color: var(--text);
}
.bld-field input:focus, .bld-field textarea:focus, .bld-field select:focus {
  outline: none; border-color: var(--brand-light); box-shadow: 0 0 0 3px var(--brand-tint);
}
.bld-field textarea { resize: vertical; min-height: 70px; }

/* Rangée de 2 champs côte à côte (ex. Taille / Graisse, marges). */
.bld-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bld-row .bld-field { margin-bottom: 13px; }

/* Champ numérique avec petit stepper visuel (marges / paddings). */
.bld-num { position: relative; }
.bld-num input[type="number"] {
  -moz-appearance: textfield; padding-right: 30px; text-align: left;
}
.bld-num input::-webkit-outer-spin-button,
.bld-num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bld-num .bld-num-unit {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: 11px; color: var(--text-faint); pointer-events: none;
}

/* Sélecteur de couleur avec option « aucune ». */
.bld-color-opt { display: flex; align-items: center; gap: 8px; }
.bld-color-opt input[type="color"] {
  width: 42px; height: 34px; padding: 2px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--paper); cursor: pointer; flex: 0 0 auto;
}
.bld-color-opt input[data-empty] { opacity: .4; }
.bld-color-hex {
  flex: 1; font-family: var(--font-body); font-size: 12.5px;
}
.bld-color-clear {
  font-size: 12px; padding: 6px 10px; border: 1px solid var(--border-strong);
  border-radius: 7px; background: var(--surface); cursor: pointer; color: var(--text-soft);
  flex: 0 0 auto;
}
.bld-color-clear:hover { background: var(--paper); }

/* Boutons segmentés (alignement, appareil…). */
.bld-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0;
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--paper); }
.bld-seg button {
  padding: 8px 6px; border: none; background: none; cursor: pointer;
  color: var(--text-soft); display: flex; align-items: center; justify-content: center;
  border-right: 1px solid var(--border); transition: .12s;
}
.bld-seg button:last-child { border-right: none; }
.bld-seg button svg { width: 16px; height: 16px; }
.bld-seg button:hover { background: var(--surface); color: var(--text); }
.bld-seg button.active { background: var(--brand); color: #fff; }

/* Répéteurs (colonnes, tarifs, témoignages, FAQ, champs de formulaire). */
.bld-repeat-item {
  border: 1px solid var(--border); border-radius: 10px; padding: 11px; margin-bottom: 10px;
  background: var(--paper); position: relative;
}
.bld-repeat-item .bld-repeat-del {
  font-size: 11px; color: var(--danger); background: none; border: none;
  cursor: pointer; padding: 2px 0 0; margin-top: 2px; font-weight: 500;
}
.bld-add-item {
  width: 100%; padding: 9px; border: 1px dashed var(--border-strong); border-radius: 8px;
  background: none; color: var(--text-soft); font-size: 12.5px; cursor: pointer; font-weight: 500;
}
.bld-add-item:hover { border-color: var(--brand); color: var(--brand); }
.bld-add-item svg { width: 13px; height: 13px; vertical-align: -2px; margin-right: 2px; }
/* Variante accentuée : action principale « Créer une nouvelle page ». */
.bld-add-item-accent {
  border-style: solid; border-color: var(--brand-light); color: var(--brand); background: var(--brand-tint);
  margin-bottom: 8px;
}
.bld-add-item-accent:hover { border-color: var(--brand); background: var(--brand-tint); }

.bld-thumb {
  width: 100%; height: 90px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--border); margin-bottom: 8px;
}
.bld-upload {
  display: block; text-align: center; padding: 10px; border: 1px dashed var(--border-strong);
  border-radius: 8px; cursor: pointer; font-size: 12.5px; color: var(--text-soft); font-weight: 500;
}
.bld-upload:hover { border-color: var(--brand); color: var(--brand); }
.bld-upload input { display: none; }

/* Encadré « édition directe sur la page ». */
.bld-inline-note {
  font-size: 12.5px; color: var(--text-soft); background: var(--brand-tint);
  border: 1px solid var(--brand-light); border-radius: 10px; padding: 11px 12px; line-height: 1.5;
}
.bld-sub-label {
  display: block; font-size: 12px; font-weight: 600; color: var(--text-soft);
  margin: 12px 0 4px;
}

/* ============================================================================
   BARRE DU BAS — fil d'ariane + aperçu multi-appareils
   ============================================================================ */
.bld-bottom {
  grid-area: bottom;
  display: flex; align-items: center; gap: 12px;
  padding: 0; 
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 10px -6px rgba(20,20,60,.18);
}
/* Onglet « Structure » (mode d'édition) tout à gauche, sous la palette,
   bleu et pleine largeur de la colonne comme la maquette. */
.bld-bottom .bld-mode-tab {
  order: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  width: 248px; flex: 0 0 248px; align-self: stretch;
  background: #2f7ae5; color: #fff; font-size: 13px; font-weight: 600;
  white-space: nowrap;
}
.bld-bottom .bld-mode-tab svg { width: 14px; height: 14px; }
/* La barre du bas ne porte plus que le mode, le fil d'ariane et les appareils :
   les pages sont gérées depuis le sélecteur déroulant de la barre du haut. */
.bld-bottom .bld-breadcrumb { order: 1; padding-left: 10px; flex: 1; }
.bld-bottom .bld-devices { order: 2; padding-right: 14px; }

.bld-breadcrumb {
  display: flex; align-items: center; gap: 6px; flex: 1;
  font-size: 12.5px; color: var(--text-soft); overflow: hidden;
}
.bld-crumb {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px; border-radius: 7px; background: var(--paper);
  border: 1px solid var(--border); white-space: nowrap; cursor: pointer;
}
.bld-crumb.active { background: var(--brand); color: #fff; border-color: transparent; font-weight: 600; }
.bld-crumb-sep { color: var(--text-faint); }
.bld-crumb svg { width: 13px; height: 13px; }

/* Boutons appareils. */
.bld-devices { display: flex; align-items: center; gap: 4px; }
.bld-devices button {
  width: 32px; height: 30px; border-radius: 7px; border: 1px solid var(--border);
  background: var(--paper); color: var(--text-soft); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: .12s;
}
.bld-devices button svg { width: 16px; height: 16px; }
.bld-devices button:hover { color: var(--text); border-color: var(--brand-light); }
.bld-devices button.active { background: var(--brand); color: #fff; border-color: transparent; }

/* ============================================================================
   VUE MODÈLES (Templates) — plein écran : onglets + grille dense + filtres
   Recouvre le canvas central, garde palette (gauche) et propriétés (droite).
   ============================================================================ */
.bld-tpl-overlay {
  position: absolute; inset: 56px 0 48px 248px; z-index: 55;
  background: #f4f5f8; overflow: hidden;
  display: grid; grid-template-rows: auto 1fr;
}
@media (max-width: 1320px) {
  .bld-tpl-overlay { inset: 56px 0 48px 228px; }
}

/* Galerie de modèles ouverte : le panneau de propriétés de droite est masqué
   et le canvas reprend toute la largeur disponible (l'overlay couvre tout). */
.builder.tpl-open { grid-template-columns: 248px 1fr 0; }
.builder.tpl-open .bld-props {
  display: none;
  overflow: hidden;
  border-left: none;
  pointer-events: none;
}

/* Barre d'onglets (My Sites / Templates / Blocs / Réglages). */
.bld-tpl-tabs {
  display: flex; align-items: center; gap: 4px;
  padding: 0 18px; height: 46px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.bld-tpl-tab {
  padding: 13px 14px 12px; font-size: 13.5px; font-weight: 500;
  color: var(--text-soft); background: none; border: none; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.bld-tpl-tab:hover { color: var(--text); }
.bld-tpl-tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.bld-tpl-tabs .bld-tpl-close {
  margin-left: auto; width: 30px; height: 30px; border-radius: 8px;
  border: none; background: none; color: var(--text-faint); font-size: 18px;
  cursor: pointer; line-height: 1;
}
.bld-tpl-tabs .bld-tpl-close:hover { background: var(--paper); color: var(--text); }

/* Corps : grille de vignettes (défilable) + colonne filtres à droite. */
.bld-tpl-body { display: grid; grid-template-columns: 1fr; overflow: hidden; min-height: 0; }
.bld-tpl-scroll { overflow-y: auto; min-height: 0; padding: 20px 22px 32px; }
.bld-tpl-grid {
  display: grid; gap: 18px 16px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

/* Carte template : vignette + nom + bouton d'action au survol. */
.bld-tpl-card { cursor: pointer; }
.bld-tpl-preview {
  position: relative; height: 130px; border-radius: 10px; overflow: hidden;
  background: linear-gradient(135deg, #2a2f45, #12141f);
  border: 1px solid var(--border); display: block;
}
.bld-tpl-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Mini-aperçu du site rendu dans la vignette (miroir simplifié du modèle). */
.bld-tpl-preview .mp {
  width: 100%; height: 100%; overflow: hidden; font-size: 5px;
  display: flex; flex-direction: column;
}
.mp-nav { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px; }
.mp-logo { font-size: 8px; line-height: 1; }
.mp-links { display: flex; gap: 4px; }
.mp-links i { width: 12px; height: 3px; border-radius: 2px; background: currentColor; opacity: .28; }
.mp-hero {
  padding: 12px 10px 14px; display: flex; flex-direction: column; gap: 5px; align-items: flex-start;
  flex: 0 0 auto;
}
.mp-hero b { font-size: 9px; line-height: 1.1; font-weight: 700; }
.mp-hero .mp-sub { width: 60%; height: 3px; border-radius: 2px; background: currentColor; opacity: .4; }
.mp-hero .mp-btn { width: 34px; height: 9px; border-radius: 3px; margin-top: 3px; }
.mp-titre { padding: 8px 10px 2px; }
.mp-titre span { display: block; width: 44%; height: 4px; border-radius: 2px; opacity: .8; }
.mp-cols { display: flex; gap: 5px; padding: 8px 10px; }
.mp-cols s { flex: 1; height: 22px; border-radius: 3px; background: currentColor; opacity: .1; text-decoration: none; }
/* Cartes (fonctionnalités / tarifs / stats / équipe) avec pastille d'icône. */
.mp-cards { display: flex; gap: 5px; padding: 8px 10px; }
.mp-cards s { flex: 1; height: 26px; border-radius: 3px; background: currentColor; opacity: .09;
  text-decoration: none; display: flex; align-items: flex-start; justify-content: center; padding-top: 4px; }
.mp-cards s em { width: 8px; height: 8px; border-radius: 50%; opacity: .9; }
/* À propos : bloc texte + image. */
.mp-apropos { display: flex; gap: 6px; padding: 8px 10px; align-items: center; }
.mp-apropos-txt { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.mp-apropos-txt span { height: 3px; border-radius: 2px; background: currentColor; opacity: .22; }
.mp-apropos-txt span:nth-child(2) { width: 85%; }
.mp-apropos-txt span:last-child { width: 60%; }
.mp-apropos-img { flex: 0 0 38%; height: 30px; border-radius: 4px; }
/* Bandeau CTA. */
.mp-cta { margin: 8px 10px; border-radius: 5px; padding: 8px; display: flex; flex-direction: column;
  align-items: center; gap: 4px; }
.mp-cta span:first-child { width: 55%; height: 4px; border-radius: 2px; background: #fff; opacity: .85; }
.mp-cta .mp-btn { width: 34px; height: 8px; border-radius: 3px; }
/* Carte / média. */
.mp-map { height: 26px; margin: 8px 10px; border-radius: 4px; }
.mp-media { display: block; height: 34px; margin: 8px 10px; border-radius: 4px; }
.mp-gal { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 8px 10px; }
.mp-gal u { height: 18px; border-radius: 3px; text-decoration: none; }
.mp-lines { padding: 6px 10px; display: flex; flex-direction: column; gap: 4px; }
.mp-lines span { height: 3px; border-radius: 2px; background: currentColor; opacity: .22; }
.mp-lines span:last-child { width: 70%; }
.mp-form { padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.mp-form i { height: 8px; border-radius: 3px; background: currentColor; opacity: .12; }
.mp-form .mp-btn { width: 40px; height: 9px; border-radius: 3px; margin-top: 2px; }
.mp-vide {
  align-items: center; justify-content: center; color: var(--text-faint);
  font-size: 26px; font-weight: 300; background: var(--paper);
}
/* Bouton Preview / Select en bas à droite de la vignette. */
.bld-tpl-action {
  position: absolute; right: 8px; bottom: 8px;
  padding: 5px 12px; border-radius: 7px;
  background: #2f7ae5; color: #fff; font-size: 12px; font-weight: 600;
  opacity: 0; transform: translateY(4px); transition: .14s ease;
}
.bld-tpl-card:hover .bld-tpl-action { opacity: 1; transform: none; }
.bld-tpl-card:hover .bld-tpl-preview { border-color: var(--brand-light); box-shadow: var(--shadow-md); }
.bld-tpl-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 2px 0; gap: 8px;
}
.bld-tpl-name { font-size: 13px; font-weight: 500; color: var(--text); }
.bld-tpl-cat { font-size: 11px; color: var(--text-faint); }

/* Colonne de filtres à droite de la grille. */
.bld-tpl-filters {
  border-left: 1px solid var(--border); background: var(--surface);
  padding: 18px 18px 32px; overflow-y: auto; width: 232px;
}
.bld-tpl-body.has-filters { grid-template-columns: 1fr 232px; }
.bld-tpl-filters h5 {
  font-family: var(--font-display); font-size: 10.5px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint);
  margin: 0 0 14px;
}
.bld-tpl-fgroup { margin-bottom: 20px; }
.bld-tpl-fgroup > label {
  display: block; font-size: 12.5px; font-weight: 600; color: var(--text-soft); margin-bottom: 8px;
}
.bld-tpl-fgroup select {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; background: var(--paper); color: var(--text);
}
.bld-tpl-check { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; color: var(--text); cursor: pointer; }
.bld-tpl-check input { width: 15px; height: 15px; accent-color: var(--brand); }
.bld-tpl-palette { display: flex; gap: 6px; flex-wrap: wrap; }
.bld-tpl-swatch {
  width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--border);
  cursor: pointer; transition: .12s;
}
.bld-tpl-swatch:hover { transform: scale(1.08); border-color: var(--brand); }
.bld-tpl-swatch.active { box-shadow: 0 0 0 2px var(--brand); }

/* Message « aucun modèle » après filtrage. */
.bld-tpl-none { grid-column: 1 / -1; text-align: center; color: var(--text-faint); font-size: 13.5px; padding: 40px; }

/* ---- Page « Réglages du site » (onglet Réglages de l'overlay) ---- */
.bld-set-body { overflow: hidden; min-height: 0; background: var(--paper); }
.bld-set-scroll { overflow-y: auto; height: 100%; padding: 28px 0 40px; }
.bld-set-head { max-width: 720px; margin: 0 auto 22px; padding: 0 24px; }
.bld-set-head h2 { font-family: var(--font-display); font-size: 24px; margin: 0 0 4px; color: var(--text); }
.bld-set-head p { margin: 0; color: var(--text-soft); font-size: 13.5px; }
.bld-set-sec {
  max-width: 720px; margin: 0 auto 16px; padding: 22px 24px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
}
.bld-set-sec-head { margin-bottom: 16px; }
.bld-set-sec-head h3 { font-size: 15.5px; margin: 0 0 2px; color: var(--text); }
.bld-set-sec-head p { margin: 0; font-size: 12.5px; color: var(--text-faint); }
.bld-set-field { display: block; margin-bottom: 14px; }
.bld-set-field > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-soft); margin-bottom: 5px; }
.bld-set-field input[type="text"], .bld-set-field textarea {
  width: 100%; padding: 10px 13px; border: 1px solid var(--border-strong); border-radius: 9px;
  font: inherit; font-size: 13.5px; color: var(--text); background: var(--surface); resize: vertical;
}
.bld-set-field input:focus, .bld-set-field textarea:focus { outline: 2px solid var(--brand-light); border-color: var(--brand); }
.bld-set-aide { display: block; font-size: 11.5px; color: var(--text-faint); font-style: normal; margin-top: 5px; line-height: 1.5; }
.bld-set-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text); margin-bottom: 8px; cursor: pointer; }
.bld-set-check input { width: 16px; height: 16px; accent-color: var(--brand); }

/* Préréglages secteur (cartes cliquables). */
.bld-set-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.bld-set-preset {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px;
  border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface);
  font: inherit; font-size: 12.5px; font-weight: 500; color: var(--text); cursor: pointer; transition: .12s;
}
.bld-set-preset:hover { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-dark); transform: translateY(-1px); }
.bld-set-preset-ic { font-size: 15px; line-height: 1; }
/* Champs image. */
.bld-set-img { display: flex; align-items: center; gap: 14px; }
.bld-set-img img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.bld-set-img-vide {
  width: 72px; height: 72px; border-radius: 10px; border: 1px dashed var(--border-strong);
  display: flex; align-items: center; justify-content: center; font-size: 10.5px; color: var(--text-faint); text-align: center;
}
.bld-set-img-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bld-set-clear { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-soft); border-radius: 8px; padding: 8px 12px; font: inherit; font-size: 12px; cursor: pointer; }
.bld-set-clear:hover { border-color: var(--danger); color: var(--danger); }
/* Pied de page réglages. */
.bld-set-foot { max-width: 720px; margin: 8px auto 0; padding: 0 24px; display: flex; align-items: center; gap: 14px; }
.bld-set-foot .bld-btn-primary { padding: 11px 22px; border-radius: 10px; border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.bld-set-saved { font-size: 12px; color: var(--text-faint); opacity: 0; transition: opacity .2s; }
.bld-set-saved.on { opacity: 1; color: var(--ok, #2f9e57); }

/* Écrans desktop plus étroits : on rétrécit les colonnes latérales
   pour garder un canvas large (comme sur la maquette). */
@media (max-width: 1320px) {
  .builder { grid-template-columns: 228px 1fr 284px; }
  .bld-bottom .bld-mode-tab { width: 228px; flex: 0 0 228px; }
}

/* ---- Responsive : sur petit écran, l'éditeur invite à passer sur desktop ---- */
@media (max-width: 980px) {
  .builder { display: none; }
  .bld-mobile-notice { display: flex; }
}
.bld-mobile-notice { display: none; }

/* ============================================================================
   ÉDITION INLINE — barre flottante de mise en forme
   ============================================================================ */
.bld-editable { outline: none; cursor: text; border-radius: 4px; transition: box-shadow .12s; }
.bld-editable:hover { box-shadow: 0 0 0 2px var(--brand-tint); }
.bld-editable:focus { box-shadow: 0 0 0 2px var(--brand-light); }

.bld-inline-bar {
  position: absolute; z-index: 90; transform: translateX(-50%);
  display: none; align-items: center; gap: 2px; padding: 5px;
  background: #1c1c28; border-radius: 10px; box-shadow: 0 8px 26px rgba(0,0,0,.34);
}
.bld-inline-bar.is-visible { display: flex; }
.bld-inline-bar button {
  min-width: 30px; height: 30px; border: 0; background: none; color: #fff; cursor: pointer;
  border-radius: 6px; font-size: 14px; display: flex; align-items: center; justify-content: center;
  padding: 0 6px;
}
.bld-inline-bar button:hover { background: rgba(255,255,255,.16); }
.bld-inline-bar button svg { width: 16px; height: 16px; }
.bld-inline-sep { width: 1px; height: 20px; background: rgba(255,255,255,.18); margin: 0 3px; }
.bld-inline-bar input[type="color"] {
  width: 26px; height: 26px; padding: 0; border: none; border-radius: 6px;
  background: none; cursor: pointer;
}

/* ---- Actions d'un champ image : bouton bibliothèque + téléversement ---- */
.bld-img-actions { display: flex; gap: 8px; margin-top: 6px; }
.bld-lib-btn {
  display: inline-flex; align-items: center; gap: 6px; flex: 1; justify-content: center;
  padding: 8px 10px; border: 1px solid var(--brand); border-radius: 9px;
  background: var(--brand-tint); color: var(--brand-dark); font: inherit; font-size: 12.5px;
  font-weight: 600; cursor: pointer; white-space: nowrap;
}
.bld-lib-btn:hover { background: var(--brand-light); }
.bld-lib-btn svg { width: 15px; height: 15px; }
.bld-img-actions .bld-upload { flex: 1; margin: 0; justify-content: center; }

/* ---- Médiathèque (recherche, filtres, tri, pagination, aperçu) ---- */
.bld-lib-overlay {
  position: fixed; inset: 0; z-index: 80; background: rgba(15,20,30,.5);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.bld-lib-modal {
  width: min(880px, 96vw); height: min(620px, 92vh);
  background: var(--surface); border-radius: 16px; overflow: hidden;
  display: grid; grid-template-rows: auto auto 1fr; box-shadow: 0 24px 60px rgba(0,0,0,.4);
  position: relative;
}
.bld-lib-modal-xl { width: min(1040px, 97vw); height: min(680px, 94vh); grid-template-rows: auto auto 1fr; }
.bld-lib-head {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; border-bottom: 1px solid var(--border); font-size: 16px;
}
.bld-lib-recap { font-size: 12px; color: var(--text-faint); font-weight: 400; margin-left: 2px; }
/* Onglets Modèles / Mes téléversements */
.bld-lib-tabs { display: flex; gap: 4px; }
.bld-lib-tab {
  border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  color: var(--text-soft); padding: 7px 14px; border-radius: 9px;
}
.bld-lib-tab:hover { background: var(--paper); color: var(--text); }
.bld-lib-tab.active { background: var(--brand); color: #fff; }
/* Bouton « Téléverser » de la médiathèque */
.bld-lib-upload {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  border: 1px solid var(--brand); background: var(--brand-tint, rgba(108,78,224,.08)); color: var(--brand-dark, var(--brand));
  padding: 8px 14px; border-radius: 9px; font-size: 12.5px; font-weight: 600;
}
.bld-lib-upload:hover { background: var(--brand); color: #fff; }
.bld-lib-upload svg { width: 15px; height: 15px; }
.bld-lib-upload.occupe { opacity: .6; pointer-events: none; }
.bld-lib-close {
  border: 0; background: none; font-size: 24px; line-height: 1; cursor: pointer;
  color: var(--text-soft); width: 34px; height: 34px; border-radius: 8px; margin-left: auto;
}
.bld-lib-close:hover { background: var(--paper); color: var(--text); }
.bld-lib-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 20px; border-bottom: 1px solid var(--border);
}
.bld-lib-toolbar input[type="search"] {
  flex: 1 1 200px; min-width: 160px; padding: 9px 13px;
  border: 1px solid var(--border-strong); border-radius: 9px; font: inherit;
}
.bld-lib-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.bld-lib-chip {
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-soft);
  padding: 7px 12px; border-radius: 20px; font: inherit; font-size: 12.5px; cursor: pointer;
}
.bld-lib-chip:hover { background: var(--paper); }
.bld-lib-chip.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.bld-lib-tri { padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 9px; font: inherit; font-size: 12.5px; }
.bld-lib-body { display: grid; grid-template-columns: 190px 1fr; min-height: 0; }
.bld-lib-side {
  border-right: 1px solid var(--border); padding: 12px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 2px;
}
.bld-lib-grp {
  display: flex; justify-content: space-between; align-items: center;
  text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 8px;
  font: inherit; font-size: 13px; color: var(--text-soft); cursor: pointer;
}
.bld-lib-grp span { font-size: 11px; color: var(--text-faint); background: var(--paper); border-radius: 10px; padding: 1px 7px; }
.bld-lib-grp:hover { background: var(--paper); }
.bld-lib-grp.active { background: var(--brand-tint); color: var(--brand-dark); font-weight: 600; }
.bld-lib-grp.active span { background: #fff; }
.bld-lib-main { display: grid; grid-template-rows: 1fr auto; min-height: 0; }
.bld-lib-grid {
  overflow-y: auto; padding: 16px; display: grid; gap: 14px; align-content: start;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); transition: opacity .15s;
}
.bld-lib-grid.chargement { opacity: .5; pointer-events: none; }
.bld-lib-card {
  border: 1px solid var(--border); border-radius: 10px; background: var(--paper);
  margin: 0; cursor: pointer; overflow: hidden; display: flex; flex-direction: column;
  transition: border-color .12s, transform .12s, box-shadow .12s;
}
.bld-lib-card:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.1); }
.bld-lib-thumb { position: relative; display: block; width: 100%; height: 96px; background: #e9e9f2 center/cover no-repeat; }
.bld-lib-badge {
  position: absolute; top: 6px; left: 6px; font-size: 10px; font-weight: 600;
  padding: 2px 7px; border-radius: 10px; color: #fff;
}
.bld-lib-badge.b-dup  { background: #d99a2b; }
.bld-lib-badge.b-orph { background: #9aa2b1; top: 6px; left: auto; right: 6px; }
.bld-lib-del {
  position: absolute; bottom: 6px; right: 6px; width: 28px; height: 28px; border: 0;
  background: rgba(220,60,60,.92); color: #fff; border-radius: 8px; cursor: pointer;
  display: none; align-items: center; justify-content: center;
}
.bld-lib-del svg { width: 15px; height: 15px; }
.bld-lib-card:hover .bld-lib-del { display: flex; }
.bld-lib-card figcaption { padding: 7px 9px; }
.bld-lib-name { display: block; font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bld-lib-meta { display: block; font-size: 10.5px; color: var(--text-faint); margin-top: 2px; }
.bld-lib-empty { grid-column: 1 / -1; padding: 40px; text-align: center; color: var(--text-faint); font-size: 13px; }
.bld-lib-pager {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 10px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-soft);
}
.bld-lib-pg {
  border: 1px solid var(--border-strong); background: var(--surface); width: 32px; height: 30px;
  border-radius: 8px; cursor: pointer; font-size: 16px; line-height: 1;
}
.bld-lib-pg:disabled { opacity: .4; cursor: default; }
.bld-lib-count { color: var(--text-faint); }
/* Aperçu agrandi au survol. */
.bld-lib-preview {
  position: absolute; right: 18px; bottom: 60px; width: 260px; z-index: 5;
  background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 8px;
  box-shadow: 0 18px 40px rgba(0,0,0,.28); opacity: 0; transform: translateY(8px);
  pointer-events: none; transition: opacity .12s, transform .12s;
}
.bld-lib-preview.on { opacity: 1; transform: none; }
.bld-lib-preview img { width: 100%; max-height: 200px; object-fit: contain; border-radius: 8px; display: block; background: #f0f0f5; }
.bld-lib-preview-info { font-size: 11.5px; color: var(--text-soft); text-align: center; padding: 7px 4px 3px; }
@media (max-width: 720px) { .bld-lib-preview { display: none; } .bld-lib-body { grid-template-columns: 1fr; } .bld-lib-side { display: none; } }

/* ============================================================================
   PRÉVISUALISATION DES BLOCS (classes bpv-*)
   Miroir visuel du CSS généré par builder_publish.php.
   ============================================================================ */
.bld-frame {
  --bpv-prim: #6c4ee0; --bpv-fond: #fff; --bpv-texte: #1a1a2e;
  --bpv-police: 'Segoe UI', system-ui, sans-serif;
  font-family: var(--bpv-police); color: var(--bpv-texte); background: var(--bpv-fond);
  line-height: 1.6;
}
.bld-frame h1, .bld-frame h2, .bld-frame h3 { font-family: inherit; }
.bpv-sec { padding: 48px 32px; }
.bpv-hero {
  text-align: center; padding: 72px 32px;
  background: linear-gradient(135deg, var(--bpv-prim), #000); color: #fff;
}
.bpv-hero h1 { font-size: clamp(24px, 4vw, 42px); margin-bottom: 12px; }
.bpv-hero p { font-size: 16px; opacity: .9; max-width: 560px; margin: 0 auto 20px; }
.bpv-btn {
  display: inline-block; padding: 12px 26px; border-radius: 9px;
  background: var(--bpv-prim); color: #fff; font-weight: 600; cursor: default;
}
.bpv-hero .bpv-btn { background: #fff; color: var(--bpv-prim); }
.bpv-sec h2 { font-size: clamp(20px, 3vw, 30px); margin-bottom: 16px; text-align: center; }
.bpv-text { font-size: 15px; max-width: 720px; margin: 0 auto; }
.bpv-img { max-width: 100%; border-radius: 12px; margin: 0 auto; display: block; }
.bpv-img-vide {
  border: 2px dashed var(--border-strong); border-radius: 12px; padding: 40px;
  text-align: center; color: var(--text-faint); font-size: 13px;
}
.bpv-cols { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.bpv-card { padding: 20px; border: 1px solid #e6e6ef; border-radius: 12px; }
.bpv-card h3 { font-size: 16px; margin-bottom: 8px; }
.bpv-card p { font-size: 14px; }
.bpv-gallery { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.bpv-gallery img { width: 100%; height: 140px; object-fit: cover; border-radius: 10px; }
.bpv-form { max-width: 460px; margin: 0 auto; display: grid; gap: 10px; }
.bpv-form input, .bpv-form textarea, .bpv-form select {
  padding: 10px 12px; border: 1px solid #d5d5e2; border-radius: 9px; font: inherit; width: 100%;
  background: #fafafe;
}
.bpv-footer { background: #12121e; color: #cfcfe0; text-align: center; padding: 32px; font-size: 13px; }

.bpv-video { position: relative; padding-bottom: 56.25%; height: 0; border-radius: 12px; overflow: hidden; }
.bpv-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.bpv-temoins { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.bpv-temoin { padding: 22px; border: 1px solid #e6e6ef; border-radius: 14px; background: #fafafe; }
.bpv-temoin blockquote { margin: 0 0 10px; font-style: italic; }
.bpv-temoin figcaption { font-weight: 600; font-size: 13px; color: var(--bpv-prim); }
.bpv-tarifs { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.bpv-tarif { padding: 26px 20px; border: 1px solid #e6e6ef; border-radius: 14px; text-align: center; }
.bpv-tarif h3 { font-size: 17px; margin-bottom: 8px; }
.bpv-prix { font-size: 30px; font-weight: 700; color: var(--bpv-prim); margin-bottom: 8px; }
.bpv-tarif p { font-size: 13px; color: #666; margin-bottom: 16px; }
.bpv-faqs { max-width: 720px; margin: 0 auto; display: grid; gap: 10px; }
.bpv-faq { border: 1px solid #e6e6ef; border-radius: 10px; padding: 12px 16px; }
.bpv-faq summary { cursor: pointer; font-weight: 600; font-size: 15px; }
.bpv-faq-r { margin-top: 8px; font-size: 14px; color: #555; }
.bpv-sep-sec { padding: 12px 24px; }
.bpv-sep-ligne { height: 1px; background: #ddd; }
.bpv-sep-points { height: 0; border-top: 2px dotted #ccc; }
.bpv-sep-espace { height: 40px; }

/* Appel à l'action (CTA). */
.bpv-cta {
  text-align: center; background: var(--bpv-prim);
  color: #fff; border-radius: 16px; margin: 0 32px; padding: 44px 28px;
}
.bpv-cta h2 { color: #fff; }
.bpv-cta p { margin: 0 auto 18px; max-width: 520px; opacity: .92; font-size: 15px; }
.bpv-cta .bpv-btn { background: #fff; color: var(--bpv-prim); }

/* Chiffres-clés. */
.bpv-stats { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); text-align: center; }
.bpv-stat-n { font-size: 34px; font-weight: 700; color: var(--bpv-prim); }
.bpv-stat-l { font-size: 13px; color: #666; margin-top: 4px; }

/* Équipe. */
.bpv-equipe { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); text-align: center; }
.bpv-membre img,
.bpv-membre-vide {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  margin: 0 auto 10px; display: flex; align-items: center; justify-content: center;
}
.bpv-membre-vide { border: 2px dashed var(--border-strong); color: var(--text-faint); font-size: 12px; }
.bpv-membre figcaption b { display: block; font-size: 15px; }
.bpv-membre figcaption span { font-size: 13px; color: var(--bpv-prim); }

/* Accordéon (aperçu). */
.bpv-accs { max-width: 720px; margin: 0 auto; display: grid; gap: 10px; }
.bpv-acc { border: 1px solid #e6e6ef; border-radius: 10px; overflow: hidden; background: #fff; }
.bpv-acc summary { cursor: pointer; font-weight: 600; font-size: 15px; padding: 12px 16px; list-style: none; }
.bpv-acc summary::-webkit-details-marker { display: none; }
.bpv-acc-c { padding: 0 16px 14px; font-size: 14px; color: #555; }

/* Réseaux sociaux (aperçu). */
.bpv-social { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.bpv-soc-lien { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--bpv-prim); color: #fff; }
.bpv-soc-petit .bpv-soc-lien { width: 34px; height: 34px; } .bpv-soc-petit svg { width: 16px; height: 16px; }
.bpv-soc-moyen .bpv-soc-lien { width: 44px; height: 44px; } .bpv-soc-moyen svg { width: 20px; height: 20px; }
.bpv-soc-grand .bpv-soc-lien { width: 56px; height: 56px; } .bpv-soc-grand svg { width: 26px; height: 26px; }

/* Carte (aperçu). */
.bpv-carte { width: 100%; border-radius: 12px; overflow: hidden; border: 1px solid #e6e6ef; }
.bpv-carte iframe { border: 0; width: 100%; height: 100%; }

/* Logos partenaires (aperçu). */
.bpv-logos { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: center; }
.bpv-logo img { max-height: 44px; max-width: 130px; object-fit: contain; filter: grayscale(1); opacity: .7; }

/* Bandeau d'annonce (aperçu). */
.bpv-annonce {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center;
  background: var(--bpv-prim); color: #fff; padding: 11px 18px; text-align: center; font-size: 14px;
}
.bpv-annonce-btn { background: #fff; color: var(--bpv-prim); padding: 6px 14px; border-radius: 18px; font-weight: 600; font-size: 12.5px; }

/* Menu d'ancres (aperçu). */
.bpv-menu { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; border-bottom: 1px solid var(--border); background: var(--surface); flex-wrap: wrap; }
.bpv-menu-marque { font-weight: 700; font-size: 16px; color: var(--bpv-prim); }
.bpv-menu-liens { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.bpv-menu-lien { font-size: 13.5px; color: var(--text-soft); font-weight: 500; }
.bpv-menu-btn { background: var(--bpv-prim); color: #fff; padding: 7px 14px; border-radius: 18px; font-weight: 600; font-size: 12.5px; }

/* Héros image de fond (aperçu). */
.bpv-heroimg { display: flex; align-items: center; justify-content: center; text-align: center; color: #fff; padding: 48px 24px; }
.bpv-heroimg-in { max-width: 620px; }

/* Zones nommées à l'intérieur d'un bloc figé (dropzones sans démonter le bloc).
   PRINCIPE : par défaut la zone est INVISIBLE et n'occupe aucune place (aucun
   contour, aucun libellé, aucune hauteur réservée) — elle ne doit jamais écraser
   le titre ni la structure du héros. On ne la révèle que :
     • quand le bloc parent est sélectionné,
     • quand on survole la zone,
     • pendant un glisser-déposer (.bld-drag-actif sur #builder).
   Une zone REMPLIE est toujours affichée normalement (ses blocs enfants). */
.bpv-zone { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.bpv-zone-logo { align-items: center; }
/* Zone VIDE : repliée à zéro par défaut (n'occupe pas d'espace, invisible). */
.bpv-zone-vide { min-height: 0; gap: 0; }
.bpv-zone-vide .bld-drop-vide { min-height: 0; height: 0; border: 0; padding: 0; margin: 0; overflow: hidden; }
.bpv-zone-vide .bld-drop-vide::before { content: ""; }
/* Espace pour séparer une zone REMPLIE du reste (uniquement si elle a du contenu). */
.bpv-zone-logo:not(.bpv-zone-vide) { margin-bottom: 14px; }
.bpv-zone-contenu:not(.bpv-zone-vide) { margin-top: 16px; }

/* Révélation : bloc sélectionné, survol de la zone, ou glisser en cours. */
.builder .bld-node.selected > .bpv-heroimg .bpv-zone-vide,
.builder .bpv-zone-vide:hover,
.builder.bld-drag-actif .bpv-zone-vide {
  min-height: 42px; margin: 8px 0; padding: 6px;
  border: 1px dashed rgba(127,127,150,.55); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  transition: min-height .12s ease, background .12s ease;
}
.builder .bld-node.selected > .bpv-heroimg .bpv-zone-vide::before,
.builder .bpv-zone-vide:hover::before,
.builder.bld-drag-actif .bpv-zone-vide::before {
  content: "Zone : " attr(data-zone-nom);
  font-size: 11.5px; color: var(--text-faint, #8a8a99); letter-spacing: .02em; pointer-events: none;
}
/* Sur fond sombre (héros), contour + libellé lisibles ; léger voile pour détacher. */
.bpv-heroimg .bpv-zone-vide:hover,
.builder.bld-drag-actif .bpv-heroimg .bpv-zone-vide,
.builder .bld-node.selected > .bpv-heroimg .bpv-zone-vide {
  border-color: rgba(255,255,255,.5); background: rgba(0,0,0,.22);
}
.bpv-heroimg .bpv-zone-vide::before { color: rgba(255,255,255,.9); }
/* Survol franc d'une zone pendant le drag = cible prête. */
.builder.bld-drag-actif .bpv-zone-vide:hover { background: var(--brand-tint, rgba(108,78,224,.14)); border-color: var(--brand); }
.bpv-heroimg h1 { font-size: clamp(24px, 4vw, 40px); margin: 0 0 12px; line-height: 1.15; }
.bpv-heroimg p { font-size: 16px; opacity: .95; margin: 0 0 20px; }

/* Grille de fonctionnalités (aperçu). */
.bpv-feats { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.bpv-feat { padding: 20px 18px; border: 1px solid var(--border); border-radius: 14px; text-align: center; background: var(--surface); }
.bpv-feat-ic { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; background: var(--brand-tint); color: var(--bpv-prim); font-size: 22px; margin-bottom: 10px; }
.bpv-feat b { display: block; font-size: 16px; margin-bottom: 6px; }
.bpv-feat span { color: var(--text-soft); font-size: 13.5px; line-height: 1.55; }

/* À propos texte + image (aperçu). */
.bpv-apropos { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.bpv-apropos.inverse .bpv-apropos-txt { order: 2; }
.bpv-apropos-img img { width: 100%; border-radius: 14px; display: block; }
.bpv-apropos-img.bpv-img-vide { min-height: 180px; }
.bpv-apropos-txt h2 { font-size: 24px; margin: 0 0 12px; }

/* Cartes d'articles (aperçu). */
.bpv-arts { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.bpv-art { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface); }
.bpv-art-img { display: block; width: 100%; height: 130px; background: #e9e9f2 center/cover no-repeat; }
.bpv-art-img.bpv-img-vide { display: flex; align-items: center; justify-content: center; }
.bpv-art-c { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.bpv-art-date { font-size: 11px; color: var(--bpv-prim); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.bpv-art-c b { font-size: 16px; }
.bpv-art-ex { color: var(--text-soft); font-size: 13px; line-height: 1.55; }
@media (max-width: 640px) { .bpv-apropos { grid-template-columns: 1fr; } }

/* ===== Variantes de disposition (aperçu) — pilotées par data-var ===== */
/* Menu */
.bpv-menu[data-var="centre"] { flex-direction: column; gap: 8px; }
.bpv-menu[data-var="centre"] .bpv-menu-liens { justify-content: center; }
.bpv-menu[data-var="split"] { position: relative; justify-content: center; }
.bpv-menu[data-var="split"] .bpv-menu-marque { order: 2; margin: 0 auto; }
.bpv-menu[data-var="split"] .bpv-menu-liens { order: 1; position: absolute; left: 20px; }
.bpv-menu[data-var="bouton"] .bpv-menu-btn { margin-left: auto; }
.bpv-menu[data-var="empile"] { flex-direction: column; gap: 6px; text-align: center; }
.bpv-menu[data-var="empile"] .bpv-menu-liens { justify-content: center; border-top: 1px solid var(--border); padding-top: 6px; width: 100%; }
/* Héros image : alignement du bloc de texte */
.bpv-heroimg[data-var="gauche"] { justify-content: flex-start; text-align: left; }
.bpv-heroimg[data-var="bas"] { align-items: flex-end; }
.bpv-heroimg[data-var="carte"] .bpv-heroimg-in { background: rgba(255,255,255,.94); color: #1a1a2e; padding: 28px 32px; border-radius: 14px; }
.bpv-heroimg[data-var="carte"] .bpv-heroimg-in h1 { color: inherit; }
/* Fonctionnalités */
.bpv-feats[data-var="liste"] { grid-template-columns: 1fr; }
.bpv-feats[data-var="liste"] .bpv-feat { display: grid; grid-template-columns: auto 1fr; text-align: left; gap: 4px 14px; }
.bpv-feats[data-var="liste"] .bpv-feat-ic { grid-row: span 2; }
.bpv-feats[data-var="compact"] { grid-template-columns: 1fr 1fr; }
.bpv-feats[data-var="compact"] .bpv-feat { display: grid; grid-template-columns: auto 1fr; text-align: left; gap: 2px 12px; padding: 14px; }
.bpv-feats[data-var="compact"] .bpv-feat-ic { grid-row: span 2; width: 34px; height: 34px; font-size: 17px; }
/* À propos */
.bpv-apropos[data-var="droite"] .bpv-apropos-txt { order: 2; }
.bpv-apropos[data-var="centre"] { grid-template-columns: 1fr; text-align: center; }
.bpv-apropos[data-var="centre"] .bpv-apropos-img { order: -1; }
/* Articles */
.bpv-arts[data-var="liste"] { grid-template-columns: 1fr; }
.bpv-arts[data-var="liste"] .bpv-art { flex-direction: row; }
.bpv-arts[data-var="liste"] .bpv-art-img { width: 40%; min-height: 120px; height: auto; }

/* Bloc SEO : carte visible uniquement dans l'éditeur (non publiée telle quelle). */
.bpv-seo {
  margin: 20px 32px; padding: 18px 20px; border: 1px dashed var(--brand-light);
  border-radius: 12px; background: var(--brand-tint); color: var(--brand-dark);
  font-size: 13px; display: flex; gap: 12px; align-items: flex-start;
}
.bpv-seo svg { width: 22px; height: 22px; flex: 0 0 auto; margin-top: 1px; }
.bpv-seo b { display: block; margin-bottom: 3px; }
.bpv-seo span { opacity: .85; }
.bpv-seo-og { display: block; margin-top: 8px; max-width: 180px; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--brand-light); }

/* Effets d'animation (miroir du CSS publié). */
@keyframes bpv-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes bpv-up   { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes bpv-zoom { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }

/* Conditions d'affichage (aperçu par appareil dans l'éditeur). */
.bld-frame[data-device="mobile"] [data-cond="desktop"] { display: none !important; }
.bld-frame:not([data-device="mobile"]) [data-cond="mobile"] { display: none !important; }
