/* Styles pour la boîte mail */
#MailBox {
    color: #333;
}

#MailBox .row:first-child {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start
}

#MailBox .row .col {
    border-right: 1px solid #efefef;
    height: 100vh;
    min-width: 250px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

/* je déplace le flex-grow 1 car il faisait en sorte 
   que la liste des dossiers était trop gros au chargement initial*/
#Mailbox .row .mailbox-container {
    flex-grow: 1;
}

#MailBox .row .col:nth-child(2) {
    min-width: 30vw;
}

#MailBox .row .col:nth-child(3) {
    min-width: 40vw;
}

#MailBox .imap-folders {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #fff;
}

#MailBox .imap-folders ul {
    list-style: none;
    padding-left: 10px;
    margin: 0;
    border-left: 1px solid #eee;
}

#MailBox .imap-folders li {
    margin: 2px 0;
}

#MailBox .folder-item {
    display: flex;
    align-items: center;
    padding: 4px 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#MailBox .folder-item:hover {
    background-color: #f5f5f5;
}

#MailBox .folder-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 10px;
    background: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2Ij48cGF0aCBmaWxsPSIjOTA5MDkwIiBkPSJNMTQgNHYxMEgyVjJoNmwyIDJ6Ii8+PC9zdmc+") no-repeat center;
    opacity: 0.7;
}

#MailBox .folder-name {
    flex: 1;
    font-size: 14px;
    line-height: 2.4;
    color: #444;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#MailBox .folder-count {
    font-size: 12px;
    color: #666;
    margin-left: 10px;
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 10px;
}

#MailBox .folder-count.has-unread {
    background: #e3effd;
    color: #1a73e8;
}

/* Styles spécifiques pour les dossiers spéciaux */
#MailBox .folder-inbox .folder-name {
    font-weight: 600;
    color: #1a73e8;
}

#MailBox .folder-sent .folder-icon,
#MailBox .folder-drafts .folder-icon,
#MailBox .folder-trash .folder-icon {
    opacity: 0.5;
}

/* Styles responsifs */
@media (max-width: 768px) {
    #MailBox .folder-item {
        padding: 10px 8px;
    }

    #MailBox .folder-count {
        font-size: 11px;
        padding: 1px 6px;
    }
}

/* Block Message Liste */
#mailContent #mailList {
    width: 100%;
}

#mailcontent {
    display: flex;
}

#infosClient {
    flex: 6;
}

/* style pour la message list + le bandeau */
.mailbox-container {
    border-radius: 5px;
    margin: 5px;
    background-color: rgb(247, 251, 255);
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
}

.message-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
    width: 100%;
}

.email-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.email-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border-bottom: 1px solid #f1f1f1;
    cursor: pointer;
    position: relative;
    width: 100%;
    overflow: hidden;
}

.email-item .email-content {
    display: flex;
    align-items: flex-start;
    flex-wrap: nowrap;
    margin-left: 15px;
}

.email-item .email-content .email-subject {
    width: 50%;
}

.email-item .email-content .email-sender {
    width: 35%;
}

.email-item .email-content .email-time {
    font-size: 12px;
    text-align: right;
    width: 15%;
}


.email-item:hover {
    /* box-shadow: inset 1px 0 0 #dadce0, inset -1px 0 0 #dadce0, 0 1px 2px 0 rgba(60, 64, 67, .3), 0 1px 3px 1px rgba(60, 64, 67, .15);
    z-index: 1; */
    /* background-color: #bcd6ec; */
    filter: brightness(0.95);
}

.email-item:hover:not(.client-taskey) {
    background-color: #bcd6ec;
}

.email-checkbox {
    margin-right: 16px;
    color: #666;
}

.email-star {
    margin-right: 16px;
    color: #666;
    cursor: pointer;
}

.email-star:hover {
    color: #f4b400;
}

.email-star.starred {
    color: #f4b400;
}

.email-sender {
    width: 200px;
    font-weight: 500;
    color: #202124;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-content {
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0;
    /* Pour que text-overflow fonctionne */
}

.email-subject {
    font-weight: 400;
    margin-right: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-preview {
    color: #5f6368;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-left: 8px;
}

.email-preview::before {
    content: "-";
    margin: 0 8px;
    color: #5f6368;
}

.email-time {
    width: 60px;
    text-align: right;
    color: #5f6368;
    font-size: 12px;
    white-space: nowrap;
}

.email-item.client-taskey {
    background-color: #edc7a2 !important;

}


/* Style pour les emails non lus */
.email-item.unread {
    background-color: #f2f6fc;
}

.email-item.unread .email-sender,
.email-item.unread .email-subject {
    font-weight: 700;
    color: #202124;
}

/* Style pour la s�lection */
.email-item.selected {
    background-color: #c2dbff;
}

/* Style pour le survol */
.email-item:hover .email-checkbox,
.email-item:hover .email-star {
    opacity: 1;
}

/* Style pour les badges et �tiquettes */
.email-badge {
    background-color: #dadce0;
    color: #5f6368;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .email-sender {
        width: 120px;
    }

    .email-preview {
        display: none;
    }
}


/* Block MEssage */
#mailMessageContent {
    background-color: #ffffff;
    border-radius: 4px;
    margin: 0px;
    padding: 20px;
    height: calc(100vh - 40px);
    overflow-y: auto;
}

/* En-t�te du message */
#mailMessageContent .message-header {
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
    padding-bottom: 15px;
}

#mailMessageContent .header-subject {
    font-size: 1.4em;
    color: #333;
    margin-bottom: 15px;
    font-weight: 500;
}

#mailMessageContent .header-details {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 8px;
    color: #666;
    font-size: 0.95em;
}

#mailMessageContent .header-label {
    font-weight: 500;
    color: #444;
}

/* Corps du message */
#mailMessageContent .message-body {
    line-height: 1.6;
    color: #333;
    padding: 10px 0;
}

/* Zone des pi�ces jointes */
#mailMessageContent .attachments {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

#mailMessageContent .attachments-title {
    font-size: 1.1em;
    color: #444;
    margin-bottom: 10px;
}

#mailMessageContent .attachment-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin: 5px 0;
    background-color: #f8f8f8;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

#mailMessageContent .attachment-item:hover {
    background-color: #f0f0f0;
}

#mailMessageContent .attachment-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.6;
}

#mailMessageContent .attachment-name {
    flex: 1;
    color: #1a73e8;
    text-decoration: none;
}

#mailMessageContent .attachment-name:hover {
    text-decoration: underline;
}

#mailMessageContent .attachment-size {
    color: #666;
    font-size: 0.9em;
    margin-left: 10px;
}

/* Style pour le contenu HTML des emails */
#mailMessageContent .email-content {
    max-width: 100%;
    overflow-x: auto;
    word-wrap: break-word;
}

#mailMessageContent .email-content img {
    max-width: 100%;
    height: auto;
}

/* Styles responsifs */
@media (max-width: 768px) {
    #mailMessageContent {
        margin: 10px;
        padding: 15px;
        height: calc(100vh - 20px);
    }

    #mailMessageContent .header-subject {
        font-size: 1.2em;
    }

    #mailMessageContent .header-details {
        grid-template-columns: 60px 1fr;
        font-size: 0.9em;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

#mailMessageContent {
    animation: fadeIn 0.3s ease-in-out;
}


/* Redimentionnement des blocks */
#MailBox {
    position: relative;
    width: 100%;
    height: 100vh;
}

#MailBox .row {
    display: flex;
    height: 100%;
    position: relative;
}

#MailBox .col {
    position: relative;
    height: 100%;
    overflow-y: auto;
    min-width: 200px;
}

#MailBox .resize-handle {
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: transparent;
    cursor: col-resize;
    z-index: 100;
}

#MailBox .resize-handle:hover {
    background: #1a73e8;
}

#MailBox .resize-handle.active {
    background: #1a73e8;
}

#MailBox.resizing {
    cursor: col-resize;
    user-select: none;
}


#mailMessageContent .DetailClientResa {
    border-top: 1px solid #e0e0e0;
    margin-top: 15px;
    padding-top: 0px;
    background-color: rgb(201 163 119 / 10%);
}

#mailMessageContent .DetailClientResa h3 {
    background-color: #222;
    color: #FFF;
    padding: 15px;
    font-size: 18px;
}

#mailMessageContent .DetailClientResa ul.list-resa {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

#mailMessageContent .DetailClientResa ul.list-resa li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #efefef;
    padding: 5px;
    margin: 0 0 5px 0;
    transition: all 0.4s ease;
}

#mailMessageContent .DetailClientResa ul.list-resa li:hover {
    background-color: #efefef;
}

/* centre le bouton */
.create-new-mail {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
}

/*bouton new mail*/
.btn-new-mail {
    padding: 5px;
    margin: 0px 5px;
    width: 90%;
}

/* centrage du bloc qui affiche que les dossiers/contenu mail chargent*/
.loading-folder-content {
    height: 80dvh;
    display: flex;
    justify-content: center;
    align-items: center;

}

/* bouton + avec le texte Nouveau dossier */
.actionModaleAjoutDossier {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-top: 15px;
    margin-bottom: 10px;
}

/* bouton + */
.btn-open-create-folder {
    border-radius: 50%;
    box-shadow: 0 5px 5px 0 rgba(0, 0, 0, 0.2);
    padding: 10px 12px;
}

/* au survol d'un dossier, on affiche le menu pour faire les actions comme renommer
.folder-item:hover .action-btn-show-menu {
    display: block;
}
 */

/* on met en vert les dossiers où peut être déplacé le mail */
.folder-item.drag-over {
    border-color: #5cb85c;
    /* bord vert (Bootstrap success) */
    background: #dff0d8;
    /* fond vert clair */
}

/* on change la couleur du dossier actif */
.folder-item.active {
    background: #bcd6ec;
}

/* on change la couleur du mail actif */
.email-item.active {
    background: #bcd6ec;
    border: 1.5px solid #c2c1c1;
}

/* aspect des boutons actions pour chaque dossier */

.folder-actions {
    display: none;
    padding: 6px 6px;
    border-radius: 50%;
    border: 1px solid #ccc;
    box-shadow: 0 5px 5px 0 rgba(0, 0, 0, 0.2);
}

/* au survol des items des dossier créer par l'utilisateur, on affiche les actions */
.folder-item-sub:hover .folder-actions {
    display: block;
}

/* au survol des dossiers créer on cache les counts pour laisser la place aux actions */
.folder-item-sub:hover .folder-count {
    display: none;
}

/* loading spinner pour signaler que les fichiers, contenu de mail sont en chargement*/
.loading-spinner {
    display: inline-block;
    font-size: 24px;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

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

/* mon hidden pour cacher de manière propre la section infos sélection*/
.my-hidden {
    visibility: hidden;
    width: 0px;
    height: 0px;
    padding: 0px !important;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
}

/* Style du du bloc qui indique le nombre de mail sélectionné */
.mail-selection-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 2px solid #e0e0e0;
    background-color: white;
}

/* positionement du bloc pour rédiger un mail  */
.position-panel-email-composer {
    position: fixed;
    bottom: 1px;
    right: 10px;
    width: 600px;
    box-shadow: 5px 5px 5px 0 rgba(0, 0, 0, 0.2) !important;
    z-index: 1000;
}

.input-wrapper {
    display: flex;
    align-items: center;
    padding: 5px;
    border-radius: 5px;
}

.prefix-input {
    font-weight: bold;
    margin-right: 5px;
}

.my-close {
    background: 0 0;
    border: 0;
    font-weight: bold;
}

.my-close:not(#resetSearchBar) {
    margin: 5px;
}


.panel-heading {
    cursor: pointer;
}

.signal-panel-input-error {
    color: red;
    font-size: 12px;
}

.BlockListeDossierImap {
    margin: 5px 5px 0 0;
}

.btn-back-to-inbox {
    border-color: white;
    background-color: white;
}

.btn-back-to-inbox:hover {
    border-color: rgb(243, 238, 238);
    background-color: rgb(243, 238, 238);
}

.toolbar-actions {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 5px;

}

.toolbar-action {
    margin: 0 5px;
}

.toolbar-actions button:not(#deleteSelectedMessages, #resetSearchBar, #rechercheMail) {
    box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    background-color: rgb(240, 240, 240);
}

.toolbar-actions button:hover {
    box-shadow: none !important;
}

.email-action {
    display: none;
}

.email-item:hover .email-action {
    display: flex;
    flex-direction: row;
}

.email-item:hover .email-time {
    visibility: hidden;
}


.primary-actions {
    box-shadow: inset -1px 0 0 rgb(230, 229, 229);
    padding-right: 8px;
    margin-right: 8px;
}

/*** Drop down pour sélectionner un dossier quand on déplace un mail depuis la page de lecture de celui-ci ***/
.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    border: 1px solid #ddd;
    width: 200px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    z-index: 1000;
}


#folderList {
    list-style: none;
    padding: 0;
    margin: 0;
}

#folderList li {
    padding: 8px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#folderList li:hover {
    background-color: #f0f0f0;
}


.vertical {
    display: flex;
    flex-direction: column;
    padding: 10px;
}

#EnteteClient {
    display: flex;
    align-items: center;
    padding: 10px;
}

#tableResaClient td,
#tableResaClient th {
    text-align: center;
}

#mailContent {
    background-color: #ffffff;
}

#infosClient {
    border-left: 1px solid #efefef;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}

#ResponseDiv {
    display: flex;
    flex-direction: column;
    border: 1px solid #efefef;
    border-radius: 5px;
    box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.1);
    margin: 20px 15px;
    gap: 10px;
}

#toResponse {
    font-weight: bold;
    color: #444;
    margin: 10px 5px 0 10px;
}

#cke_reponseClassic {
    margin: 5px;
}

#btnSendResponse {
    align-self: flex-end;
    padding: 8px 16px;
    margin: 5px 10px 5px 0;
}

/* Mise en forme de la barre de recherche  */
#searchBarWrapper {
    border-radius: 24px;
    background-color: #e9eef6;
}

#inputRechercheMail {
    border: none;
    background-color: #e9eef6;
}

#resetSearchBar {
    border-radius: 50%;
    width: 30px;
    height: 30px;
}

#resetSearchBar:hover {
    color: #d9534f;
    background-color: rgba(60, 64, 67, .08);
}

#rechercheMail {

    border-radius: 24px;
}

.actions-search-bar {
    display: table-cell;
    vertical-align: middle;
}

.my-col-lg-6 {
    position: relative;
    min-height: 1px;
    padding-left: 15px;
}

.shadow-on-selection {
    box-shadow: 0 1px 1px 0 rgba(65, 69, 73, .3), 0 1px 3px 1px rgba(65, 69, 73, .15);
}

/* Mise en forme des input de l'éditeur de mail  */


.panel-footer {
    position: absolute;
    width: 100%;
    bottom: 0;
}

.panel-body {
    display: flex;
    flex-direction: column;
}

/* #emailComposer{
    min-height: 70vh;
} */

input.input-mail-composer {
    border: none;
    background-color: #ffffff;
    border-radius: 5px;
}

.tagify {
    border: none !important;
    background-color: #ffffff;
    border-radius: 5px;
    height: auto !important;
    overflow-y: auto;
    white-space: normal !important;
    flex-wrap: wrap !important;
}

.input-wrapper {
    background-color: #ffffff;
    padding: 5px;
    margin: 5px;
}

.my-hr-composer {
    margin: 0 0 5px 0 !important;
    border-top: 1px solid #d1d1d1 !important;
}

.prefix-input {
    opacity: 0.8;
}

.cke_chrome {
    border: none !important;
    border-radius: 5px;
}

.cke_top {
    background-color: #ffffff !important;
}

.cke_button_icon {
    opacity: 0.8;
    transition: opacity 0.2s;
}

.cke_bottom {
    display: none !important;
}

.cke_button:hover .cke_button_icon {
    opacity: 1;
}

.tagify__dropdown {
    border-top: solid 1px #d1d1d1 !important;
}

.tagify__dropdown__wrapper {
    border: solid 1px #d1d1d1 !important;
}

.tagify__dropdown__item {
    padding: 8px 12px;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.tagify__dropdown__item--active {
    background-color: #f0f0f0;
    color: #000;
    font-weight: bold;
}

/**
 * Style pour le modal de composition de mail
 */

#modalMailComposerFullScreen {
    min-height: 70vh;
}

.cke_contents {
    min-height: 25vh;
}

/* #cke_corpsMail{
    min-height: 45vh;
}

.cke_editable{
    min-height: 45vh;
} */

.header-composer-fs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    content: none !important;
}

.header-composer-fs::before,
.header-composer-fs::after {
    content: none !important;
    display: none !important;
}

/* CE FIX EST DU AU FICHER REDUCTION.CSS QUI AJOUTE:  "position : fixed" SUR modal-open
   HORS CECI CASSE LE VISUEL DU SITE SUR L'OUVERTURE DES MODALS*/
.modal-open {
    position: static !important;
}

.editor-wrapper {
    max-height: 40vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

#attachmentsPreview,
#attachmentsPreviewFS {
    padding: 8px;
}


.item-attachment-preview {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    background-color: #f5f5f5;
    border-radius: 5px;
    padding: 5px;
    margin: 5px;
    font-size: 14px;

}

.remove-attachment {
    margin: 5px;
    cursor: pointer;
}

#dragOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10150;
}

.drag-overlay-content{
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#indicationNombreFichierFS, #indicationNombreFichier{
    margin: 5px;
}