/* ═══════════════════════════════════════════════════════════════════════════
   COMMERCIFY HYPERPROFIL - LIENS SOUS-SECTIONS (libellés au-dessus des vignettes)
   Lisibilité au hover + embellissements thème clair & dark mode Dashlight
   Cible : .hyperprofil-*-link, .hyperprofil-tooltip-jump, .preview-title (pays)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Cible commune : tous les liens « libellé sous-section » au-dessus des vignettes */
.hyperprofil-category-link,
.hyperprofil-rayon-link,
.hyperprofil-region-link,
.hyperprofil-department-link,
.hyperprofil-devise-link,
.hyperprofil-language-link,
.hyperprofil-tooltip-jump,
.preview-block > a.preview-title {
    transition: color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease !important;
}

/* ─── Hover : texte toujours lisible + effet « waouh » ─── */
@media (hover: hover) {
    .hyperprofil-category-link:hover,
    .hyperprofil-rayon-link:hover,
    .hyperprofil-region-link:hover,
    .hyperprofil-department-link:hover,
    .hyperprofil-devise-link:hover,
    .hyperprofil-language-link:hover,
    .hyperprofil-tooltip-jump:hover,
    .preview-block > a.preview-title:hover {
        color: #ffffff !important;
        text-decoration: none !important;
        /* Légère surbrillance du fond + ombre pour feedback visuel */
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
        transform: translateY(-2px) scale(1.01) !important;
    }

    /* Conserver un fond lisible au hover (éviter override thème qui casse le contraste) */
    .hyperprofil-category-link:hover     { background-color: #1565c0 !important; }
    .hyperprofil-rayon-link:hover        { background-color: #388e3c !important; }
    .hyperprofil-region-link:hover       { background-color: #1565c0 !important; }
    .hyperprofil-department-link:hover   { background-color: #616161 !important; }
    .hyperprofil-devise-link:hover        { background-color: #ef6c00 !important; }
    .hyperprofil-language-link:hover     { background-color: #1565c0 !important; }
    .hyperprofil-tooltip-jump:hover,
    .preview-block > a.preview-title:hover { background: linear-gradient(135deg, #616161 0%, #8e8e8e 100%) !important; }
}

/* ─── Dark mode Dashlight : hover sous-sections ─── */
.dark-mode .hyperprofil-category-link:hover,
html.dark-mode .hyperprofil-category-link:hover,
[data-bs-theme='dark'] .hyperprofil-category-link:hover,
.dark-mode .hyperprofil-rayon-link:hover,
html.dark-mode .hyperprofil-rayon-link:hover,
[data-bs-theme='dark'] .hyperprofil-rayon-link:hover,
.dark-mode .hyperprofil-region-link:hover,
html.dark-mode .hyperprofil-region-link:hover,
[data-bs-theme='dark'] .hyperprofil-region-link:hover,
.dark-mode .hyperprofil-department-link:hover,
html.dark-mode .hyperprofil-department-link:hover,
[data-bs-theme='dark'] .hyperprofil-department-link:hover,
.dark-mode .hyperprofil-devise-link:hover,
html.dark-mode .hyperprofil-devise-link:hover,
[data-bs-theme='dark'] .hyperprofil-devise-link:hover,
.dark-mode .hyperprofil-language-link:hover,
html.dark-mode .hyperprofil-language-link:hover,
[data-bs-theme='dark'] .hyperprofil-language-link:hover,
.dark-mode .hyperprofil-tooltip-jump:hover,
html.dark-mode .hyperprofil-tooltip-jump:hover,
[data-bs-theme='dark'] .hyperprofil-tooltip-jump:hover,
.dark-mode .preview-block > a.preview-title:hover,
html.dark-mode .preview-block > a.preview-title:hover,
[data-bs-theme='dark'] .preview-block > a.preview-title:hover {
    color: #ffffff !important;
    text-decoration: none !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
}

/* Couleurs de fond hover en dark mode (légèrement éclaircies pour contraste) */
@media (hover: hover) {
    .dark-mode .hyperprofil-category-link:hover,
    html.dark-mode .hyperprofil-category-link:hover,
    [data-bs-theme='dark'] .hyperprofil-category-link:hover { background-color: #1976d2 !important; }
    .dark-mode .hyperprofil-rayon-link:hover,
    html.dark-mode .hyperprofil-rayon-link:hover,
    [data-bs-theme='dark'] .hyperprofil-rayon-link:hover { background-color: #43a047 !important; }
    .dark-mode .hyperprofil-region-link:hover,
    html.dark-mode .hyperprofil-region-link:hover,
    [data-bs-theme='dark'] .hyperprofil-region-link:hover { background-color: #1976d2 !important; }
    .dark-mode .hyperprofil-department-link:hover,
    html.dark-mode .hyperprofil-department-link:hover,
    [data-bs-theme='dark'] .hyperprofil-department-link:hover { background-color: #757575 !important; }
    .dark-mode .hyperprofil-devise-link:hover,
    html.dark-mode .hyperprofil-devise-link:hover,
    [data-bs-theme='dark'] .hyperprofil-devise-link:hover { background-color: #f57c00 !important; }
    .dark-mode .hyperprofil-language-link:hover,
    html.dark-mode .hyperprofil-language-link:hover,
    [data-bs-theme='dark'] .hyperprofil-language-link:hover { background-color: #1976d2 !important; }
    .dark-mode .hyperprofil-tooltip-jump:hover,
    html.dark-mode .hyperprofil-tooltip-jump:hover,
    [data-bs-theme='dark'] .hyperprofil-tooltip-jump:hover,
    .dark-mode .preview-block > a.preview-title:hover,
    html.dark-mode .preview-block > a.preview-title:hover,
    [data-bs-theme='dark'] .preview-block > a.preview-title:hover {
        background: linear-gradient(135deg, #616161 0%, #78909c 100%) !important;
    }
}

/* ─── Focus clavier (accessibilité) : même contraste que hover ─── */
.hyperprofil-category-link:focus-visible,
.hyperprofil-rayon-link:focus-visible,
.hyperprofil-region-link:focus-visible,
.hyperprofil-department-link:focus-visible,
.hyperprofil-devise-link:focus-visible,
.hyperprofil-language-link:focus-visible,
.hyperprofil-tooltip-jump:focus-visible,
.preview-block > a.preview-title:focus-visible {
    color: #ffffff !important;
    text-decoration: none !important;
    outline: 2px solid rgba(255, 255, 255, 0.8) !important;
    outline-offset: 2px !important;
}

/* ─── Embellissement : filet gauche accent au hover (tip graphiste) ─── */
@media (hover: hover) {
    .hyperprofil-category-link:hover,
    .hyperprofil-rayon-link:hover,
    .hyperprofil-region-link:hover,
    .hyperprofil-department-link:hover,
    .hyperprofil-devise-link:hover,
    .hyperprofil-language-link:hover,
    .hyperprofil-tooltip-jump:hover,
    .preview-block > a.preview-title:hover {
        border-left: 4px solid rgba(255, 255, 255, 0.6) !important;
    }
}

/* RTL : filet à droite au lieu de gauche */
@media (hover: hover) {
    html[dir="rtl"] .hyperprofil-category-link:hover,
    html[dir="rtl"] .hyperprofil-rayon-link:hover,
    html[dir="rtl"] .hyperprofil-region-link:hover,
    html[dir="rtl"] .hyperprofil-department-link:hover,
    html[dir="rtl"] .hyperprofil-devise-link:hover,
    html[dir="rtl"] .hyperprofil-language-link:hover,
    html[dir="rtl"] .hyperprofil-tooltip-jump:hover,
    html[dir="rtl"] .preview-block > a.preview-title:hover {
        border-left: 0 !important;
        border-right: 4px solid rgba(255, 255, 255, 0.6) !important;
    }
}

/* Réduire le mouvement si préférence utilisateur */
@media (prefers-reduced-motion: reduce) {
    .hyperprofil-category-link,
    .hyperprofil-rayon-link,
    .hyperprofil-region-link,
    .hyperprofil-department-link,
    .hyperprofil-devise-link,
    .hyperprofil-language-link,
    .hyperprofil-tooltip-jump,
    .preview-block > a.preview-title {
        transition: color 0.15s ease, background-color 0.15s ease !important;
    }
    .hyperprofil-category-link:hover,
    .hyperprofil-rayon-link:hover,
    .hyperprofil-region-link:hover,
    .hyperprofil-department-link:hover,
    .hyperprofil-devise-link:hover,
    .hyperprofil-language-link:hover,
    .hyperprofil-tooltip-jump:hover,
    .preview-block > a.preview-title:hover {
        transform: none !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15) !important;
    }
}
