/* =============================================================
   VHB — Vandeto Hero Banner  |  widget.css  |  v1.0.0
   ============================================================= */

/* ── Reset interne ─────────────────────────────────────────── */
.vhb-hero *,
.vhb-hero *::before,
.vhb-hero *::after,
.vhb-flags-section *,
.vhb-flags-section *::before,
.vhb-flags-section *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ════════════════════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════════════════════ */
.vhb-hero {
    position: relative;
    overflow: hidden;
    width: 100%;
    min-height: 520px; /* défaut — surchargé par Elementor */
    user-select: none;
    -webkit-user-select: none;
}

/* ── Slides wrapper ─────────────────────────────────────────── */
.vhb-slides-wrapper {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.vhb-slide {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0;
    z-index: 1;
    transition: opacity 0.9s ease;
    will-change: opacity;
}

.vhb-slide.vhb-slide--active {
    opacity: 1;
    z-index: 2;
}

/* ── Fond image (+ Ken Burns ici, pas sur le parent) ───────── */
.vhb-slide-bg {
    position: absolute;
    inset: -4%;          /* léger débord pour le zoom sans bord blanc */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    will-change: transform;
}

/* Ken Burns — activé via data-ken="1" */
@keyframes vhb-ken-burns {
    from { transform: scale(1.07); }
    to   { transform: scale(1.0);  }
}

[data-ken="1"] .vhb-slide--active .vhb-slide-bg {
    animation: vhb-ken-burns 8s ease-out forwards;
}

/* ── Overlay / voile ────────────────────────────────────────── */
.vhb-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background-color: #000;
    opacity: 0.38; /* surchargé par Elementor */
}

/* ── Inner — centrage du contenu ────────────────────────────── */
.vhb-inner {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    justify-content: center; /* vertical — surchargé par prefix_class */
    align-items: center;     /* horizontal — surchargé par prefix_class */
    width: 100%;
}

/* Alignements via prefix_class */
.vhb-valign-top    .vhb-inner { justify-content: flex-start; }
.vhb-valign-center .vhb-inner { justify-content: center;     }
.vhb-valign-bottom .vhb-inner { justify-content: flex-end;   }

.vhb-halign-left   .vhb-inner { align-items: flex-start; }
.vhb-halign-center .vhb-inner { align-items: center;     }
.vhb-halign-right  .vhb-inner { align-items: flex-end;   }

/* ── Contenu ─────────────────────────────────────────────────── */
.vhb-content {
    display: flex;
    flex-direction: column;
    align-items: center;    /* surchargé par prefix_class */
    text-align: center;     /* surchargé par prefix_class */
    width: 100%;
    padding: 60px 40px;     /* surchargé par Elementor */
    max-width: 1200px;
}

.vhb-halign-left   .vhb-content { align-items: flex-start; text-align: left;   }
.vhb-halign-center .vhb-content { align-items: center;     text-align: center;  }
.vhb-halign-right  .vhb-content { align-items: flex-end;   text-align: right;   }

/* ── Titre ───────────────────────────────────────────────────── */
.vhb-title {
    color: #fff;
    font-size: clamp(26px, 4vw, 52px);
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -0.02em;
    margin: 0 0 12px;
}

/* ── Sous-titre ──────────────────────────────────────────────── */
.vhb-subtitle {
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(14px, 1.8vw, 18px);
    font-weight: 400;
    line-height: 1.5;
    margin: 0 0 32px;
}

/* ════════════════════════════════════════════════════════════
   BARRE DE RECHERCHE
   ════════════════════════════════════════════════════════════ */
.vhb-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 860px; /* surchargé par Elementor */
    flex-wrap: wrap;
    justify-content: center;
}

.vhb-halign-left  .vhb-search-form { justify-content: flex-start; }
.vhb-halign-right .vhb-search-form { justify-content: flex-end;   }

/* Input keyword */
.vhb-search-input {
    flex: 1 1 260px;
    min-width: 180px;
    height: 52px;             /* surchargé */
    padding: 0 22px;
    border: none;
    border-radius: 100px;     /* surchargé */
    background: #fff;
    color: #444;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s;
}

.vhb-search-input:focus {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08), 0 0 0 3px rgba(255, 194, 32, 0.35);
}

.vhb-search-input::placeholder {
    color: #444;
    opacity: 0.6;
}

/* Wrapper select (pour le chevron custom) */
.vhb-select-wrap {
    position: relative;
    flex-shrink: 0;
}

.vhb-select-wrap::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
}

/* Select */
.vhb-search-select {
    height: 52px;             /* surchargé */
    padding: 0 38px 0 18px;
    border: none;
    border-radius: 100px;     /* surchargé */
    background: #fff;
    color: #666;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    min-width: 150px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Bouton recherche */
.vhb-search-btn {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 50%;
    background: #ffc220;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(255, 194, 32, 0.4);
    transition: box-shadow 0.2s, transform 0.15s;
}

.vhb-search-btn:hover {
    box-shadow: 0 6px 20px rgba(255, 194, 32, 0.55);
    transform: scale(1.06);
}

.vhb-search-btn:active {
    transform: scale(0.97);
}

/* ════════════════════════════════════════════════════════════
   NAVIGATION — FLÈCHES (desktop uniquement)
   ════════════════════════════════════════════════════════════ */
.vhb-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;          /* surchargé */
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;   /* défaut cercle — surchargé par Elementor */
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    cursor: pointer;
    display: none;        /* caché par défaut — activé seulement desktop hover */
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    padding: 0;
}

.vhb-arrow svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.vhb-arrow-prev { left: 20px; }   /* surchargé par Elementor */
.vhb-arrow-next { right: 20px; }

.vhb-arrow:hover {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.5);
}

.vhb-arrow:active { transform: translateY(-50%) scale(0.94); }

/* Desktop hover pointer = montrer flèches */
@media (hover: hover) and (pointer: fine) {
    .vhb-arrow { display: flex; }
}

/* ════════════════════════════════════════════════════════════
   NAVIGATION — DOTS (mobile)
   ════════════════════════════════════════════════════════════ */
.vhb-dots {
    position: absolute;
    bottom: 20px;         /* surchargé par Elementor */
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: none;        /* caché par défaut — activé seulement mobile touch */
    align-items: center;
    gap: 6px;
}

.vhb-dot {
    width: 7px;
    height: 7px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1), background 0.25s;
    flex-shrink: 0;
}

.vhb-dot.vhb-dot--active {
    width: 22px;
    background: #fff;
}

/* Mobile touch = montrer dots */
@media (hover: none), (pointer: coarse) {
    .vhb-dots  { display: flex; }
    .vhb-arrow { display: none !important; }
}

/* ════════════════════════════════════════════════════════════
   SECTION DRAPEAUX
   ════════════════════════════════════════════════════════════ */
.vhb-flags-section {
    background: #fff;
    padding: 40px 24px;
    width: 100%;
}

.vhb-flags-title {
    font-size: 20px;
    font-weight: 700;
    color: #11151c;
    margin: 0 0 28px;
    letter-spacing: -0.01em;
}

.vhb-flags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    align-items: flex-start;
}

/* Item drapeau */
.vhb-flag-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    cursor: default;
    transition: transform 0.18s;
}

a.vhb-flag-item {
    cursor: pointer;
}

/* Hover uniquement pour les liens */
@media (hover: hover) and (pointer: fine) {
    a.vhb-flag-item:hover { transform: translateY(-3px); }
    a.vhb-flag-item:hover .vhb-flag-img-wrap {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    }
}

/* Image circulaire */
.vhb-flag-img-wrap {
    width: 60px;
    height: 60px;
    border-radius: 50%;   /* défaut cercle — surchargé par Elementor */
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: box-shadow 0.18s;
    flex-shrink: 0;
    background: #f0f0f0;
}

.vhb-flag-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.vhb-flag-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .vhb-content {
        padding: 40px 20px;
    }

    .vhb-title {
        font-size: clamp(22px, 6vw, 34px);
    }

    .vhb-subtitle {
        font-size: 14px;
    }

    .vhb-search-form {
        gap: 8px;
    }

    .vhb-search-input {
        flex: 1 1 100%;
        min-width: 0;
    }

    .vhb-select-wrap {
        flex: 1 1 calc(50% - 4px);
    }

    .vhb-search-select {
        width: 100%;
        min-width: 0;
    }

    .vhb-flags-title {
        font-size: 17px;
        margin-bottom: 20px;
    }

    .vhb-flag-img-wrap {
        width: 48px;
        height: 48px;
    }

    .vhb-flag-label {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .vhb-flags-grid {
        gap: 14px;
    }
}

/* =============================================================
   YELLOW PENCIL — OVERRIDES IFRAME ÉDITEUR
   Vandeto standard : scoped à .yp-yellow-pencil (body class
   injectée par YP uniquement dans le contexte iframe d'édition).
   ============================================================= */

/* Forcer la visibilité des flèches + dots dans l'éditeur,
   quelle que soit la media query hover/pointer.              */
.yp-yellow-pencil .vhb-arrow { display: flex !important; }
.yp-yellow-pencil .vhb-dots  { display: flex !important; }

/* Stopper le Ken Burns — fond stable pendant l'édition.     */
.yp-yellow-pencil [data-ken="1"] .vhb-slide--active .vhb-slide-bg {
    animation: none !important;
    transform: scale(1) !important;
}

/* Stopper toutes les transitions slide en cours.            */
.yp-yellow-pencil .vhb-slide {
    transition: none !important;
}

/* Garantir que l'overlay ne bloque pas la sélection YP.     */
.yp-yellow-pencil .vhb-overlay {
    pointer-events: none !important;
}

/* Rendre les éléments de contenu sélectionnables par YP.    */
.yp-yellow-pencil .vhb-inner,
.yp-yellow-pencil .vhb-title,
.yp-yellow-pencil .vhb-subtitle,
.yp-yellow-pencil .vhb-search-form,
.yp-yellow-pencil .vhb-search-input,
.yp-yellow-pencil .vhb-search-select,
.yp-yellow-pencil .vhb-search-btn,
.yp-yellow-pencil .vhb-flags-section,
.yp-yellow-pencil .vhb-flag-item {
    pointer-events: auto !important;
}

/* Supprimer l'ombre/glow du bouton recherche dans YP
   (évite les artefacts visuels lors de la sélection).       */
.yp-yellow-pencil .vhb-search-btn {
    box-shadow: none !important;
    transform: none !important;
}

/* Hover de flèche — désactivé dans YP (clic = sélection YP) */
.yp-yellow-pencil .vhb-arrow:hover {
    background: rgba(255, 255, 255, 0.14) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}
