/* Corps principal */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    color: #333;
    transition: background 0.3s, color 0.3s;
}

/* SVG Container for index page */
.svg-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: -215px;
    margin-bottom: -150px;
}

/* Responsive SVG */
.responsive-svg {
    width: 100%;
    max-width: 500px;
    height: auto;
    display: block;
    transform-origin: center;
}

/* Conteneur principal */
.container {
    max-width: 960px;
    margin: 20px auto;
    padding: 20px;
}

/* Titres */
h1, h2 {
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    font-size: 48px;
    color: #2c3e50;
}

h2 {
    font-size: 22px;
}

/* Conteneur spécifique des dossiers */
.folder {
    background: #ffffff;
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.folder:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* En-tête de la section */
.folder-header {
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    padding: 10px;
    background: #7486b3;
    color: #ffffff;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.folder-header:hover {
    background: #3b699f;
}

/* Listes de tests */
.test-list {
    margin-top: 10px;
    padding-left: 15px;
    display: none;
}

.test-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    border-radius: 8px;
    background: #f5f5f5;
    margin: 8px 0;
    transition: background 0.3s;
}

.test-item:hover {
    background: #e0e0e0;
}

/* Éléments de la liste */
.test-item span {
    flex-grow: 1;
    font-size: 16px;
    font-weight: 500;
    margin-right: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Boutons d'action */
.test-actions, .test-result-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

/* Bouton pour exécuter des tests ou actions */
.test-item button, .run-all-button, .run-folder-button, .run-button {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    background: #053da8;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    width: 10vw;
    align-content: center;
}

.run-folder-button {
    padding: 6px 12px;
    font-size: 12px;
    margin-left: 10px;
}

.test-item button:hover, .run-all-button:hover, .run-folder-button:hover {
    background: #053da8;
    transform: scale(1.05);
}

.test-item button:disabled, .run-all-button:disabled, .run-folder-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Champ input pour l'upload */
.file-input, .file-input-user {
    font-size: 14px;
    border: 1px solid #ccc;
    padding: 8px;
    border-radius: 6px;
    margin-left: 10px;
}
.file-input-user {
    width: 25vw;
}

/* Bouton personnalisé pour remplacer l'input invisible */
.custom-file-label {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    background: #053da8;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.custom-file-label:hover {
    background: #053da8;
    transform: scale(1.05);
}

.custom-file-label:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Spinner animé */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #ccc;
    border-top-color: #4caf50;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: none; /* Spinner invisible par défaut */
}

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

/* Résultat final */
.result {
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
}

/* Mode sombre */
body.dark-mode {
    background-color: #1e1e1e;
    color: #f9f9f9;
}

.dark-mode .folder {
    background: #333;
    box-shadow: 0 2px 4px rgb(164, 175, 213);
}

.dark-mode .folder-header {
    background: #666;
}

.dark-mode .test-item {
    background: #444;
}

.dark-mode .test-item:hover {
    background: #555;
}

.dark-mode .test-item button {
    background: #053da8;
}

.dark-mode .test-item button:hover {
    background: #053da8;
}

.dark-mode .spinner {
    border-color: #777;
    border-top-color: #053da8;
}

/* Préférences du mode sombre */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 35px;
    height: 35px;
    font-size: 20px;
    background: #053da8;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.theme-toggle:hover {
    background: #053da8;
}

.demo-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    padding-left: 10px;
}

.demo-toggle input[type="checkbox"] {
    transform: scale(1.5);
    margin-right: 5px;
    cursor: pointer;
}

/* Centrage complet de la page */
.container-center {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f9f9f9; /* Respecte le thème général clair */
    transition: background-color 0.3s, color 0.3s;
}

/* Conteneur principal du formulaire */
.login-container {
    text-align: center;
    background: #ffffff;
    padding: 30px;
    border-radius: 16px; /* Bords légèrement arrondis pour un effet moderne */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1); /* Ombre douce */
    width: 100%;
    max-width: 400px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.login-container:hover {
    transform: translateY(-5px); /* Légère élévation au survol */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15); /* Ombre plus marquée */
}

/* Styles modernes pour les champs */
.modern-input {
    width: 100%;
    padding: 14px 16px;
    margin: 10px 0;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #f9f9f9;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
}

.modern-input:focus {
    border-color: #053da8; /* Couleur vive au focus */
    box-shadow: 0 0 6px rgba(5, 61, 168, 0.3); /* Effet lumineux */
    background-color: #ffffff;
}

/* Styles pour un bouton moderne et esthétique */
.modern-button {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
    background: linear-gradient(45deg, #053da8, #0056b8); /* Dégradé pour un rendu moderne */
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.modern-button:hover {
    background: linear-gradient(45deg, #0056b8, #053da8); /* Inversion du dégradé pour l'animation */
    transform: translateY(-2px); /* Légère élévation visuelle */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2); /* Ombre plus forte */
}

.modern-button:active {
    transform: translateY(1px); /* Réaction de clic */
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2); /* Réduction de l'ombre */
}

/* Message d'erreur */
.error-message {
    color: red;
    font-size: 14px;
    margin-bottom: 20px;
}

/* Mode sombre (si activé) */
body.dark-mode .container-center {
    background-color: #1e1e1e; /* Fond sombre */
    color: #f9f9f9;
}

body.dark-mode .login-container {
    background: #333333;
    box-shadow: 0 8px 20px rgba(164, 175, 213, 0.1); /* Ajustement pour le mode sombre */
}

body.dark-mode .modern-input {
    background-color: #444;
    border-color: #666;
    color: #fff;
}

body.dark-mode .modern-input:focus {
    border-color: #4caf50;
    background-color: #555;
    box-shadow: 0 0 6px rgba(76, 175, 80, 0.3); /* Effet lumineux vert */
}

body.dark-mode .modern-button {
    background: linear-gradient(45deg, #444, #555); /* Dégradé adapté au mode sombre */
    color: #fff;
}

body.dark-mode .modern-button:hover {
    background: linear-gradient(45deg, #555, #444);
    box-shadow: 0 6px 15px rgba(255, 255, 255, 0.2); /* Effet plus léger */
}

#export-results-btn, #search-console-btn {
    padding: 10px 20px;
    background-color: #053da8;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

#export-results-btn:hover {
    background-color: #032d80;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.sidebar {
    width: 220px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background-color: #2c3e50;
    color: #ecf0f1;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Pour séparer top du bottom */
}

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

.sidebar ul.menu-top li a, .sidebar ul.menu-bottom li a, .sidebar button.theme-toggle {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #ecf0f1;
    border: none;
    background: none;
    font-size: 16px;
    width: 100%; /* Occupe toute la largeur */
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s;
}

.sidebar ul.menu-top li a:hover, .sidebar ul.menu-bottom li a:hover, .sidebar button.theme-toggle:hover {
    background-color: #34495e;
}

/* Sépare les éléments du bas */
.menu-bottom {
    padding-bottom: 20px;
}

/* Page principale ajustement pour laisser l'espace de la barre de nav */
.main-content {
    margin-left: 240px; /* largeur sidebar + padding extra */
    padding: 20px;
    min-height: 100vh;
    overflow-x: hidden;
    transition: margin-left 0.3s;
}

/* Ajustement du bouton de thème pour ne pas chevaucher */
.theme-toggle {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: #ffffff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    border: none;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Mode sombre sidebar */
body.dark-mode .sidebar {
    background-color: #333333;
}

body.dark-mode .sidebar ul li a {
    color: #f9f9f9;
}

body.dark-mode .main-content {
    background-color: #1e1e1e;
    color: #f9f9f9;
}

.result.wrap {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-all;
}

.sidebar {
    background-color: #3c516a;
    width: 220px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;

}

.sidebar h2 {
    padding: 20px;
    margin: 0;
    text-align: center;
}

.sidebar ul.menu-top {
    list-style: none;
    padding: 0;
    margin-top: 30px;
}

.sidebar ul.menu-top li a {
    display: block;
    padding: 10px 5px;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.sidebar ul.menu-top li a:hover {
    background-color: #1f2c3a;
}

.sidebar-bottom {
    margin-top: auto;
    margin-bottom: 30px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* Bouton Switch Toggle Animated */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.label-text {
    font-size: 14px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 45px;
    height: 25px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 25px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 19px;
    width: 19px;
    border-radius: 50%;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #053da8;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* Style mode sombre global */
body.dark-mode {
    background-color: #1e1e1e;
    color: #f9f9f9;
}

.dark-mode .sidebar {
    background-color: #1a2530;
}

.dark-mode .sidebar ul.menu-top li a:hover {
    background-color: #34495e;
}

.dark-mode .logout-btn {
    background-color: #34495e;
}

.dark-mode .logout-btn:hover {
    background-color: #053da8;
}

.logo-container {
    display: flex;
    justify-content: center; /* centrer horizontal du svg */
    padding: 20px 0; /* ajustez selon vos besoins de marge verticale */
}

.sidebar ul, .sidebar h2 {
    color: #ffffff !important; /* Couleur de texte blanc */
}

/* Amélioration supplémentaire des formulaires utilisateurs */
.user-actions form {
    display: flex;
    flex-direction: row;
    margin-bottom: 10px;
}

.user-actions .run-button {
    align-self: start;
}

/* Container pour les formulaires d'actions, assure une meilleure lisibilité */
.user-actions {
    display: flex;
    flex-direction: row;
    gap: 5px;
}

/* Style clair et lisible pour les messages flash */
.flash-message {
    padding: 8px;
    border-radius: 5px;
    margin-top: 10px;
    font-weight: bold;
}

.flash-success {
    background-color: #def1e7;
    color: #2c662d;
}

.flash-error {
    background-color: #f8d7da;
    color: #821b20;
}

/* Amélioration générale du formulaire de création d'utilisateur */
.new-user-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.new-user-form button {
    width: fit-content;
}

/* Table utilisateur lisible et claire */
.user-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.user-table th, .user-table td {
    padding: 4px;
    border-bottom: 1px solid #ddd;
    text-align: center;
}

.user-table th {
    background-color: #ffffff;
    color: #090808;
}

.dark-mode .user-table th {
     background-color: #34495e;
}

.icon-button {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 18px;
    transition: transform 0.3s;
}

.icon-button:hover {
    transform: scale(1.3);
}

/* Formulaires en ligne propres et compacts */
.inline-form {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.flash-message {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border-radius: 5px;
    margin-bottom: 10px;
    font-weight: bold;
}

.user-success {
    background-color: #dff0d8;
    color: #3c763d;
}

.user-error {
    background-color: #f2dede;
    color: #a94442;
}

/* Formulaire de création utilisateur clair et convivial */
.user-creation-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.empty-table {
    text-align: center;
    padding: 20px;
    color: #888;
    font-style: italic;
}

.delete-user {
    color: #e74c3c;
    transition: color 0.3s, transform 0.3s;
}

.delete-user:hover {
    color: #c0392b;
    transform: scale(1.3);
}

.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
}

.card, .card-large{
    background: #ffffff;
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    width: calc(45% - 20px); /* Default width for larger screens */
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.card-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #053da8;
    text-decoration: underline;
}

.card-text {
    font-size: 16px;
    margin-bottom: 20px;
    color: #333;
}

.card .btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    background-color: #053da8;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    text-decoration: none;
}

.card .btn:hover {
    background-color: #032d80;
    transform: scale(1.05);
}

.card-body {
    position: relative;
}

.card-large {
    flex: 1 1 calc(100% - 16px); /* Occupe toute la largeur (équivalent de 2 cards classiques) */
}

/* Style for large cards in dashboard */
.dashboard-large-card {
    width: 100% !important; /* Force full width in dashboard */
    margin-bottom: 30px;
    background: #ffffff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.dashboard-large-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Make sure dashboard cards look good */
#dashboard-card-container .card-large {
    width: 100%;
    margin-bottom: 20px;
    background: #ffffff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

#dashboard-card-container .card-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

#graph {
    width: 100% !important;
    height: 250px !important;
    margin-top: 20px;
}

.sortable-ghost {
    opacity: 0.4;
}

.sortable-chosen {
    border: 2px dashed #053da8;
    box-shadow: 0 8px 12px rgba(0,0,0,0.2);
}

.sortable-drag {
    background-color: #ececec;
}

#activityChart, #activityChartCompany, #statusChart {
    max-width: 350px;
    max-height: 350px;
    margin: 0 auto;
}

#candidaturesChart {
    max-width: 400px;
    max-height: 400px;
    margin: 0 auto;
}

#skillsChart {
    height: auto;
    min-height: 400px; /* Increased minimum height to accommodate more job titles */
    width: 95%;
    margin: 0 auto;
}
th { cursor: pointer; }
th:hover { background: #f8fafc; }


.scrollable-table {
    overflow-y: auto;
    max-height: 400px; /* Ajustez selon votre besoin */
}

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

.scrollable-table th, .scrollable-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
}

.scrollable-table thead {
    position: sticky;
    top: 0;
    background-color: #ffffff; /* White background for headers */
    z-index: 1; /* Pour s'assurer que l'entête reste bien dessus */
}

.scrollable-table th {
    font-weight: bold;
    color: #333;
    border-bottom: 1px solid #ddd; /* Thin bottom border for headers */
}

/* Alternating row colors for better readability */
.scrollable-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.scrollable-table tbody tr:hover {
    background-color: #eef2f9; /* Light highlight on hover */
}

.floating-action-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999;
}

.floating-action-btn {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    cursor: pointer;
}


.floating-action-btn:hover {
    transform: scale(1.1);
}

.actions-menu {
    margin-top: 5px;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    overflow: hidden;
}

.actions-menu button {
    padding: 8px 10px;
    border: none;
    background: #ffffff;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
    text-align: left;
}

.actions-menu button:hover {
    background: #053da8;
    color: white;
}

.hidden {
    display: none;
}

.action-btn-icon {
    display: block;
    width: 40px;
    height: 40px;
}

.action-btn {
    background: #f5f5f5;
    border: 1px solid #bbb;
    border-radius: 4px;
    cursor: pointer;
    padding: 2px 8px;
}
.action-btn:hover {
    background: #e8e8e8;
}

/* Conteneur pour une table scrollable en pleine page */
.table-fullpage-container {
    width: 100%;
    max-width: 100vw;
    margin: 0 auto;
    padding: 30px 0 0 0;
}

/* bar d'entête optionnelle */
.table-header-bar {
    min-height: 40px;
    margin-bottom: 10px;
}

/* Sous-container scrollable */
.scrollable-table-overview {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 18px rgba(44, 62, 80, 0.10);
    overflow-x: auto;
    width: 100%;
    min-height: 300px;
    max-height: 100vh;
}
.scrollable-table-overview::-webkit-scrollbar {
    height: 8px;
}
.scrollable-table-overview::-webkit-scrollbar-thumb {
    background-color: #e4e4ef;
    border-radius: 6px;
}

/* Table elle-même */
#company-table-overview, #candidate-table-overview {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

#company-table-overview th, #company-table-overview td, #candidate-table-overview th, #candidate-table-overview td {
    padding: 8px 12px;
    text-align: center;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
}

#company-table-overview thead th, #candidate-table-overview thead th {
    position: sticky;
    top: 0;
    background: #7486b3;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    z-index: 2;
}

#company-table-overview tbody tr, #candidate-table-overview tbody tr {
    background: #f9f9f9;
    transition: background 0.2s;
}

#company-table-overview tbody tr:hover, #candidate-table-overview tbody tr:hover {
    background: #e0e0e0;
}

/* Coins arrondis au premier et dernier th */
#company-table-overview thead th:first-child, #candidate-table-overview thead th:first-child {
    border-top-left-radius: 12px;
}
#company-table-overview thead th:last-child, #candidate-table-overview thead th:last-child {
    border-top-right-radius: 12px;
}

/* Mode sombre */
body.dark-mode .scrollable-table-overview {
    background: #232b3a;
    box-shadow: 0 4px 18px rgba(41, 57, 79, 0.25);
}

body.dark-mode #company-table-overview thead th {
    background: #44568e;
    color: #fff;
}
body.dark-mode #company-table-overview tbody tr {
    background: #333a48;
}
body.dark-mode #company-table-overview tbody tr:hover {
    background: #41506a;
}


#total-actifs-candidate{
    color: #2c662d;
    font-weight: bold;
}

#total-inactifs-candidate{
    color: darkred;
    font-weight: bold;
}

.billing-summary-table {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
}

.billing-summary-table th {
    background-color: #0d6efd;
    color: #ffffff;
    padding: 10px;
    text-align: left;
}

.billing-summary-table tbody tr:nth-child(odd) {
    background-color: #f8f9fa;
}

.billing-summary-table tbody tr:nth-child(even) {
    background-color: #ffffff;
}

.billing-summary-table td {
    padding: 8px;
    border-bottom: 1px solid #dee2e6;
}

.billing-summary-table tbody tr:hover {
    background-color: #e2e6ea;
}

.tree-table {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
}

.tree-table th {
    background-color: #ffffff;
    color: #333;
    padding: 10px;
    text-align: left;
}

.tree-table td {
    padding: 8px;
    border-bottom: 1px dashed #ccc;
}

.tree-table tbody tr:hover {
    background-color: #f1f3f5;
}

.tree-table .tree-indent {
    padding-left: calc(20px);
}

.clickable-row:hover {
    cursor: pointer;
    background-color: #8bb2ed;
}

/* Dashboard styles */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.card-header h5 {
    margin: 0;
}

.card-header .dashboard-checkbox-container {
    display: none;
    align-items: center;
}

.card:hover .dashboard-checkbox-container,
.card-large:hover .dashboard-checkbox-container {
    display: flex;
}

.dashboard-selector {
    margin-left: 10px;
    cursor: pointer;
    transform: scale(1.2);
}

.dashboard-card-wrapper {
    position: relative;
    margin-bottom: 20px;
}

/* Make sure dashboard cards look good */
#dashboard-card-container .card {
    margin-bottom: 20px;
    background: #ffffff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    width: calc(45% - 20px);
}

#dashboard-card-container .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Dashboard container should match other card containers */
#dashboard-card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
}

/* Card type container for dashboard */
.card-type-container {
    width: 100%;
    margin-bottom: 20px;
}

/* Card type title for dashboard */
.card-type-title {
    font-size: 24px;
    margin-bottom: 15px;
    color: #2c3e50;
    border-bottom: 2px solid #3c516a;
    padding-bottom: 5px;
}

/* Home card styles */
.home-card {
    width: 180px;
    height: 180px;
    margin: 15px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.home-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.home-card-link {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: #333;
}

.home-card-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.home-card-name {
    font-size: 1rem;
    font-weight: bold;
}

/* Home card container */
#home-card-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

/* Dashboard card specific styles */
.dashboard-card {
    margin-bottom: 20px;
    background: #ffffff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    width: calc(45% - 20px);
}

.dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Media queries for responsive design */
@media (max-width: 1200px) {
    .card, .card-large, .dashboard-card {
        width: calc(50% - 20px);
    }
}

@media (max-width: 992px) {
    .card, .card-large, .dashboard-card {
        width: calc(100% - 20px);
    }

    #activityChart, #activityChartCompany, #statusChart, #candidaturesChart, #skillsChart {
        max-width: 100%;
        height: auto;
    }

    .card-container {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    /* Adjust padding and margins for smaller screens */
    body {
        font-size: 14px;
    }

    h1 {
        font-size: 32px;
    }

    h2 {
        font-size: 18px;
    }

    .container {
        padding: 10px;
    }

    /* Make tables responsive */
    .scrollable-table, .scrollable-table-overview {
        overflow-x: auto;
        max-width: 100%;
    }

    /* Adjust form elements */
    .modern-input, .modern-button {
        padding: 10px 12px;
        font-size: 14px;
    }

    /* Adjust card padding */
    .card, .card-large, .dashboard-card {
        padding: 10px;
    }

    /* Ensure buttons are properly sized */
    .test-item button, .run-all-button, .run-folder-button, .run-button {
        width: auto;
        padding: 8px 12px;
        font-size: 12px;
    }

    /* Adjust form layouts */
    .user-actions {
        flex-direction: column;
        gap: 10px;
    }

    .user-actions form {
        width: 100%;
    }

    /* Make sure tables don't overflow */
    table {
        width: 100%;
    }

    /* Adjust table cell padding */
    th, td {
        padding: 6px 8px;
        font-size: 12px;
    }

    /* Login page responsive adjustments for tablets */
    .login-container {
        width: 90%;
        max-width: 350px;
        padding: 20px 15px;
    }

    .login-container .logo-container svg {
        width: 80%;
        height: auto;
    }
}

@media (max-width: 576px) {
    /* Further adjustments for very small screens */
    .main-content {
        padding: 10px;
    }

    h1 {
        font-size: 24px;
    }

    /* Stack form elements vertically */
    .inline-form {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Make sure buttons are full width on very small screens */
    .modern-button, .btn, .action-btn {
        width: 100%;
        margin-bottom: 5px;
    }

    /* Adjust floating action buttons */
    .floating-action-container {
        top: 10px;
        right: 10px;
    }

    /* Login page responsive adjustments for very small screens */
    .login-container {
        width: 95%;
        max-width: 320px;
        padding: 15px 10px;
    }

    .login-container .logo-container svg {
        width: 70%;
        height: auto;
    }

    .login-container h5 {
        font-size: 16px;
        margin-top: 5px;
    }
}

/* Dashboard remover checkbox */
.dashboard-remover {
    margin-left: 10px;
    cursor: pointer;
    transform: scale(1.2);
}

/* Loading indicator for dashboard cards */
.loading-indicator {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

/* Message when no cards are selected */
.no-cards-message {
    width: 100%;
    text-align: center;
    padding: 30px;
    background: #f5f5f5;
    border-radius: 12px;
    color: #666;
    font-size: 18px;
    margin: 20px 0;
}

/* Error message styles */
.error-message {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
    text-align: center;
    font-weight: bold;
}

/* Apparence normale de la sidebar */
.sidebar {
    width: 250px;
    transition: width 0.3s, min-width 0.3s;
    overflow: hidden;
}

.main-content {
    transition: margin-left 0.3s;
    margin-left: 250px;
}

/* Quand la sidebar est repliée */
.sidebar.collapsed {
    width: 10px;
    min-width: 10px;
}

.main-content.with-collapsed-sidebar {
    margin-left: 10px;
}

/* Style du bouton toggle */
.sidebar-toggle {
    background-color: #3c516a;
    border: none;
    color: #ffffff;
    font-size: 22px;
    cursor: pointer;
    outline: none;
    transition: all 0.3s;
    position: absolute;
    top: 50%;
    right: -30px;
    transform: translateY(-50%);
    z-index: 1000;
    width: 30px;
    height: 60px;
    border-radius: 0 5px 5px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
}

.sidebar-toggle:hover {
    background-color: #243864;
    transform: translateY(-50%) scale(1.05);
}

.sidebar.collapsed ul,
.sidebar.collapsed .sidebar-bottom,
.sidebar.collapsed .logo-container {
    display: none;
}

.sidebar.collapsed .sidebar-toggle {
    /* Optionnel : on peut maintenir le bouton visible même quand la sidebar est repliée */
    left: 10px; /* pour qu’il reste à sa place */
}

#messenger-recap-table tbody tr {
    transition: background 0.2s;
}
#messenger-recap-table tbody tr:hover {
    background: #f0f4fc;
}

/* Styles for fiche_messenger.html */
.messages-container {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background-color: #f9f9f9;
    margin-top: 20px;
}

.message-item {
    padding: 12px;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    line-height: 1.5;
    font-size: 0.95em;
}

.message-item:last-child {
    border-bottom: none;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.action-buttons-manager {
    display: grid;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.action-buttons button {
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: bold;
    transition: all 0.3s;
}

.action-buttons button:hover:not([disabled]) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.action-buttons button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Company and candidate name styles */
.company-name {
    color: #009933;
    font-weight: bold;
}

.candidate-name {
    color: #053da8;
    font-weight: bold;
}

.training-name {
    color: #de2d2d;
    font-weight: bold;
}

.special-message {
    color: #5f14e1;
    font-style: italic;
}

#moderationModal.modal {
    display: none; /* hidden by default, handled by Bootstrap */
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

#moderationModal .modal-dialog {
    margin: 0 auto;
    max-width: 500px;
}

#moderationModal .modal-content {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.12);
    padding: 0;
    border: none;
    color: #333;
    font-family: 'Arial', sans-serif;
}

#moderationModal .modal-header {
    background: #053da8;
    color: #fff;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    border-bottom: none;
    padding: 20px 24px 12px 24px;
}

#moderationModal .modal-title {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    margin: 0;
}

#moderationModal .close {
    background: transparent !important;
    border: none;
    color: #fff;
    opacity: 0.8;
    font-size: 28px;
    margin-top: -4px;
    margin-right: -8px;
    transition: opacity 0.2s;
    box-shadow: none;
    outline: none;
    line-height: 1;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}
#moderationModal .close:focus,
#moderationModal .close:active {
    outline: none;
    box-shadow: none;
}
#moderationModal .close:hover {
    opacity: 1;
    background: transparent !important;
    color: #fff;
}

#moderationModal .modal-body {
    padding: 20px 24px 12px 24px;
    background: #f9f9f9;
}

#moderationModal .modal-footer {
    background: #f9f9f9;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    border-top: none;
    padding: 18px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

#moderationModal .btn {
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 14px;
    border: none;
    transition: background 0.3s, transform 0.2s;
}

#moderationModal .btn-primary {
    background: #053da8;
    color: #fff;
}
#moderationModal .btn-primary:hover {
    background: #032d80;
}

#moderationModal .btn-secondary {
    background: #ccc;
    color: #333;
}
#moderationModal .btn-secondary:hover {
    background: #b2b2b2;
}

#moderationModal .btn-info {
    background: #009933;
    color: #fff;
}
#moderationModal .btn-info:hover {
    background: #007a29;
}

/* Responsive for small screens */
@media (max-width: 576px) {
    #moderationModal .modal-dialog {
        max-width: 98vw;
    }
    #moderationModal .modal-content {
        border-radius: 8px;
        padding: 0;
    }
    #moderationModal .modal-header,
    #moderationModal .modal-body,
    #moderationModal .modal-footer {
        padding-left: 12px;
        padding-right: 12px;
    }
}


/* Center moderation message label */
#moderationModal .modal-body label {
    display: block;
    text-align: center;
    font-weight: bold;
    margin-bottom: 12px;
    font-size: 1.08em;
    color: #053da8;
}

/* WYSIWYG editable zone: */
#moderation-message-editor {
    width: 90%;
    min-height: 120px;
    padding: 18px 14px;
    border: 1.8px solid #053da8;
    border-radius: 10px;
    background: #fff;
    font-size: 1.15em;
    font-family: 'Arial', sans-serif;
    color: #222;
    outline: none;
    margin-bottom: 4px;
    box-shadow: 0 2px 7px rgba(44, 62, 80, 0.08);
    transition: border 0.25s, box-shadow 0.25s;
}
#moderation-message-editor:focus {
    border: 2px solid #032d80;
    box-shadow: 0 2px 12px rgba(44, 62, 80, 0.15);
    background: #fff;
}

/* Remove bottom margin on the .form-group for better centering */
#moderationModal .modal-body .form-group {
    margin-bottom: 0;
}

/* Style the textarea to look bigger and visually prominent */
#moderationModal textarea#moderation-message.form-control {
    min-height: 120px;
    font-size: 1.15em;
    padding: 18px 14px;
    border: 1.8px solid #053da8;
    border-radius: 10px;
    background: #fff;
    color: #222;
    outline: none;
    box-shadow: 0 2px 7px rgba(44, 62, 80, 0.08);
    transition: border 0.25s, box-shadow 0.25s;
}
#moderationModal textarea#moderation-message.form-control:focus {
    border: 2px solid #032d80;
    box-shadow: 0 2px 12px rgba(44, 62, 80, 0.15);
    background: #fff;
}

@media (max-width: 576px) {
    #moderation-message-editor {
        min-height: 80px;
        font-size: 1em;
        padding: 12px 7px;
    }
    #moderationModal textarea#moderation-message.form-control {
        min-height: 80px;
        font-size: 1em;
        padding: 12px 7px;
    }
}

.btn-moderate-message.btn-primary {
    background-color: #de2d2d !important;
    border-color: #de2d2d !important;
    color: #fff !important;
    border-radius: 2;
}
