/* =========================================================
   WPZ — Vows Assistant (V2) — Iliade Native (CLEAN) — FINAL
   Scope: .wpz-vows
   Dépend: variables/root Iliade (brand/ink/muted/soft/soft-2/radius/shadow/focus)
   Objectif: CSS complet, sans doublons, sans patchs, sans casser
   ========================================================= */

/* =========================
   0) Scope & tokens locaux
   ========================= */
.wpz-vows{
  --vows-gap: clamp(12px, 2vw, 18px);
  --vows-pad: clamp(12px, 2vw, 18px);

  /* Bridge tokens Iliade (root) */
  --vows-brand:     var(--brand, #5CA174);
  --vows-brand-600: var(--brand-600, #4b8b62);
  --vows-ink:       var(--ink, #0f172a);
  --vows-muted:     var(--muted, #64748b);
  --vows-soft:      var(--soft, #F4F7F5);
  --vows-soft2:     var(--soft-2, #E9EEF0);

  --vows-radius:    var(--radius, 16px);
  --vows-radius-sm: var(--radius-sm, 10px);
  --vows-shadow:    var(--shadow, 0 10px 30px rgba(0,0,0,.08));
  --vows-focus:     var(--focus, color-mix(in oklab, var(--vows-brand) 65%, #000 0%));

  --vows-line: var(--vows-soft2);
  --vows-card: #fff;

  /* nuances */
  --vows-tint:  color-mix(in oklab, var(--vows-brand) 8%, transparent);
  --vows-tint2: color-mix(in oklab, var(--vows-brand) 14%, transparent);
  --vows-ring:  color-mix(in oklab, var(--vows-brand) 18%, transparent);
}

/* --- Reset local anti-thème (Elementor/Hello) --- */
.wpz-vows :where(button, a, input, select, textarea){
  font: inherit;
  color: inherit;
}

/* =========================
   1) Cards & header
   ========================= */
.wpz-vows .wpz-card{
  background: var(--vows-card);
  border: 1px solid var(--vows-line);
  border-radius: var(--vows-radius);
  box-shadow: var(--vows-shadow);
}

.wpz-vows__head{
  display:flex;
  gap: var(--vows-gap);
  align-items:flex-start;
  justify-content:space-between;
  margin-bottom: var(--vows-gap);
}

.wpz-vows__title{
  margin:0 0 6px;
  color: var(--vows-ink);
  font-weight: 800;
  letter-spacing: .2px;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.15;
}

.wpz-vows__sub{
  margin:0;
  color: var(--vows-muted);
}

.wpz-vows__headActions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* =========================
   2) Status pill
   ========================= */
.wpz-vows__status{
  display:flex;
  align-items:center;
  gap: 10px;
  margin-bottom: var(--vows-gap);
}

.wpz-vows__pill{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--vows-line);
  background: #fff;
  font-weight: 800;
  font-size: 13px;
  color: var(--vows-ink);
}

.wpz-vows__pill[data-status="idle"]{ background: var(--vows-soft); }

.wpz-vows__pill[data-status="saving"]{
  background: var(--vows-tint);
  border-color: color-mix(in oklab, var(--vows-brand) 22%, var(--vows-line));
}

.wpz-vows__pill[data-status="saved"]{
  background: color-mix(in oklab, var(--vows-brand) 10%, #fff);
  border-color: color-mix(in oklab, var(--vows-brand) 25%, var(--vows-line));
}

.wpz-vows__pill[data-status="error"]{
  border-color: #f3cccc;
  background: #fff0f0;
  color: #7f1d1d;
}

.wpz-vows__tiny{
  font-size: 13px;
  color: var(--vows-muted);
}

/* =========================
   3) Layout (stack)
   ========================= */
.wpz-vows__grid{
  display: grid;
  gap: var(--vows-gap);
  grid-template-columns: 1fr;
  align-items: start;
}

.wpz-vows__panel,
.wpz-vows__aside{
  width: 100%;
  padding: var(--vows-pad);
}

/* =========================
   4) Progress
   ========================= */
.wpz-vows__progress{
  display:flex;
  flex-direction:column;
  gap: 10px;
  margin-bottom: 14px;
}

.wpz-vows__bar{
  height: 10px;
  border-radius: 999px;
  background: var(--vows-soft);
  overflow:hidden;
  border: 1px solid var(--vows-line);
}

.wpz-vows__bar span{
  display:block;
  height:100%;
  width:0%;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    color-mix(in oklab, var(--vows-brand) 90%, #000 0%),
    color-mix(in oklab, var(--vows-brand-600) 85%, #000 0%)
  );
}

.wpz-vows__steps{
  display:flex;
  justify-content:space-between;
  color: var(--vows-muted);
  font-size: 13px;
}

/* =========================
   5) Question & inputs
   ========================= */
.wpz-vows__question h3{
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .2px;
  color: var(--vows-ink);
}

.wpz-vows__hint{
  margin: 0 0 12px;
  color: var(--vows-muted);
  line-height: 1.6;
}

.wpz-vows__textarea{
  width:100%;
  min-height: 170px;
  resize: vertical;

  padding: .85rem .9rem;
  border-radius: 12px;
  border: 1px solid var(--vows-line);
  background:#fff;
  color: var(--vows-ink);
  outline: none;

  line-height: 1.65;
  font-size: 15px;

  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.wpz-vows__textarea:hover{
  border-color: color-mix(in oklab, var(--vows-brand) 25%, var(--vows-line));
}

.wpz-vows__textarea:focus{
  border-color: var(--vows-brand);
  box-shadow: 0 0 0 3px var(--vows-ring);
}

/* Nav */
.wpz-vows__nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin-top: 12px;
}

.wpz-vows__navRight{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content:flex-end;
}

/* Micro actions */
.wpz-vows__micro{
  display:flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.wpz-link{
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-weight: 800;
  font-size: 13px;

  color: var(--vows-brand);
  text-decoration: underline;
  text-decoration-color: color-mix(in oklab, var(--vows-brand) 40%, transparent);
  text-underline-offset: 2px;

  transition: color .18s ease, text-decoration-color .18s ease;
}

.wpz-link:hover{
  text-decoration-color: color-mix(in oklab, var(--vows-brand) 85%, transparent);
}

.wpz-vows .wpz-link:focus-visible{
  outline: 2px solid var(--vows-focus);
  outline-offset: 2px;
  border-radius: 8px;
}

/* =========================
   6) Preview / Result
   ========================= */
.wpz-vows__asideTitle{
  margin:0 0 6px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .2px;
  color: var(--vows-ink);
}

.wpz-vows__asideHint{
  margin:0 0 12px;
  color: var(--vows-muted);
}

.wpz-vows__preview{
  border: 1px dashed var(--vows-line);
  background: color-mix(in oklab, var(--vows-soft) 75%, #fff);
  border-radius: 12px;
  padding: 12px;
  min-height: 240px;
  overflow: auto;
}

.wpz-vows__preview h4{
  margin: 10px 0 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: color-mix(in oklab, var(--vows-muted) 85%, #000 0%);
}

.wpz-vows__preview p{
  margin: 0 0 10px;
  color: var(--vows-ink);
  line-height: 1.75;
}

.wpz-vows__placeholder{
  margin:0;
  color: var(--vows-muted);
}

.wpz-vows__final{
  line-height: 1.8;
}

.wpz-vows__final[contenteditable="true"]{
  white-space: pre-wrap;
  line-height: 1.6;
  min-height: 160px;
  outline: none;
}

.wpz-vows__final[contenteditable="true"]:focus{
  box-shadow: 0 0 0 3px var(--vows-ring);
  border-radius: 10px;
}

/* Result block */
.wpz-vows__result{
  margin-top: var(--vows-gap);
  padding: var(--vows-pad);
}

.wpz-vows__preview--final{
  min-height: 220px;
}

/* Refine bar */
.wpz-vows__refineBar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--vows-line);
}

/* Aside actions */
.wpz-vows__asideActions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* Review step */
.wpz-vows__reviewBox{
  border: 1px solid var(--vows-line);
  background: color-mix(in oklab, var(--vows-soft) 72%, #fff);
  border-radius: 12px;
  padding: 12px;
}

.wpz-vows__reviewBox h4{
  margin: 10px 0 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: color-mix(in oklab, var(--vows-muted) 85%, #000 0%);
}

.wpz-vows__reviewBox p{
  margin: 0 0 10px;
  color: var(--vows-ink);
  line-height: 1.75;
}

/* Mobile: aperçu reste dans le flux */
@media (max-width: 980px){
  .wpz-vows__aside{
    position: static;
    max-height: none;
    overflow: visible;
  }
}

/* =========================
   7) Dashboard
   ========================= */
.wpz-vows__toolbar{
  padding: var(--vows-pad);
  display:flex;
  gap: 12px;
  align-items:center;
  justify-content:space-between;
  margin-bottom: var(--vows-gap);
  background: #fff;
}

.wpz-vows__search{ flex: 1; }
.wpz-vows__filters{ width: 220px; }

@media (max-width: 780px){
  .wpz-vows__toolbar{ flex-direction:column; align-items:stretch; }
  .wpz-vows__filters{ width:100%; }
}

.wpz-vows__list{
  display:grid;
  gap: var(--vows-gap);
}

.wpz-vows__item{
  padding: var(--vows-pad);
}

.wpz-vows__item.is-active{
  border-color: color-mix(in oklab, var(--vows-brand) 28%, var(--vows-line));
  box-shadow: 0 12px 30px color-mix(in oklab, var(--vows-brand) 18%, transparent);
}

.wpz-vows__itemTop{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 10px;
}

.wpz-vows__itemTitle{
  margin:0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .2px;
  color: var(--vows-ink);
}

/* badge */
.wpz-vows__badge{
  display:inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid var(--vows-line);
  background: var(--vows-soft);
  color: var(--vows-ink);
}

.wpz-vows__badge[data-badge="final"]{
  border-color: #CFE9D9;
  background: #F2FBF6;
  color: #065f46;
}

.wpz-vows__badge[data-badge="archived"]{ opacity: .75; }

.wpz-vows__meta{
  display:flex;
  gap: 14px;
  margin-top: 8px;
  color: var(--vows-muted);
  font-size: 13px;
  flex-wrap: wrap;
}

.wpz-vows__itemActions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.wpz-vows__pager{
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 14px;
  margin-top: var(--vows-gap);
}

.wpz-vows__empty,
.wpz-vows__login{
  padding: var(--vows-pad);
}

/* =========================
   8) Buttons / Inputs (force Iliade)
   ========================= */
.wpz-vows :where(.wpz-btn, button.wpz-btn, a.wpz-btn){
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid var(--vows-brand) !important;
  background: var(--vows-brand) !important;
  color: #fff !important;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;

  border-radius: 999px !important;
  padding: .7rem 1rem !important;

  font-weight: 800 !important;
  line-height: 1.15 !important;
  text-decoration: none !important;
  cursor: pointer;

  box-shadow: 0 6px 18px color-mix(in oklab, var(--vows-brand) 25%, transparent) !important;
  transition: transform .08s ease, filter .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}

.wpz-vows :where(.wpz-btn, button.wpz-btn, a.wpz-btn):hover{
  filter: brightness(.98);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px color-mix(in oklab, var(--vows-brand) 35%, transparent) !important;
}

.wpz-vows :where(.wpz-btn, button.wpz-btn, a.wpz-btn):active{
  transform: translateY(0);
  box-shadow: 0 4px 12px color-mix(in oklab, var(--vows-brand) 25%, transparent) !important;
}

.wpz-vows :where(.wpz-btn, button.wpz-btn, a.wpz-btn):focus-visible{
  outline: 2px solid var(--vows-focus);
  outline-offset: 2px;
}

/* Ghost */
.wpz-vows :where(.wpz-btn--ghost){
  background: transparent !important;
  color: var(--vows-brand) !important;
  border-color: var(--vows-brand) !important;
  box-shadow: none !important;
}

.wpz-vows :where(.wpz-btn--ghost):hover{
  background: color-mix(in oklab, var(--vows-brand) 8%, transparent) !important;
  transform: translateY(-1px);
}

/* Danger */
.wpz-vows :where(.wpz-btn--danger){
  --danger: #dc2626;
  border-color: color-mix(in oklab, var(--danger) 75%, #000 0%) !important;
  background: var(--danger) !important;
  color:#fff !important;
  box-shadow: 0 6px 18px color-mix(in oklab, var(--danger) 22%, transparent) !important;
}

.wpz-vows :where(.wpz-btn--danger):hover{
  box-shadow: 0 10px 28px color-mix(in oklab, var(--danger) 28%, transparent) !important;
}

/* Disabled */
.wpz-vows :where(.wpz-btn, button.wpz-btn, a.wpz-btn)[disabled],
.wpz-vows :where(.wpz-btn, button.wpz-btn, a.wpz-btn).is-disabled{
  opacity: .6 !important;
  cursor: not-allowed !important;
  transform: none !important;
  filter: none !important;
  box-shadow: none !important;
  pointer-events: none !important;
}

/* Inputs */
.wpz-vows :where(.wpz-input, input[type="search"].wpz-input, select.wpz-input){
  width: 100%;
  padding: .75rem .8rem !important;
  border: 1px solid var(--vows-soft2) !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: var(--vows-ink) !important;
  transition: border-color .15s ease, box-shadow .15s ease;
  box-shadow: none !important;
}

.wpz-vows :where(.wpz-input, input[type="search"].wpz-input, select.wpz-input):hover{
  border-color: color-mix(in oklab, var(--vows-brand) 25%, var(--vows-soft2)) !important;
}

.wpz-vows :where(.wpz-input, input[type="search"].wpz-input, select.wpz-input):focus{
  border-color: var(--vows-brand) !important;
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--vows-brand) 18%, transparent) !important;
  outline: none !important;
}

.wpz-vows :where(.wpz-input)::placeholder{
  color: color-mix(in oklab, var(--vows-muted) 65%, transparent);
}

/* refine buttons compact */
.wpz-vows :where([data-refinebar] .wpz-btn){
  padding: .55rem .85rem !important;
  font-weight: 800 !important;
}

/* =========================================================
   9) OVERLAY LOADER PRO — SINGLE SOURCE OF TRUTH
   (PAS DE DOUBLON)
   ========================================================= */

/* Lock scroll */
html.wpz-overlay-lock,
html.wpz-overlay-lock body{
  overflow: hidden;
}

/* Overlay container */
.wpz-vows [data-overlay]{
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 28px);
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(10px);
}

.wpz-vows [data-overlay][hidden]{ display:none !important; }

/* Card */
.wpz-vows .wpz-vows__overlayCard{
  width: min(560px, 100%);
  border-radius: 18px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 18px 60px rgba(0,0,0,.16);
  padding: clamp(18px, 3vw, 26px);
  overflow: hidden;
  position: relative;
}

.wpz-vows .wpz-vows__overlayCard::before{
  content:"";
  position:absolute;
  inset:-2px;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--vows-brand) 70%, transparent),
    color-mix(in srgb, var(--vows-ink) 35%, transparent),
    color-mix(in srgb, var(--vows-brand) 70%, transparent)
  );
  opacity:.18;
  filter: blur(12px);
  pointer-events:none;
}

.wpz-vows .wpz-vows__overlayTop{
  display:flex;
  gap: 14px;
  align-items:center;
}

.wpz-vows .wpz-vows__overlayTexts{ min-width:0; }

/* IMPORTANT: supprime l’ancienne pastille */
.wpz-vows .wpz-vows__pen{ display:none !important; }

/* Titles */
.wpz-vows .wpz-vows__overlayTitle{
  margin:0;
  font-size:16px;
  letter-spacing:.2px;
  color:var(--vows-ink);
  font-family: ui-serif, "Georgia", serif;
  font-style: italic;
  font-weight: 750;
}

.wpz-vows .wpz-vows__overlaySub{
  margin:6px 0 0;
  color: color-mix(in srgb, var(--vows-muted) 92%, #000 0%);
  font-size: 13px;
  line-height: 1.35;
}

/* Dots off */
.wpz-vows .wpz-vows__dots{ display:none !important; }

/* =========================================================
   10) HANDWRITE (FINAL) — stylo suit le texte (FIABLE)
   - on évite translateX(100%) (bug fréquent)
   - on anime LEFT de la plume (stable)
   ========================================================= */
.wpz-vows .wpz-vows__handwrite{
  --wpz-pen: 34px;
  --wpz-padL: 8px;
  --wpz-dur: 2.5s;

  font-family: "Segoe Script","Brush Script MT","Snell Roundhand","Apple Chancery",cursive !important;
  font-size: clamp(22px, 3vw, 34px) !important;
  font-weight: 650 !important;
  letter-spacing: .2px !important;
  line-height: 1.08 !important;
  margin: 2px 0 6px !important;

  position: relative !important;

  /* shrink-to-fit => largeur = largeur réelle du texte */
  display: inline-block !important;
  width: max-content !important;
  max-width: 100% !important;

  white-space: nowrap !important;
  overflow: hidden !important;

  color: transparent !important;
  user-select: none !important;

  padding-left: calc(var(--wpz-pen) - 10px);
}

/* Texte révélé puis effacé */
.wpz-vows .wpz-vows__handwrite::after{
  content: attr(data-text);
  position: absolute;
  inset: 0;
  padding-left: calc(var(--wpz-pen) - 10px);

  background: linear-gradient(90deg, #000 0%, #000 100%);
  background-repeat: no-repeat;
  background-size: 0% 100%;
  background-position: left top;

  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;

  animation: wpz_hw_text var(--wpz-dur) linear infinite;
  will-change: background-size;
}

/* Stylo (anim LEFT, stable) */
.wpz-vows .wpz-vows__handwrite::before{
  content:"";
  position: absolute;
  top: 0.05em;
  left: var(--wpz-padL);

  width: var(--wpz-pen);
  height: var(--wpz-pen);

  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 64 64'%3E%3Cg fill='none'%3E%3Cpath d='M44.8 8.8c1.8-1.8 4.7-1.8 6.5 0l3.9 3.9c1.8 1.8 1.8 4.7 0 6.5L26 48.4 12 52l3.6-14L44.8 8.8z' fill='%230f172a' opacity='.92'/%3E%3Cpath d='M48.4 12.4l3.2 3.2L27.2 40l-3.2-3.2L48.4 12.4z' fill='%235CA174' opacity='.95'/%3E%3Cpath d='M12 52l6-1.6-4.4-4.4L12 52z' fill='%230f172a' opacity='.55'/%3E%3C/g%3E%3C/svg%3E");

  filter: drop-shadow(0 12px 18px rgba(0,0,0,.18));
  transform-origin: 20% 80%;

  animation: wpz_hw_pen var(--wpz-dur) linear infinite;
  will-change: left;
}

/* Fine ligne d’encre sous le texte */
.wpz-vows .wpz-vows__handwrite{
  --wpz-ink: color-mix(in srgb, var(--vows-brand) 55%, transparent);

  background-image: linear-gradient(90deg, transparent, var(--wpz-ink), transparent);
  background-repeat: no-repeat;
  background-size: 0% 2px;
  background-position: calc(var(--wpz-pen) - 10px) 100%;

  animation: wpz_hw_ink var(--wpz-dur) linear infinite;
}

/* Écriture -> pause -> effacement */
@keyframes wpz_hw_text{
  0%   { background-size: 0% 100%; opacity: .75; }
  55%  { background-size: 100% 100%; opacity: 1; }
  70%  { background-size: 100% 100%; opacity: 1; }
  100% { background-size: 0% 100%; opacity: .75; }
}

@keyframes wpz_hw_ink{
  0%   { background-size: 0% 2px; opacity: .18; }
  55%  { background-size: 100% 2px; opacity: .55; }
  70%  { background-size: 100% 2px; opacity: .55; }
  100% { background-size: 0% 2px; opacity: .18; }
}

/* Stylo suit la largeur du conteneur (width:max-content) via LEFT */
@keyframes wpz_hw_pen{
  0%   { left: var(--wpz-padL); transform: rotate(-18deg); }
  55%  { left: calc(100% - var(--wpz-pen)); transform: rotate(-18deg); }
  70%  { left: calc(100% - var(--wpz-pen)); transform: rotate(-18deg); }
  100% { left: var(--wpz-padL); transform: rotate(-18deg); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .wpz-vows .wpz-vows__handwrite,
  .wpz-vows .wpz-vows__handwrite::before,
  .wpz-vows .wpz-vows__handwrite::after{
    animation: none !important;
  }
  .wpz-vows .wpz-vows__handwrite{
    color: color-mix(in srgb, var(--vows-ink) 92%, #000 0%) !important;
    background-image: none !important;
  }
  .wpz-vows .wpz-vows__handwrite::after{
    -webkit-text-fill-color: currentColor !important;
    background: none !important;
  }
}



.wpz-modal[hidden]{ display:none !important; }
.wpz-modal{
  position: fixed; inset: 0; z-index: 9999;
}
.wpz-modal__backdrop{
  position:absolute; inset:0;
  background: rgba(10, 18, 30, .55);
  backdrop-filter: blur(6px);
}
.wpz-modal__dialog{
  position: relative;
  width: min(560px, calc(100vw - 28px));
  margin: 7vh auto;
  background: var(--card, #fff);
  border: 1px solid var(--line, rgba(0,0,0,.08));
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  overflow: hidden;
  outline: none;
}
.wpz-modal__header{
  display:flex; align-items:center; justify-content:space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line, rgba(0,0,0,.08));
}
.wpz-modal__title{
  margin:0; font-size: 16px; font-weight: 700; color: var(--text, #111);
}
.wpz-modal__body{
  padding: 14px 16px;
}
.wpz-modal__desc{
  margin: 0 0 12px;
  color: var(--text-2, #4b5563);
  line-height: 1.45;
}
.wpz-modal__field{ margin-top: 10px; }
.wpz-modal__label{
  display:block; margin-bottom: 6px;
  font-size: 12px; color: var(--muted, #6b7280);
}
.wpz-modal__hint{
  margin: 8px 0 0;
  font-size: 12px; color: var(--muted, #6b7280);
}
.wpz-input{
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--line, rgba(0,0,0,.12));
  background: var(--bg, #fff);
  color: var(--text, #111);
  outline: none;
}
.wpz-input:focus{
  border-color: var(--brand, #5CA174);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand, #5CA174) 18%, transparent);
}
.wpz-modal__footer{
  display:flex; justify-content:flex-end; gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--line, rgba(0,0,0,.08));
}
.wpz-btn--icon{
  width: 36px; height: 36px;
  border-radius: 10px;
}







/* =========================================================
   WPZ MODAL — PREMIUM (V3) — Iliade Native
   Cible: .wpz-modal (global footer)
   Objectif: look premium + mobile first + focus + boutons clean
   ========================================================= */

/* Lock scroll (ton JS ajoute .wpz-overlay-lock sur <html>) */
html.wpz-overlay-lock,
html.wpz-overlay-lock body{
  overflow: hidden !important;
}

/* Root modal */
.wpz-modal[hidden]{ display:none !important; }

.wpz-modal{
  position: fixed;
  inset: 0;
  z-index: 100000; /* au-dessus de tout */
  display: grid;
  place-items: center;
  padding: clamp(14px, 4vw, 24px);
  isolation: isolate;
  font-family: inherit;
}

/* Backdrop premium */
.wpz-modal__backdrop{
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(92,161,116,.18), transparent 60%),
    radial-gradient(900px 500px at 80% 0%, rgba(15,23,42,.18), transparent 55%),
    rgba(10, 18, 30, .56);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
}

/* Dialog */
.wpz-modal__dialog{
  position: relative;
  width: min(560px, 100%);
  max-height: min(86vh, 760px);
  overflow: hidden;
  border-radius: 18px;

  background: color-mix(in oklab, #fff 92%, #f4f7f5);
  border: 1px solid rgba(255,255,255,.22);

  box-shadow:
    0 30px 80px rgba(0,0,0,.35),
    0 12px 28px rgba(0,0,0,.18);

  transform: translateY(10px) scale(.985);
  opacity: 0;
  animation: wpzModalIn .18s ease-out forwards;

  outline: none;
}

/* subtle glow edge */
.wpz-modal__dialog::before{
  content:"";
  position:absolute;
  inset:-2px;
  border-radius: 20px;
  background: linear-gradient(135deg,
    rgba(92,161,116,.35),
    rgba(255,255,255,.12),
    rgba(15,23,42,.22)
  );
  filter: blur(14px);
  opacity: .35;
  pointer-events: none;
  z-index: -1;
}

@keyframes wpzModalIn{
  to{ transform: translateY(0) scale(1); opacity: 1; }
}

/* Header */
.wpz-modal__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;

  padding: 14px 16px;
  background: linear-gradient(
    180deg,
    rgba(244,247,245,.92),
    rgba(255,255,255,.88)
  );
  border-bottom: 1px solid rgba(15,23,42,.08);
}

.wpz-modal__title{
  margin:0;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .2px;
  color: #0f172a;
  line-height: 1.15;
}

/* Close btn */
.wpz-modal .wpz-btn--icon{
  -webkit-appearance:none;
  appearance:none;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,.14);
  background: rgba(255,255,255,.9);
  color: #0f172a;
  display:grid;
  place-items:center;
  cursor:pointer;
  box-shadow: 0 10px 24px rgba(0,0,0,.10);
  transition: transform .08s ease, background .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.wpz-modal .wpz-btn--icon:hover{
  transform: translateY(-1px);
  border-color: rgba(92,161,116,.35);
  box-shadow: 0 14px 30px rgba(0,0,0,.14);
}
.wpz-modal .wpz-btn--icon:active{
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(0,0,0,.12);
}
.wpz-modal .wpz-btn--icon:focus-visible{
  outline: 2px solid color-mix(in oklab, #5CA174 65%, #000 0%);
  outline-offset: 2px;
}

/* Body */
.wpz-modal__body{
  padding: 14px 16px 10px;
  background: rgba(255,255,255,.92);
}

.wpz-modal__desc{
  margin: 0 0 12px;
  color: rgba(15,23,42,.72);
  line-height: 1.5;
  font-size: 13.5px;
}

.wpz-modal__field{ margin-top: 10px; }

.wpz-modal__label{
  display:block;
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(15,23,42,.55);
}

.wpz-modal__hint{
  margin: 8px 0 0;
  font-size: 12.5px;
  color: rgba(15,23,42,.56);
}

/* Input premium */
.wpz-modal .wpz-input{
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.14);
  background: #fff;
  color: #0f172a;
  outline: none;
  box-shadow: 0 1px 0 rgba(0,0,0,.03);
  transition: border-color .15s ease, box-shadow .15s ease, transform .08s ease;
}
.wpz-modal .wpz-input:hover{
  border-color: rgba(92,161,116,.30);
}
.wpz-modal .wpz-input:focus{
  border-color: #5CA174;
  box-shadow:
    0 0 0 4px color-mix(in oklab, #5CA174 18%, transparent),
    0 14px 30px rgba(0,0,0,.10);
  transform: translateY(-1px);
}
.wpz-modal .wpz-input::placeholder{
  color: rgba(100,116,139,.70);
}

/* Footer */
.wpz-modal__footer{
  display:flex;
  justify-content:flex-end;
  gap: 10px;
  padding: 12px 16px 16px;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,.92),
    rgba(244,247,245,.95)
  );
  border-top: 1px solid rgba(15,23,42,.08);
}

/* Buttons premium (modal-only) */
.wpz-modal .wpz-btn{
  -webkit-appearance:none;
  appearance:none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: .72rem 1.05rem;
  font-weight: 900;
  letter-spacing: .15px;
  line-height: 1.1;
  cursor: pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: .55rem;
  text-decoration:none;
  transition: transform .08s ease, filter .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  user-select:none;
}

/* Primary */
.wpz-modal .wpz-btn--primary{
  background: #5CA174;
  border-color: #5CA174;
  color: #fff;
  box-shadow: 0 12px 26px rgba(92,161,116,.28);
}
.wpz-modal .wpz-btn--primary:hover{
  transform: translateY(-1px);
  filter: brightness(.98);
  box-shadow: 0 18px 40px rgba(92,161,116,.34);
}
.wpz-modal .wpz-btn--primary:active{
  transform: translateY(0);
  box-shadow: 0 10px 22px rgba(92,161,116,.26);
}

/* Ghost */
.wpz-modal .wpz-btn--ghost{
  background: rgba(255,255,255,.9);
  border-color: rgba(15,23,42,.14);
  color: #0f172a;
  box-shadow: 0 10px 22px rgba(0,0,0,.10);
}
.wpz-modal .wpz-btn--ghost:hover{
  transform: translateY(-1px);
  border-color: rgba(92,161,116,.30);
  box-shadow: 0 14px 30px rgba(0,0,0,.14);
}
.wpz-modal .wpz-btn--ghost:active{
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(0,0,0,.12);
}

/* Focus */
.wpz-modal :where(.wpz-btn, .wpz-input):focus-visible{
  outline: 2px solid color-mix(in oklab, #5CA174 65%, #000 0%);
  outline-offset: 2px;
}

/* Mobile polish */
@media (max-width: 560px){
  .wpz-modal{
    padding: 12px;
  }
  .wpz-modal__dialog{
    width: 100%;
    max-height: 88vh;
    border-radius: 16px;
  }
  .wpz-modal__footer{
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .wpz-modal .wpz-btn{
    width: 100%;
    justify-content: center;
  }
}


/* =========================================================
   WPZ MODAL — HOTFIX UI (buttons inline + close red X)
   À coller TOUT EN BAS pour écraser l'ancien CSS modal
   ========================================================= */

/* Dialog sizing / spacing clean */
.wpz-modal .wpz-modal__dialog{
  margin: 0 !important;              /* enlève le vieux "7vh auto" */
  width: min(560px, calc(100vw - 28px)) !important;
}

/* Header: titre + croix à droite (pas de bouton énorme) */
.wpz-modal .wpz-modal__header{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap: 12px !important;
}

.wpz-modal .wpz-modal__title{
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

/* Close = simple X rouge */
.wpz-modal [data-wpz-modal-close]{
  -webkit-appearance:none;
  appearance:none;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;

  width: 34px !important;
  height: 34px !important;
  border-radius: 10px !important;

  display:grid !important;
  place-items:center !important;

  color: #dc2626 !important;     /* rouge */
  font-size: 22px !important;    /* taille du X */
  font-weight: 900 !important;
  line-height: 1 !important;

  cursor: pointer !important;
  padding: 0 !important;
}

.wpz-modal [data-wpz-modal-close]:hover{
  background: rgba(220,38,38,.10) !important;
}

.wpz-modal [data-wpz-modal-close]:focus-visible{
  outline: 2px solid rgba(220,38,38,.55) !important;
  outline-offset: 2px !important;
}

/* Footer: TOUJOURS en ligne, même sur mobile */
.wpz-modal .wpz-modal__footer{
  display:flex !important;
  flex-direction: row !important;     /* force inline */
  align-items:center !important;
  justify-content:flex-end !important;
  gap: 10px !important;
  flex-wrap: nowrap !important;       /* empêche de passer en colonne */
}

/* Boutons: mêmes hauteurs, pas étirés */
.wpz-modal .wpz-modal__footer .wpz-btn{
  width: auto !important;
  min-width: 140px;                   /* look premium */
  justify-content:center !important;
}

/* Mobile: si vraiment trop serré, on réduit un peu sans passer en colonne */
@media (max-width: 420px){
  .wpz-modal .wpz-modal__footer .wpz-btn{
    min-width: 0 !important;
    padding: .68rem .9rem !important;
    font-size: 14px !important;
  }
}



/* =========================================================
   WPZ — Vows Assistant — Mobile: hide top header actions
   Cible: page assistant uniquement
   Cache: Nouveau / Charger / Sauvegarder (+ tout bouton "destock" si présent)
   ========================================================= */

@media (max-width: 980px){

  /* 1) On cache TOUTE la zone d’actions desktop */
  .wpz-vows.wpz-vows--assistant .wpz-vows__headActions{
    display: none !important;
  }

  /* 2) Sécurité: si jamais certains boutons sont ailleurs avec data-action */
  .wpz-vows.wpz-vows--assistant [data-action="new"],
  .wpz-vows.wpz-vows--assistant [data-action="manual-save"],
  .wpz-vows.wpz-vows--assistant [data-manual-save-btn]{
    display: none !important;
  }

  /* 3) Sécurité: lien “Charger” (dashboard) dans le header */
  .wpz-vows.wpz-vows--assistant .wpz-vows__headActions a.wpz-btn{
    display: none !important;
  }

  /* 4) Si tu as un bouton “destock” (ou “de-stock”) avec data-action */
  .wpz-vows.wpz-vows--assistant [data-action="destock"],
  .wpz-vows.wpz-vows--assistant [data-action="de-stock"],
  .wpz-vows.wpz-vows--assistant .wpz-btn--destock{
    display: none !important;
  }
}




/* =========================================================
   WPZ — Vows Overlay — ALWAYS ON TOP (final override)
   À coller TOUT EN BAS
   ========================================================= */

/* 1) L’overlay doit dépasser tout (même si un parent a transform/filter) */
.wpz-vows [data-overlay]{
  position: fixed !important;
  inset: 0 !important;

  /* z-index volontairement énorme (au-dessus des modals, sticky headers, etc.) */
  z-index: 2147483647 !important; /* max 32-bit signed */

  /* crée son propre contexte et évite les interférences */
  isolation: isolate !important;

  display: grid !important;
  place-items: center !important;

  /* évite bug iOS / overlay “décalé” */
  transform: none !important;
  filter: none !important;
  will-change: auto !important;
}

/* 2) S’assurer que le contenu (card) est au-dessus du backdrop */
.wpz-vows [data-overlay] .wpz-vows__overlayCard{
  position: relative !important;
  z-index: 1 !important;
}

/* 3) Backdrop bien bloquant (capture clics) */
.wpz-vows [data-overlay]{
  pointer-events: auto !important;
}
.wpz-vows [data-overlay] *{
  pointer-events: auto !important;
}

/* 4) Sécurité: si ton thème/metabox met un z-index “infini” sur la modal */
.wpz-modal{
  z-index: 100000 !important; /* OK, mais overlay reste au-dessus */
}

/* 5) Sécurité: FAB / sticky header / autres flottants */
.wpz-fab,
.site-header,
.elementor-sticky--effects{
  z-index: 9999 !important;
}

/* 6) Lock scroll fiable quand overlay affiché */
html.wpz-overlay-lock,
html.wpz-overlay-lock body{
  overflow: hidden !important;
}




/* =========================================================
   WPZ — Handwrite — Mobile full width
   ========================================================= */
@media (max-width: 560px){
  .wpz-vows .wpz-vows__handwrite{
    display: block !important;
    width: 100% !important;        /* prend toute la carte */
    max-width: 100% !important;
  }

  /* optionnel : évite que le texte déborde si très long */
  .wpz-vows .wpz-vows__handwrite{
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}

@media (max-width: 560px){
  .wpz-vows .wpz-vows__handwrite{
    text-align: center !important;
  }
  .wpz-vows .wpz-vows__handwrite::after{
    text-align: center !important;
  }
}
/* =========================================================
   WPZ — Overlay handwrite full width (FIX REAL)
   Cause: parent flex item (.wpz-vows__overlayTexts) shrink-to-content
   ========================================================= */

@media (max-width: 980px){

  /* Le container texte doit s’étirer dans le flex */
  .wpz-vows .wpz-vows__overlayTop{
    width: 100% !important;
  }

  .wpz-vows .wpz-vows__overlayTexts{
    flex: 1 1 auto !important;     /* <-- le point clé */
    width: 100% !important;
    min-width: 0 !important;
  }

  /* L’écriture peut maintenant prendre 100% de la card */
  .wpz-vows .wpz-vows__handwrite{
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* optionnel: centrage visuel */
  .wpz-vows .wpz-vows__handwrite,
  .wpz-vows .wpz-vows__handwrite::after{
    text-align: center !important;
  }
}


/* =========================================================
   WPZ — Overlay title size (MOBILE)
   À coller TOUT EN BAS
   ========================================================= */
@media (max-width: 980px){
  .wpz-vows .wpz-vows__handwrite{
    font-size: clamp(34px, 7vw, 40px) !important; /* + grand sur mobile */
    line-height: 1.05 !important;
  }

  /* optionnel : stylo un poil plus grand aussi */
  .wpz-vows .wpz-vows__handwrite{
    --wpz-pen: 38px; /* au lieu de 34px */
  }
  
    /* Le conteneur texte prend toute la largeur ET centre tout */
  .wpz-vows .wpz-vows__overlayTexts{
    width: 100% !important;
    text-align: center !important;
  }

  /* Sous-titre dynamique */
  .wpz-vows .wpz-vows__overlaySub{
    width: 100% !important;
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Si un titre "overlayTitle" est utilisé */
  .wpz-vows .wpz-vows__overlayTitle{
    width: 100% !important;
    text-align: center !important;
  }

  /* Sécurité: si ton sous-texte contient des spans */
  .wpz-vows .wpz-vows__overlaySub *{
    text-align: center !important;
  }
}