/* =========================================================
   CLIC LAB — CHAT PREMIUM ISOLATED
   Desktop + Tablet + Mobile
   Aucun impact CSS sur le site principal
========================================================= */


/* =========================================================
   VARIABLES DU CHAT — ISOLÉES
========================================================= */

#cliclab-chat-launcher,
#cliclab-chat-box {

    --clchat-navy-950: #041426;
    --clchat-navy-900: #071b34;
    --clchat-navy-800: #0a2948;

    --clchat-cyan-500: #00b8e8;
    --clchat-cyan-600: #009ed0;
    --clchat-cyan-100: #eaf9fd;

    --clchat-green-500: #43c77b;
    --clchat-red-500: #ef5261;

    --clchat-bg: #f4f8fb;

    --clchat-surface: #ffffff;
    --clchat-surface-soft: #f8fbfd;

    --clchat-text: #142f49;
    --clchat-muted: #718499;

    --clchat-border: #dbe5ed;
    --clchat-border-soft: #e9eff4;

    --clchat-shadow:
        0 30px 90px rgba(4,20,38,.24),
        0 12px 32px rgba(4,20,38,.10);
}


/* =========================================================
   ISOLATION / RESET
========================================================= */

#cliclab-chat-launcher,
#cliclab-chat-box,
#cliclab-chat-box * {

    box-sizing: border-box;
}


#cliclab-chat-box {

    text-align: left;
    letter-spacing: normal;
}


#cliclab-chat-box button,
#cliclab-chat-box textarea {

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}


#cliclab-chat-box button {

    -webkit-tap-highlight-color: transparent;
}


#cliclab-chat-box textarea {

    appearance: none;
    -webkit-appearance: none;
}


/* =========================================================
   LAUNCHER
========================================================= */

#cliclab-chat-launcher {

    position: fixed;

    right: 24px;
    bottom: 24px;

    z-index: 2147483646;

    width: 66px;
    height: 66px;

    padding: 0;

    border: 0;

    border-radius: 22px;

    background:

        radial-gradient(
            circle at 30% 20%,
            rgba(255,255,255,.15),
            transparent 36%
        ),

        linear-gradient(
            145deg,
            var(--clchat-navy-800),
            var(--clchat-navy-950)
        );

    color: #fff;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    pointer-events: auto !important;

    box-shadow:
        0 18px 44px rgba(4,20,38,.30),
        0 7px 20px rgba(0,184,232,.17);

    transition:
        transform .22s ease,
        box-shadow .22s ease,
        filter .22s ease;
}


#cliclab-chat-launcher::before {

    content: "";

    position: absolute;

    inset: 5px;

    border:
        1px solid
        rgba(255,255,255,.13);

    border-radius: 18px;

    pointer-events: none;
}


#cliclab-chat-launcher::after {

    content: "";

    position: absolute;

    width: 18px;
    height: 3px;

    bottom: 12px;

    border-radius: 999px;

    background:
        var(--clchat-cyan-500);

    box-shadow:
        0 0 10px
        rgba(0,184,232,.45);
}


#cliclab-chat-launcher:hover {

    transform:
        translateY(-4px)
        scale(1.03);

    box-shadow:
        0 24px 58px rgba(4,20,38,.37),
        0 10px 27px rgba(0,184,232,.23);
}


#cliclab-chat-launcher:active {

    transform:
        translateY(-1px)
        scale(.98);
}


#cliclab-chat-launcher:focus-visible {

    outline: none;

    box-shadow:
        0 0 0 4px rgba(0,184,232,.20),
        0 20px 46px rgba(4,20,38,.30);
}


#cliclab-chat-launcher > i {

    position: relative;

    z-index: 3;

    font-size: 23px;
}


/* =========================================================
   PULSE DU LAUNCHER
========================================================= */

#cliclab-chat-launcher .cl-launcher-pulse {

    position: absolute;

    inset: -5px;

    border-radius: 27px;

    border:
        2px solid
        rgba(0,184,232,.42);

    pointer-events: none;

    animation:
        cliclabChatPulse
        2.4s
        infinite;
}


@keyframes cliclabChatPulse {

    0% {

        opacity: .65;

        transform:
            scale(.94);
    }

    70% {

        opacity: 0;

        transform:
            scale(1.18);
    }

    100% {

        opacity: 0;

        transform:
            scale(1.18);
    }
}


/* =========================================================
   BADGE
========================================================= */

#cliclab-chat-launcher .cl-launcher-badge {

    position: absolute;

    top: -7px;
    right: -7px;

    min-width: 24px;
    height: 24px;

    padding:
        0 6px;

    border-radius: 999px;

    border:
        3px solid #fff;

    background:

        linear-gradient(
            145deg,
            #ff6370,
            #df3c4c
        );

    color: #fff;

    font-size: 10px;
    line-height: 1;

    font-weight: 800;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow:
        0 5px 14px
        rgba(239,82,97,.30);

    z-index: 4;
}


/* =========================================================
   CHAT BOX
========================================================= */

#cliclab-chat-box {

    position: fixed;

    right: 24px;
    bottom: 104px;

    z-index: 2147483647;

    width: 398px;

    height:
        min(
            620px,
            calc(100vh - 130px)
        );

    min-height: 470px;

    max-width:
        calc(100vw - 32px);

    display: none;

    flex-direction: column;

    overflow: hidden;

    background:
        var(--clchat-surface);

    border:
        1px solid
        rgba(4,20,38,.07);

    border-radius: 26px;

    box-shadow:
        var(--clchat-shadow);

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color:
        var(--clchat-text);

    pointer-events: auto !important;

    isolation: isolate;

    transform-origin:
        bottom right;
}


#cliclab-chat-box::before {

    content: "";

    position: absolute;

    top: 0;
    left: 0;
    right: 0;

    height: 3px;

    background:

        linear-gradient(
            90deg,
            var(--clchat-cyan-500),
            var(--clchat-green-500)
        );

    z-index: 20;
}


#cliclab-chat-box.is-open {

    display: flex !important;

    animation:
        cliclabChatOpen
        .30s
        cubic-bezier(.22,.8,.3,1);
}


@keyframes cliclabChatOpen {

    from {

        opacity: 0;

        transform:
            translateY(16px)
            scale(.965);
    }

    to {

        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }
}


/* =========================================================
   AUTO OPEN
========================================================= */

#cliclab-chat-box.cl-auto-open {

    animation:
        cliclabChatOpen
        .30s
        cubic-bezier(.22,.8,.3,1),

        cliclabChatAttention
        .64s
        ease
        .35s;
}


@keyframes cliclabChatAttention {

    0%,
    100% {

        transform:
            translateX(0);
    }

    30% {

        transform:
            translateX(-4px);
    }

    60% {

        transform:
            translateX(4px);
    }

    80% {

        transform:
            translateX(-2px);
    }
}


/* =========================================================
   HEADER
========================================================= */

#cliclab-chat-box .cl-chat-head {

    flex:
        0 0 auto;

    min-height: 88px;

    padding:
        17px 18px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 12px;

    background:

        radial-gradient(
            circle at 88% 18%,
            rgba(0,184,232,.25),
            transparent 36%
        ),

        linear-gradient(
            135deg,
            var(--clchat-navy-800),
            var(--clchat-navy-950)
        );

    color: #fff;
}


#cliclab-chat-box .cl-chat-brand {

    display: flex;

    align-items: center;

    gap: 12px;

    min-width: 0;
}


#cliclab-chat-box .cl-chat-brand-copy {

    min-width: 0;
}


/* =========================================================
   LOGO
========================================================= */

#cliclab-chat-box .cl-chat-logo {

    width: 48px;
    height: 48px;

    flex:
        0 0 48px;

    border-radius: 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:

        linear-gradient(
            145deg,
            rgba(255,255,255,.18),
            rgba(255,255,255,.05)
        );

    border:
        1px solid
        rgba(255,255,255,.16);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.14),
        0 7px 20px rgba(0,0,0,.12);

    color: #fff;

    font-size: 18px;
}


/* =========================================================
   TITRE
========================================================= */

#cliclab-chat-box .cl-chat-title {

    margin: 0;

    font-size: 16px;

    line-height: 1.2;

    font-weight: 800;

    letter-spacing: .55px;

    color: #fff;
}


/* =========================================================
   STATUS
========================================================= */

#cliclab-chat-box .cl-online {

    margin-top: 6px;

    display: flex;

    align-items: center;

    gap: 7px;

    font-size: 11.5px;

    line-height: 1.2;

    color:
        rgba(255,255,255,.79);
}


#cliclab-chat-box .cl-status-dot {

    width: 8px;
    height: 8px;

    flex:
        0 0 8px;

    display: inline-block;

    border-radius: 50%;

    background:
        var(--clchat-green-500);

    box-shadow:
        0 0 0 4px
        rgba(67,199,123,.12);
}


#cliclab-chat-box .cl-online.connecting
.cl-status-dot {

    background:
        #ffc857;

    box-shadow:
        0 0 0 4px
        rgba(255,200,87,.13);
}


#cliclab-chat-box .cl-online.offline
.cl-status-dot {

    background:
        #ef6b74;

    box-shadow:
        0 0 0 4px
        rgba(239,107,116,.13);
}


/* =========================================================
   FERMETURE
========================================================= */

#cliclab-chat-box .cl-chat-close {

    width: 40px;
    height: 40px;

    flex:
        0 0 40px;

    margin: 0;

    padding: 0;

    border:
        1px solid
        rgba(255,255,255,.11);

    border-radius: 13px;

    background:
        rgba(255,255,255,.06);

    color: #fff;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 25px;

    line-height: 1;

    cursor: pointer;

    transition:
        background .18s ease,
        transform .18s ease;
}


#cliclab-chat-box .cl-chat-close:hover {

    background:
        rgba(255,255,255,.15);

    transform:
        rotate(3deg);
}


#cliclab-chat-box .cl-chat-close:active {

    transform:
        scale(.95);
}


/* =========================================================
   INTRO
========================================================= */

#cliclab-chat-box .cl-chat-intro {

    flex:
        0 0 auto;

    padding:
        12px 18px 13px;

    background:

        linear-gradient(
            90deg,
            rgba(0,184,232,.075),
            rgba(67,199,123,.045)
        );

    border-bottom:
        1px solid
        var(--clchat-border-soft);
}


#cliclab-chat-box .cl-chat-intro-label {

    margin: 0 0 4px 0;

    font-size: 9px;

    line-height: 1.2;

    font-weight: 800;

    letter-spacing: 1.35px;

    color:
        var(--clchat-cyan-600);
}


#cliclab-chat-box .cl-chat-intro-text {

    margin: 0;

    font-size: 12.5px;

    line-height: 1.4;

    font-weight: 650;

    color:
        var(--clchat-text);
}


/* =========================================================
   ZONE MESSAGES
========================================================= */

#cliclab-chat-box .cl-chat-body {

    flex:
        1 1 auto;

    min-height: 0;

    overflow-y: auto;

    overflow-x: hidden;

    padding: 18px;

    scroll-behavior: smooth;

    overscroll-behavior: contain;

    -webkit-overflow-scrolling: touch;

    background:

        radial-gradient(
            circle at top right,
            rgba(0,184,232,.055),
            transparent 32%
        ),

        linear-gradient(
            180deg,
            #fafeff 0%,
            var(--clchat-bg) 100%
        );
}


#cliclab-chat-box .cl-chat-body::-webkit-scrollbar {

    width: 6px;
}


#cliclab-chat-box .cl-chat-body::-webkit-scrollbar-track {

    background:
        transparent;
}


#cliclab-chat-box .cl-chat-body::-webkit-scrollbar-thumb {

    background:
        #ccd7e0;

    border-radius: 999px;
}


/* =========================================================
   MESSAGES
========================================================= */

#cliclab-chat-box .cl-msg {

    width: fit-content;

    max-width: 83%;

    margin:
        8px 0;

    padding:
        11px 13px;

    border-radius: 17px;

    font-size: 13.5px;

    line-height: 1.48;

    white-space: pre-wrap;

    overflow-wrap: anywhere;

    word-break: break-word;

    animation:
        cliclabChatMessageIn
        .20s
        ease-out;
}


@keyframes cliclabChatMessageIn {

    from {

        opacity: 0;

        transform:
            translateY(5px);
    }

    to {

        opacity: 1;

        transform:
            translateY(0);
    }
}


#cliclab-chat-box .cl-msg-name {

    margin-bottom: 5px;

    font-size: 9px;

    line-height: 1.2;

    font-weight: 850;

    letter-spacing: .75px;

    text-transform: uppercase;

    color:
        var(--clchat-cyan-600);
}


/* =========================================================
   MESSAGE AGENT / BOT
========================================================= */

#cliclab-chat-box .cl-msg.agent,
#cliclab-chat-box .cl-msg.bot {

    margin-right: auto;

    margin-left: 0;

    background:
        rgba(255,255,255,.97);

    color:
        var(--clchat-text);

    border:
        1px solid
        #e0e8ee;

    border-bottom-left-radius: 6px;

    box-shadow:
        0 5px 18px
        rgba(4,20,38,.055);
}


/* =========================================================
   MESSAGE VISITEUR
========================================================= */

#cliclab-chat-box .cl-msg.visitor {

    margin-left: auto;

    margin-right: 0;

    background:

        linear-gradient(
            135deg,
            #087db8,
            var(--clchat-cyan-600)
        );

    color: #fff;

    border:
        1px solid
        rgba(255,255,255,.08);

    border-bottom-right-radius: 6px;

    box-shadow:
        0 8px 20px
        rgba(0,145,194,.18);
}


/* =========================================================
   MESSAGE ERREUR
========================================================= */

#cliclab-chat-box .cl-msg.error {

    background:
        #fff4f5;

    color:
        #a52e3a;

    border-color:
        #f0c7cc;
}


/* =========================================================
   QUICK ACTIONS
========================================================= */

#cliclab-chat-box .cl-chat-quick {

    flex:
        0 0 auto;

    display: flex;

    gap: 7px;

    padding:
        10px 13px;

    overflow-x: auto;

    overflow-y: hidden;

    scrollbar-width: thin;

    background:
        rgba(255,255,255,.98);

    border-top:
        1px solid
        var(--clchat-border-soft);
}


#cliclab-chat-box .cl-chat-quick::-webkit-scrollbar {

    height: 4px;
}


#cliclab-chat-box .cl-chat-quick::-webkit-scrollbar-thumb {

    background:
        #d8e1e8;

    border-radius: 999px;
}


#cliclab-chat-box .cl-chat-quick button {

    flex:
        0 0 auto;

    min-height: 34px;

    margin: 0;

    display: inline-flex;

    align-items: center;

    gap: 7px;

    padding:
        8px 12px;

    border:
        1px solid
        #d4dfe7;

    border-radius: 999px;

    background:
        #fff;

    color:
        var(--clchat-navy-800);

    white-space: nowrap;

    font-size: 11.5px;

    line-height: 1.15;

    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 3px 9px
        rgba(4,20,38,.035);

    transition:
        transform .18s ease,
        border-color .18s ease,
        background .18s ease,
        color .18s ease;
}


#cliclab-chat-box .cl-chat-quick button i {

    color:
        var(--clchat-cyan-600);

    font-size: 11px;
}


#cliclab-chat-box .cl-chat-quick button:hover {

    transform:
        translateY(-1px);

    border-color:
        rgba(0,184,232,.48);

    background:
        var(--clchat-cyan-100);

    color:
        var(--clchat-navy-950);
}


#cliclab-chat-box .cl-chat-quick button:active {

    transform:
        scale(.98);
}


/* =========================================================
   INPUT
========================================================= */

#cliclab-chat-box .cl-chat-foot {

    flex:
        0 0 auto;

    min-height: 74px;

    padding:
        10px 12px 8px;

    display: flex;

    align-items: flex-end;

    gap: 9px;

    background:
        #fff;

    border-top:
        1px solid
        var(--clchat-border-soft);
}


#cliclab-chat-box .cl-chat-foot textarea {

    flex:
        1 1 auto;

    width: 100%;

    min-width: 0;

    min-height: 48px;

    max-height: 120px;

    margin: 0;

    resize: none;

    padding:
        12px 14px;

    border:
        1px solid
        #d2dde5;

    border-radius: 15px;

    background:
        var(--clchat-surface-soft);

    color:
        var(--clchat-text);

    font-size: 13.5px;

    line-height: 1.4;

    outline: none;

    box-shadow: none;

    transition:
        background .18s ease,
        border-color .18s ease,
        box-shadow .18s ease;
}


#cliclab-chat-box .cl-chat-foot textarea::placeholder {

    color:
        #99a7b4;

    opacity: 1;
}


#cliclab-chat-box .cl-chat-foot textarea:hover {

    border-color:
        #c3d2dc;
}


#cliclab-chat-box .cl-chat-foot textarea:focus {

    background:
        #fff;

    border-color:
        rgba(0,184,232,.72);

    box-shadow:
        0 0 0 4px
        rgba(0,184,232,.09);
}


/* =========================================================
   BOUTON ENVOYER
========================================================= */

#cliclab-chat-box .cl-chat-foot button {

    flex:
        0 0 48px;

    width: 48px;

    height: 48px;

    margin: 0;

    padding: 0;

    border: 0;

    border-radius: 15px;

    background:

        linear-gradient(
            145deg,
            var(--clchat-cyan-500),
            var(--clchat-cyan-600)
        );

    color: #fff;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 15px;

    cursor: pointer;

    box-shadow:
        0 9px 20px
        rgba(0,158,208,.24);

    transition:
        transform .18s ease,
        box-shadow .18s ease,
        filter .18s ease;
}


#cliclab-chat-box .cl-chat-foot button:hover {

    transform:
        translateY(-2px);

    box-shadow:
        0 12px 26px
        rgba(0,158,208,.30);
}


#cliclab-chat-box .cl-chat-foot button:active {

    transform:
        scale(.96);
}


#cliclab-chat-box .cl-chat-foot button:disabled {

    opacity: .55;

    cursor: wait;

    transform: none;

    box-shadow: none;
}


/* =========================================================
   FOOTER NOTE
========================================================= */

#cliclab-chat-box .cl-chat-footer-note {

    flex:
        0 0 auto;

    min-height: 27px;

    padding:
        0 13px 10px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 6px;

    background:
        #fff;

    color:
        #8a9aaa;

    font-size: 9.5px;

    line-height: 1.2;

    font-weight: 600;
}


#cliclab-chat-box .cl-chat-footer-note i {

    color:
        var(--clchat-green-500);
}


/* =========================================================
   TABLETTE
========================================================= */

@media
(max-width: 900px)
and
(min-width: 601px) {

    #cliclab-chat-launcher {

        right: 20px;
        bottom: 20px;
    }


    #cliclab-chat-box {

        right: 18px;

        bottom: 96px;

        width: 380px;

        max-width:
            calc(100vw - 36px);
    }
}


/* =========================================================
   MOBILE PREMIUM
========================================================= */

@media (max-width: 600px) {

    /* ---------------------------------------------
       Launcher
    --------------------------------------------- */

    #cliclab-chat-launcher {

        right: 16px;

        bottom:
            max(
                16px,
                env(safe-area-inset-bottom)
            );

        width: 58px;

        height: 58px;

        border-radius: 19px;

        box-shadow:
            0 14px 35px rgba(4,20,38,.30),
            0 5px 14px rgba(0,184,232,.18);
    }


    #cliclab-chat-launcher::before {

        inset: 4px;

        border-radius: 15px;
    }


    #cliclab-chat-launcher::after {

        bottom: 10px;

        width: 15px;
    }


    #cliclab-chat-launcher > i {

        font-size: 21px;
    }


    #cliclab-chat-launcher
    .cl-launcher-badge {

        top: -6px;

        right: -6px;

        min-width: 22px;

        height: 22px;

        border-width: 2px;

        font-size: 9px;
    }


    /* ---------------------------------------------
       Fenêtre chat
    --------------------------------------------- */

    #cliclab-chat-box {

        left:
            max(
                7px,
                env(safe-area-inset-left)
            );

        right:
            max(
                7px,
                env(safe-area-inset-right)
            );

        top:
            max(
                7px,
                env(safe-area-inset-top)
            );

        bottom:
            max(
                7px,
                env(safe-area-inset-bottom)
            );

        width: auto;

        height: auto;

        min-height: 0;

        max-width: none;

        max-height: none;

        border-radius: 22px;

        transform-origin:
            bottom center;
    }


    /* ---------------------------------------------
       Header mobile
    --------------------------------------------- */

    #cliclab-chat-box .cl-chat-head {

        min-height: 74px;

        padding:
            12px 14px;

        gap: 10px;
    }


    #cliclab-chat-box .cl-chat-brand {

        gap: 10px;
    }


    #cliclab-chat-box .cl-chat-logo {

        width: 42px;

        height: 42px;

        flex:
            0 0 42px;

        border-radius: 13px;

        font-size: 16px;
    }


    #cliclab-chat-box .cl-chat-title {

        font-size: 14px;
    }


    #cliclab-chat-box .cl-online {

        margin-top: 4px;

        font-size: 10.5px;
    }


    #cliclab-chat-box .cl-chat-close {

        width: 38px;

        height: 38px;

        flex:
            0 0 38px;

        border-radius: 12px;
    }


    /* ---------------------------------------------
       Intro
    --------------------------------------------- */

    #cliclab-chat-box .cl-chat-intro {

        padding:
            9px 14px 10px;
    }


    #cliclab-chat-box
    .cl-chat-intro-label {

        font-size: 8px;

        letter-spacing: 1px;
    }


    #cliclab-chat-box
    .cl-chat-intro-text {

        font-size: 11.5px;
    }


    /* ---------------------------------------------
       Messages
    --------------------------------------------- */

    #cliclab-chat-box .cl-chat-body {

        padding: 13px;

        min-height: 0;
    }


    #cliclab-chat-box .cl-msg {

        max-width: 88%;

        margin:
            6px 0;

        padding:
            10px 12px;

        border-radius: 15px;

        font-size: 13px;

        line-height: 1.42;
    }


    #cliclab-chat-box .cl-msg-name {

        font-size: 8px;
    }


    /* ---------------------------------------------
       Quick actions
    --------------------------------------------- */

    #cliclab-chat-box .cl-chat-quick {

        padding:
            8px 10px;

        gap: 6px;
    }


    #cliclab-chat-box
    .cl-chat-quick button {

        min-height: 32px;

        padding:
            7px 10px;

        font-size: 10.5px;
    }


    /* ---------------------------------------------
       Input
    --------------------------------------------- */

    #cliclab-chat-box .cl-chat-foot {

        min-height: 64px;

        padding:
            8px 9px 6px;

        gap: 7px;
    }


    #cliclab-chat-box
    .cl-chat-foot textarea {

        min-height: 46px;

        max-height: 95px;

        padding:
            11px 12px;

        border-radius: 14px;

        /*
         * Important :
         * 16px évite le zoom automatique iPhone.
         */

        font-size: 16px;
    }


    #cliclab-chat-box
    .cl-chat-foot button {

        flex:
            0 0 46px;

        width: 46px;

        height: 46px;

        border-radius: 14px;
    }


    #cliclab-chat-box
    .cl-chat-footer-note {

        min-height: 23px;

        padding:
            0 10px 7px;

        font-size: 8.5px;
    }
}


/* =========================================================
   TRÈS PETITS MOBILES
========================================================= */

@media (max-width: 360px) {

    #cliclab-chat-box {

        left: 4px;

        right: 4px;

        top: 4px;

        bottom: 4px;

        border-radius: 18px;
    }


    #cliclab-chat-box .cl-chat-logo {

        display: none;
    }


    #cliclab-chat-box
    .cl-chat-intro-text {

        font-size: 11px;
    }


    #cliclab-chat-box .cl-msg {

        max-width: 91%;
    }


    #cliclab-chat-box
    .cl-chat-quick button {

        font-size: 10px;
    }
}


/* =========================================================
   PETITE HAUTEUR DESKTOP
========================================================= */

@media
(max-height: 650px)
and
(min-width: 601px) {

    #cliclab-chat-box {

        height:
            calc(100vh - 105px);

        bottom: 92px;

        min-height: 0;
    }


    #cliclab-chat-box .cl-chat-head {

        min-height: 72px;

        padding:
            12px 15px;
    }


    #cliclab-chat-box .cl-chat-logo {

        width: 42px;

        height: 42px;

        flex:
            0 0 42px;
    }


    #cliclab-chat-box .cl-chat-intro {

        padding:
            9px 15px;
    }
}


/* =========================================================
   ORIENTATION PAYSAGE MOBILE
========================================================= */

@media
(max-height: 500px)
and
(max-width: 900px) {

    #cliclab-chat-box {

        left: 5px;

        right: 5px;

        top: 5px;

        bottom: 5px;

        width: auto;

        height: auto;

        min-height: 0;

        max-height: none;
    }


    #cliclab-chat-box .cl-chat-head {

        min-height: 62px;

        padding:
            8px 12px;
    }


    #cliclab-chat-box .cl-chat-logo {

        width: 38px;

        height: 38px;

        flex:
            0 0 38px;
    }


    #cliclab-chat-box .cl-chat-intro {

        display: none;
    }


    #cliclab-chat-box .cl-chat-footer-note {

        display: none;
    }
}


/* =========================================================
   ACCESSIBILITÉ — REDUCED MOTION
========================================================= */

@media
(prefers-reduced-motion: reduce) {

    #cliclab-chat-launcher,
    #cliclab-chat-box,
    #cliclab-chat-box .cl-msg,
    #cliclab-chat-box
    .cl-chat-quick button,
    #cliclab-chat-box
    .cl-chat-foot button {

        animation:
            none !important;

        transition:
            none !important;
    }


    #cliclab-chat-launcher
    .cl-launcher-pulse {

        display: none;
    }
}


/* =========================================================
   DARK MODE DU SYSTÈME
   On maintient volontairement le widget clair pour préserver
   l'identité visuelle CLIC LAB.
========================================================= */

@media
(prefers-color-scheme: dark) {

    #cliclab-chat-box {

        color-scheme: light;
    }
}

/* =========================================================
   CLIC LAB CHAT — FIX PREMIUM BULLES 2026
   Empêche tout étirement vertical des messages
========================================================= */

#cliclab-chat-box .cl-chat-body{
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    gap:2px !important;
}

#cliclab-chat-box .cl-msg{
    display:block !important;
    flex:0 0 auto !important;

    width:fit-content !important;
    height:auto !important;

    min-width:0 !important;
    min-height:0 !important;

    max-width:82% !important;

    margin-top:5px !important;
    margin-bottom:5px !important;

    padding:10px 13px !important;

    white-space:normal !important;

    overflow-wrap:anywhere !important;
    word-break:break-word !important;

    align-self:flex-start;
}

#cliclab-chat-box .cl-msg.agent,
#cliclab-chat-box .cl-msg.bot{
    align-self:flex-start !important;

    margin-left:0 !important;
    margin-right:auto !important;

    background:#fff !important;

    color:var(--clchat-text) !important;

    border:1px solid #dfe7ed !important;

    border-radius:16px !important;
    border-bottom-left-radius:5px !important;

    box-shadow:
        0 5px 16px
        rgba(7,27,52,.06) !important;
}

#cliclab-chat-box .cl-msg.visitor{
    align-self:flex-end !important;

    margin-left:auto !important;
    margin-right:0 !important;

    background:
        linear-gradient(
            135deg,
            #087fba,
            #00a8d8
        ) !important;

    color:#fff !important;

    border:0 !important;

    border-radius:16px !important;
    border-bottom-right-radius:5px !important;

    box-shadow:
        0 7px 18px
        rgba(0,145,194,.18) !important;
}

#cliclab-chat-box .cl-msg-name{
    display:block !important;

    margin:0 0 4px 0 !important;

    padding:0 !important;

    font-size:9px !important;

    line-height:1.15 !important;

    font-weight:850 !important;

    letter-spacing:.7px !important;

    color:var(--clchat-cyan-600) !important;
}

@media(max-width:600px){

    #cliclab-chat-box .cl-msg{
        max-width:88% !important;

        padding:
            9px 11px !important;

        font-size:
            13px !important;

        line-height:
            1.42 !important;
    }

}

@media(max-width:360px){

    #cliclab-chat-box .cl-msg{
        max-width:91% !important;
    }

}
