/* ============================================================
   🎨 CHATBOT STYLE — VERSION PREMIUM (TYPE CHATGPT)
   ============================================================ */

/* === Bulle flottante === */
#chatbot-bubble {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 140px;
    height: 140px;
    background: #10A37F;  /* vert ChatGPT */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(0,0,0,0.25);
    z-index: 999999;
    transition: 0.25s;
    animation: bubblePulse 1.4s infinite;
}
#chatbot-bubble:hover {
    transform: scale(1.12);
}
#chatbot-bubble img {
    width: 70px;
    height: 70px;
}

@keyframes bubblePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.12); }
    100% { transform: scale(1); }
}

/* === Fenêtre principale === */
#chatbot-box {
    position: fixed;
    bottom: 110px;
    right: 25px;
    width: 380px;
    height: 520px;
    background: #F6F8F9;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 999999;
    opacity: 0;
    transform: translateY(20px);
    transition: 0.25s ease-out;
}

.chatbot-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.chatbot-hidden {
    opacity: 0 !important;
    pointer-events: none;
}

/* === Header === */
#chatbot-header {
    background: #10A37F;
    color: white;
    padding: 14px;
    font-size: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#chatbot-header button {
    background: transparent;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
}

/* === Messages === */
#chatbot-messages {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    background: #FFFFFF;
}

.msg {
    padding: 10px 14px;
    margin-bottom: 12px;
    border-radius: 12px;
    max-width: 80%;
    font-size: 15px;
    line-height: 1.4em;
}

.user-msg {
    background: #DCF8C6;
    margin-left: auto;
}

.bot-msg {
    background: #F0F0F0;
    border-left: 4px solid #10A37F;
}

/* === Zone d'entrée === */
#chatbot-input-zone {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #FFFFFF;
    border-top: 1px solid #E0E0E0;
}

/* champ texte */
/* === Champ Texte Extensible === */
#chatbot-input {
    flex: 1;
    padding: 10px 12px;
    font-size: 15px;
    border: 1px solid #CCC;
    border-radius: 10px;
    outline: none;
    resize: none;               /* ❌ pas de redimension manuel */
    overflow-y: hidden;         /* ✔ pas de scroll interne */
    max-height: 120px;          /* ➜ limite 4 lignes maximum */
    min-height: 42px;           /* hauteur de base */
    line-height: 20px;
    background: #fff;
}


/* bouton envoyer */
#chatbot-send {
    margin-left: 10px;
    background: #10A37F;
    border: none;
    color: white;
    width: 48px;
    height: 42px;
    border-radius: 10px;
    font-size: 20px;
    cursor: pointer;
}

/* === Micro === */
#chatbot-mic {
    background: #10A37F;
    color: white;
    border: none;
    width: 48px;
    height: 42px;
    border-radius: 10px;
    margin-right: 8px;
    font-size: 22px;
    cursor: pointer;
}

/* micro en enregistrement */
#chatbot-mic.recording {
    background: red;
    animation: micPulse 1s infinite;
}

@keyframes micPulse {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* === Bouton volume (réponse vocale) === */
#chatbot-sound {
    background: #10A37F;
    color: white;
    width: 48px;
    height: 42px;
    border: none;
    border-radius: 10px;
    margin-left: 8px;
    font-size: 22px;
    cursor: pointer;
}

/* === Scroll === */
#chatbot-body {
    height: 100%;
    overflow-y: auto !important;
}
/* Miniatures */
.chatbot-image-gallery {
    display: flex;
    gap: 6px;
    margin: 8px 0;
    flex-wrap: wrap;
}

.chatbot-thumb {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid #10A37F;
}

/* Lightbox (zoom) */
#chatbot-lightbox {
    position: fixed;
    inset: 0;
    display: none;
    justify-content:center;
    align-items:center;
    z-index: 999999;
}

#chatbot-lightbox.visible {
    display: flex;
}

#lightbox-overlay {
    position:absolute;
    inset:0;
    background:rgba(0,0,0,0.75);
}

#lightbox-image {
    max-width: 90%;
    max-height: 90%;
    z-index:10;
    border-radius:10px;
    border:4px solid white;
}

#lightbox-close {
    position:absolute;
    top:20px;
    right:20px;
    font-size:32px;
    color:white;
    cursor:pointer;
    z-index:15;
}
/* Mode agrandi */
#chatbot-box.chatbot-expanded {
    width: 90% !important;
    height: 90% !important;
    right: 5% !important;
    bottom: 5% !important;

    max-height: none !important;
    max-width: none !important;

    border-radius: 15px;
}

/* Bouton agrandir */
#chatbot-expand {
    background: transparent;
    border: none;
    font-size: 22px;
    cursor: pointer;
    margin-right: 10px;
    color: white;
}
/* Fenêtre chatbot agrandie */
#chatbot-box.chatbot-expanded {
    width: 90vw !important;
    height: 90vh !important;
    right: 5vw !important;
    bottom: 5vh !important;
    max-width: none !important;
    max-height: none !important;
}

/* Boutons header */
#chatbot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header-buttons {
    display: flex;
    gap: 4px;
}

#chatbot-expand,
#chatbot-minimize {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

/* Miniatures */
.chatbot-image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}

.chatbot-thumb {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid #10A37F;
}

/* Lightbox */
#chatbot-lightbox {
    position: fixed;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999999;
}

#chatbot-lightbox.visible {
    display: flex;
}

#lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.75);
}

#lightbox-image {
    max-width: 90%;
    max-height: 90%;
    z-index: 10;
    border-radius: 10px;
    border: 4px solid #fff;
}

#lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    z-index: 15;
}
/* Conteneur de la bulle */
#chatbot-bubble {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 100px;
    height: 100px;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;

    /* Animation flottante */
    animation: float 2s ease-in-out infinite;
}

/* Image à l’intérieur */
#chatbot-bubble .chatbot-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

/* Animation keyframes */
@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-15px); } /* monte de 15px */
    100% { transform: translateY(0); }
}
/* Conteneur de la bulle */
#chatbot-bubble {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 100px;
    height: 100px;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;

    /* Animation flottante et latérale */
    animation: floatMove 3s ease-in-out infinite;
}

/* Image à l’intérieur */
#chatbot-bubble .chatbot-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

/* Animation keyframes */
@keyframes floatMove {
    0%   { transform: translate(0, 0); }
    25%  { transform: translate(-10px, -10px); } /* à gauche et légèrement vers le haut */
    50%  { transform: translate(0, -15px); }     /* centre et plus haut */
    75%  { transform: translate(10px, -10px); }  /* à droite et légèrement vers le haut */
    100% { transform: translate(0, 0); }         /* revient au centre */
}
/* Conteneur de la bulle */
#chatbot-bubble {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 100px;
    height: 100px;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;

    /* Animation flottante normale */
    animation: floatMove 3s ease-in-out infinite;
    transition: transform 0.3s ease; /* transition douce pour le hover */
}

/* Image à l’intérieur */
#chatbot-bubble .chatbot-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

/* Animation keyframes pour le mouvement flottant */
@keyframes floatMove {
    0%   { transform: translate(0, 0); }
    25%  { transform: translate(-10px, -10px); }
    50%  { transform: translate(0, -15px); }
    75%  { transform: translate(10px, -10px); }
    100% { transform: translate(0, 0); }
}

/* Effet au survol : rebond + agrandissement */
#chatbot-bubble:hover {
    animation: hoverBounce 0.5s ease infinite;
    transform: scale(1.2); /* agrandit légèrement la bulle */
}

@keyframes hoverBounce {
    0%   { transform: translateY(0); }
    50%  { transform: translateY(-20px); }
    100% { transform: translateY(0); }
}
