/* ========================================
   MOUNA CHAT WIDGET - Styles Frontend
   Couleur: #f6831e (Orange)
   Position: Bas Gauche
   ======================================== */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
    --mouna-primary-color: #f6831e;
    --mouna-primary-dark: #d96f0f;
    --mouna-primary-light: #f6831e;
    --mouna-text-dark: #2d3748;
    --mouna-text-muted: #4a5568;
    --mouna-bg-white: #ffffff;
    --mouna-shadow-opacity: 0.3;
    --mouna-animation-speed: 3s;
    --mouna-whatsapp-green: #25d366;
    --mouna-online-green: #10b981;
}

/* ========================================
   CONTAINER
   ======================================== */
.mouna-chat-widget-container {
    position: fixed;
    bottom: 30px;
    left: 30px;
    /* Position ÃƒÂ  GAUCHE */
    z-index: 100;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

.mouna-chat-widget-container.mouna-widget-right {
    left: auto;
    right: 30px;
}

/* ========================================
   WIDGET PRINCIPAL
   ======================================== */
.mouna-chat-widget {
    max-width: 420px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    color: inherit;
    text-decoration: none;
}

.mouna-chat-widget-container.mouna-widget-entering .mouna-chat-widget {
    opacity: 0;
}

.mouna-chat-widget:hover {
    transform: translateY(-4px);
}

/* ========================================
   SECTION PROFIL
   ======================================== */
.mouna-profile-container {
    position: relative;
    flex-shrink: 0;
    border-radius: 50px;
}

.mouna-profile-image {
    width: 75px;
    height: 75px;
    border-radius: 50px;
    object-fit: cover;
    border: 3px solid #f6831e5c;
    box-shadow: 0 12px 26px rgb(23 32 51 / calc(var(--mouna-shadow-opacity) * 0.24));
    animation: mouna-imageGlow 2.8s ease-in-out infinite;
}

/* Indicateur en ligne */
.mouna-status-indicator {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 16px;
    height: 16px;
    background: var(--mouna-online-green);
    border: 3px solid white;
    border-radius: 50%;
    animation: mouna-pulse 2s infinite;
}

@keyframes mouna-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

@keyframes mouna-imageGlow {

    0%,
    100% {
        box-shadow:
            0 12px 26px rgb(23 32 51 / calc(var(--mouna-shadow-opacity) * 0.24)),
            0 0 0 0 rgb(246 131 30 / 0.18);
    }

    50% {
        box-shadow:
            0 20px 38px rgb(23 32 51 / calc(var(--mouna-shadow-opacity) * 0.42)),
            0 0 0 14px rgb(246 131 30 / 0);
    }
}

/* ========================================
   CONTENU MESSAGE
   ======================================== */
.mouna-message-content {
    flex: 1;
    background: #f6f0ea;
    padding: 5px 15px;
    border-radius: 11px;
    box-shadow: 0 16px 32px rgb(23 32 51 / calc(var(--mouna-shadow-opacity) * 0.16));
}

.mouna-greeting {
    font-size: 16px;
    font-weight: 700;
    color: var(--mouna-text-dark);
    margin-bottom: -1px;
    letter-spacing: -0.02em;
}

.mouna-subtitle {
    font-size: 14px;
    color: var(--mouna-text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.mouna-badge-24-7 {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, var(--mouna-primary-color) 0%, var(--mouna-primary-light) 100%);
    color: white;
    padding: 4px 6px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.mouna-question {
    font-size: 14px;
    color: var(--mouna-text-muted);
    font-weight: 400;
    line-height: 1.4;
}

/* ========================================
   ANIMATION BOUNCE
   ======================================== */
.mouna-bounce-slow {
    animation: mouna-bounceGentle var(--mouna-animation-speed) ease-in-out infinite;
}

@keyframes mouna-bounceGentle {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-15px);
    }

    60% {
        transform: translateY(-7px);
    }
}

/* Animation d'apparition */
@keyframes mouna-slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes mouna-slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* Animation de disparition */
@keyframes mouna-fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }

    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

.mouna-widget-show,
.mouna-widget-show-left {
    animation: mouna-slideInFromLeft 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.mouna-widget-show-right {
    animation: mouna-slideInFromRight 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.mouna-widget-hidden {
    animation: mouna-fadeOut 0.3s ease forwards;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .mouna-chat-widget-container {
        bottom: 20px;
        left: 20px;
        right: auto;
        max-width: calc(100% - 40px);
    }

    .mouna-chat-widget-container.mouna-widget-right {
        left: 20px;
        right: 20px;
    }

    .mouna-chat-widget {
        max-width: 100%;
        padding: 20px 24px;
    }

    .mouna-greeting {
        font-size: 20px;
    }

    .mouna-question {
        font-size: 14px;
    }

    .mouna-profile-image {
        width: 70px;
        height: 70px;
    }

}

@media (max-width: 480px) {
    .mouna-chat-widget {
        padding: 2px 4px;
        gap: 4px;
    }

    .mouna-greeting {
        font-size: 18px;
    }

    .mouna-subtitle {
        font-size: 13px;
    }

    .mouna-question {
        font-size: 13px;
    }
}

/* ========================================
   ACCESSIBILITÃƒâ€°
   ======================================== */
@media (prefers-reduced-motion: reduce) {

    .mouna-bounce-slow,
    .mouna-chat-widget,
    .mouna-status-indicator,
    .mouna-profile-image {
        animation: none !important;
    }

    .mouna-chat-widget:hover {
        transform: none;
    }
}

/* Focus pour navigation au clavier */
.mouna-chat-widget:focus-visible {
    outline: 3px solid var(--mouna-primary-color);
    outline-offset: 2px;
}
