a {
    cursor: pointer;
}
.card-auth {
    border-radius: 50px;
}
.form-group.required .control-label:after {
    content: '*';
    color: red;
}
.custom-control-label {
    font-size: 15px;
}
.btn-ecg {
    color: #fff;
    background-color: #814edf;
    border-color: #814edf;
    border-radius: 10px;
}
.btn-ecg:hover {
    color: #fff;
    background-color: #814edf;
    border-color: #814edf;
}
.btn-ecg.focus,
.btn-ecg:focus {
    color: #fff;
    background-color: #814edf;
    border-color: #814edf;
    box-shadow: 0 0 0 0.2rem rgba(105, 136, 228, 0.5);
}
.btn-active-platform {
    border: 7px solid #198754 !important;
    border-radius: 0.375rem;
    box-shadow: 0 0 8px #1fad8380;
}
.form-control:hover {
    border: 1px solid #814edf;
}
.form-control:active {
    border: 1px solid #b0519d;
}
.form-control:focus {
    border: 1px solid #b97cad;
}
.custom-control-label {
    cursor: pointer;
}
/* for md */

.custom-switch.custom-switch-md .custom-control-label {
    padding-left: 1.1rem;
    padding-top: 0.2rem;
}

.custom-switch.custom-switch-md .custom-control-label::before {
    height: 1.25rem;
    width: calc(2rem + 0.75rem);
    border-radius: 3rem;
}

.custom-switch.custom-switch-md .custom-control-label::after {
    width: calc(1.25rem - 4px);
    height: calc(1.25rem - 4px);
    border-radius: calc(2rem - (1.25rem / 2));
}

.custom-switch.custom-switch-md .custom-control-input:checked ~ .custom-control-label::after {
    transform: translateX(calc(1.75rem - 0.25rem));
}
@media (max-width: 950px) {
    .li-support {
        font-size: 0.65em;
    }
}
@media (max-width: 800px) {
    .li-support {
        font-size: 0.55em;
    }
}

@media (max-width: 950px) {
    .li-support .text-gray-600 a {
        font-size: 1.55em;
    }
}

@media (max-width: 575px) {
    .li-support {
        display: none;
    }
}
.progress {
    background-color: #ddd;
}

.weak-password {
    width: 33.3% !important;
    background-color: red !important;
}

.medium-password {
    width: 66.6% !important;
    background-color: orange !important;
}

.strong-password {
    width: 100% !important;
    background-color: green !important;
}

#passwordNotification {
    visibility: hidden; /* Cache la notification par défaut */
    min-width: 250px;
    margin-left: -125px;
    background-color: #5671df;
    color: #ffffff;
    font-weight: 600;
    text-align: center;
    border-radius: 10px;
    padding: 20px;
    position: fixed;
    z-index: 1;
    right: 30px;
    top: 30px;
    font-size: 18px;
}

#passwordNotification.show {
    visibility: visible; /* Affiche la notification */
    -webkit-animation: fadeout 0.5s 3.5s forwards;
    animation: fadeout 0.5s 3.5s forwards;
}

@-webkit-keyframes fadeout {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes fadeout {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.input-group-append .input-group-text:hover {
    color: #814edf;
}

.table tr th {
    font-size: 13px;
}
.table tr td {
    font-size: 12px;
}

.table tbody {
    font-size: 13px;
}

.table th {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
}

.table input {
    border-radius: 8px;
}

.table tbody tr {
    border-top: 1px solid #7c4be945;
    border-bottom: 1px solid #7c4be945;
}

.sort-arrow {
    cursor: pointer;
    color: grey; /* Couleur par défaut */
}

.sort-arrow.active {
    color: #814edf; /* Couleur quand le tri est actif */
}

.card-body.card-table {
    padding: 0px !important;
}

/* CSS pour fixer la largeur des colonnes du deuxième tableau */
.table th.col-nomdocument,
.table td.col-nomdocument {
    width: 30%;
}
.table th.col-datedocument,
.table td.col-datedocument {
    width: 10%;
}
.table th.col-taille,
.table td.col-taille {
    width: 10%;
}
.table th.col-format,
.table td.col-format {
    width: 10%;
}
.table th.col-download,
.table td.col-download {
    width: 20%;
}
.table th.col-number,
.table td.col-number {
    width: 3%;
}

.table th.col-os,
.table td.col-os {
    width: 5%;
}

.table th.col-nomcustomer,
.table td.col-nomcustomer {
    width: 15%;
}
.table th.col-prenomcustomer,
.table td.col-prenomcustomer {
    width: 15%;
}
.table th.col-emailcustomer,
.table td.col-emailcustomer {
    width: 15%;
}
.table th.col-emailcustomer
.table td.col-emailcustomer {
    width: 20%;
}
.table th.col-societecustomer,
.table td.col-societecustomer {
    width: 20%;
}
.table th.col-statutcustomer,
.table td.col-statutcustomer {
    width: 10%;
}
.table th.col-actioncustomer,
.table td.col-actioncustomer {
    width: 15%;
}

.table .custom-control.custom-checkbox {
    display: inline-block; /* Centre le contrôle de la case à cocher */
}
/* CSS pour fixer la largeur des colonnes */
.table th.col-nom,
.table td.col-nom {
    width: 30%;
}
.table th.col-correspondant,
.table td.col-correspondant {
    width: 30%;
}
.table th.col-id,
.table td.col-id {
    width: 10%;
}
.table th.col-utilisateurs,
.table td.col-utilisateurs {
    width: 10%;
}
.table th.col-date,
.table td.col-date {
    width: 20%;
}

/* Pour s'assurer que le tableau ne dépasse pas de son conteneur */

.table th,
.table td {
    overflow: hidden;
    text-overflow: ellipsis; /* white-space: nowrap; */
}

th,
.sort-arrow {
    cursor: pointer;
}
.sort-arrows {
    display: inline-block;
    cursor: pointer;
    user-select: none;
}

.arrow-up,
.arrow-down {
    display: block;
    text-align: center;
}

.custom-tooltiptext {
    display: inline-block;
    width: auto;
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    font-size: 13px;
    font-weight: bold;
    position: absolute;
    z-index: 1000;
    opacity: 0; /* Commencez par le rendre invisible */
    transition: opacity 0.3s ease-in-out;
}

.badge {
    font-size: 12px;
}

.permission-item {
    margin-bottom: 10px;
}
.permission-header {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #333; /* Couleur des en-têtes */
}

#swal2-permissions .custom-control {
    margin-bottom: 5px; /* Espacement entre les switches */
}

#swal2-permissions div[style*='padding-left: 20px;'] .custom-control {
    padding-left: 30px; /* Indentation supplémentaire pour les sous-pages */
}
.swal2-title {
    font-size: 1.5em !important;
}
.swal2-html-container {
    font-size: 1em !important;
}
.swal2-popup {
    border-radius: 3rem !important;
}
.swal2-popup button {
    border-radius: 3rem !important;
}

.btn-genere {
    border-top-right-radius: 30px;
    border-bottom-right-radius: 30px;
}

.btn-outline-gray {
    border: 1px solid #d1d3e2;
    color: #2c49bb;
}
.btn-outline-gray:hover {
    border: 1px solid #814edf;
    color: #ffffff;
    background-color: #814edf;
}
.sort-arrow-date {
    color: grey;
}
.sort-arrow-date.active {
    color: #814edf;
}
.col-utilisateurs span {
    cursor: pointer;
    display: inline-block; /* Assure une bonne disposition du texte et de la flèche */
}

#user-sort-icon {
    user-select: none;
}
.dropdown-menu .dropdown-item .text-gray-400:active {
    color: #814edf !important;
}

#notification-container {
    position: fixed; /* Flottant sur la page */
    right: 20px;
    top: 20px;
    background-color: #ffffff; /* Couleur de fond */
    color: #814edf; /* Couleur du texte */
    border-radius: 5px; /* Bordures arrondies */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Ombre portée */
    z-index: 1060;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

#progress-bar {
    width: 100%;
    height: 4px;
    background-color: #814edf;
    margin-top: 5px;
    border-radius: 5px;
}
@keyframes slideDown {
    from {
        top: -100px; /* Commence hors de la vue, au-dessus du haut de la page */
        opacity: 0;
    }
    to {
        top: 20px; /* La position finale de la notification */
        opacity: 1;
    }
}
@keyframes slideUp {
    from {
        top: 20px;
        opacity: 1;
    }
    to {
        top: -100px;
        opacity: 0;
    }
}

.slide-up {
    animation: slideUp 0.5s ease-in forwards;
}

.d-flex {
    display: flex;
}

.flex-row {
    flex-direction: row;
}

.slide-down {
    animation: slideDown 0.5s ease-out forwards;
}

.btn-ecg-disabled {
  opacity: .2;
  cursor: not-allowed;
}


#notification-container-success {
    position: fixed;
    right: 20px;
    top: 20px; 
    background-color: #ffffff;
    color: #009d00;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

#progress-bar-success {
    width: 100%;
    height: 4px;
    background-color: #009d00;
    margin-top: 5px;
    border-radius: 5px;
}

#notification-container-access {
    position: fixed;
    top: -100px; /* Position de départ hors de l'écran */
    right: 20px;
    background-color: #ffffff;
    color: #009d00;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 1060;
    width: auto;
    opacity: 0; /* Commence caché */
    transition:
        opacity 0.5s ease,
        top 0.5s ease; /* Animation pour opacity et position top */
}

#accordionSidebar {
    position: -webkit-sticky; /* Pour la compatibilité avec Safari */
    position: sticky;
    top: 0;
    left: 0;
    width: 300px;
    max-height: 100vh; /* Ajustez cette hauteur maximale selon vos besoins */
    overflow-y: auto;
    z-index: 1000; /* Assurez-vous qu'elle est supérieure à celle des autres éléments pour rester au-dessus */
}

#accordionSidebar::-webkit-scrollbar {
    width: 5px; /* Largeur de la barre de défilement */
}

#accordionSidebar::-webkit-scrollbar-track {
    background: #f1f1f1; /* Couleur de l'arrière-plan de la piste de défilement */
}

#accordionSidebar::-webkit-scrollbar-thumb {
    background: #814edfa6;
    border-radius: 10px;
}

#accordionSidebar::-webkit-scrollbar-thumb:hover {
    background: #814edfd3;
}

#accordionSidebar {
    scrollbar-width: thin;
    scrollbar-color: #814edfd3 #f1f1f1; /* Couleur de la barre de défilement et de la piste */
}
html::-webkit-scrollbar {
    width: 8px; /* Largeur de la barre de défilement */
}

html::-webkit-scrollbar-track {
    background: #f1f1f1; /* Couleur de l'arrière-plan de la piste de défilement */
}

html::-webkit-scrollbar-thumb {
    background: #814edfa6; /* Couleur de la barre de défilement */
    border-radius: 10px;
}

html::-webkit-scrollbar-thumb:hover {
    background: #814edfd3; /* Couleur de la barre de défilement au survol */
}

html {
    scrollbar-width: thin; /* "auto" ou "thin" */
    scrollbar-color: #814edfd3 #f1f1f1; /* Couleur de la barre de défilement et de la piste */
}
#nextButton {
    display: flex;
    justify-content: center;
    align-items: center;
}

#nextButton i {
    margin-left: 8px;
    transition: transform 0.3s ease-in-out;
}

#nextButton:hover i {
    transform: translateX(5px);
}

#nextButton,
#backButton {
    display: flex;
    justify-content: center;
    align-items: center;
}

#nextButton .fas,
#backButton .fas {
    transition: transform 0.3s ease-in-out;
}

#nextButton:hover .fas {
    transform: translateX(5px);
}

#backButton .fas {
    margin-right: 8px;
}

#backButton:hover .fas {
    transform: translateX(-5px);
}

#twoFactorCard {
    transition:
        opacity 0.5s ease,
        max-height 0.5s ease;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
}

#twoFactorCard.show {
    opacity: 1;
    max-height: 100px;
}

.form-group,
#confirmButton,
#nextButton,
#backButton {
    transition: opacity 0.5s ease;
}

.hidden {
    opacity: 0;
    pointer-events: none;
}

.notification {
    visibility: hidden; /* Caché par défaut */
    min-width: 250px; /* Largeur minimale */
    margin-left: -125px; /* Décalage pour centrer la notification */
    background-color: #f44336; /* Couleur de fond */
    color: #ffffff; /* Couleur du texte */
    text-align: center; /* Texte centré */
    border-radius: 5px; /* Bordures arrondies */
    padding: 16px; /* Padding */
    position: fixed; /* Positionnement fixe */
    z-index: 1; /* S'assure qu'il apparaît au-dessus des autres éléments */
    right: 20px; /* Position depuis la droite */
    top: 20px; /* Position depuis le haut */
    font-size: 17px; /* Taille de la police */
}

.notification.show {
    visibility: visible; /* Montre la notification */
    animation:
        fadein 0.5s,
        fadeout 0.5s 3s; /* Fade in, reste pendant 2.5 secondes, puis fade out */
}

@keyframes fadein {
    from {
        top: 0;
        opacity: 0;
    }
    to {
        top: 20px;
        opacity: 1;
    }
}

@keyframes fadeout {
    from {
        top: 20px;
        opacity: 1;
    }
    to {
        top: 0;
        opacity: 0;
    }
}

/* LOAD */

#loader {
    display: none; /* Assurez-vous qu'il est caché par défaut */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.4);
    justify-content: center;
    align-items: center;
}

.spinner {
    border: 4px solid #f3f3f3; /* Couleur de fond */
    border-top: 4px solid #814edf; /* Couleur du bord (bleu) */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.5s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
.text-high {
    color: #d9534f; /* Rouge pour une sévérité élevée */
}

.text-medium {
    color: #f0ad4e; /* Orange pour une sévérité moyenne */
}

.text-low {
    color: #5cb85c; /* Vert pour une sévérité faible */
}

.text-default {
    color: #6c757d; /* Gris pour les sévérités non spécifiées ou autres */
}

.custom-tab-style .nav-item {
    margin-right: 5px; /* Espace entre les onglets */
}

.custom-tab-style .nav-link {
    border: 1px solid transparent;
    border-radius: 5px 5px 0 0; /* Bordures arrondies en haut */
    background-color: #f8f9fa; /* Couleur de fond par défaut */
    color: #495057; /* Couleur du texte par défaut */
    margin-right: 2px;
    transition:
        background-color 0.3s ease-in-out,
        color 0.3s ease-in-out;
}

.custom-tab-style .nav-link:hover {
    background-color: #e9ecef; /* Couleur de fond au survol */
    color: #0056b3; /* Couleur du texte au survol */
}

.custom-tab-style .nav-link.active {
    background-color: #ffffff; /* Couleur de fond de l'onglet actif */
    border-color: #dee2e6 #dee2e6 #ffffff; /* Bordures de l'onglet actif */
    color: #0056b3; /* Couleur du texte de l'onglet actif */
}

/* Indicateur de la future position */
.sortable-item.sortable-ghost {
    opacity: 0.4;
    border: 2px dashed #007bff; /* Bordure en pointillé */
    background-color: #f8f9fa;
    transition: all 0.2s ease-in-out;
}

.fs-1 { font-size: 2.5rem; }
.fs-2 { font-size: 2rem; }
.fs-3 { font-size: 1.75rem; }
.fs-4 { font-size: 1.5rem; }
.fs-5 { font-size: 1.25rem; }
.fs-6 { font-size: 1rem; }

.rounded { border-radius: 0.25rem; }
.rounded-1 { border-radius: 0.2rem; }
.rounded-2 { border-radius: 0.5rem; }
.rounded-3 { border-radius: 1rem; }

.rounded-top-1 {
  border-top-left-radius: 0.2rem;
  border-top-right-radius: 0.2rem;
}

.rounded-top-2 {
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
}

.rounded-top-3 {
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
}


.fw-bold { font-weight: bold; }

.overflow-auto {
  overflow: auto;
}

.overflow-hidden {
  overflow: hidden;
}

.overflow-visible {
  overflow: visible;
}

.overflow-scroll {
  overflow: scroll;
}

.container-custom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
}

.chat-container {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    overflow: hidden;
    height: calc(100vh - 200px);
    width: 50%;
}

.chat-header {
    background: #814edf;
    color: white;
    padding: 5px;
    text-align: center;

}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8fafc;
}

.message {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: slideIn 0.3s ease;
}
.message.user {
    flex-direction: row-reverse;
}
.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 0.9rem;
}
.message.user .message-avatar {
    background: #814edf;
}

.message.bot .message-avatar {
    background: #10b981;
}

.message-content {
    max-width: 80%;
    padding: 15px 20px;
    border-radius: 20px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.message-content h3 {
    font-size: 1rem;
}

.message-content h3 {
    font-size: 1.2rem;
}

.message.user .message-content {
    background: #814edf;
    color: white;
    border-bottom-right-radius: 5px;
}

.message.bot .message-content {
    background: white;
    color: var(--gray-dark);
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 5px;
}

.chat-input {
    display: flex;
    padding: 20px;
    background: white;
    border-top: 1px solid #e2e8f0;
}

.chat-input input {
    flex: 1;
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.chat-input input:focus {
    border-color: #814edf;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.chat-input button {
    margin-left: 10px;
    padding: 15px 25px;
    background: #814edf;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.chat-input button:hover {
    background: #814edf;
    transform: translateY(-2px);
}

.chat-input button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Partie Recommendation */

.recommendations-panel {
    width: 50%;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    overflow: hidden;
    height: calc(100vh - 200px);
    display: flex;
    flex-direction: column;
}

.recommendations-header {
    background: #814edf;
    color: white;
    padding: 5px;
    text-align: center;

}

.recommendations-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.alert-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(5, 1fr);
    grid-column-gap: 0px;
    grid-row-gap: 0px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 10px;
    border-left: 4px solid #814edf;
}

.gap-2 {
    gap: 0.5rem;
}

.box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 100px;
}

.align-items-center {
    align-items: center;
}
.justify-content-center {
    justify-content: center;
}

.alert-id {
    grid-area: 1 / 1 / 2 / 2;
}

.alert-description {
    grid-area: 1 / 2 / 3 / 3;
}

.alert-status {
    grid-area: 2 / 1 / 3 / 2;
}

.alert-level {
    grid-area: 3 / 1 / 4 / 3;
}

.alert-agent {
    grid-area: 4 / 1 / 5 / 2;
}

.alert-timestamp {
    grid-area: 4 / 2 / 5 / 3;
}

.alert-section h3 {
    color: #814edf;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.alerte-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.alert-info-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.alert-info-item strong {
    color: #814edf;
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.alert-info-item span {
    color: var(--gray-dark);
    font-size: 0.95rem;
    word-break: break-word;
}

/* Special styling for description to handle longer text */
.alert-info-item:nth-child(4) {
    grid-column: 1 / -1; /* Make description span full width */
}

.alert-info-item:nth-child(4) span {
    font-style: italic;
    background: #e2e8f0;
    padding: 8px 12px;
    border-radius: 6px;
    display: block;
    margin-top: 8px;
}

.severity-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.severity-high {
    background: var(--danger);
    color: white;
}

.severity-medium {
    background: var(--warning);
    color: white;
}

.severity-low {
    background: var(--success);
    color: white;
}

.severity-critical {
    background: var(--primary);
    color: white;
}

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

.recommendations-list li {
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.recommendations-list li:last-child {
    border-bottom: none;
}

.recommendations-list li::before {
    content: "•";
    color: var(--primary);
    font-weight: bold;
    font-size: 1.2rem;
    margin-top: 2px;
}

.analyze-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;  
    width: 50%;
    padding: 8px 12px;
    background: #814edf;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    grid-area: 5 / 1 / 6 / 3;
}

.analyze-button:hover {
    background: var(--blue);
    transform: translateY(-2px);
}

.analyze-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.loading {
    display: none;
    text-align: center;
    padding: 20px;
    color: var(--gray-dark);
}

.loading.active {
    display: block;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.max-height {
  max-height: 12vh;
}

/* 1. Masquer la modale par défaut */
#analysisModal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: none;               /* invisible tant que la classe .open n’est pas appliquée */
  align-items: center;         /* centrer verticalement */
  justify-content: center;     /* centrer horizontalement */
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  transition: opacity 0.3s ease;
  opacity: 0;
}

/* 2. Quand on veut l’afficher : on ajoute .open */
#analysisModal.open {
  display: flex;
  opacity: 1;
}

/* 3. Style de la boîte de dialogue */
#analysisModal .modal-dialog {
  background: #fff;
  border-radius: 0.25rem;
  max-width: 800px;
  width: 90%;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  overflow: hidden;
}

/* 4. Optionnel : bouton “Fermer” style minimal */
.modal-close {
  cursor: pointer;
  background: none;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
}

 #eset-content .table {
    table-layout: fixed;      /* force le respect des largeurs et permet les césures */
    width: 100%;
  }

  /* 1ʳᵉ colonne = Description : on autorise les retours à la ligne */
  #eset-content .table th:nth-child(1),
  #eset-content .table td:nth-child(1) {
    white-space: normal !important;   /* annule un éventuel nowrap du thème */
    overflow-wrap: anywhere;          /* casse même des mots très longs */
    word-break: break-word;           /* fallback navigateurs */
  }

  /* Les autres colonnes peuvent rester compactes (facultatif) */
  #eset-content .table th:not(:first-child),
  #eset-content .table td:not(:first-child) {
    white-space: nowrap;              /* évite qu'elles s'étirent */
    vertical-align: top;
  }

  /* Si tu veux empêcher le débordement visuel de la carte */
  #eset-content .table-responsive {
    overflow-x: auto;                 /* scroll horizontal si vraiment nécessaire */
  }

  /* Message "bot en train d'écrire" */
.message.bot.typing .message-content {
  display: inline-flex;
  align-items: center;
}

/* 3 points qui s'animent l'un après l'autre */
.typing-dots {
  display: inline-flex;
  gap: 6px;
}
.typing-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #999;
  opacity: 0.25;
  animation: dotBlink 1.2s infinite;
}
.typing-dots .dot:nth-child(2) { animation-delay: .2s; }
.typing-dots .dot:nth-child(3) { animation-delay: .4s; }

@keyframes dotBlink {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40%          { opacity: 1;    transform: translateY(-2px); }
}

.remediation-container {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    overflow: hidden;
    height: calc(100vh - 200px);
    width: 100%;
    height: 100%;
}

.remediation-header {
    background: #814edf;
    color: white;
    padding: 5px;
    text-align: center;
}

.remediation-message {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 10px;
    align-items: center;
    gap: 5px;
    animation: slideIn 0.3s ease;
}

.btn-remediation {
    display: flex;
    justify-content: center;
    margin: 10px;
    align-items: center;
    gap: 5px;
    animation: slideIn 0.3s ease;
}

/* zone scrollable si la liste est longue */
.remediation-messages { max-height: 420px; overflow: auto; }

/* conteneur */
#remediation-commande {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  counter-reset: cmd;
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: flex-start;
  gap: 8px;
  padding: 6px 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* UNE commande = UNE ligne stylée, avec retour à la ligne si trop longue */
#remediation-commande .cmd-line {
  position: relative;
  display: block;
  align-items: flex-start;
  padding: 10px 12px 10px 44px;   /* espace pour le numéro */
  background: #f6f8fa;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  width: 50%;

  /* 👉 wrapping lisible */
  white-space: pre-wrap;          /* autorise les retours à la ligne + garde les espaces */
  overflow-wrap: anywhere;        /* casse même dans un "mot" très long si besoin */
  word-break: break-word;         /* fallback pour certains navigateurs */
  overflow-x: hidden;             /* pas de scroll horizontal */
  line-height: 1.45;
  font-size: .95rem;
}

/* rangée 2 colonnes : commande | description */
#remediation-commande .cmd-item{
  display:flex;
  align-items:flex-start;
  gap:12px;
  width:100%;
}

/* description : simple span, style proche de la commande */
#remediation-commande .desc-line{
  display:block;
  width:50%;             /* en vis-à-vis de .cmd-line (qui est déjà à 50%) */
  align-self:flex-start;
  padding:10px 12px;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:10px;
  line-height:1.45;
  font-size:.95rem;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  word-break:break-word;
  min-height:42px;
}

/* responsive */
@media (max-width:900px){
  #remediation-commande .cmd-item{flex-direction:column;}
  #remediation-commande .cmd-line,
  #remediation-commande .desc-line{width:100%;}
}


/* Numérotation en haut à gauche (adaptée aux lignes multi-lignes) */
#remediation-commande .cmd-line::before {
  counter-increment: cmd;
  content: counter(cmd) ".";
  position: absolute;
  left: 12px;
  top: 10px;                      /* pas centré verticalement pour éviter l'effet bizarre sur plusieurs lignes */
  font-weight: 700;
  color: #6b7280;
}

/* petit hover agréable */
#remediation-commande .cmd-line:hover {
  border-color: #c9ced6;
  background: #f3f5f7;
}


/* Scrollbar discrète (Chrome/Edge) */
#remediation-commande .cmd-line::-webkit-scrollbar {
  height: 6px;
}
#remediation-commande .cmd-line::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 6px;
}


  #groupCounts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;           /* espace horizontal/vertical entre chips */
  }
  #groupCounts .gc-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: 2px 8px;   /* <<< réduit la hauteur */
    line-height: 1;     /* <<< réduit la hauteur */
    font-size: .85rem;  /* un peu plus petit */
    border-radius: 9999px;
    background: #f8f9fa;            /* clair */
    border: 1px solid #e5e7eb;      /* léger contour */
    white-space: nowrap;
  }
  #groupCounts .gc-name { color: #444; }
  #groupCounts .gc-count {
    display: inline-block;
    padding: 0 6px;     /* petit badge du nombre */
    line-height: 1.2;
    border-radius: 9999px;
    background: rgba(13,110,253,.12); /* primary très léger */
    color: #0d6efd;
    font-weight: 600;
  }

.m-0 {
    margin: 0 !important;
}

.service-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* pour que le wrapper s’intègre dans la grille existante */
.service-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

/* bloc du toggle (visible au clic sur "modifier") */
.visibility-toggle {
  min-height: 40px;
  text-align: center;
  transition: opacity 0.3s ease;
}

.visibility-toggle .form-check {
  justify-content: center;
}

.visibility-toggle .form-check-input {
  cursor: pointer;
  transform: scale(1.1);
}


.service-card {
  position: relative;
  flex: 1 1 150px; /* comme avant */
  height: 100px;
  width: 200px;
  margin: 10px;;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.2), 0 8px 10px -6px rgb(0 0 0 / 0.2);
  min-width: 100px; /* pour éviter que ça devienne trop petit sur petit écran */
}

.service-card-bg {
  position: absolute;
  inset: 0; /* top:0 right:0 bottom:0 left:0 */
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
}

.service-card-content {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(0,0,0,0.7); /* fond noir transparent */
  color: white;
  padding: 5px;
  transition: transform 0.4s ease;
  transform: translateY(70%); /* description cachée par défaut */
}

.service-card h2 {
  margin: 0;
  font-size: 1.1rem;
}

.service-card p {
  margin-top: 5px;
  margin-bottom: 0px;
  font-size: 0.8rem;
  line-height: 1.2;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Effet au hover */
.service-card:hover .service-card-bg {
  transform: scale(1.1); /* zoom léger de l’image */
}

.service-card:hover .service-card-content {
  transform: translateY(0); /* remonte le bloc noir */
}

.service-card:hover p {
  opacity: 1; /* le texte apparaît */
}

.pack-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.pack-card {
  position: relative;
  flex: 1 1 200px; /* largeur fluide comme tes services */
  height: 150px; /* plus haut que service-card */
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.2), 0 8px 10px -6px rgb(0 0 0 / 0.2);
  min-width: 100px;
}

.pack-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
}

.pack-card-content {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(0,0,0,0.75); /* fond noir + transparent */
  color: white;
  padding: 15px;
  transition: transform 0.4s ease;
  transform: translateY(70%); /* caché au départ */
  overflow-y: auto; /* si beaucoup de texte, scrollbar interne */
}

.pack-card h2 {
  margin: 0;
  font-size: 1.3rem;
}

.pack-card p {
  margin-top: 5px;
  margin-bottom: 0px;
  font-size: 0.8rem;
  line-height: 1.1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Effet hover */
.pack-card:hover .pack-card-bg {
  transform: scale(1.1);
}

.pack-card:hover .pack-card-content {
  transform: translateY(0);
}

.pack-card:hover p {
  opacity: 1;
}

.col-groupe {
  width: 150px; /* ajuste à ton besoin */
  white-space: nowrap; /* évite que le texte aille à la ligne */
}

.card-header span {
  word-break: break-word; /* coupe proprement les mots longs */
  white-space: normal;    /* autorise les retours à la ligne */
}

/* Conteneur onglets */
.tabs {
    display: flex;
    gap: .5rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
/* Boutons onglets */
.tab {
    appearance: none;
    border: 0;
    background: transparent;
    padding: .6rem .9rem;
    font: inherit;
    cursor: pointer;
    color: #6b7280;            /* gris */
    opacity: .7;               /* look grisé */
    border-bottom: 2px solid transparent;
    border-radius: .5rem .5rem 0 0;
    transition: opacity .15s ease, color .15s ease, border-color .15s ease, background-color .15s ease;
}
.tab:hover { opacity: .95; }
.tab.is-active {
    color: #111827;            /* texte plus sombre */
    opacity: 1;
    border-color: #6610f2;     /* soulignement actif */
    background-color: #f9fafb;
}

/* Panneaux */
.tab-panels { }
.tab-panel { padding: 1rem; background: #fff; border: 1px solid #e5e7eb; border-radius: .5rem; }
.tab-panel + .tab-panel { margin-top: 1rem; }

/* Option dark-ish support simple */
@media (prefers-color-scheme: dark) {
.tabs { border-bottom-color: #374151; }
.tab { color: #9ca3af; }
.tab.is-active { color: #e5e7eb; background-color: #111827; border-color: #60a5fa; }
.tab-panel { background: #0b0f14; border-color: #374151; }
}

/* Intro au-dessus de la liste */
.ai-intro {
  margin: 0 0 10px 0;
  font-weight: 600;
  color: var(--gray-dark); /* gris-900 */
}

/* Liste stylée avec compteurs personnalisés */
.ai-steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
    max-width: 100%;
}

.ai-steps > li {
  counter-increment: step;
  position: relative;
  background: #ffffff;
  border: 1px solid #e5e7eb;         /* gris-200 */
  border-radius: 14px;
  padding: 14px 16px 14px 56px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
    width: 100%;
  box-sizing: border-box;
}

/* Badge numéroté à gauche */
.ai-steps > li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 14px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: #eef2ff;               /* indigo-50 */
  color: #4338ca;                    /* indigo-700 */
  border: 1px solid #c7d2fe;         /* indigo-200 */
  border-radius: 999px;
}

/* Contenu d'un item */
.step {
  display: grid;
  gap: 6px;
  max-width: 100%;
}

.step-title {
  font-weight: 600;
  color: var(--gray-dark);
}

.step-text {
  color: #374151;    
    word-break: break-word;
  overflow-wrap: anywhere;                /* gris-700 */
}

.ai-code {
  margin-top: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: auto; /* scroll horizontal si commande trop longue */
  background: #f9fafb;
}

.ai-code code {
  display: block;
  padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
               "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  white-space: pre-wrap; /* on garde la mise en forme mais on wrap si besoin */
}
