/* ============================================
   CSS SPÉCIFIQUE À L'APPLICATION USER_ACCOUNTS
   ============================================ */

/* --- STRUCTURE GÉNÉRALE --- */
.user-accounts-header {
    height: 10%;
    padding: 1.5rem;
    display: flex;
    align-items: center;
}

.user-accounts-breadcrumb {
    font-size: 11px;
    color: var(--orange-dark);
}

.user-accounts-breadcrumb a {
    color: var(--orange-dark);
    text-decoration: none;
}

.user-accounts-breadcrumb a:hover {
    text-decoration: underline;
}

.user-accounts-breadcrumb span {
    color: var(--grey-dark);
}

.user-accounts-title {
    height: 10%;
    padding: 1.5rem;
    display: flex;
    align-items: center;
}

.user-accounts-title h1 {
    margin-bottom: 0;
}

.user-accounts-content {
    height: 80%;
    padding: 1.5rem;
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    position: relative;
    display: flex;
    flex-direction: column;
}

.user-accounts-content-centered {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.user-accounts-content h3 {
    color: var(--orange-main);
}

.user-accounts-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.user-accounts-card {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 20px;
    min-height: 100px;
}

.user-accounts-logo-container {
    min-height: 100%;
}

.user-accounts-logo-img {
    max-height: 100px;
    max-width: 100%;
    object-fit: contain;
}

.sidebar-nav span,
.logout-link span {
    font-family: 'Saira', sans-serif !important;
    font-size: 14px !important;
    font-weight: 600;
}

/* ============================================
   HARMONISATION DES FORM-CONTROL
   ============================================ */
/* Harmonisation de la taille de police pour tous les form-control */
.user-accounts-content .form-control,
.user-accounts-content .form-control:focus,
.user-accounts-content textarea.form-control,
.user-accounts-content input.form-control,
.user-accounts-content select.form-control {
    font-size: 14px;
    font-weight: 400;
}

/* ============================================
   CSS SPÉCIFIQUE PAR PAGE
   ============================================ */

/* --- ACCUEIL --- */
.user-accounts-card-hover {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--grey-dark);
}

.user-accounts-card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0px 4px 12px 4px var(--grey-medium);
}

.user-accounts-card-icon {
    height: 48px;
    width: auto;
    object-fit: contain;
}

/* --- AUDIENCES --- */
#analytics-error {
    display: none;
}

#analytics-error.visible {
    display: block;
}

.info-icon-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: help;
    flex-shrink: 0;
}

.info-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.info-icon-wrapper:hover .info-icon {
    opacity: 1;
}

.custom-tooltip {
    position: fixed;
    top: var(--tooltip-top, 0);
    left: var(--tooltip-left, 0);
    transform: translateX(-50%);
    padding: 12px;
    background-color: white;
    color: var(--grey-dark);
    width: 280px;
    max-width: 90vw;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0s 0.2s;
    z-index: 10000;
}

.custom-tooltip-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 6px;
}

.custom-tooltip-title:only-child {
    margin-bottom: 0;
}

.custom-tooltip-body {
    font-size: 12px;
    line-height: 1.4;
}

.custom-tooltip-body:only-child {
    margin-top: 0;
}

.custom-tooltip.measuring {
    visibility: hidden;
    opacity: 0;
}

.custom-tooltip.visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s ease;
}

.custom-tooltip-arrow {
    position: fixed;
    top: var(--arrow-top, 0);
    left: var(--arrow-left, 0);
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0s 0.2s;
    z-index: 10001;
}

.custom-tooltip-arrow.arrow-up {
    border-top: 6px solid var(--grey-dark);
    border-bottom: none;
}

.custom-tooltip-arrow.arrow-down {
    border-bottom: 6px solid var(--grey-dark);
    border-top: none;
}

.custom-tooltip-arrow.visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s ease;
}

.date-range-picker-container {
    position: relative;
    display: inline-block;
}

.date-range-picker-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background-color: var(--orange-main);
    color: white;
    border-radius: 4px;
    cursor: pointer;
}

.date-range-picker-trigger:hover {
    background-color: var(--orange-hover-dark-bg);
}

.date-range-arrow {
    margin-left: 8px;
}

#dateRangeInput {
    display: none;
}

.audience-tabs {
    display: flex;
    margin-top: 16px;
    gap: 8px;
}

.audience-tab {
    padding: 8px 16px;
    background-color: white;
    border: 1px solid var(--orange-main);
    border-radius: 4px;
    cursor: pointer;
    color: var(--grey-dark);
    transition: all 0.2s ease;
}

.audience-tab:hover {
    background-color: var(--orange-light);
    border-color: var(--orange-main);
}

.audience-tab.active {
    background-color: var(--orange-main);
    border-color: var(--orange-main);
    color: white;
}

.audience-tab-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

.flatpickr-calendar {
    line-height: auto !important;
    padding: 10px;
}

.date-range-picker-container .flatpickr-calendar {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;
    margin-top: 0 !important;
    z-index: 1000;
    transform: none !important;
}

.flatpickr-calendar.rangeMode .flatpickr-months {
    border-bottom: 1px solid var(--grey-medium);
    padding-top: 10px;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.flatpickr-calendar .flatpickr-monthDropdown-months,
.flatpickr-calendar .flatpickr-monthDropdown-years {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
}

.flatpickr-calendar .flatpickr-weekday {
    color: var(--grey-dark);
    font-size: 0;
    text-transform: capitalize;
}

.flatpickr-calendar .flatpickr-weekday::first-letter {
    font-size: 12px;
    display: inline-block;
}

.flatpickr-calendar.rangeMode .flatpickr-dayContainer {
    width: 50%;
    padding: 8px;
    box-sizing: border-box;
}

.flatpickr-calendar .flatpickr-day.startRange,
.flatpickr-calendar .flatpickr-day.endRange {
    background-color: var(--orange-main);
    border-color: var(--orange-hover-dark-bg);
    color: white;
}

.flatpickr-calendar .flatpickr-day.startRange:hover,
.flatpickr-calendar .flatpickr-day.endRange:hover {
    background-color: var(--orange-main) !important;
    border-color: var(--orange-hover-dark-bg) !important;
    color: white !important;
}

.flatpickr-calendar .flatpickr-day.inRange {
    background-color: transparent !important;
    background: var(--orange-light) !important;
    border: none !important;
    box-shadow: none !important;
}

.flatpickr-calendar .flatpickr-day.inRange:hover {
    background-color: var(--orange-light) !important;
}

.flatpickr-calendar .flatpickr-day:hover {
    background-color: var(--orange-light) !important;
    border: none !important;
}

.flatpickr-calendar .flatpickr-day.disabled,
.flatpickr-calendar .flatpickr-day.prevMonthDay,
.flatpickr-calendar .flatpickr-day.nextMonthDay {
    color: #ccc;
}

.flatpickr-footer {
    display: none;
    justify-content: flex-end;
    align-items: center;
    padding: 12px 16px;
    border-top: 1px solid var(--grey-medium);
}

.flatpickr-footer.attached {
    display: flex;
}

.flatpickr-footer-buttons {
    display: flex;
    gap: 8px;
}

.flatpickr-footer-button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.flatpickr-footer-button.apply {
    background-color: var(--orange-main);
    border: 1px solid var(--orange-hover-dark-bg);
    color: white;
    display: flex;
    align-items: center;
    gap: 4px;
}

.flatpickr-footer-button.apply:hover {
    background-color: var(--orange-hover-dark-bg);
}

.flatpickr-footer-button.cancel {
    background-color: transparent;
    color: var(--grey-medium);
}

.flatpickr-footer-button.cancel:hover {
    background-color: var(--grey-light);
}

#analytics-data {
    display: none;
}

#analytics-data.loaded {
    display: flex;
}

.datas_analytics {
    flex: 1;
    min-height: 0;
}

.analytics-cards-container {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 5px;
    height: 100%;
    flex: 1;
    min-height: 0;
}


#chart-section {
    display: block;
}


.user-accounts-chart-container {
    overflow-x: hidden;
}

.user-accounts-chart-wrapper {
    overflow-x: hidden;
    width: 100%;
    min-height: 250px;
}

.chart-donut-wrapper {
    min-height: 200px;
    height: 200px;
}

.user-accounts-chart-canvas {
    max-height: 400px;
    max-width: 100%;
}

#countries-section {
    display: block;
}

.countries-map-table-container {
    align-items: center;
}

.countries-map-table-container .col-6:first-child {
    display: flex;
    align-items: center;
}

#countries-map {
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    height: 500px;
}

.countries-tooltip {
    background-color: var(--white);
    border: 1px solid var(--grey-medium);
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.countries-tooltip strong {
    color: var(--orange-main);
    display: block;
    margin-bottom: 4px;
}

#countries-table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 20px;
}

#countries-table th.sortable:hover {
    background-color: var(--grey-light);
}

#countries-table th.sortable::after {
    content: '';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    opacity: 0.3;
}

#countries-table th.sortable.sort-asc::after {
    border-bottom: 6px solid var(--orange-main);
    opacity: 1;
}

#countries-table th.sortable.sort-desc::after {
    border-top: 6px solid var(--orange-main);
    opacity: 1;
}

#audiences-translations {
    display: none;
}

/* --- MY PRODUCTS --- */
.tableau_derivés {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    min-width: 0;
    position: relative;
}

.my-products-table-wrapper.table-responsive {
    overflow-x: auto;
    overflow-y: auto;
    position: relative;
    flex: 1;
    min-height: 0;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    box-sizing: border-box;
}


.my-products-table {
    margin-bottom: 0;
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
}

.my-products-table-header {
    position: sticky;
    top: 0;
    z-index: 10;
}

.my-products-table-header th {
    background-color: var(--white);
    border-bottom: 2px solid var(--grey-medium);
    font-weight: 600;
    position: sticky;
    top: 0;
    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
}

.my-products-table td {
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 0;
    position: relative;
}

/* Garder le texte à l'horizontale dans les cellules éditables (évite l'affichage vertical après swap HTMX) */
.my-products-table td.editable-cell {
    white-space: nowrap;
}

.my-products-table td.commentary-cell {
    text-align: center;
}

.my-products-table td.commentary-cell button {
    pointer-events: none;
}

.my-products-table td form {
    width: 100%;
    min-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.my-products-table td.certifications-cell form {
    width: auto;
    min-width: 0;
    display: inline-flex;
    justify-content: flex-start;
    align-items: center;
}

.my-products-table td.certifications-cell .badge {
    text-align: left;
    background-color: var(--orange-light);
    border-color: var(--orange-main) !important;
    color: var(--orange-main);
}

.my-products-table td .btneditcertif {
    border: none;
    color: var(--orange-main);
}

.my-products-table td input.form-control {
    width: 100%;
    min-width: 250px;
    max-width: none;
    box-sizing: border-box;
    display: block;
    margin: 0 auto;
}

.my-products-table td input.form-control:focus {
    min-width: max(250px, calc(100% + 50px));
    width: auto;
    position: relative;
    z-index: 100;
    margin: 0 auto;
    left: 50%;
    transform: translateX(-50%);
}

.my-products-table .dropdown-menu {
    min-width: fit-content;
    white-space: nowrap;
}

.Titredropdowncertif {
    display: block;
    font-size: 12px;
    font-weight: 500;
    background-color: var(--orange-light);
    text-align: center;
}

.my-products-table .certifications-dropdown-list {
    max-height: calc(7 * 2.4rem);
    overflow-y: auto;
    margin-bottom: 0;
}

.my-products-table .dropdown-menu form {
    margin: 0;
}

.my-products-table .dropdown-menu .form-check-input {
    flex-shrink: 0;
    margin: 0;
    margin-right: 0.5rem;
}

.my-products-table .dropdown-menu .form-check-label {
    white-space: nowrap;
    margin: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    width: 100%;
    cursor: pointer;
}

.my-products-table .dropdown-menu li {
    white-space: nowrap;
    transition: background-color 0.2s ease;
    border-radius: 4px;
    cursor: pointer;
}

.my-products-table .dropdown-menu li:hover {
    background-color: var(--orange-light);
}

.my-products-table .dropdown-menu li:hover .form-check-label {
    color: var(--grey-dark);
}

.my-products-pagination-container {
    width: 100%;
    background-color: transparent;
}

.my-products-pagination {
    margin: 0;
}

.my-products-pagination .page-link {
    color: var(--orange-main);
    border-color: var(--orange-light);
    padding: 0.5rem 0.75rem;
    font-size: 14px;
    transition: all 0.2s ease;
}

.my-products-pagination .page-link:hover {
    color: var(--orange-dark);
    background-color: var(--orange-light);
    border-color: var(--orange-main);
}

.my-products-pagination .page-item.active .page-link {
    background-color: var(--orange-main);
    border-color: var(--orange-main);
    color: var(--white);
}

.my-products-pagination .page-item.disabled .page-link {
    color: var(--grey-medium);
    background-color: var(--white);
    border-color: var(--grey-light);
    cursor: not-allowed;
    opacity: 0.6;
}

.my-products-pagination .page-item.disabled .page-link:hover {
    color: var(--grey-medium);
    background-color: var(--white);
    border-color: var(--grey-light);
}

/* --- DOCUMENTATION --- */
.user-accounts-card-coming-soon {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 80px 40px;
    text-align: center;
    position: relative;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.user-accounts-illustration {
    position: relative;
    width: 200px;
    height: 200px;
    margin-bottom: 40px;
}

.user-accounts-illustration img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* --- MY ACCOUNT --- */
.calendly-widget {
    min-width: 320px;
    flex: 1;
}

/* --- MY PUBLIC DATA --- */
/* Formulaire avec flex pour gérer la hauteur */
.user-accounts-public-data-form {
    flex: 1;
    min-height: 0;
}

/* Contenu scrollable du formulaire */
.user-accounts-public-data-content {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

/* Séparateur pour la section logo */
.logo-preview-separator {
    border-top: 1px solid #e0e0e0;
}

/* Styles pour les images de logo (actuel et prévisualisation) */
.logo-image,
.logo-preview-image {
    max-width: 150px;
    max-height: 150px;
    width: auto;
    height: auto;
    object-fit: contain;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
    padding: 8px;
}

/* Conteneur de prévisualisation du logo */
.logo-preview-container {
    display: none;
}

.logo-preview-container.visible {
    display: block;
}

/* Placeholder de prévisualisation */
.logo-preview-placeholder {
    display: block;
}

.logo-preview-placeholder.hidden {
    display: none;
}

/* Textarea avec auto-resize */
.auto-resize-textarea {
    overflow-y: hidden;
}


.user-accounts-public-data-footer-buttons {
    justify-content: center;
}

/* Footer de pagination fixé en bas */
.user-accounts-pagination-footer {
    border-top: 1px solid var(--grey-light);
    flex-shrink: 0;
}


/* ============================================
   COULEURS CHART.JS
   ============================================ */
:root {
    --chart-color-impressions: var(--orange-light);
    --chart-color-impressions-bg: var(--grey-medium);
    --chart-color-clicks: var(--orange-main);
    --chart-color-clicks-bg: var(--grey-medium);
    --chart-color-sessions: var(--orange-light);
    --chart-color-sessions-bg: var(--grey-medium);
    --chart-color-users: var(--orange-main);
    --chart-color-users-bg: var(--grey-medium);
    --chart-grid-color: var(--grey-medium);
    
    --device-desktop-color: #FFB89A;
    --device-desktop-bg: rgba(255, 184, 154, 0.1);
    --device-mobile-color: #FFD700;
    --device-mobile-bg: rgba(255, 215, 0, 0.1);
    --device-tablet-color: #FF69B4;
    --device-tablet-bg: rgba(255, 105, 180, 0.1);
    
    --traffic-direct-color: #4A90E2;
    --traffic-direct-bg: rgba(74, 144, 226, 0.1);
    --traffic-organic-color: #50C878;
    --traffic-organic-bg: rgba(80, 200, 120, 0.1);
    --traffic-referral-color: #FF6B6B;
    --traffic-referral-bg: rgba(255, 107, 107, 0.1);
    --traffic-social-color: #9B59B6;
    --traffic-social-bg: rgba(155, 89, 182, 0.1);
    
    --search-successful-color: #4CAF50;
    --search-successful-bg: rgba(76, 175, 80, 0.1);
    --search-abandon-color: #FF9800;
    --search-abandon-bg: rgba(255, 152, 0, 0.1);
    --search-no-result-color: #F44336;
    --search-no-result-bg: rgba(244, 67, 54, 0.1);
    
    --abandon-escape-color: #9C27B0;
    --abandon-escape-bg: rgba(156, 39, 176, 0.1);
    --abandon-outside-click-color: #2196F3;
    --abandon-outside-click-bg: rgba(33, 150, 243, 0.1);
    --abandon-new-search-color: #00BCD4;
    --abandon-new-search-bg: rgba(0, 188, 212, 0.1);
    --abandon-timeout-color: #FF5722;
    --abandon-timeout-bg: rgba(255, 87, 34, 0.1);
    
    --map-country-border-color: var(--grey-medium);
    --map-country-no-data-color: var(--grey-light);
    --map-country-fill-opacity: 0.7;
    --map-country-border-weight: 1;
    --map-country-border-opacity: 0.3;
    --map-country-dash-array: 0;
    --map-gradient-steps: 10;
    --map-ocean-color: white !important;
}

.device-metric-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px;
    background-color: var(--white);
    border-radius: 8px;
    border: 1px solid var(--grey-light);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.device-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
}

.device-metric-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
}

.device-desktop .device-metric-icon {
    background-color: var(--device-desktop-bg);
    color: var(--device-desktop-color);
}

.device-mobile .device-metric-icon {
    background-color: var(--device-mobile-bg);
    color: var(--device-mobile-color);
}

.device-tablet .device-metric-icon {
    background-color: var(--device-tablet-bg);
    color: var(--device-tablet-color);
}

.device-metric-content {
    flex: 1;
}

.traffic-direct .device-metric-icon {
    background-color: var(--traffic-direct-bg);
    color: var(--traffic-direct-color);
}

.traffic-organic .device-metric-icon {
    background-color: var(--traffic-organic-bg);
    color: var(--traffic-organic-color);
}

.traffic-referral .device-metric-icon {
    background-color: var(--traffic-referral-bg);
    color: var(--traffic-referral-color);
}

.traffic-social .device-metric-icon {
    background-color: var(--traffic-social-bg);
    color: var(--traffic-social-color);
}

.search-successful .device-metric-icon {
    background-color: var(--search-successful-bg);
    color: var(--search-successful-color);
}

.search-abandon .device-metric-icon {
    background-color: var(--search-abandon-bg);
    color: var(--search-abandon-color);
}

.search-no-result .device-metric-icon {
    background-color: var(--search-no-result-bg);
    color: var(--search-no-result-color);
}

.abandon-escape .device-metric-icon {
    background-color: var(--abandon-escape-bg);
    color: var(--abandon-escape-color);
}

.abandon-outside-click .device-metric-icon {
    background-color: var(--abandon-outside-click-bg);
    color: var(--abandon-outside-click-color);
}

.abandon-new-search .device-metric-icon {
    background-color: var(--abandon-new-search-bg);
    color: var(--abandon-new-search-color);
}

.abandon-timeout .device-metric-icon {
    background-color: var(--abandon-timeout-bg);
    color: var(--abandon-timeout-color);
}

.device-metric-value {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.leaflet-popup-pane,
.leaflet-popup {
    display: none !important;
}

/* ============================================
   EDIT CLASSIFICATION
   ============================================ */

/* 1. Contenu principal */
.classification-content-wrapper {
    flex: 1;
    min-height: 0;
}

/* 2. Carte principale */
.classification-edit-card {
    min-height: 600px;
}

/* 3. Wrapper d'information */
.classification-info-wrapper {
    flex: 1;
}

/* 4. Badges de classification */
.classification-badge-primary,
.classification-badge-secondary {
    display: inline-flex;
    align-items: center;
    color: var(--grey-dark);
    font-size: 14px;
}

/* 5. Séparateur */
.classification-separator {
    color: var(--grey-medium);
    font-weight: 500;
    padding: 0px 4px 4px 0px;
}

/* 6. Bouton de suppression */
.classification-remove-btn {
    background: none;
    border: none;
    color: var(--grey-medium);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.classification-remove-btn:hover {
    color: var(--orange-dark);
}

/* 7. Bouton retour */
.classification-back-btn {
    background-color: var(--white);
    color: var(--orange-main);
    border: 1px solid var(--orange-main);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.classification-back-btn:hover{
    background-color: var(--grey-light);
    color: var(--orange-main);
    border: 1px solid var(--orange-main);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.classification-back-icon {
    width: 16px;
    height: 16px;
}

/* 8. Bouton sauvegarder */
.classification-save-btn {
    background-color: var(--white);
    border: 1px solid var(--grey-medium);
    color: var(--grey-medium);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.classification-save-btn:hover {
    background-color: var(--grey-dark);
    color: var(--white);
    border-color: var(--grey-dark);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 9. Onglets */
.classification-tabs {
    background-color: var(--orange-light);
    gap: 8px;
    padding-bottom: 0;
    border-radius: 8px;
    width: fit-content;
    display: inline-flex;
}

.classification-tab {
    padding: 10px 16px;
    background-color: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    color: var(--grey-medium);
    transition: all 0.2s ease;
    position: relative;
}

.classification-tab:hover {
    color: var(--orange-main);
    background-color: var(--orange-light);
}

.classification-tab.active {
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    background-color: var(--orange-main);
    font-weight: 600;
}

/* 10. Contenu des onglets */
.tab-content-pane {
    display: none;
    padding: 20px 0;
}

.tab-content-pane.active {
    display: block;
}

/* 11. Grille des primary families */
.primary-family-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

/* 12. Checkbox primary family */
.primary-family-checkbox {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    background-color: var(--grey-light);
    min-height: 65px;
    box-sizing: border-box;
}

.primary-family-checkbox:not(:has(input[type="radio"]:checked)) {
    border-color: var(--grey-light);
}

.primary-family-checkbox:hover {
    background-color: var(--orange-light);
    border-color: var(--orange-main);
}

.primary-family-checkbox:has(input[type="radio"]:checked) {
    background-color: var(--orange-light);
    border-color: var(--orange-main);
}

.primary-family-checkbox input[type="radio"]:checked ~ span,
.primary-family-checkbox:has(input[type="radio"]:checked) span {
    font-weight: 600;
    color: var(--orange-main);
}

/* 13. Liste des descripteurs */
.descriptors-radio-list {
    max-height: calc(50vh);
    overflow-y: auto;
    overflow-x: hidden;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--grey-light);
    border-radius: 4px;
    will-change: scroll-position;
    contain: layout style paint;
}

/* 14. Label radio descripteur */
.descriptor-radio-label {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    background-color: var(--grey-light);
    min-height: 65px;
    box-sizing: border-box;
}

.descriptor-radio-label:not(:has(input[type="radio"]:checked)) {
    border-color: var(--grey-light);
}

.descriptor-radio-label:hover {
    background-color: var(--orange-light);
    border-color: var(--orange-main);
}

.descriptor-radio-label:has(input[type="radio"]:checked) {
    background-color: var(--orange-light);
    border-color: var(--orange-main);
}

.descriptor-radio-label input[type="radio"]:checked ~ span,
.descriptor-radio-label:has(input[type="radio"]:checked) span {
    font-weight: 600;
    color: var(--orange-main);
}

/* 15. Input radio caché */
.descriptor-radio-hidden {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    pointer-events: none;
}

/* 16. Conteneur d'image */
.descriptor-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

/* 17. Image descripteur */
.descriptor-image {
    max-width: 40px;
    max-height: 40px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* 18. Icône de recherche */
.descriptor-search-icon {
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--grey-medium);
    pointer-events: none;
}

/* 19. Section produits similaires */
.similar-products-section {
    border: 2px dashed var(--grey-light);
    border-radius: 4px;
    padding: 16px;
    min-height: 200px;
    max-height: calc(40vh);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 20. Liste produits similaires */
.similar-products-list {
    color: var(--grey-light);
    font-size: 12px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

/* 21. Nom produit similaire */
.similar-product-name {
    font-weight: 600;
    color: var(--grey-dark);
    margin-bottom: 4px;
}

/* 22. Classification produit similaire */
.similar-product-classification {
    font-size: 10px;
}

/* 23. Tooltip pour les descripteurs */
.descriptor-tooltip {
    position: fixed;
    opacity: 0;
    visibility: hidden;
    background-color: var(--grey-light);
    border: 1px solid var(--grey-medium);
    border-radius: 4px;
    padding: 12px;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    pointer-events: none;
    left: var(--tooltip-x, 0);
    top: var(--tooltip-y, 0);
    transform: translateX(-50%) translateY(calc(-100% - 2px));
    transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}

.descriptor-tooltip.show {
    visibility: visible;
    animation: tooltipFadeIn 0.2s ease 1s forwards;
    transition: none;
}

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

.descriptor-tooltip .tooltip-loading {
    color: var(--grey-medium);
    font-size: 12px;
    font-style: italic;
}

.descriptor-tooltip .tooltip-content {
    color: var(--grey-dark);
    font-size: 12px;
    line-height: 1.5;
    white-space: normal;
    word-wrap: break-word;
}

/* 24. Classe pour masquer les éléments */
.hidden {
    display: none !important;
}
