/* ==========================================================================
   Vandeto - Watermark Title  v1.1.0
   Compatibilité Yellow Pencil Visual Customizer ajoutée.
   ========================================================================== */

.vwt-watermark {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 90px;
    isolation: isolate;
}

/* ── Texte fantôme ───────────────────────────────────────────────────────── */
.vwt-watermark__ghost {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 0;
    white-space: nowrap;
    line-height: 1;
    font-weight: 800;
    /* pointer-events et user-select désactivés en prod pour ne pas gêner l'UX */
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
}

.vwt-watermark__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

.vwt-watermark__eyebrow {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vwt-watermark__heading {
    margin: 0;
    font-size: 36px;
    font-weight: 800;
    line-height: 1.2;
}

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .vwt-watermark__ghost {
        max-width: 100vw;
    }
}

/* ── Overflow containment ────────────────────────────────────────────────── */
.elementor-widget-vwt-watermark-title {
    overflow-x: clip;
    max-width: 100%;
}

/* ==========================================================================
   YELLOW PENCIL — Compatibilité édition visuelle
   Le texte fantôme est normalement pointer-events:none (UX production).
   Quand Yellow Pencil est actif (iframe avec body.wyp-editor-active ou
   présence du cookie/param wyp), on réactive pointer-events pour que
   YP puisse sélectionner et styler le ghost au clic.

   Yellow Pencil injecte la classe .wyp-editor-active sur le body
   de l'iframe de prévisualisation.
   ========================================================================== */

/* Réactivation pointer-events dans l'éditeur YP */
body.wyp-editor-active .vwt-watermark__ghost,
body.wyp-active .vwt-watermark__ghost,
body[class*="wyp-"] .vwt-watermark__ghost {
    pointer-events: auto !important;
    user-select: auto !important;
    -webkit-user-select: auto !important;
    /* Curseur crosshair pour indiquer que l'élément est sélectionnable dans YP */
    cursor: crosshair !important;
}

/* Quand YP survole le ghost, légère mise en évidence pour confirmer la sélection */
body.wyp-editor-active .vwt-watermark__ghost:hover,
body.wyp-active .vwt-watermark__ghost:hover,
body[class*="wyp-"] .vwt-watermark__ghost:hover {
    outline: 2px dashed rgba(255, 193, 7, 0.7) !important;
    outline-offset: 4px !important;
}
