/* ==========================================
   STYLES GÉNÉRAUX FORMULAIRES
   ========================================== */

form p {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

form label {
    margin-bottom: 5px;
    font-weight: bold;
}

form input,
form select,
form textarea {
    width: 100%;
    box-sizing: border-box;
}

/* Styles globaux pour les champs de formulaire */
input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
    border-radius: 8px;
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 10px;
    width: 100%;
    font-size: 1rem;
    transition: box-shadow 0.3s ease-in-out, border 0.3s ease-in-out;
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
select:hover,
textarea:hover {
    border-color: #80bdff;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    border-color: #007bff;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
    outline: none;
}

/* ==========================================
   LAYOUT PRINCIPAL
   ========================================== */

.page-container {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    min-height: 100vh;
}

.page-content {
    flex-grow: 1;
    margin: 0;
    box-sizing: border-box;
    min-height: 100vh;
    min-width: 80vw;
}

.main-wrapper {
    min-width: 80vw;
    padding: 0 30px 30px 30px;
}

/* ==========================================
   SIDEBAR
   ========================================== */

/* ==========================================
   SIDEBAR - STYLES AMÉLIORÉS
   ========================================== */

/* Conservation du style existant avec améliorations */
.page-sidebar {
    position: sticky;
    top: 0;
    left: 0;
    width: 300px;
    height: 100vh;
    background-color: #ffffff !important;
    padding: 0;
    overflow: hidden;
    border-right: 1px solid #ddd;
    box-shadow: 0px 0 2px rgba(0, 0, 0, 0.05);
    z-index: 999;
    font-family: "Poppins", sans-serif;
}

.page-sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    top: 25%;
    transform: translateY(-12.5%);
}

.page-sidebar ul li {
    margin: 0;
    position: relative;
}

.page-sidebar ul li a {
    display: block;
    text-decoration: none;
    color: #333;
    background-color: transparent;
    padding: 15px 20px;
    font-size: 16px;
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
}

/* Hover pour les éléments non actifs - Teinte grise */
.page-sidebar ul li:not(.active-page) a:hover {
    background-color: #f8f9fa !important;
    color: #495057 !important;
    transform: translateX(5px);
}

/* Style pour la page active - Gradient bleu */
.page-sidebar ul li.active-page a {
    background: linear-gradient(to right, #0d6efd, #7888fc);
    color: #ffffff !important;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
    animation: slideIn 0.3s ease;
}

/* Indicateur visuel pour la page active */
.page-sidebar ul li.active-page a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background-color: #ffffff;
    border-radius: 0 4px 4px 0;
    opacity: 0.8;
}

/* Hover sur la page active - légère modification du gradient */
.page-sidebar ul li.active-page a:hover {
    background: linear-gradient(to right, #0b5ed7, #6c7ffc);
    transform: none; /* Pas de translation pour la page active */
    box-shadow: 0 3px 10px rgba(13, 110, 253, 0.4);
}

/* Animation d'entrée pour la page active */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Style spécial pour le bouton déconnexion */
.page-sidebar ul li:last-child a:hover {
    background-color: #fff5f5 !important;
    color: #dc3545 !important;
    transform: translateX(5px);
}

/* Amélioration de l'affichage des icônes */
.page-sidebar ul li a i {
    margin-right: 10px;
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
}

/* Effet de transition fluide entre les pages */
.page-sidebar ul li {
    transition: all 0.3s ease;
}

/* Scrollbar personnalisée pour la sidebar */
.page-sidebar::-webkit-scrollbar {
    display: none;
}

/* Responsive - Réduction de la largeur sur petits écrans */
@media (max-width: 992px) {
    .page-sidebar {
        width: 250px;
    }
}

@media (max-width: 768px) {
    .page-sidebar {
        width: 60px;
    }

    .page-sidebar ul li a {
        padding: 15px 10px;
        text-align: center;
    }

    .page-sidebar ul li a h5 {
        display: none;
    }

    .page-sidebar ul li a i {
        margin: 0;
    }
}

/* ==========================================
   BARRES FIXES (TOP/BOTTOM)
   ========================================== */

.subscription-info-bar {
    background-color: #0d6efd;
    color: white;
    padding: 5px 15px;
    font-size: 14px;
    line-height: 30px;
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #0d6efd;
    color: white;
    text-align: center;
    padding: 10px 10px;
    font-size: 14px;
    line-height: 1.5;
    z-index: 1001;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.1);
}

.footer-separator {
    color: rgba(255, 255, 255, 0.6);
}

/* ==========================================
   CONTENEURS ET BOXES
   ========================================== */

.subscription-box,
.project-box,
.request-box {
    background-color: #fff;
    flex-grow: 1;
    border: 1px solid #e4e6ef;
    border-radius: 15px;
    box-shadow: 0px 1px 3px rgba(54, 74, 99, 0.05);
    padding: 30px;
    margin-bottom: 30px;
    font-family: 'Poppins', sans-serif;
}

.request-box {
    margin: auto;
    width: 100%;
    min-width: 80vw;
    box-shadow: 0px 1px 3px rgba(54, 74, 99, 0.1);
}

.subscription-box h4,
.project-box h4 {
    font-size: 18px;
    color: #5b5b5b;
    margin-bottom: 15px;
    font-weight: 600;
}

.subscription-box p,
.project-box p {
    font-size: 14px;
    color: #7e8299;
    line-height: 1.6;
    margin-bottom: 10px;
}

.subscription-box p span,
.project-box p span {
    color: #5b5b5b;
    font-weight: 500;
}

.subscription-box .alert,
.project-box .alert {
    background-color: #f3f6f9;
    border: none;
    border-radius: 10px;
    padding: 15px;
    margin-top: 10px;
    font-size: 14px;
    color: #5b5b5b;
}

/* ==========================================
   STYLES BOUTONS COMMUNS
   ========================================== */

.btn-export-csv,
.btn-visualiser,
.btn-visualisercocon {
    height: 42px;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.2s ease-in-out;
    min-width: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-export-csv,
.btn-visualiser {
    background-color: #0d6efd;
    color: white;
    border: 2px solid #0d6efd;
}

.btn-export-csv:hover,
.btn-visualiser:hover {
    background-color: white;
    color: #0d6efd;
    border: 2px solid #0d6efd;
}

.btn-visualisercocon {
    background-color: white;
    color: #0d6efd;
    border: 2px solid #0d6efd;
}

.btn-visualisercocon:hover {
    background-color: #0d6efd;
    color: white;
    border: 2px solid #0d6efd;
}

.btn-export-csv:focus {
    outline: none;
    box-shadow: none;
}

/* Boutons box (subscription/project) */
.subscription-box .btn,
.project-box .btn {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 10px;
    transition: all 0.2s ease-in-out;
}

.subscription-box .btn {
    margin-top: 15px;
}

.subscription-box .btn-danger,
.project-box .btn-danger {
    background-color: #ee6e83;
    color: #fff;
    border: none;
}

.subscription-box .btn-danger:hover,
.project-box .btn-danger:hover {
    background-color: #e65874;
    box-shadow: 0 3px 6px rgba(238, 110, 131, 0.2);
}

.subscription-box .btn-primary,
.project-box .btn-primary {
    background-color: #0d6efd;
    color: #fff;
    border: none;
}

.subscription-box .btn-primary:hover,
.project-box .btn-primary:hover {
    background-color: #0b5ed7;
    box-shadow: 0 3px 6px rgba(120, 136, 252, 0.2);
}

/* Boutons spéciaux */
.btn-pay {
    background-color: #28a745;
    color: #fff;
    font-weight: 600;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    float: right;
    transition: all 0.2s ease-in-out;
}

.btn-pay:hover {
    background-color: #218838;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-plus-circle {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: #0d6efd;
    color: white;
    font-size: 15px;
    font-weight: bold;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
    animation: zoomPulse 5s infinite ease-in-out;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.btn-plus-circle:focus {
    outline: none;
    box-shadow: none;
}

.createproject,
.newrequestproject {
    background-color: #0d6efd !important;
    color: #fff;
    border: none;
    font-size: 1rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.createproject:hover,
.newrequestproject:hover {
    background-color: #0b5ed7 !important;
    box-shadow: 0 3px 6px rgba(120, 136, 252, 0.2);
    color: #fff;
}

.newrequestproject {
    border-color: #0d6efd !important;
    color: white !important;
}

.newrequestproject:hover {
    border-color: #0a58ca !important;
}

.newrequestproject:focus,
.newrequestproject:active {
    background-color: #0a58ca !important;
    border-color: #0a53be !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

.google-login-btn {
    background-color: #0d6efd;
    color: white;
    font-weight: 600;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.google-login-btn:hover {
    background-color: #0b5ed7;
    text-decoration: none;
    color: white;
}

.google-login-btn i {
    font-size: 1.2rem;
}

.btn-enregistrer {
    display: inline-block;
    font-weight: 400;
    color: #fff;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    background-color: #0d6efd;
    border: 1px solid #0d6efd;
    padding: 0.5rem 1rem;
    font-size: 1.25rem;
    line-height: 1.5;
    border-radius: 0.3rem;
    transition: background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.btn-enregistrer:hover,
.btn-enregistrer:focus {
    background-color: #0b5ed7;
    border-color: #0b5ed7;
}

/* ==========================================
   ÉLÉMENTS STRIPE
   ========================================== */

#card-element {
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 5px;
    width: 66%;
}

.card-and-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#pay-button {
    width: 32%;
}

.card-and-button #card-element,
.card-and-button #pay-button {
    margin-top: 0;
}

/* ==========================================
   PAGE 404
   ========================================== */

.fun-404 {
    background: #f8f9fa;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.fun-404 h1 {
    font-size: 10rem;
    color: #ff6b6b;
    animation: shake 1s infinite alternate;
}

.fun-404 h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.fun-404 img {
    max-height: 40vh;
    margin-top: 20px;
    animation: float 3s ease-in-out infinite;
}

.fun-404 .btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
    font-size: 1.1rem;
    padding: 0.75rem 1.5rem;
    color: #ffffff;
}

.fun-404 .btn-primary:hover {
    background-color: #0a58ca;
    border-color: #0a58ca;
    color: #ffffff;
}

/* ==========================================
   ALERTS PERSONNALISÉES
   ========================================== */

.custom-alert {
    background-color: #ffcad4;
    border: 1px solid #ffcad4;
    color: #5b5b5b;
    border-radius: 20px;
    padding: 15px;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.custom-alert h5 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #5b5b5b;
}

.custom-alert p {
    margin: 0;
    color: #5b5b5b;
}

.custom-btn {
    background-color: #f75d6fd8;
    border-color: #f75d6fd8;
    color: #5b5b5b;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 5px;
    transition: all 0.2s ease-in-out;
}

.custom-btn:hover {
    background-color: #d95c72;
    border-color: #d95c72;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
}

/* ==========================================
   BARRES DE PROGRESSION
   ========================================== */

.progress {
    display: inline-block;
    background-color: transparent;
    padding: 8px !important;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    text-align: center;
    transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.completion-pourcentage {
    width: 100%;
    height: 42px;
    border-radius: 10px;
    background-color: transparent;
    position: relative;
    overflow: hidden;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    box-shadow: none !important;
    border: none;
}

.completion-bar {
    height: 70%;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    transition: width 0.8s ease-in-out;
    color: white;
    min-width: 50px;
    padding: 0 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: none !important;
    margin: 0 !important;
}

.percent-0 {
    background-color: rgba(220, 53, 69, 0.8);
    width: 4%;
    color: #fff;
}

.percent-0   { background-color: #dc3545; }
.percent-10  { background-color: #ff5722; }
.percent-30  { background-color: #ff9800; }
.percent-50  { background-color: #ffc107; color: black; }
.percent-70  { background-color: #4caf50; }
.percent-90  { background-color: #28a745; }
.percent-100 { background-color: #00c896; }

/* ==========================================
   SÉLECTEURS PERSONNALISÉS
   ========================================== */

.custom-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 8px 12px;
    gap: 0.5rem;
    min-height: 42px;
    max-height: 42px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
}

.custom-select-wrapper:hover {
    border-color: #80bdff;
    box-shadow: 0 4px 8px rgba(0,123,255,0.2);
}

.custom-select-wrapper:focus-within {
    border-color: #007bff;
    box-shadow: 0 4px 8px rgba(0,123,255,0.3);
}

.custom-select-wrapper .selected-value {
    flex: 1;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.custom-select-wrapper[data-target="queryType"] .dropdown-list {
    right: 0;
    left: auto;
    width: auto;
    min-width: 400px;
    max-width: 500px;
}

#flag-in-select {
    margin-right: .5rem;
    pointer-events: none;
    flex-shrink: 0;
}

.dropdown-icon {
    font-size: .8rem;
    color: #666;
    pointer-events: none;
    flex-shrink: 0;
}

.dropdown-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.dropdown-list li {
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: .5rem;
    white-space: nowrap;
    cursor: pointer;
}

.dropdown-list li:hover {
    background: #f0f0f0;
}

/* ==========================================
   TABLES
   ========================================== */

.white-table-questions-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    margin-bottom: 1,5rem;
    margin-right: 30px;
}

.white-table-questions-container .table tr {
    background: #fff;
}

.white-table-questions-container .table td,
.white-table-questions-container .table th {
    padding: 0.4rem 0.75rem;
    line-height: 1.1;
}

.white-table-questions-container p {
    margin: 20px;
    font-size: 16px;
}

.table-row-enfant {
    background-color: #f6f9ff;
    font-style: italic;
}

.table-row-enfant td:nth-child(2) {
    padding-left: 60px;
    position: relative;
}

.table-row-enfant td:nth-child(2)::before {
    content: "↳";
    position: absolute;
    left: 50px;
    font-style: normal;
    color: #555;
}

.toggle-btn-modern {
    background-color: #eef1ff;
    border: 1px solid #c7d1ff;
    border-radius: 8px;
    padding: 4px 12px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.toggle-btn-modern:hover {
    background-color: #d8e0ff;
}

.project-table-container {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0px 1px 3px rgba(54, 74, 99, 0.05);
    padding: 0;
    margin-bottom: 30px;
    font-family: 'Poppins', sans-serif;
    border: none;
    width: 100%;
}

.project-table-container .table {
    margin-bottom: 0;
    border-radius: 15px;
    overflow: hidden;
}

.project-table-container .table td,
.project-table-container .table th {
    padding: 0.4rem 0.75rem;
    line-height: 1.1;
    vertical-align: middle;
}

.project-table-container .table thead th {
    background-color: transparent;
    border-bottom: 1px solid #dee2e6;
    font-weight: bold !important;
    font-size: 14px;
}

.project-table-container .table tbody tr {
    border-bottom: 1px solid #f1f3f4;
}

.project-table-container .table tbody tr:last-child {
    border-bottom: none;
}

.project-table-container .table th:nth-child(1) { width: 25%; }
.project-table-container .table th:nth-child(2) { width: 30%; }
.project-table-container .table th:nth-child(3) { width: 5%; }
.project-table-container .table th:nth-child(4) { width: 40%; }

.action-buttons {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    align-items: center;
}

.action-buttons .btn {
    padding: 4px 8px;
    font-size: 12px;
    line-height: 1.2;
    border-radius: 4px;
    min-width: 50px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 28px;
}

.project-header {
    padding: 0px 30px 15px 0px;
    border-bottom: 1px solid #f1f3f4;
}

.project-content {
    padding: 0;
}

.visit-link {
    color: #0d6efd;
    text-decoration: none;
    font-size: 13px;
}

.visit-link:hover {
    text-decoration: underline;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

/* ==========================================
   STYLES LIGNES TABLES
   ========================================== */

.link {
    fill: none;
    stroke: #ccc;
    stroke-width: 1.5px;
}

.orange-link {
    stroke: #f4a261;
    stroke-opacity: 0.8;
}

.hidden-child {
    visibility: collapse;
    height: 0;
    display: table-row;
}

.even-bg {
    background-color: #eef5ff !important;
}

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

.even-bg-free {
    background-color: #f0f8ff !important;
}

.odd-bg-free {
    background-color: #ffffff !important;
}

/* ==========================================
   DATATABLES STYLES
   ========================================== */

.dataTables_length {
    text-align: left;
    font-weight: 500;
    display: inline-block;
    margin-right: 1rem;
}

.dataTables_length select,
#user-queries-table_length select {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #495057;
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 8px 12px;
    height: 42px;
    line-height: normal;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%236c757d' d='M2 0L0 2h4L2 0zM2 5l2-2H0l2 2z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 8px 10px;
}

.dataTables_length select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    outline: none;
}

.dataTables_length label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dataTables_paginate {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1rem auto;
    float: none !important;
    text-align: center !important;
}

#user-queries-table_filter {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin: 0;
}

#user-queries-table_filter label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

#user-queries-table_filter input[type="search"] {
    height: 32px;
    padding: 4px 8px;
    font-size: 14px;
}

#user-queries-table thead th {
    font-family: 'Poppins', sans-serif !important;
    font-weight: bold !important;
    font-size: 15px !important;
    color: #343a40 !important;
    background-color: transparent !important;
    background-image: none !important;
    padding-right: 8px !important;
    border-bottom: 1px solid #dee2e6;
    text-transform: none !important;
}

table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc {
    background-image: none !important;
    background-repeat: no-repeat;
    background-position: center right;
    padding-right: 8px;
}

table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:after {
    content: "" !important;
    display: none !important;
}

.custom-search-container {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

#custom-search {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    padding: 0.6rem 1rem;
    border: 1px solid #ced4da;
    border-radius: 6px;
    width: 100%;
    height: 42px;
    background-color: #f8f9fa;
    box-shadow: none;
    transition: box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out;
    line-height: normal;
    outline: none;
}

#custom-search::placeholder {
    color: #6c757d;
    opacity: 1;
}

#custom-search:focus {
    border-color: #007bff;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
    outline: none;
}

#custom-search:hover {
    border-color: #80bdff;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

.datatable-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    width: 100%;
}

.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap !important;
    white-space: nowrap;
    gap: 0.5rem;
    margin: 0 !important;
}

.pagination-wrapper .paginate_button,
.dataTables_paginate .paginate_button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0.4rem 0.75rem;
    margin: 0 0.2rem;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    background-color: #fff;
    color: #0d6efd;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    line-height: 1.4;
}

.pagination-wrapper .paginate_button.current,
.dataTables_paginate .paginate_button.current {
    background-color: #0d6efd;
    color: #fff !important;
    border-color: #0d6efd;
}

.pagination-wrapper .paginate_button:hover:not(.current),
.dataTables_paginate .paginate_button:hover:not(.current) {
    background-color: #e9f2ff;
}

.dataTables_wrapper {
    width: 100%;
}

.dataTables_length {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    background: #f8f9fa;
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 6px 12px;
    min-height: 42px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #212529;
}

.dataTables_length select {
    appearance: none;
    background-color: #f8f9fa;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #212529;
    cursor: pointer;
    box-shadow: none;
}

.dataTables_length:hover {
    border-color: #80bdff;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

.dataTables_length:focus-within {
    border-color: #007bff;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.dataTables_length label {
    margin: 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dataTables_length select:focus {
    border-color: transparent;
    box-shadow: none;
    outline: none;
}

.datatable-length-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8f9fa;
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 8px 12px;
    min-height: 42px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #212529;
    cursor: pointer;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.datatable-length-wrapper:hover {
    border-color: #80bdff;
    box-shadow: 0 4px 8px rgba(0,123,255,0.2);
}

.datatable-length-wrapper:focus-within {
    border-color: #007bff;
    box-shadow: 0 4px 8px rgba(0,123,255,0.3);
}

.datatable-length-wrapper select.styled-select {
    border: none;
    background: transparent;
    padding: 0;
    font-weight: 600;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    outline: none;
    appearance: none;
    -moz-appearance: none;
    -webkit-appearance: none;
    background-image: none;
    box-shadow: none;
}

.styled-select {
    border: none;
    background: transparent;
    font-weight: 500;
    font-size: 14px;
    padding: 0;
    outline: none;
    appearance: none;
    -moz-appearance: none;
    -webkit-appearance: none;
    background-image: none;
    box-shadow: none;
}

.dataTables_length {
    display: none !important;
}

/* ==========================================
   SÉLECTEURS LIGNES PERSONNALISÉS
   ========================================== */

#custom-rows-per-page-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 8px 12px;
    gap: 0.5rem;
    min-height: 42px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    width: fit-content;
}

#custom-rows-per-page-wrapper:hover {
    border-color: #80bdff;
    box-shadow: 0 4px 8px rgba(0,123,255,0.2);
}

#custom-rows-per-page-wrapper:focus-within {
    border-color: #007bff;
    box-shadow: 0 4px 8px rgba(0,123,255,0.3);
}

#custom-rows-per-page-wrapper .selected-value {
    flex: 1;
    user-select: none;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #212529;
}

#custom-rows-per-page-wrapper .dropdown-icon {
    font-size: 0.8rem;
    color: #666;
    pointer-events: none;
}

#custom-rows-per-page-wrapper .dropdown-list {
    position: absolute;
    bottom: 110%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ced4da;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

#custom-rows-per-page-wrapper .dropdown-list li {
    padding: 8px 16px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #212529;
    cursor: pointer;
}

#custom-rows-per-page-wrapper .dropdown-list li:hover,
#custom-rows-per-page-wrapper .dropdown-list li.active {
    background-color: #e9f2ff;
    color: #0d6efd;
}

#custom-rows-per-page-wrapper.open-up .dropdown-list {
    bottom: 100%;
    top: auto;
    margin-bottom: 6px;
    margin-top: 0;
    transform-origin: bottom;
}

/* ==========================================
   WRAPPER SEARCH
   ========================================== */

.custom-search-wrapper {
    max-width: 370px;
    width: 100%;
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* ==========================================
   MODALS
   ========================================== */

.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    font-family: 'Poppins', sans-serif;
}

.modal-header {
    border-bottom: 1px solid #f1f3f4;
    padding: 20px 30px;
    background-color: #f8f9fa;
    border-radius: 15px 15px 0 0;
    text-align: center !important;
}

.modal-title,
.modal-title#wordpressModalLabel {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    color: #343a40;
    margin: 0;
}

.btn-close {
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    font-size: 18px;
    color: #6c757d;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.btn-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 30px;
    text-align: center;
    line-height: 1.6;
}

.modal-body p {
    margin-bottom: 15px;
    font-size: 16px;
    color: #495057;
}

#projectNameToDelete {
    font-size: 20px;
    font-weight: 700;
    color: #dc3545;
    display: block;
    margin: 10px 0;
    padding: 8px 15px;
    background-color: #fff5f5;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    text-transform: none;
}

.modal-body .text-muted {
    font-size: 14px;
    color: #6c757d !important;
    font-style: italic;
    margin-top: 15px;
}

.modal-footer {
    border-top: 1px solid #f1f3f4;
    padding: 20px 30px;
    background-color: #f8f9fa;
    border-radius: 0 0 15px 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.modal-footer .btn {
    padding: 10px 25px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    min-width: 100px;
    transition: all 0.2s ease-in-out;
}

.modal-footer .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

.modal-footer .btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.modal-footer .btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

.modal-footer .btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(220, 53, 69, 0.3);
}

.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -50px);
}

.modal.show .modal-dialog {
    transform: none;
}

.modal-header-centered {
    border-bottom: 1px solid #f1f3f4;
    padding: 20px 30px;
    background-color: #f8f9fa;
    border-radius: 15px 15px 0 0;
    text-align: center;
    position: relative;
}

.modal-title-centered {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    color: #343a40;
    margin: 0 auto;
    display: block;
    width: 100%;
}

.modal-header-centered .btn-close {
    position: absolute;
    top: 20px;
    right: 30px;
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    font-size: 18px;
    color: #6c757d;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.modal-header-centered .btn-close:hover {
    opacity: 1;
}

.modal-warning-text {
    font-size: 14px;
    color: #dc3545 !important;
    font-weight: 600;
    margin-top: 15px;
    text-align: center;
    display: block;
}

.modal-warning-text-highlighted {
    font-size: 14px;
    color: #dc3545 !important;
    font-weight: 600;
    margin-top: 15px;
    text-align: center;
    display: block;
    background-color: #fff5f5;
    padding: 8px 15px;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    border-left: 4px solid #dc3545;
}

/* ==========================================
   GRILLES ET LAYOUTS
   ========================================== */

.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 15px;
    align-items: end;
}

.field-grid label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
    font-size: 0.9rem;
    grid-row: 1;
}

.field-grid .custom-select-wrapper {
    grid-row: 2;
}

.field-empty {
    background-color: #fef2f2 !important; /* Rouge très léger */
    border-color: #fca5a5 !important; /* Bordure rouge claire */
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.field-empty {
    animation: subtle-pulse 2s infinite ease-in-out;
}

.required-field-label::after {
    content: " *";
    color: #dc3545;
    font-weight: bold;
}

.add-project-option {
    color: #007bff !important;
    font-weight: 600;
    border-top: 1px solid #e9ecef;
    margin-top: 5px;
    padding-top: 8px !important;
}

.add-project-option:hover {
    background-color: #f8f9fa !important;
    color: #0056b3 !important;
}

.add-project-option i {
    margin-right: 5px;
}

.custom-select-wrapper .dropdown-list .createproject {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    text-align: center !important;
}

.custom-select-wrapper .dropdown-list .createproject {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    color: #ffffff !important;
}

.custom-select-wrapper .dropdown-list .createproject:hover,
.custom-select-wrapper .dropdown-list .createproject:focus {
    background-color: #0b5ed7 !important;
    border-color: #0b5ed7 !important;
    color: #ffffff !important;
}

/* ==========================================
   PROPRIÉTÉS
   ========================================== */

.property-option {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.property-option:hover {
    border-color: #0d6efd;
    background-color: #f8f9fa;
}

.property-option.selected {
    border-color: #0d6efd;
    background-color: #e7f3ff;
}

.property-option.current {
    border-color: #198754;
    background-color: #d1e7dd;
}

.property-url {
    font-weight: 600;
    color: #0d6efd;
}

.property-permission {
    font-size: 0.875rem;
    margin-top: 5px;
}

.property-match {
    color: #198754;
    font-weight: 600;
}

/* ==========================================
   CARTES STATISTIQUES
   ========================================== */

.stats-card {
    color: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: none;
}

.stats-card.clicks,
.stats-card.impressions,
.stats-card.ctr,
.stats-card.position {
    background: #0d6efd;
}

/* ==========================================
   BOUTONS SEARCH CONSOLE
   ========================================== */

.btn-sync {
    background-color: #146c43 !important;
    border-color: #146c43 !important;
    color: white !important;
}

.btn-sync:hover {
    background-color: #0f5132 !important;
    border-color: #0f5132 !important;
    color: white !important;
}

.btn-config {
    background-color: #6f42c1 !important;
    border-color: #6f42c1 !important;
    color: white !important;
}

.btn-config:hover {
    background-color: #5a32a3 !important;
    border-color: #5a32a3 !important;
    color: white !important;
}

.btn-return {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: white !important;
}

.btn-return:hover {
    background-color: #5c636a !important;
    border-color: #5c636a !important;
    color: white !important;
}

.btn-sc-link {
    background-color: #6bcac2 !important;
    color: white !important;
    border-color: #6bcac2 !important;
}

.btn-sc-link:hover {
    background-color: #146c43 !important;
    border-color: #146c43 !important;
    color: white !important;
}

.data-table-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(13, 110, 253, 0.1);
    overflow: hidden;
}

.search-bar-datasc {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
}

/* ==========================================
   BADGES
   ========================================== */

.query-badge {
    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    max-width: 300px;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-link {
    max-width: 250px;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #0d6efd !important;
}

.page-link:hover {
    color: #0a58ca !important;
}

.metric-badge {
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 6px;
}

.clicks-badge {
    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

.impressions-badge {
    background: rgba(13, 202, 240, 0.1);
    color: #0dcaf0;
}

.ctr-value {
    color: #6610f2;
    font-weight: 600;
}

.position-value {
    color: #198754;
    font-weight: 600;
}

.badge-info {
    background-color: #0dcaf0 !important;
    color: #000 !important;
}

.badge-info-requestsnumber {
    background-color: #0d6efd !important;
    color: #fff !important;
}

.badge-secondary {
    background-color: #6c757d !important;
}

.badge-property-sc {
    background-color: #495057 !important;
    color: white !important;
}

.btn-sync-custom {
    background-color: #00c896 !important;
    color: white !important;
}

.btn-config-custom {
    background-color: #0B5ED7 !important;
    color: white !important;
}

.btn-return-custom {
    background-color: #7e8299 !important;
    color: white !important;
}

/* ==========================================
   EN-TÊTES TABLEAUX
   ========================================== */

.thead-dark {
    font-weight: bold;
}

.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* ==========================================
   STYLES SEARCH CONSOLE DATA SPÉCIFIQUES
   ========================================== */

.custom-search-container-datasc {
    position: relative;
    max-width: 100%;
    width: 100%;
}

.custom-search-wrapper-datasc {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.custom-search-input-datasc {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    font-family: 'Poppins', sans-serif;
    height: 42px;
    box-sizing: border-box;
}

.custom-search-input-datasc::placeholder {
    color: #6c757d;
    opacity: 1;
}

.custom-search-input-datasc:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    outline: none;
    background-color: #fff;
}

.custom-search-input-datasc:hover:not(:focus) {
    border-color: #80bdff;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

.search-clear-btn-datasc {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 10;
}

.custom-search-wrapper-datasc.has-content .search-clear-btn-datasc {
    opacity: 1;
    visibility: visible;
}

.search-clear-btn-datasc:hover {
    color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
    transform: translateY(-50%) scale(1.1);
}

.search-clear-btn-datasc:active {
    transform: translateY(-50%) scale(0.95);
}

.search-clear-btn-datasc {
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.2s ease;
}

.custom-search-wrapper-datasc.has-content .custom-search-input-datasc:focus {
    padding-right: 40px;
}

/* ==========================================
   ONGLETS ET NAVIGATION
   ========================================== */

#queries #dataTable a.page-link {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    display: inline-block !important;
    color: #007bff !important;
    text-decoration: none !important;
}

#queries #dataTable a.page-link:hover,
#queries #dataTable a.page-link:focus {
    background-color: transparent !important;
    text-decoration: underline !important;
}

#pagesTable td.metric-cell {
    background: transparent !important;
    table-layout: fixed;
    width: 100%;
}

.page-row {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s;
}

.page-row:hover {
    background-color: #f8f9fa;
}

.queries-dropdown {
    display: none !important;
}

.queries-dropdown.show {
    display: table-row !important;
}

.expand-btn {
    background: none;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    color: #007bff;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.expand-btn:hover {
    background-color: #f8f9fa;
    color: #0056b3;
}

.expand-btn.expanded {
    background-color: #007bff;
    color: white;
}

.expand-btn i {
    transition: transform 0.2s ease;
}

.expand-btn.expanded i {
    transform: rotate(45deg);
}

.queries-table {
    margin: 0;
    font-size: 0.9rem;
}

.queries-table td {
    padding: 0.5rem;
}

#pagesTable .ctr-value,
#pagesTable .position-value {
    font-weight: normal !important;
}

.page-url {
    display: inline-block;
    max-width: calc(100% - 20px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.metric-cell {
    text-align: center;
    font-weight: 600;
}

.page-metrics {
    background-color: transparent !important;
    font-weight: 600;
}

#pagesTable tbody tr:hover {
    background-color: #f1f3f4 !important;
}

.nav-tabs {
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 20px;
}

.nav-tabs .nav-link {
    color: #6c757d;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s;
}

.nav-tabs .nav-link:hover {
    color: #495057;
    border-bottom-color: #dee2e6;
}

.nav-tabs .nav-link.active {
    color: #007bff;
    background-color: transparent;
    border-color: transparent;
    border-bottom-color: #007bff;
}

.tab-content {
    padding-top: 10px;
}

.tab-count-badge {
    background-color: #6c757d;
    color: white;
    padding: 0.25em 0.6em;
    font-size: 0.75rem;
    border-radius: 10px;
    margin-left: 8px;
}

.nav-link.active .tab-count-badge {
    background-color: #007bff;
}

.page-url-container {
    display: flex;
    align-items: center;
}

.page-url-text {
    display: inline-block;
    max-width: 50ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: transparent !important;
}

.page-url-icon {
    flex-shrink: 0;
    margin-left: 0.5em;
}

/* ==========================================
   SÉLECTEUR SC DATA
   ========================================== */

#scdata-rows-per-page-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 8px 12px;
    gap: 0.5rem;
    min-height: 42px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    width: fit-content;
}

#scdata-rows-per-page-wrapper:hover {
    border-color: #80bdff;
    box-shadow: 0 4px 8px rgba(0,123,255,0.2);
}

#scdata-rows-per-page-wrapper:focus-within {
    border-color: #007bff;
    box-shadow: 0 4px 8px rgba(0,123,255,0.3);
}

#scdata-rows-per-page-wrapper .selected-value {
    flex: 1;
    user-select: none;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #212529;
}

#scdata-rows-per-page-wrapper .dropdown-icon {
    font-size: 0.8rem;
    color: #666;
    pointer-events: none;
}

#scdata-rows-per-page-wrapper .dropdown-list {
    position: absolute;
    bottom: 110%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ced4da;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

#scdata-rows-per-page-wrapper .dropdown-list li {
    padding: 8px 16px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #212529;
    cursor: pointer;
}

#scdata-rows-per-page-wrapper .dropdown-list li:hover,
#scdata-rows-per-page-wrapper .dropdown-list li.active {
    background-color: #e9f2ff;
    color: #0d6efd;
}

/* ==========================================
   STYLES PAGE SEARCH CONSOLE
   ========================================== */

.sc-page-content {
    padding: 30px !important;
    box-sizing: border-box;
    flex: 1;
    width: 100%;
}

.sc-main-wrapper {
    padding-right: 0 !important;
    width: 100%;
    max-width: none !important;
    padding-right: 20px;
}

.sc-container {
    margin-right: 0 !important;
    padding-right: 0 !important;
    max-width: none !important;
    width: 100%;
}

.sc-filter-panel {
    width: 100%;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px !important;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.sc-filter-panel h5 {
    margin-bottom: 35px !important;
}

.sc-filter-panel input[type="number"],
.sc-filter-panel input {
    border-radius: 8px !important;
    padding: 10px 14px;
    border: 1px solid #ced4da;
    font-size: 15px;
    background-color: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    height: 40px;
}

.sc-filter-panel input:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    outline: none;
}

.sc-filter-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 80px;
}

.sc-filter-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
    display: block;
    font-size: 14px;
}

.sc-filter-range {
    display: flex;
    flex-direction: column !important;
    gap: 8px;
    align-items: stretch;
    position: relative;
}

.sc-filter-range input {
    flex: 1;
    min-width: 0;
    width: calc(50% - 4px);
}

.sc-filter-range span {
    display: none !important;
}

.sc-filter-actions {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

.sc-filter-actions .btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: white !important;
}

.sc-filter-actions .btn:hover {
    color: white !important;
}

.sc-saved-filters {
    background: #e7f3ff;
    border: 1px solid #0d6efd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.search-header {
    margin-bottom: 20px !important;
}

.data-table-container {
    overflow-x: auto;
    margin-right: 0;
}

.table-responsive {
    margin-right: 0;
    padding-right: 0;
    width: 100%;
    overflow-x: auto;
}

.project-box-stat {
    overflow: hidden;
    width: 100%;
}

.project-box-stat .card {
    width: 100%;
}

.datatable-footer {
    padding-right: 0;
    margin-right: 0;
}

.sc-filter-panel input::placeholder {
    color: #adb5bd;
    font-size: 13px;
}

.sc-filter-panel input {
    transition: all 0.3s ease;
}

.sc-filter-panel input:focus {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.15);
}

.sc-filter-group label::after {
    content: ":";
    margin-left: 2px;
}

.row > .col-md-3 {
    margin-bottom: 0;
}

.sc-filter-panel .row {
    align-items: stretch;
}

.sc-filter-panel .col-md-3 {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#filterPanel {
    width: 100%;
    box-sizing: border-box;
}

.sc-btn-filters {
    background-color: #5f6ff3 !important;
    border-color: #5f6ff3 !important;
    color: white !important;
    font-weight: 600 !important;
}

.sc-btn-filters:hover {
    background-color: #4c5ce9 !important;
    border-color: #4c5ce9 !important;
    color: white !important;
}

.sc-btn-export {
    background-color: #34d399 !important;
    border-color: #34d399 !important;
    color: white !important;
    font-weight: 600 !important;
}

.sc-btn-export:hover {
    background-color: #10b981 !important;
    border-color: #10b981 !important;
}

.sc-filter-actions .btn {
    font-weight: 600 !important;
    color: white !important;
}

.sc-filter-actions .btn-primary {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    color: white !important;
}

.sc-filter-actions .btn-secondary {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: white !important;
}

.sc-filter-actions .btn-success {
    background-color: #198754 !important;
    border-color: #198754 !important;
    color: white !important;
}

/* ==========================================
   FILTRES SAUVEGARDÉS
   ========================================== */

#savedFiltersList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    padding: 0;
}

.saved-filter-item {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.saved-filter-item:hover {
    border-color: #0d6efd;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.15);
}

.saved-filter-header {
    font-weight: 600;
    font-size: 16px;
    color: #212529;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.saved-filter-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-detail {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.filter-detail-label {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

.filter-detail-value {
    font-size: 14px;
    color: #212529;
    font-weight: 600;
}

.saved-filter-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e9ecef;
}

.saved-filter-date {
    font-size: 11px;
    color: #6c757d;
}

.saved-filter-actions {
    display: flex;
    gap: 5px;
}

.saved-filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

/* ==========================================
   SÉLECTEUR SEARCH CONSOLE
   ========================================== */

.sc-rows-selector {
    position: relative;
    display: inline-flex;
    align-items: center;
    background: #0d6efd !important;
    border: 2px solid #0d6efd !important;
    border-radius: 8px;
    padding: 8px 16px;
    gap: 0.5rem;
    min-height: 42px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    width: auto;
    min-width: 80px;
    font-family: 'Poppins', sans-serif;
}

.sc-rows-selector:hover {
    background: #0b5ed7 !important;
    border-color: #0b5ed7 !important;
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
}

.sc-rows-value {
    font-weight: 600;
    font-size: 14px;
    color: #ffffff;
    user-select: none;
}

.sc-rows-icon {
    font-size: 0.8rem;
    color: #ffffff;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.sc-rows-selector.open {
    background: #0b5ed7 !important;
    border-color: #0b5ed7;
}

.sc-rows-dropdown {
    position: absolute;
    bottom: calc(100% + 4px);
    left: 0;
    right: 0;
    min-width: 100%;
    background: white;
    border: 2px solid #0d6efd;
    border-radius: 8px;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
    list-style: none;
    margin: 0;
    padding: 4px;
    z-index: 1050;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.sc-rows-selector.open .sc-rows-icon {
    transform: rotate(180deg);
}

.sc-rows-dropdown li {
    padding: 8px 16px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #212529;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.sc-rows-dropdown li:hover {
    background-color: #0d6efd;
    color: white;
}

.sc-rows-dropdown li.active {
    background-color: #e7f3ff;
    color: #0d6efd;
    font-weight: 600;
}

/* ==========================================
   BOUTONS FLOTTANTS ET ANIMATIONS
   ========================================== */

.btn-floating {
    position: fixed;
    bottom: 80px;
    right: 30px;
    border-radius: 50px;
    padding: 15px 25px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    animation: fadeInUp 0.3s ease;
}

.btn-floating:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.5);
}

.query-checkbox,
#selectAllQueries {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.form-check-input:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

#generateCoconBtn #selectedCount {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 5px;
}

.generate-cocon-btn {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 1050 !important;
    border-radius: 50px !important;
    padding: 15px 25px !important;
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.3) !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    backdrop-filter: blur(5px) !important;
    background: rgba(0, 123, 255, 0.95) !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff;
}

.generate-cocon-btn:hover {
    transform: translate(-50%, -50%) scale(1.05) !important;
    box-shadow: 0 6px 25px rgba(0, 123, 255, 0.4) !important;
    background: rgba(0, 123, 255, 1) !important;
    color: #fff;
}

.generate-cocon-btn i {
    margin-right: 8px !important;
}

#confirmCoconModal .modal-title {
    text-align: center !important;
    width: 100% !important;
}

#confirmCoconModal .btn-primary {
    background: rgba(0, 123, 255, 0.95) !important;
    border-color: rgba(0, 123, 255, 0.95) !important;
    font-weight: 600 !important;
    padding: 10px 25px !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
    color: #fff;
}

#confirmCoconModal .btn-primary:hover {
    background: rgba(0, 123, 255, 1) !important;
    border-color: rgba(0, 123, 255, 1) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3) !important;
    color: #fff;
}

#confirmCoconModal .btn-primary:focus {
    background: rgba(0, 123, 255, 1) !important;
    border-color: rgba(0, 123, 255, 1) !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
    color: #fff;
}

#confirmCoconModal .btn-primary:active {
    background: rgba(0, 100, 200, 1) !important;
    border-color: rgba(0, 100, 200, 1) !important;
    color: #fff;
}

#confirmCoconModal .modal-header {
    justify-content: center !important;
    border-bottom: 1px solid #dee2e6 !important;
}

#confirmCoconModal .btn-close {
    position: absolute !important;
    right: 1rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

.generated-query-link {
    display: inline-block;
    font-size: 1.2rem;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.generated-query-link:hover {
    transform: scale(1.2);
    text-decoration: none;
}

.generating-query {
    display: inline-block;
    font-size: 1.2rem;
    cursor: not-allowed;
}

.generating-query i {
    animation: pulse 2s infinite;
}

#backToTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999999;
    width: 50px;
    height: 50px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
    transition: all 0.3s ease;
    display: none;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    outline: none;
}

#backToTopBtn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,123,255,0.4);
}

#backToTopBtn:focus {
    outline: none;
}

/* ==========================================
   STYLES PROJETS
   ========================================== */

#project-queries-table td:nth-child(5) {
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 120px;
}

#project-queries-table .btn-sm {
    white-space: nowrap !important;
    min-width: 70px;
    font-size: 12px;
    padding: 4px 8px;
}

#project-queries-table .text-muted {
    white-space: nowrap !important;
    font-size: 13px;
    display: inline-block;
    min-width: 80px;
}

#project-queries-table td {
    vertical-align: middle;
    padding: 8px 6px;
}

#project-queries-table .badge {
    font-size: 11px;
    padding: 3px 6px;
    white-space: nowrap;
}

/* ==========================================
   STYLES API ET INPUT GROUP
   ========================================== */

.input-group #id_openai_api_key,
.input-group #id_anthropic_api_key {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    padding: 6px 12px !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    border: 1px solid #ced4da !important;
    border-right: none !important;
    border-radius: 0.25rem 0 0 0.25rem !important;
    margin: 0 !important;
    vertical-align: middle !important;
}

.input-group input[type="text"]#id_openai_api_key,
.input-group input[type="text"]#id_anthropic_api_key {
    padding: 6px 12px !important;
    height: 38px !important;
    background-color: #f8f9fa !important;
}

.input-group .btn,
.input-group .btn-outline-secondary,
.input-group .btn-outline-danger {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    padding: 6px 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
    line-height: 1 !important;
    margin: 0 !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    border-radius: 0 0.25rem 0.25rem 0 !important;
}

.input-group .btn i,
.input-group .btn-outline-secondary i,
.input-group .btn-outline-danger i {
    margin-right: 6px !important;
    font-size: 14px !important;
    line-height: 1 !important;
    vertical-align: middle !important;
}

.input-group {
    height: 38px !important;
    align-items: stretch !important;
}

#openai-test-btn,
#anthropic-test-btn {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
}

.input-group > .form-control {
    height: 38px !important;
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}

.input-group > * {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.api-key-section {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
}

.api-key-section h4 {
    color: #333;
    margin-bottom: 10px;
}

.api-key-section .text-muted {
    font-size: 0.9rem;
}

.api-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    margin-top: 5px;
}

.api-status-indicator.success {
    color: #28a745;
}

.api-status-indicator.error {
    color: #dc3545;
}

.api-status-indicator.warning {
    color: #ffc107;
}

.api-status-indicator.info {
    color: #17a2b8;
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

.btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.input-group .form-control {
    font-family: monospace;
    font-size: 0.95rem;
}

.btn {
    transition: all 0.3s ease;
}

.error-message {
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.api-label-status {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-left: 5px;
    vertical-align: middle;
}

.api-label-status.active {
    background-color: #28a745;
}

.api-label-status.inactive {
    background-color: #dc3545;
}

/* ==========================================
   ÉDITEUR DE CONTENU
   ========================================== */

.edit-content-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-left: 10px;
    color: #6c757d;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.edit-content-icon:hover {
    color: #5850EC;
    transform: scale(1.1);
}

.edit-content-icon:focus {
    outline: 2px solid #5850EC;
    outline-offset: 2px;
    border-radius: 4px;
    opacity: 1;
}

.page-fille .edit-content-icon {
    margin-left: 5px;
}

.btn-wordpress {
    padding: 14px 32px;
    background: #10a37f;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sc-filter-actions .btn-success {
    background-color: #198754 !important;
    border-color: #198754 !important;
    color: white !important;
}

.btn-wordpress:hover {
    background: #0d8968;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 80, 236, 0.3);
}

#wordpressPublishModal .form-check {
    padding: 10px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

#wordpressPublishModal .form-check:hover {
    background-color: #f8f9fa;
}

#wordpressPublishModal .form-check-input:checked + .form-check-label {
    color: #21759b;
    font-weight: 600;
}

.category-item {
    padding: 8px 12px;
    margin: 4px 0;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.category-item:hover {
    background-color: #f8f9fa;
}

.category-item input:checked + label {
    color: #21759b;
    font-weight: 600;
}

.editor-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    font-weight: 600;
    color: #444;
    margin-bottom: 8px;
    display: block;
    font-size: 14px;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 15px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: #5850EC;
    box-shadow: 0 0 0 0.2rem rgba(88, 80, 236, 0.1);
}

.char-counter {
    font-size: 12px;
    color: #6c757d;
    text-align: right;
    margin-top: 5px;
}

.char-counter.warning {
    color: #ffc107;
}

.char-counter.danger {
    color: #dc3545;
}

.ai-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
}

.ai-btn {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ai-btn-chatgpt {
    background: #10a37f;
    color: white;
}

.ai-btn-chatgpt:hover {
    background: #0d8968;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 163, 127, 0.3);
}

.ai-btn-claude {
    background: #5436da;
    color: white;
}

.ai-btn-claude:hover {
    background: #4528b8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(84, 54, 218, 0.3);
}

.sidebar-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 25px;
    margin-bottom: 20px;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-item {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

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

.info-label {
    font-weight: 600;
    color: #666;
}

.info-value {
    color: #333;
}

.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 80px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

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

.action-buttons-project {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    align-items: center;
}

.action-buttons-project .btn {
    padding: 4px 8px;
    font-size: 12px;
    line-height: 1.2;
    border-radius: 4px;
    min-width: 50px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 28px;
}


.btn-save {
    padding: 14px 32px;
    background: #5850EC;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-save:hover {
    background: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 80, 236, 0.3);
}

.btn-cancel {
    padding: 14px 32px;
    background: white;
    color: #666;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
}

.autosave-indicator {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #28a745;
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.autosave-indicator.show {
    opacity: 1;
}

.coming-soon {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
    text-align: center;
    color: #adb5bd;
    font-style: italic;
    font-size: 14px;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s ease-in-out infinite;
}

.generating {
    opacity: 0.7;
    pointer-events: none;
}

#editor-container {
    height: 400px;
    margin-bottom: 40px;
}

.ql-toolbar {
    border: 2px solid #e9ecef !important;
    border-radius: 8px 8px 0 0 !important;
    background: #f8f9fa !important;
}

.ql-container {
    border: 2px solid #e9ecef !important;
    border-top: none !important;
    border-radius: 0 0 8px 8px !important;
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ql-editor {
    min-height: 350px;
}

/* ==========================================
   STYLES SPÉCIAUX ET LABELS
   ========================================== */

#id_client_type {
    width: calc(70vw);
    max-width: 100%;
    box-sizing: border-box;
}

label[for="id_client_type"] {
    display: block;
    width: calc(70vw);
    box-sizing: border-box;
}

#typewriter-text {
    font-family: "Poppins", sans-serif;
    font-size: 1.5rem;
    color: #333;
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

#cursor {
    font-size: 1.5rem;
    color: #333;
    animation: blink 0.5s step-end infinite;
}

/* ==========================================
   ANIMATIONS ET KEYFRAMES
   ========================================== */

@keyframes zoomPulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.4); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0% { transform: rotate(-3deg); }
    100% { transform: rotate(3deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes blink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

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

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 768px) {
    .field-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(6, auto);
        gap: 10px;
    }

    .field-grid label {
        margin-bottom: 3px;
        grid-row: auto;
    }

    .field-grid .custom-select-wrapper {
        grid-row: auto;
    }

    .page-content {
        padding-right: 20px !important;
    }

    .sc-filter-range {
        flex-direction: column !important;
        gap: 8px !important;
    }

    .sc-filter-range span {
        display: none !important;
    }

    .sc-filter-range input {
        width: 100% !important;
        max-width: 100% !important;
    }

    .sc-filter-group {
        min-height: auto;
        margin-bottom: 15px;
    }

    #backToTopBtn {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 16px;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-header,
    .modal-footer {
        padding: 15px 20px;
    }

    #projectNameToDelete {
        font-size: 18px;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    .modal-footer .btn:last-child {
        margin-bottom: 0;
    }
}

.config-section {
    border-radius: 8px;
}

.section-title {
    color: #333;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    font-size: 1.2rem;
}

.config-section .card {
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.config-section .alert {
    margin-bottom: 0;
}

.config-section .section-title {
    color: #333;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Sous-titres des catégories */
.config-section h6.text-primary {
    font-size: 1rem;
    font-weight: 600;
    color: #5850EC !important;
    border-left: 3px solid #5850EC;
    padding-left: 10px;
}

/* Style des inputs et textareas */
.config-section .form-control {
    border: 1px solid #dee2e6;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.config-section .form-control:focus {
    border-color: #5850EC;
    box-shadow: 0 0 0 0.2rem rgba(88, 80, 236, 0.25);
}

/* Placeholder en gris clair */
.config-section .form-control::placeholder {
    color: #adb5bd !important;
    opacity: 1;
    font-size: 0.9rem;
}

/* Labels */
.config-section .form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* Textareas */
.config-section textarea.form-control {
    resize: vertical;
    min-height: 60px;
}

/* Boutons de la section IA */
.config-section .btn {
    padding: 0.5rem 1rem;
    font-weight: 500;
}

/* Badge "Configuré" */
.badge.bg-success {
    background-color: #28a745 !important;
    font-size: 0.75rem;
    font-weight: normal;
}

/* Espacement entre les sections */
.config-section .mb-4:last-child {
    margin-bottom: 1rem !important;
}

/* Card de la section IA */
.config-section .card {
    border: 1px solid #e9ecef;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Icône robot */
.fa-robot {
    color: #5850EC;
}

/* Styles pour la configuration du prompt */
.prompt-config-container {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
}

.prompt-section {
    border-bottom: 1px solid #e9ecef;
}

.prompt-section:last-child {
    border-bottom: none;
}

.prompt-section-header {
    padding: 12px 16px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: #495057;
    transition: background-color 0.2s;
}

.prompt-section-header:hover {
    background: #f8f9fa;
}

.prompt-section-header .toggle-icon {
    transition: transform 0.2s;
    font-size: 12px;
    color: #6c757d;
}

.prompt-section-header.active .toggle-icon {
    transform: rotate(90deg);
}

.prompt-section-content {
    padding: 16px 20px;
    background: #fff;
    border-top: 1px solid #e9ecef;
}

.prompt-field {
    font-size: 14px;
}

.form-label.small {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 6px;
    font-weight: 500;
}

/* Espacement réduit pour le dernier élément */
.prompt-section-content .mb-3:last-child {
    margin-bottom: 0.5rem !important;
}

/* Animation pour le déploiement */
.prompt-section-content {
    transition: all 0.3s ease;
}

/* Styles pour la progression de génération */
.generation-progress {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    animation: fadeIn 0.3s ease;
}

.progress-header {
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-header i {
    color: #5850EC;
    animation: pulse 2s infinite;
}

.progress-messages {
    color: #6c757d;
    margin-bottom: 15px;
    min-height: 20px;
}

.progress-bar-container {
    background: #e9ecef;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    background: linear-gradient(90deg, #5850EC 0%, #7c3aed 100%);
    height: 100%;
    width: 0%;
    border-radius: 4px;
    animation: progressAnimation 30s ease-out forwards;
}

@keyframes progressAnimation {
    0% { width: 0%; }
    10% { width: 15%; }
    30% { width: 40%; }
    50% { width: 60%; }
    70% { width: 80%; }
    90% { width: 95%; }
    100% { width: 100%; }
}

/* Notifications */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    z-index: 9999;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-success {
    background: #28a745;
    color: white;
}

.notification-error {
    background: #dc3545;
    color: white;
}

.notification i {
    font-size: 20px;
}

/* Animation pour le robot */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Désactiver les boutons pendant la génération */
.ai-btn.generating {
    opacity: 0.7;
    cursor: not-allowed;
}

.ai-btn.generating:hover {
    transform: none;
    box-shadow: none;
}

.btn-export-csv-content {
    padding: 14px 32px;
    background-color: #17a2b8;  /* Bleu turquoise distinctif */
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-export-csv-content:hover {
    background-color: #138496;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.btn-export-csv-content:active {
    transform: translateY(0);
}

/* Bouton Editer dans projects */
.action-buttons-project .btn-warning {
    background-color: #ffc107 !important;
    color: #ffffff !important;
    border-color: #ffc107 !important;
}

.action-buttons-project .btn-warning:hover {
    background-color: #e0a800 !important;
    color: #ffffff !important;
    border-color: #d39e00 !important;
}

/* Bouton Editer dans le tableau projets */
.action-buttons-project a[href*="edit"] {
    color: #ffc107 !important;
    font-weight: 500;
}

.action-buttons-project a[href*="edit"]:hover {
    color: #e0a800 !important;
    text-decoration: none;
}