/* =================================
   Annuaire PANEL & HEADER
================================= */
:root {
    --primary-orange: #FF6B35;
    --primary-blue: #304287;
    --primary-purple: #6F42C1;
    --light-blue: #DCE4FD;
    --light-gray: #F8F9FA;
    --border-gray: #E9ECEF;
    --text-dark: #212529;
    --text-medium: #495057;
    --text-light: #6C757D;
    --white: #FFFFFF;
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --border-radius-large: 24px;
}



.x-theme-legalsuite .ls-directory-panel .ls-directory-editor {
	min-width: auto;
	width: 100%;
	max-width: none;
	margin-left: 0px;
	height: 100%;
}

.x-theme-legalsuite .ls-directory-panel .ls-directory-listview .flex-layout-column .x-grid3-row,
.x-theme-legalsuite .ls-directory-panel .ls-directory-listview .flex-layout-column .x-grid3-header.x-grid3-td-fileType,
.x-theme-legalsuite .ls-directory-panel .ls-directory-listview .flex-layout-column .x-grid3-header.x-grid3-td-title,
.x-theme-legalsuite .ls-directory-panel .ls-directory-listview .ls-directory-header .ls-directory-tab:not(.active) * {
	cursor: pointer;
}

.filetab-directory{
	background: var(--orange);
	
}
.ls-directory-panel {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
}

.ls-directory-header {
    display: flex;
    gap: 24px;
    background: var(--white);
    border-bottom: 1px solid var(--border-gray);
    justify-content: flex-start;
    align-items: center;
    /*padding: 16px 20px 0;*/
}

.ls-directory-tab {
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    padding: 14px 16px;
    /*margin-right: 24px;*/
    transition: all 0.3s ease;
    position: relative;
}
.ls-directory-tab button {
	display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative; /* pour ::after */
    cursor: pointer;
    color: var(--primary-blue) !important;
    background: transparent !important;
    border: none;
    padding: 0px !important;
}
.ls-directory-tab.active button {
    color: var(--primary-orange) !important;
}
.ls-directory-tab.active::after {
    content: '';
    position: absolute;
    left: 16px; /* correspond au padding gauche du bouton */
  right: 16px;
    height: 3px;
    background: var(--primary-orange);
    
  	top: auto;
  	 bottom: calc(-1 * (100% - 46px));
}
.ls-directory-tab:first-child::before,
.ls-directory-tab:last-child::before {
    content: '';
    width: 16px; height: 16px;
    background-size: contain;
    display: inline-block;
    margin-right: 8px;
}
.ls-directory-tab:first-child::before {
    background: url(../gxt/themes/legalsuite/images/legalsuite/pictos/mini/physicalperson.png) no-repeat;
}
.ls-directory-tab:last-child::before {
    background: url(../gxt/themes/legalsuite/images/legalsuite/pictos/mini/place.png) no-repeat;
}

.ls-directory-tab.active:first-child::before {
    background: url(../gxt/themes/legalsuite/images/legalsuite/pictos/mini/physicalperson-orange.png) no-repeat;
}

.ls-directory-tab.active:last-child::before {
    background: url(../gxt/themes/legalsuite/images/legalsuite/pictos/mini/place-orange.png) no-repeat;
}




.ls-directory-tab:first-child::before,
.ls-directory-tab.active:first-child::before,

.ls-directory-tab.active:last-child::before,

.ls-directory-tab:last-child::before {
    content: '';
    width: 18px;
    height: 18px;
    background-size: contain;
    background-repeat: no-repeat;
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
}

.ls-directory-panel .top-panel{
	display: flex;
	flex-direction: column;
	gap: 16px;
}
/* ===============-==================
   TOOLBAR & SEARCH
================================= */
.ls-directory-toolbar {
    /* padding: 12px; */
    /* border-bottom: 1px solid var(--border-gray); */
    display: flex;
    flex-direction: column;
    /*align-items: center;*/
    gap: 8px;
}

.ls-directory-toolbar .btn-add-line {
	border: 1px solid #304287 !important;
	background-color: white !important;	
	width: 100% !important;
	max-width: 100% !important;
}
.ls-directory-toolbar .btn-add-line .btn-label{
	color: #304287 !important;
}

.ls-directory-toolbar .btn-add-line .btn-icon {
	/* On surcharge l'icon pour mettre une icon blue*/
	background-image: url(../gxt/themes/legalsuite/images/legalsuite/grid/plus-blue-icon.svg) !important;
}

.ls-directory-toolbar .x-form-field-wrap {
    flex: 1;
    position: relative;
}
.ls-directory-toolbar .x-form-field-wrap.ls-directory-search-input {
    width: auto !important;
    max-width: 100%;
}
.ls-directory-toolbar .x-form-field-wrap.ls-directory-search-input input[type="text"] {
	position: relative;
    width: 100% !important;
    padding-left: 44px;
    box-sizing: border-box;
    background-color: transparent !important;
}


.ls-directory-toolbar .x-form-field-wrap.ls-directory-search-input::before {
    content: "";
    position: absolute;
    left: 12px; top: 50%;
    width: 20px; height: 20px;
    background: url("../gxt/themes/legalsuite/images/legalsuite/icons/search-blue-icon.svg") no-repeat center;
    background-size: contain;
    transform: translateY(-50%);
    pointer-events: none;
} 
.ls-directory-toolbar .ls-button:last-child {
    border: none;
    color: var(--white);
    padding: 10px;
    border-radius: 50%;
    width: 40px !important;
    height: 40px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

/* =================================
   FILTER BUTTONS
================================= */
.ls-directory-filters {
	display: flex;
	flex-direction: column; 
	gap: 4px;
}

.ls-directory-filters-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.ls-directory-filter-button button {
    color: var(--primary-blue) !important;
    background-color: transparent !important;
    margin-top: 3px;
}

.ls-directory-filter-button * {
  cursor: pointer;
}

.ls-directory-filter-button.active {
    /*background: var(--primary-blue);*/
    background-color: rgba(220, 228, 253, 1);
    /*color: var(--white) !important;*/
    color: rgba(48, 66, 135, 1) !important;
    /*border-color: var(--primary-blue);*/
    border: none;
}

.ls-directory-filter-button.active button {
    color: var(--white) !important;
    padding: 0px;
}

/* ICÔNES DES FILTRES */
.ls-directory-filter-button .type-physique,
.ls-directory-filter-button .type-morale,
.ls-directory-filter-button .type-organisation {
    content: "";
    width: 24px; height: 24px;
    background-size: contain;
    display: inline-block;
}

.ls-directory-filter-button.type-physique::before { 
    background: url('../gxt/themes/legalsuite/images/legalsuite/pictos/medium/physicalperson.png') no-repeat center;
}
.ls-directory-filter-button.type-morale::before {
    background: url('../gxt/themes/legalsuite/images/legalsuite/pictos/medium/moralperson.png') no-repeat center;
}
.ls-directory-filter-button.type-organisation::before {
    background: url('../gxt/themes/legalsuite/images/legalsuite/pictos/medium/otherentity.png') no-repeat center;
}

.ls-directory-filter-button.active .type-physique {
    background-image: url('../gxt/themes/legalsuite/images/legalsuite/pictos/mini/physicalperson.svg');
    filter: none;
}
.ls-directory-filter-button.active .type-morale {
    /*background-image: url('../gxt/themes/legalsuite/images/legalsuite/pictos/mini/moralperson.png');*/
    background-image: url('../gxt/themes/legalsuite/images/legalsuite/pictos/mini/moralperson.svg');
    filter: none;
}
.ls-directory-filter-button.active .type-organisation {
    /*background-image: url('../gxt/themes/legalsuite/images/legalsuite/pictos/mini/otherentity.png');*/ 
    background-image: url('../gxt/themes/legalsuite/images/legalsuite/pictos/mini/otherentity.svg'); 
    filter: none; 
}

.ls-directory-filter-button .type-physique {
    background-image: url('../gxt/themes/legalsuite/images/legalsuite/pictos/mini/physicalperson.svg');
    filter: grayscale(0.2) brightness(1.7) contrast(0.4);  /* léger gris bleuté */
}
.ls-directory-filter-button .type-morale {
    background-image: url('../gxt/themes/legalsuite/images/legalsuite/pictos/mini/moralperson.svg');
    filter: grayscale(0.2) brightness(1.7) contrast(0.4);  /* léger gris bleuté */
}
.ls-directory-filter-button .type-organisation {
    background-image: url('../gxt/themes/legalsuite/images/legalsuite/pictos/mini/otherentity.svg');
    filter: grayscale(0.2) brightness(1.7) contrast(0.4);  /* léger gris bleuté */
}

/* =================================
   ANIMATIONS
================================= */
.ls-directory-tab,
.ls-directory-filter-button {
    /*transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);*/
}

/* =================================
   RESPONSIVE
================================= */
@media (max-width: 768px) {
    .ls-directory-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .ls-directory-header {
        flex-direction: column;
        padding: 12px;
    }
    .ls-directory-tab {
        text-align: center;
        margin-right: 0;
    }
    .ls-directory-filters-buttons {
        flex-direction: column;
    }
    .ls-directory-filter-button {
        width: 100%;
        justify-content: center;
    }
}

.ls-directory-filter-button {
    display: inline-flex;
    /* min-width: 160px; */
    max-width: 250px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0px 12px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(106, 120, 150, 1);
    background: transparent;
    color: rgba(106, 120, 150, 1);
    cursor: pointer;
    /*transition: all 0.3s ease;*/
    user-select: none;
    gap: 4px;
    
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Pour le bouton archivé pas de gap et pas d'icon */
.ls-directory-filter-button.archived {
	height: 24px;
	gap: 0px;
}


.ls-directory-filter-button .lib {
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 12px;
}

.ls-directory-type-icon.type-physique::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    background: url('../gxt/themes/legalsuite/images/legalsuite/pictos/medium/physicalperson.svg') no-repeat center;
    background-size: contain;
}

/* quand la ligne est selectionnée on applique un filter sur l'icon */
.x-grid3-row-selected .ls-directory-type-icon.type-physique::before {
    filter: grayscale(0.1) brightness(0.80) contrast(2.6);
}

.ls-directory-type-icon.type-morale::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    background: url('../gxt/themes/legalsuite/images/legalsuite/pictos/medium/moralperson.svg') no-repeat center;
    background-size: contain;
}

/* quand la ligne est selectionnée on applique un filter sur l'icon */
.x-grid3-row-selected .ls-directory-type-icon.type-morale::before {
    filter: grayscale(0.1) brightness(0.80) contrast(2.6);
}

.ls-directory-type-icon.type-organisation::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    background: url('../gxt/themes/legalsuite/images/legalsuite/pictos/medium/otherentity.svg') no-repeat center;
    background-size: contain;
}

/* quand la ligne est selectionnée on applique un filter sur l'icon */
.x-grid3-row-selected .ls-directory-type-icon.type-organisation::before {
    filter: grayscale(0.1) brightness(0.80) contrast(2.6);
}

.ls-directory-type-icon.type-societe::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    background: url('../gxt/themes/legalsuite/images/legalsuite/pictos/medium/moralperson.svg') no-repeat center;
    background-size: contain;
}

/* quand la ligne est selectionnée on applique un filter sur l'icon */
.x-grid3-row-selected .ls-directory-type-icon.type-societe::before {
    filter: grayscale(0.1) brightness(0.80) contrast(2.6);
}

.ls-directory-type-icon.type-place::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    background: url('../gxt/themes/legalsuite/images/legalsuite/pictos/medium/place.png') no-repeat center;
    background-size: contain;
}

.ls-directory-type-icon.type-default::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    background: url('../gxt/themes/legalsuite/images/legalsuite/pictos/medium/physicalperson.png') no-repeat center;
    background-size: contain;
}

.x-theme-legalsuite .ls-directory-panel .flex-layout-row .ls-directory-listview {
	display: flex;
	flex-direction: column;
	gap: 16px;
	background-color: white;
    padding: 16px;
    border-left: 1px solid rgb(194, 197, 204);
    border-right: 1px solid rgb(194, 197, 204);
    max-width: 368px;
    min-width: 368px;
}

.x-theme-legalsuite .ls-directory-panel .flex-layout-row .ls-directory-listview .x-grid3-col.x-grid3-cell.x-grid3-td-fileNum,
.x-theme-legalsuite .ls-directory-panel .flex-layout-row .ls-directory-listview .x-grid3-col.x-grid3-cell.x-grid3-td-specificFileNum {
	width: 92px;
}

/* style du bouton dans l'entête directory */
.account-btn-container {
	display: inline-flex;
	position: relative;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 0px 12px;
	background-color: rgba(220, 228, 253, 1);
	border-radius: 16px;
}

.account-btn-container .account-icon {
	position: relative; 
	width : 24px;
	height: 24px;
}

.account-btn-container .account-icon.physicalperson {
	background: url('../gxt/themes/legalsuite/images/legalsuite/pictos/medium/physicalperson.svg') no-repeat center;
}

.account-btn-container .account-icon.corporate, .account-icon.moralperson {
	background: url('../gxt/themes/legalsuite/images/legalsuite/pictos/medium/moralperson.svg') no-repeat center;
}

.account-btn-container .account-icon.otherentity {
	background: url('../gxt/themes/legalsuite/images/legalsuite/pictos/medium/otherentity.svg') no-repeat center;
}

.account-btn-container .account-icon.place {
	background: url('../gxt/themes/legalsuite/images/legalsuite/pictos/medium/place.svg') no-repeat center;
}

.account-btn-container .account-label {
	font-family: 'Inter', sans-serif;
	font-style: normal;
	font-size: 12px;
	font-weight: 700;
	color: rgba(48, 66, 135, 1);
	letter-spacing: 0px;
	white-space: nowrap;
	/*line-height: 18px*/;
	width: fit-content;	
}
/* fin style du bouton dans l'entête directory */

/* flex sur directory avec listview à gauche et directory-detail-container à droite*/
.directory-main-container {
	display: flex;
	flex-direction: row; /* enfants côte à côte */
	width: auto;
	/*height: 100%;*/
}

.ls-directory-listview {
	flex: 0 0 auto; /* ne grandit pas */
}

.directory-detail-container {
	flex: 1 1 auto; /* prend le reste */
	overflow: auto; 
}

.directory-detail-container .ls-file-tab.x-component {
	width: calc(100% - 24px);
}

.directory-detail-container .ls-file-tabpanel {
	padding: 0px 0px 0px 15px;
}

/* override pour style pour l'image dans l'entête de l'annuaire*/
.x-theme-legalsuite .file-header .fav-refresh-email-container .image-editable-container .ls-upload-field-img-preview,
.x-theme-legalsuite .directory-header .fav-refresh-email-container .image-editable-container .ls-upload-field-img-preview
	{
	height: 32px;
	width: 32px;
}
.x-theme-legalsuite .file-header .fav-refresh-email-container .image-editable-container .x-form-file-wrap.ls-upload-field .x-form-file-btn,
.x-theme-legalsuite .directory-header .fav-refresh-email-container .image-editable-container .x-form-file-wrap.ls-upload-field .x-form-file-btn
	{
	display: none;
}

.x-theme-legalsuite .file-header .fav-refresh-email-container .image-editable-container .ls-file-delete-btn
.x-theme-legalsuite .directory-header .fav-refresh-email-container .image-editable-container .ls-file-delete-btn
	{
	display: none;
}

.ls-file-editmode .fav-refresh-email-container .image-editable-container * {
	cursor: pointer !important;
	pointer-events: auto !important;
}

.x-theme-legalsuite .directory-header .ct-title {
  display: flex;
  overflow: hidden; /* cache le texte qui dépasse */
  white-space: nowrap;
}

.x-theme-legalsuite .directory-header  .ct-title .x-form-field-wrap {
  flex: 1 1 0 !important;   /* force shrink */
  min-width: 0 !important;  /* indispensable en flex */
  width: 0 !important;      /* écrase width:auto inline */
  overflow: hidden;         /* masque contenu qui dépasse */
}

.x-theme-legalsuite .directory-header  .ct-title .x-form-field {
  width: 100% !important;   /* occupe tout l’espace dispo */
  min-width: 0 !important; 
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;  /* affiche ... si déborde */
}

.x-theme-legalsuite .directory-header .ct-title .x-form-field input {
    border: 1px solid rgba(174, 185, 207, 1);
}
