/**
 * ═══════════════════════════════════════════════════════════════
 * RIAD MAROCVACANCE — Correctifs v3.8.7
 * ═══════════════════════════════════════════════════════════════
 *
 * Surcouche finale chargée en TOUT DERNIER pour garantir l'override.
 * Chaque sélecteur utilise une spécificité élevée (body + classes)
 * pour battre les règles du main.css sans dépendre de l'ordre de
 * chargement (utile face aux caches plugin/serveur).
 *
 *   1. Hero "Authentic Marrakech" — voile semi-transparent + halo texte
 *   2. Chatbot — vraies dimensions premium responsive (desk/tab/mob)
 *   3. Logo customizer — dimensionnement fin
 */

/* ═══════════════════════════════════════════════════════════════
   1. LOGO PERSONNALISÉ (Customizer)
═══════════════════════════════════════════════════════════════ */
body .lux-nav__logo--custom {
    display: inline-flex !important;
    align-items: center !important;
    text-decoration: none;
    transition: opacity 0.25s ease;
    height: 64px !important;
    max-height: 64px !important;
    overflow: hidden !important;
}
body .lux-nav__logo--custom:hover { opacity: 0.88; }
body .lux-nav__logo-img,
body .lux-nav__logo--custom img,
body header .lux-nav__logo-img {
    height: 52px !important;
    max-height: 52px !important;
    width: auto !important;
    max-width: 220px !important;
    object-fit: contain !important;
    display: block !important;
}
@media (max-width: 767px) {
    body .lux-nav__logo--custom { height: 48px !important; max-height: 48px !important; }
    body .lux-nav__logo-img,
    body .lux-nav__logo--custom img { height: 40px !important; max-height: 40px !important; max-width: 160px !important; }
}

/* ═══════════════════════════════════════════════════════════════
   2. HERO — "Authentic Marrakech" lisible quel que soit l'image
   Approche stratifiée :
     a) Overlay vertical renforcé (déjà fait en v3.8.6)
     b) Scrim gauche plus dense
     c) NOUVEAU v3.8.7 : voile rectangulaire semi-transparent
        derrière le contenu du hero
     d) Text-shadow doublé (halo + ombre nette)
═══════════════════════════════════════════════════════════════ */

/* a) Overlay vertical (renforcé) */
body .lux-hero__media::after {
    background: linear-gradient(
        180deg,
        rgba(15, 8, 5, 0.55) 0%,
        rgba(15, 8, 5, 0.35) 45%,
        rgba(15, 8, 5, 0.80) 100%
    ) !important;
}

/* b) Scrim gauche (plus dense, plus large) */
body .lux-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        90deg,
        rgba(15, 8, 5, 0.68) 0%,
        rgba(15, 8, 5, 0.50) 25%,
        rgba(15, 8, 5, 0.15) 55%,
        rgba(15, 8, 5, 0.00) 75%
    );
    pointer-events: none;
}

/* c) Voile rectangulaire derrière le contenu — invisible mais améliore
   considérablement le contraste sur la zone du texte */
body .lux-hero__content {
    position: relative;
}
body .lux-hero__content::before {
    content: '';
    position: absolute;
    inset: -32px -64px -32px -32px;
    background: radial-gradient(
        ellipse at left center,
        rgba(15, 8, 5, 0.45) 0%,
        rgba(15, 8, 5, 0.25) 50%,
        rgba(15, 8, 5, 0.00) 100%
    );
    z-index: -1;
    pointer-events: none;
    border-radius: 24px;
}

/* d) Text-shadow renforcé : halo diffus + ombre nette en plus */
body .lux-hero__title {
    text-shadow:
        0 0 24px rgba(0, 0, 0, 0.6),
        0 2px 12px rgba(0, 0, 0, 0.7),
        0 1px 3px rgba(0, 0, 0, 0.8) !important;
    color: #FFFFFF !important; /* blanc pur — plus lumineux que ivoire */
}
body .lux-hero__title em {
    color: #F0D08C !important; /* or chaud légèrement plus saturé */
    text-shadow:
        0 0 24px rgba(0, 0, 0, 0.7),
        0 2px 12px rgba(0, 0, 0, 0.8),
        0 1px 3px rgba(0, 0, 0, 0.85) !important;
}
body .lux-hero__lead {
    color: rgba(255, 255, 255, 0.96) !important;
    text-shadow:
        0 1px 10px rgba(0, 0, 0, 0.65),
        0 1px 2px rgba(0, 0, 0, 0.55) !important;
}
body .lux-hero__eyebrow {
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55) !important;
    color: #E5C77A !important;
}

/* ═══════════════════════════════════════════════════════════════
   3. CHATBOT — VRAIMENT compact (spécificité triple)
   Mounir a confirmé qu'à la résolution Desktop, le panneau était
   encore trop imposant en v3.8.6. On force la dimension via une
   sélection à plusieurs niveaux pour battre les règles ailleurs.
═══════════════════════════════════════════════════════════════ */

/* ─── Bouton flottant ─── */
body .riad-chat-bubble,
html body .riad-chat-bubble {
    width: 52px !important;
    height: 52px !important;
    bottom: 22px !important;
    right: 22px !important;
    box-shadow:
        0 6px 18px rgba(184, 147, 90, 0.30),
        0 2px 6px rgba(26, 18, 9, 0.12) !important;
}
body .riad-chat-bubble__icon svg,
html body .riad-chat-bubble__icon svg {
    width: 20px !important;
    height: 20px !important;
}
body .riad-chat-bubble:hover {
    transform: translateY(-2px) scale(1.05) !important;
}
/* Pulse plus discret */
body .riad-chat-bubble__pulse {
    animation: riad-pulse-discreet 3s ease-out infinite !important;
}
@keyframes riad-pulse-discreet {
    0%   { transform: scale(1);   opacity: 0.25; }
    100% { transform: scale(1.30); opacity: 0; }
}

/* ─── FENÊTRE DU CHAT ─── DESKTOP (>=1025px) */
body .riad-chat-window,
body .riad-chat-window.riad-chat-window--v2,
body .riad-chat-window--v2,
html body .riad-chat-window--v2 {
    width: 340px !important;
    max-width: 340px !important;
    height: auto !important;
    max-height: 540px !important;
    bottom: 88px !important;
    right: 22px !important;
    left: auto !important;
    border-radius: 16px !important;
    box-shadow:
        0 20px 50px rgba(26, 18, 9, 0.30),
        0 6px 12px rgba(26, 18, 9, 0.08) !important;
    transition:
        opacity 0.25s ease,
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s 0.28s !important;
}
body .riad-chat-window.is-open {
    transition:
        opacity 0.25s ease,
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s !important;
}

/* ─── Header chatbot compact ─── */
body .riad-chat-window__header {
    padding: 12px 14px !important;
    gap: 10px !important;
}
body .riad-chat-window__avatar {
    width: 34px !important;
    height: 34px !important;
    flex-shrink: 0;
}
body .riad-chat-window__avatar svg {
    width: 16px !important;
    height: 16px !important;
}
body .riad-chat-window__heading h3 {
    font-size: 13px !important;
    line-height: 1.3 !important;
    margin: 0 !important;
}
body .riad-chat-window__heading p {
    font-size: 11px !important;
    line-height: 1.3 !important;
    margin: 2px 0 0 !important;
}
body .riad-chat-window__lang {
    font-size: 10px !important;
    padding: 3px 7px !important;
}

/* ─── Zone messages compactée ─── */
body .riad-chat-window__messages,
body .riad-chat-window__body {
    padding: 12px !important;
    font-size: 13px !important;
    max-height: 320px !important;
}

/* ─── Bulles de message plus compactes ─── */
body .riad-chat-msg {
    margin-bottom: 8px !important;
}
body .riad-chat-msg__bubble {
    padding: 10px 12px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    border-radius: 14px !important;
    max-width: 90% !important;
}

/* ─── Boutons d'options compacts ─── */
body .riad-chat-options {
    gap: 6px !important;
}
body .riad-chat-option {
    padding: 7px 10px !important;
    font-size: 12px !important;
    border-radius: 100px !important;
    min-width: 60px !important;
}

/* ─── Zone input/form compacte ─── */
body .riad-chat-window__input-area {
    padding: 10px 12px !important;
    border-top: 1px solid rgba(0,0,0,0.06);
}
body .riad-chat-form input {
    padding: 8px 12px !important;
    font-size: 13px !important;
}

/* ═══════════════════════════════════════════════════════════════
   3-bis. CHATBOT — TABLETTE (768-1024px)
═══════════════════════════════════════════════════════════════ */
@media (min-width: 768px) and (max-width: 1024px) {
    body .riad-chat-window,
    body .riad-chat-window--v2 {
        width: 320px !important;
        max-width: 320px !important;
        height: auto !important;
        max-height: 480px !important;
    }
    body .riad-chat-window__messages,
    body .riad-chat-window__body {
        max-height: 280px !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   3-ter. CHATBOT — MOBILE (<=767px)
═══════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
    body .riad-chat-bubble {
        width: 48px !important;
        height: 48px !important;
        bottom: 16px !important;
        right: 16px !important;
    }
    body .riad-chat-bubble__icon svg {
        width: 18px !important;
        height: 18px !important;
    }
    body .riad-chat-window,
    body .riad-chat-window--v2 {
        width: 92vw !important;
        max-width: 360px !important;
        height: auto !important;
        max-height: 70vh !important;
        bottom: 76px !important;
        right: 4vw !important;
        left: auto !important;
    }
    body .riad-chat-window__messages,
    body .riad-chat-window__body {
        max-height: calc(70vh - 180px) !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   v3.9.1 — DROPDOWN SÉLECTEUR DE LANGUE
═══════════════════════════════════════════════════════════════ */
.lux-nav__lang-wrap {
    position: relative;
    display: inline-block;
}
.lux-nav__lang-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 160px;
    background: #1A0F08;
    border: 1px solid rgba(201, 163, 78, 0.30);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.22,1,0.36,1), visibility 0.22s;
    z-index: 1000;
}
.lux-nav__lang-wrap.is-open .lux-nav__lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.lux-nav__lang-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    color: #F5EDE0;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.18s ease, color 0.18s ease;
}
.lux-nav__lang-item:hover {
    background: rgba(201, 163, 78, 0.12);
    color: #E5C77A;
}
.lux-nav__lang-item.is-active {
    color: #E5C77A;
    font-weight: 600;
}
.lux-nav__lang-flag {
    font-size: 16px;
    line-height: 1;
}
.lux-nav__lang[aria-expanded="true"] svg {
    transform: rotate(180deg);
}
.lux-nav__lang svg {
    transition: transform 0.22s ease;
}

/* ═══════════════════════════════════════════════════════════════
   v3.9.4 — FIX boutons "Voir plus" illisibles (cartes expériences)
   Le texte sombre sur fond sombre venait d'un héritage de couleur.
   On force le texte clair, spécificité élevée.
═══════════════════════════════════════════════════════════════ */
body .riad-experience-card-v2__cta,
body a.riad-experience-card-v2__cta {
    background: #1A0F08 !important;
    color: #F5EDE0 !important;
}
body .riad-experience-card-v2__cta:hover,
body a.riad-experience-card-v2__cta:hover {
    background: #C66B3D !important;
    color: #FFFFFF !important;
}
/* Sécurité : tout descendant texte du bouton hérite du clair */
body .riad-experience-card-v2__cta * { color: inherit !important; }

/* ═══════════════════════════════════════════════════════════════
   v3.9.4 — Barre WhatsApp en haut du chatbot
═══════════════════════════════════════════════════════════════ */
.riad-chat-wa-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #25D366;
    color: #fff !important;
    text-decoration: none;
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: background 0.2s ease;
    border: none;
}
.riad-chat-wa-bar:hover { background: #1EBE57; }
.riad-chat-wa-bar svg { flex-shrink: 0; }
