/* Applique une couleur de fond plus claire pour le code */
pre code {
    background-color: #282c34 !important;
    /* Fond sombre */
    color: #dcdfe4 !important;
    /* Texte clair */
    border-radius: 5px !important;
    /* Coins arrondis */
    padding: 10px !important;
    display: block !important;
    font-family: 'Courier New', monospace !important;
    font-size: 12px !important;
    white-space: pre-wrap !important;
    /* Permet le retour à la ligne */
    word-wrap: break-word !important;
    /* Evite le débordement */
}

/* Personnalisation des classes de syntaxe */
.hljs-keyword {
    color: #c678dd !important;
    /* Couleur des mots-clés (ex: function, return) */
}

.hljs-string {
    color: #98c379 !important;
    /* Couleur des chaînes de caractères */
}

.hljs-number {
    color: #d19a66 !important;
    /* Couleur des nombres */
}

.hljs-function {
    color: #61afef !important;
    /* Couleur des fonctions */
}

.hljs-variable {
    color: #e06c75 !important;
    /* Couleur des variables */
}

body {
    overflow-y: hidden;
    /* background-color: #0F172A; */
    background-image: radial-gradient(circle farthest-corner at center, rgb(43, 53, 77) 0%, #0F172A 100%);
}

#scrollToBottomBtn {
    display: none;
    position: fixed;
    bottom: 120px;
    right: 30px;
    cursor: pointer;
    z-index: 1000;
    /* Assurer que le bouton est au-dessus du contenu */
    border-radius: 50px;
    background-color: rgba(169, 169, 169, 0.5);
}

#recharge {
    position: fixed;
    top: 90px;
    right: 30px;
    cursor: pointer;
    z-index: 1000;
    border-radius: 50%;
    padding: 0px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease-in-out;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: white;
    font-weight: bold;
    overflow: hidden;
}

.recharge {
    position: fixed;
    top: 130px;
    right: 15px;
    cursor: pointer;
    z-index: 1000;
    border-radius: 50%;
    padding: 0px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: white;
    font-weight: bold;
    overflow: hidden;
}

.recharge2 {
    position: fixed;
    top: 190px;
    right: 15px;
    cursor: pointer;
    z-index: 1000;
    border-radius: 50%;
    padding: 0px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: white;
    font-weight: bold;
    overflow: hidden;
}

.recharge3 {
    position: fixed;
    top: 130px;
    right: 15px;
    cursor: pointer;
    z-index: 1000;
    border-radius: 50%;
    padding: 0px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: white;
    font-weight: bold;
    overflow: hidden;
}

/* Effet Glitch sur le bouton */
@keyframes glitchEffect {
    0% {
        transform: translateX(0);
        text-shadow: 1px 0 rgba(255, 0, 0, 0.9), -1px 0 rgba(0, 255, 0, 0.9), 0 0 10px rgba(255, 255, 255, 0.7);
    }

    20% {
        transform: translateX(-5px);
        text-shadow: -2px 0 rgba(255, 0, 0, 0.9), 2px 0 rgba(0, 255, 0, 0.9), 0 0 20px rgba(255, 255, 255, 0.7);
    }

    40% {
        transform: translateX(5px);
        text-shadow: 2px 0 rgba(255, 0, 0, 0.9), -2px 0 rgba(0, 255, 0, 0.9), 0 0 30px rgba(255, 255, 255, 0.7);
    }

    60% {
        transform: translateX(-5px);
        text-shadow: -3px 0 rgba(255, 0, 0, 0.9), 3px 0 rgba(0, 255, 0, 0.9), 0 0 40px rgba(255, 255, 255, 0.7);
    }

    80% {
        transform: translateX(5px);
        text-shadow: 3px 0 rgba(255, 0, 0, 0.9), -3px 0 rgba(0, 255, 0, 0.9), 0 0 50px rgba(255, 255, 255, 0.7);
    }

    100% {
        transform: translateX(0);
        text-shadow: 1px 0 rgba(255, 0, 0, 0.9), -1px 0 rgba(0, 255, 0, 0.9), 0 0 10px rgba(255, 255, 255, 0.7);
    }
}

/* Animation du bouton */
#recharge {
    animation: glitchEffect 3s infinite alternate;
}

/* Effet sur le survol du bouton */
#recharge:hover {
    transform: scale(1.1);
    animation: none;
    /* Supprime l'animation glitch lors du survol pour éviter le conflit */
    box-shadow: 0 0 30px rgba(255, 0, 0, 1), 0 0 50px rgba(0, 255, 0, 1);
}

.chat {
    margin-top: auto;
    margin-bottom: auto;
}

.card {
    height: 100%;
    border-radius: 15px !important;
    background-color: #0F172A;
    /* Mode sombre par défaut */
}

.card-footer {
    background: linear-gradient(to bottom, rgba(28, 44, 83, 0.8), rgba(22, 33, 59, 0.9), rgba(15, 23, 42, 1));
}

.carde {
    height: 100%;
    border-radius: 15px !important;
    width: 95px;
    /* padding: 10px; */
    /* color: deepskyblue; */
    transition: transform 0.3s ease;
}

.carde:hover {
    transform: scale(1.1);
}

@keyframes grossirRetrecir {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.animer {
    animation: grossirRetrecir 3s infinite;
}

.contacts_body {
    padding: 0.75rem 0 !important;
    overflow-y: auto;
    white-space: nowrap;
}

.msg_card_body {
    overflow-y: auto;
}

.card-header {
    border-radius: 15px 15px 0 0 !important;
    border-bottom: 0 !important;
    background-color: rgb(14, 19, 34);
}

.card-footer {
    /* border-radius: 0 0 15px 15px !important; */
    border-top: 0 !important;
}

.container {
    align-content: center;
}

.search {
    border-radius: 15px 0 0 15px !important;
    background-color: rgba(0, 0, 0, 0.3) !important;
    border: 0 !important;
    color: white !important;
}

.search:focus {
    box-shadow: none !important;
    outline: 0px !important;
}

.type_msg {
    background-color: rgba(0, 0, 0, 0.3) !important;
    border: 0 !important;
    color: white !important;
    height: 60px !important;
    overflow-y: auto;
}

.type_msg:focus {
    box-shadow: none !important;
    outline: 0px !important;
}

.attach_btn {
    border-radius: 15px 0 0 15px !important;
    background-color: rgba(0, 0, 0, 0.3) !important;
    border: 0 !important;
    color: white !important;
    cursor: pointer;
}

.send_btn {
    border-radius: 0 15px 15px 0 !important;
    background-color: rgba(0, 0, 0, 0.3) !important;
    border: 0 !important;
    color: white !important;
    cursor: pointer;
}

.search_btn {
    border-radius: 0 15px 15px 0 !important;
    background-color: rgba(0, 0, 0, 0.3) !important;
    border: 0 !important;
    color: white !important;
    cursor: pointer;
}

.contacts {
    list-style: none;
    padding: 0;
}

.contacts li {
    width: 100% !important;
    padding: 5px 10px;
    margin-bottom: 15px !important;
}

.user_img {
    height: 40px;
    width: 40px;
    /* border: 1.5px solid #f5f6fa; */
}

.user_img_msg {
    margin-bottom: -60px;
    height: 40px;
    width: 40px;
    /* border: 1.5px solid #f5f6fa; */

}

.img_cont {
    position: relative;
    height: 70px;
    width: 70px;
}

.img_cont_msg {
    height: 40px;
    width: 40px;
}

.online_icon {
    position: absolute;
    height: 15px;
    width: 15px;
    background-color: #4cd137;
    border-radius: 50%;
    bottom: 1.4em;
    right: 0.4em;
    /* border: 1.5px solid white; */
}

.new_message_icon {
    position: absolute;
    height: 15px;
    width: 15px;
    background-color: rgba(214, 214, 214, 0.85);
    color: rgb(189, 3, 3);
    border-radius: 50%;
    bottom: 1.4em;
    right: 3.5em;
    /* border: 1.5px solid white; */
}

.offline {
    background-color: #c23616 !important;
}

.user_info {
    margin-top: auto;
    margin-bottom: auto;
    margin-left: 15px;
}

.user_info span {
    font-size: 20px;
    color: white;
}

.user_info p {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
}

.video_cam {
    margin-left: 50px;
    margin-top: 5px;
}

.video_cam span {
    color: white;
    font-size: 20px;
    cursor: pointer;
    margin-right: 20px;
}

.msg_cotainer {
    max-width: 95%;
    min-width: 80px;
    margin-top: auto;
    margin-bottom: auto;
    margin-left: 10px;
    border-radius: 5px;
    background-color: #1E293B;
    padding: 10px;
    position: relative;
    color: #CBD5E1;
    overflow-x: auto;
    overflow-y: hidden;
}

.msg_cotainers::after {
    content: '';
    position: absolute;
    top: 10px;
    left: -10px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 10px 5px 0;
    border-color: transparent #1E293B transparent transparent;
}

.msg_cotainer_send {
    max-width: 95%;
    min-width: 80px;
    margin-top: auto;
    margin-bottom: auto;
    margin-right: 10px;
    border-radius: 5px;
    border-top-right-radius: 17px;
    background-color: rgba(255, 255, 255, 0.09);
    padding: 10px;
    position: relative;
    padding-bottom: 15px;
    color: #F8FAFC;
}


.msg_cotainer_sends::after {
    content: '';
    position: absolute;
    top: 10px;
    right: -10px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 0 5px 10px;
    border-color: transparent transparent transparent rgba(255, 255, 255, 0.09);
}

.msg_time {
    position: absolute;
    color: dimgray;
    left: 0;
    bottom: -1px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 9px;
    margin-left: 5px;
}

.msg_time_send {
    position: absolute;
    color: dimgray;
    left: 3px;
    bottom: -1px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 9px;
}

/* Statut des messages (tik) */
.status {
    font-size: 12px;
    margin-left: 5px;
    margin-right: 5px;
    color: gray;
    /* Couleur par défaut pour le tik */
}

/* Tik vu (deux tik bleus) */
.status.seen {
    color: rgb(0, 153, 255);
}

.msg_head {
    position: relative;
}

@media (max-width: 768px) {
    .img_cont2 {
        width: 10%;
        height: 10%;
    }

    .img_cont3 {
        width: 50%;
        height: 50%;
    }

    .sms_content {
        height: 200px;
        margin-top: -20px;
    }

    .user_img_msg {
        height: 30px;
        width: 30px;
    }
}

.sms_content {
    height: 444px;
}

audio {
    width: 200px
}

html,
body {
    overflow-y: hidden;
    height: 100%;
    /* Assurez-vous que la hauteur est bien définie */
    margin: 0;
    /* Retirer tout espace par défaut */
}

/* Style général de la scrollbar */
::-webkit-scrollbar {
    width: 6px;
    /* très fine */
    height: 6px;
    /* pour scroll horizontal aussi */
}

/* Fond de la scrollbar */
::-webkit-scrollbar-track {
    background: transparent;
    /* invisible ou très discret */
}

/* Curseur de la scrollbar */
::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    /* gris très clair */
    border-radius: 10px;
    /* arrondi pour un look moderne */
}

/* Pour survol de la scrollbar */
::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.4);
    /* un peu plus visible au survol */
}

.feedback-tab {
    border-radius: 12px;
}

.feedback-tab h2 {
    color: #333;
    font-weight: 700;
}

.feedback-tab .form-control {
    border-radius: 8px;
    border: 1px solid #ddd;
}

.feedback-tab .btn-primary {
    background-color: #4a90e2;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.feedback-tab .btn-primary:hover {
    background-color: #357ABD;
}

.scrolling-suggestions {
    display: flex;
    gap: 8px;
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
}

.suggestion-btn {
    background-color: #ffffff30 !important;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    transition: background-color 0.3s;
}

.suggestion-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}


#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    /* 100% de la hauteur de la fenêtre */
}

#header {
    text-align: center;
    flex-shrink: 0;
    /* Définit une hauteur précise pour le header */
}

html,
body {
    height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#messages {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-top: 5%;
    margin-bottom: 15%;
}

.table-container table {
    width: 100%;
    border-collapse: collapse;
}

.table-container th,
.table-container td {
    border: 1px solid #CBD5E1;
    /* Changer la couleur de la bordure en blanc */
    padding: 8px;
    text-align: left;
}

.table-container th {
    background-color: #0F172A;
    color: rgba(255, 255, 255, 0.7);
}

/* Style de l'overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    display: none;
    /* Caché par défaut */
}

/* Conteneur de l'animation */
.spinner {
    position: relative;
    width: 100px;
    height: 100px;
}

/* Cercle qui tourne */
.circle {
    width: 100px;
    height: 100px;
    border: 5px solid transparent;
    border-top: 5px solid white;
    border-radius: 50%;
    position: absolute;
    animation: spin 1s linear infinite;
}

/* Texte au centre */
.spinner p {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    font-weight: bold;
}

/* Animation de rotation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes vibration {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-3px);
    }

    50% {
        transform: translateX(3px);
    }

    75% {
        transform: translateX(-3px);
    }

    100% {
        transform: translateX(3px);
    }
}

.vibrating {
    animation: vibration 1s infinite;
}

@media (max-width: 576px) {
    .msg_card_body {
        margin-bottom: -100px !important;
    }
}

/* Le conteneur global du chat */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #111;
    overflow: hidden;
    position: relative;
}

/* Zone de messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px 15px 160px;
    /* ajusté pour laisser place au footer + suggestions */
    box-sizing: border-box;
}

/* Barre de suggestions (juste au-dessus du footer) */
.suggestions-bar {
    position: fixed;
    bottom: 60px;
    /* juste au-dessus du footer (ajuste si nécessaire) */
    left: 0;
    width: 100%;
    /* background: rgba(255, 255, 255, 0.05);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1); */
    padding: 6px 10px;
    display: flex;
    align-items: center;
    color: white;
    z-index: 9998;
    /* légèrement sous le footer */
}

.suggestions-bar button {
    background: none;
    border: none;
    color: white;
    font-size: 10px;
    cursor: pointer;
    margin-right: 10px;
}

.scrolling-suggestions {
    overflow-x: auto;
    white-space: nowrap;
    flex: 1;
    scrollbar-width: thin;
}

.scrolling-suggestions::-webkit-scrollbar {
    height: 4px;
}

.scrolling-suggestions::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

/* Footer du chat (fixé en bas) */
.chat-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgb(16, 23, 39);
    padding: 10px;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

.chat-footer form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-footer textarea {
    flex: 1;
    resize: none;
    border: none;
    outline: none;
    background: transparent;
    color: #ddd;
    height: 40px;
    max-height: 100px;
    padding: 8px 10px;
    border-radius: 8px;
    background-color: rgb(16, 23, 39);
}

.chat-footer textarea:focus {
    background-color: rgba(255, 255, 255, 0.15);
}

.chat-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgb(16, 23, 39);
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.5);
    padding: 8px 10px;
    z-index: 9999;
}

.input-wrapper {
    display: flex;
    align-items: flex-end;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 25px;
    padding: 6px 10px;
    gap: 8px;
    transition: background 0.2s ease;
}

.input-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.1);
}

#message {
    flex: 1;
    border: none;
    outline: none;
    color: #ddd;
    resize: none;
    font-size: 16px;
    line-height: 1.4;
    overflow-y: hidden;
    min-height: 40px;
    /* hauteur de base */
    max-height: 120px;
    /* environ 3 lignes supplémentaires */
    padding: 6px 8px;
    box-sizing: border-box;
}

.send-btn,
.microphoneBtn {
    background: #2f80ed;
    border: none;
    border-radius: 50%;
    color: white;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.send-btn:hover,
.microphoneBtn:hover {
    background: #1b6ae0;
}

.floating-date-bar {
    position: sticky;
    top: 0;
    z-index: 999;
    color: #fff;
    text-align: center;
    padding: 6px 12px;
    font-weight: bold;
    display: none;
}

.loader {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    perspective: 800px;
    position: relative;
}

.inner {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-sizing: border-box;
}

.inner.one {
    animation: rotate-one 1s linear infinite;
    border-top: 3px solid rgb(69, 69, 252);
}

.inner.two {
    animation: rotate-two 1s linear infinite;
    border-top: 3px solid rgb(115, 115, 255);
}

.inner.three {
    animation: rotate-three 1s linear infinite;
    border-top: 3px solid rgb(163, 160, 156);
}

@keyframes rotate-one {
    0% {
        transform: rotateX(35deg) rotateY(-45deg) rotateZ(0deg);
    }

    100% {
        transform: rotateX(35deg) rotateY(-45deg) rotateZ(360deg);
    }
}

@keyframes rotate-two {
    0% {
        transform: rotateX(50deg) rotateY(10deg) rotateZ(0deg);
    }

    100% {
        transform: rotateX(50deg) rotateY(10deg) rotateZ(360deg);
    }
}

@keyframes rotate-three {
    0% {
        transform: rotateX(35deg) rotateY(55deg) rotateZ(0deg);
    }

    100% {
        transform: rotateX(35deg) rotateY(55deg) rotateZ(360deg);
    }
}

.abonnement-selected {
    box-shadow: 0 0 0 4px #0d6efd66;
    /* bleu clair semi-transparent */
    border: 5px solid #0d6efd;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.star-rating {
    font-size: 2rem;
    color: #ccc;
    /* Couleur grisâtre par défaut */
    cursor: pointer;
    user-select: none;
    position: center;
}

.star-rating .filled {
    color: gold;
    /* Couleur dorée quand sélectionné */
}

#preview {
    max-width: 100%;
    max-height: 80%;
    margin-top: 10px;
}

#video {
    width: 100%;
}

#cropper-container {
    max-width: 100%;
    display: none;
}

.mm {
    margin-left: -4px;
}

@media (max-width: 768px) {
    .img_cont2 {
        width: 8%;
        height: 8%;
    }
}

/* Conteneur de l'overlay */
.image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    /* Fond sombre */
    display: none;
    /* Masqué au départ */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    /* Transparent au départ */
}

/* Animation d'apparition */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
        /* Image légèrement réduite */
    }

    to {
        opacity: 1;
        transform: scale(1);
        /* Taille normale */
    }
}

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

    to {
        opacity: 0;
        transform: scale(0.9);
        /* Réduction légère */
    }
}

/* Lorsque l'overlay est actif */
.image-overlay.active {
    display: flex;
    /* Affiche l'overlay */
    animation: fadeIn 0.5s ease forwards;
    /* Animation d'apparition */
}

/* Lorsque l'overlay est en train de disparaître */
.image-overlay.hide {
    animation: fadeOut 0.5s ease forwards;
    /* Animation de disparition */
}

/* Image dans l'overlay */
.image-overlay img {
    max-width: 90%;
    max-height: 90%;
    border: 5px solid white;
    border-radius: 8px;
}

.copy-container {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: -7px;
}

.copy-container.copy-bottom {
    top: unset;
    bottom: 5px;
    right: 5px;
    color: rgb(191, 197, 209);
}

.copy-container2 {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: -7px;
}

.copy-container2.copy-bottom2 {
    top: unset;
    bottom: 5px;
    right: 5px;
    color: rgb(191, 197, 209);
}


.copied-text {
    background: #4CAF50;
    color: white;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    display: none;
}

.copy-btn {
    cursor: pointer;
    font-size: 14px;
    border-radius: 5px;
}