@import "../template.css?v=20260617-shared-hero";

/* ================================ */
/* FILTRES MODERNES */
/* ================================ */

.filtres-container {
    position: sticky;
    top: 75px;
    z-index: 100;
    margin-bottom: 40px;
    background: var(--background-box);
    border-radius: 24px;
    padding: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid var(--section-border);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: background 0.3s ease, border-color 0.3s ease;
}

body.dark-theme .filtres-container {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.filtres-categories {
    display: flex;
    gap: 12px;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    scroll-behavior: smooth;
    flex-wrap: nowrap;
}

body.dark-theme .filtres-categories {
    scrollbar-color: #404040 transparent;
}

.filtres-categories::-webkit-scrollbar {
    height: 6px;
}

.filtres-categories::-webkit-scrollbar-track {
    background: transparent;
}

.filtres-categories::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

body.dark-theme .filtres-categories::-webkit-scrollbar-thumb {
    background: #404040;
}

.filtres-categories::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

body.dark-theme .filtres-categories::-webkit-scrollbar-thumb:hover {
    background: #525252;
}

.filtre-btn {
    padding: 9px 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    color: var(--brand-silver);
    border: 2px solid var(--section-border);
    border-radius: var(--ui-radius-button);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: color var(--ui-transition), background-color var(--ui-transition), border-color var(--ui-transition), transform var(--ui-transition), box-shadow var(--ui-transition);
    white-space: nowrap;
    flex-shrink: 0;
    font-family: 'Poppins', sans-serif;
}

body.dark-theme .filtre-btn {
    background: linear-gradient(135deg, #1e1e1e 0%, #1a1a1a 100%);
    color: #d1d5db;
}

.filtre-btn:hover {
    border-color: #cbd5e1;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

body.dark-theme .filtre-btn:hover {
    border-color: #3a3a3a;
}

.filtre-btn.active {
    background: var(--brand-sapphire);
    border-color: var(--brand-sapphire);
    color: white;
    box-shadow: 0 4px 12px rgba(30, 30, 226, 0.2);
}

body.dark-theme .filtre-btn.active {
    background: var(--brand-sapphire);
    border-color: var(--brand-blue-circuit);
    color: white;
    box-shadow: 0 4px 12px rgba(39, 153, 255, 0.4);
}

.scroll-btn {
    display: none;
    background: var(--brand-sapphire);
    border: none;
    color: white;
    font-size: 18px;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: var(--ui-radius-button);
    transition: background-color var(--ui-transition), transform var(--ui-transition), box-shadow var(--ui-transition);
    flex-shrink: 0;
}

.scroll-btn:hover:not(:disabled) {
    background: var(--brand-blue-circuit);
    transform: var(--ui-hover-lift);
    box-shadow: var(--ui-shadow-brand-soft);
}

.scroll-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ================================ */
/* TABLEAU MODERNE */
/* ================================ */

.responsive-table {
    list-style: none;
    padding: 0;
    margin: 0;
}

.responsive-table li {
    display: flex;
    align-items: center;
    padding: 18px 30px;
    margin-bottom: 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    gap: 20px;
}

.table-header {
    background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-sapphire) 100%);
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
    position: sticky;
    top: 160px;
    z-index: 50;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    padding: 16px 30px;
    border: 2px solid transparent;
    transition: none;
    align-items: flex-start;
}

.responsive-table .table-header {
    transition: none;
}

body.dark-theme .table-header {
    background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-sapphire) 100%);
}

.table-header .col {
    color: white;
    align-items: center;
}

.table-header .col-4 {
    flex-wrap: nowrap;
    gap: 0;
    flex-direction: row;
    align-items: center;
}

.table-row {
    background: var(--background-box);
    border: 2px solid var(--section-border);
    position: relative;
    overflow: hidden;
    align-items: flex-start;
}

.table-row::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 30, 226, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

body.dark-theme .table-row::before {
    background: linear-gradient(135deg, rgba(39, 153, 255, 0.1) 0%, transparent 100%);
}

.table-row:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    border-color: var(--brand-sapphire);
}

body.dark-theme .table-row:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--brand-blue-circuit);
}

.table-row:hover::before {
    opacity: 1;
}

.col {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    min-width: 0;
}

.col-1 { flex: 1.35 1 0; }
.col-2 { flex: 2.5 1 0; }
.col-3 { flex: 0.95 1 0; }
.col-4 {
    flex: 1.1 1 0;
    flex-wrap: wrap;
    gap: 8px;
    flex-direction: column;
    align-items: flex-start;
}
.col-5 {
    flex: 0 0 104px;
    gap: 10px;
    justify-content: flex-end;
}

.col p {
    margin: 0;
    color: var(--hero-subtitle);
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 100%;
}

.col p,
.col a {
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

.col a {
    color: var(--brand-sapphire);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
    max-width: 100%;
}

body.dark-theme .col a {
    color: var(--brand-blue-circuit);
}

.col a:hover {
    color: var(--brand-sapphire);
    text-decoration: underline;
}

body.dark-theme .col a:hover {
    color: var(--brand-cloud-byte);
}

/* ================================ */
/* BOUTONS D'ACTION */
/* ================================ */

.bouton_dl,
.favori-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--ui-radius-button);
    transition: color var(--ui-transition), background-color var(--ui-transition), border-color var(--ui-transition), transform var(--ui-transition), box-shadow var(--ui-transition);
    cursor: pointer;
    position: relative;
}

.bouton_dl {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 2px solid var(--section-border);
}

body.dark-theme .bouton_dl {
    background: linear-gradient(135deg, #1e1e1e 0%, #1a1a1a 100%);
}

.bouton_dl i {
    font-size: 20px;
    color: var(--brand-sapphire);
    transition: all 0.3s ease;
}

body.dark-theme .bouton_dl i {
    color: var(--brand-blue-circuit);
}

.bouton_dl:hover {
    background: var(--brand-sapphire);
    border-color: var(--brand-sapphire);
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(30, 30, 226, 0.3);
}

.bouton_dl:hover i {
    color: white;
}

.favori-btn {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 2px solid var(--section-border);
}

body.dark-theme .favori-btn {
    background: linear-gradient(135deg, #1e1e1e 0%, #1a1a1a 100%);
}

.favori-btn i {
    font-size: 18px;
    color: #94a3b8;
    transition: all 0.3s ease;
}

.favori-btn .bi-heart-fill {
    display: none;
}

.favori-btn.favori-active {
    background: linear-gradient(135deg, rgba(229, 60, 56, 0.08) 0%, var(--brand-error-pale) 100%);
    border-color: #fb7185;
}

body.dark-theme .favori-btn.favori-active {
    background: linear-gradient(135deg, rgba(229, 60, 56, 0.18) 0%, var(--brand-error) 100%);
}

.favori-btn.favori-active .bi-heart {
    display: none;
}

.favori-btn.favori-active .bi-heart-fill {
    display: inline-block;
    color: #fb7185;
    animation: heartBeat 0.5s ease;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1.1); }
}

.favori-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(251, 113, 133, 0.3);
}

/* ================================ */
/* PAGINATION */
/* ================================ */

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.pagination button {
    min-width: 45px;
    padding: 12px 16px;
    background: var(--background-box);
    border: 2px solid var(--section-border);
    border-radius: var(--ui-radius-button);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: color var(--ui-transition), background-color var(--ui-transition), border-color var(--ui-transition), transform var(--ui-transition), box-shadow var(--ui-transition);
    color: var(--hero-subtitle);
    font-family: 'Poppins', sans-serif;
}

.pagination button:hover:not(:disabled) {
    border-color: var(--brand-sapphire);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 30, 226, 0.2);
}

body.dark-theme .pagination button:hover:not(:disabled) {
    border-color: var(--brand-blue-circuit);
}

.pagination button.active {
    background: var(--brand-sapphire);
    border-color: var(--brand-sapphire);
    color: white;
    box-shadow: 0 8px 20px rgba(30, 30, 226, 0.3);
}

.pagination button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ================================ */
/* LE SAVIEZ-VOUS */
/* ================================ */

.saviez-vous {
    background: linear-gradient(135deg, var(--brand-sky-byte) 0%, var(--brand-cloud-byte) 100%);
    border: 2px solid var(--brand-cloud-byte);
    border-radius: 20px;
    padding: 25px 30px;
    margin: 30px 0;
    color: var(--brand-navy);
    font-size: 1rem;
    line-height: 1.7;
    box-shadow: 0 4px 15px rgba(39, 153, 255, 0.15);
    transition: all 0.3s ease;
}

body.dark-theme .saviez-vous {
    background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-sapphire) 100%);
    border-color: var(--brand-blue-circuit);
    color: var(--brand-cloud-byte);
    box-shadow: 0 4px 15px rgba(39, 153, 255, 0.3);
}

.saviez-vous a {
    color: var(--brand-sapphire);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s ease;
}

body.dark-theme .saviez-vous a {
    color: var(--brand-cloud-byte);
}

.saviez-vous a:hover {
    color: var(--brand-navy);
    text-decoration: underline;
}

body.dark-theme .saviez-vous a:hover {
    color: var(--brand-sky-byte);
}

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

@media (min-width: 1400px) {
    .responsive-table li {
        gap: 24px;
    }

    .responsive-table li {
        padding: 22px 40px;
    }
}

@media (min-width: 1600px) {
    .responsive-table li {
        padding: 18px 50px;
        gap: 28px;
    }

    .col p {
        font-size: 1rem;
    }
}

@media (max-width: 1399px) and (min-width: 1101px) {
    .responsive-table li {
        gap: 18px;
    }
}

@media (max-width: 1042px) {
    .filtres-container {
        padding: 12px 16px;
        margin-bottom: 32px;
        gap: 12px;
    }

    .scroll-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 8px 12px;
        font-size: 16px;
    }

    .filtres-categories {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .filtres-categories::-webkit-scrollbar {
        display: none;
    }

    .filtre-btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 1100px) {
    .responsive-table li {
        gap: 16px;
    }

    .col-1 { flex: 1.15 1 0; }
    .col-2 { flex: 1.9 1 0; }
    .col-3 { flex: 1 1 0; }
    .col-4 {
        flex: 1.1 1 0;
        flex-wrap: wrap;
        gap: 6px;
        flex-direction: column;
        align-items: flex-start;
    }
    .col-5 { flex: 0 0 92px; }

    .col p {
        font-size: 0.88rem;
    }

    .table-row {
        padding: 14px 20px;
    }

    .table-header {
        padding: 14px 20px;
        font-size: 0.8rem;
    }
}

@media (max-width: 872px) {
    .filtres-container {
        top: 60px;
        padding: 10px 14px;
        margin-bottom: 24px;
        border-radius: 20px;
    }

    .scroll-btn {
        padding: 7px 10px;
        font-size: 15px;
    }

    .filtre-btn {
        padding: 8px 18px;
        font-size: 0.88rem;
    }

    .table-header {
        display: none !important;
    }

    .table-row {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 18px;
        gap: 0;
        margin-bottom: 10px;
        border-radius: 16px;
    }

    .col {
        flex-basis: 100% !important;
        padding: 12px 0;
        width: 100%;
        border-bottom: 1px solid #f1f5f9;
        flex-direction: row;
        align-items: flex-start;
        gap: 8px;
    }

    body.dark-theme .col {
        border-bottom-color: #2a2a2a;
    }

    .col:last-child {
        border-bottom: none;
    }

    .col::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--hero-title);
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 0.4px;
        min-width: 110px;
        flex-shrink: 0;
        line-height: 1.3;
    }

    .col p {
        font-size: 0.92rem;
        line-height: 1.5;
        flex: 1;
    }

    .col a {
        font-size: 0.92rem;
    }

    .col-4 {
        border-bottom: none;
        padding: 10px 0;
    }

    .col-5 {
        justify-content: flex-start;
        gap: 12px;
        padding-top: 16px;
        border-top: 2px solid var(--section-border);
        margin-top: 4px;
        border-bottom: none;
    }

    .col-5::before {
        content: none;
    }

    .bouton_dl,
    .favori-btn {
        width: 38px;
        height: 38px;
    }

    .bouton_dl i {
        font-size: 18px;
    }

    .favori-btn i {
        font-size: 16px;
    }

    .pagination {
        gap: 6px;
        margin: 32px 0;
    }

    .pagination button {
        min-width: 42px;
        padding: 10px 14px;
        font-size: 0.9rem;
    }

    .saviez-vous {
        padding: 18px 20px;
        margin: 24px 0;
        font-size: 0.95rem;
        border-radius: 16px;
    }
}

@media (max-width: 576px) {
    .filtres-container {
        padding: 10px 12px;
        gap: 10px;
        top: 55px;
    }

    .scroll-btn {
        padding: 6px 9px;
        font-size: 14px;
        border-radius: var(--ui-radius-button);
    }

    .filtre-btn {
        padding: 7px 16px;
        font-size: 0.85rem;
        border-radius: var(--ui-radius-button);
    }

    .table-row {
        padding: 16px 14px;
        border-radius: 14px;
        margin-bottom: 8px;
    }

    .col {
        padding: 10px 0;
        gap: 6px;
    }

    .col::before {
        font-size: 0.75rem;
        min-width: 95px;
        letter-spacing: 0.3px;
    }

    .col p {
        font-size: 0.88rem;
        line-height: 1.4;
    }

    .col a {
        font-size: 0.88rem;
    }

    .col-5 {
        padding-top: 14px;
        gap: 10px;
    }

    .bouton_dl,
    .favori-btn {
        width: 36px;
        height: 36px;
    }

    .bouton_dl i {
        font-size: 17px;
    }

    .favori-btn i {
        font-size: 15px;
    }

    .pagination {
        gap: 5px;
        margin: 28px 0;
    }

    .pagination button {
        min-width: 40px;
        padding: 9px 12px;
        font-size: 0.88rem;
        border-radius: var(--ui-radius-button);
    }

    .saviez-vous {
        padding: 16px 18px;
        margin: 20px 0;
        font-size: 0.9rem;
        border-radius: 14px;
        line-height: 1.6;
    }
}

@media (max-width: 375px) {
    .filtres-container {
        padding: 8px 10px;
        gap: 8px;
    }

    .scroll-btn {
        padding: 6px 8px;
        font-size: 13px;
    }

    .filtre-btn {
        padding: 7px 14px;
        font-size: 0.82rem;
    }

    .table-row {
        padding: 14px 12px;
    }

    .col {
        padding: 9px 0;
    }

    .col::before {
        font-size: 0.72rem;
        min-width: 85px;
    }

    .col p,
    .col a {
        font-size: 0.85rem;
    }

    .col-5 {
        padding-top: 12px;
    }

    .bouton_dl,
    .favori-btn {
        width: 34px;
        height: 34px;
    }

    .bouton_dl i {
        font-size: 16px;
    }

    .favori-btn i {
        font-size: 14px;
    }

    .pagination button {
        min-width: 38px;
        padding: 8px 10px;
        font-size: 0.85rem;
    }

    .saviez-vous {
        padding: 14px 16px;
        margin: 18px 0;
        font-size: 0.88rem;
    }
}

/* ================================ */
/* TOOLTIPS PERSONNALISÉS */
/* ================================ */

.bouton_dl[title],
.bouton_locked[title],
.bouton_shop[title] {
    position: relative;
}

.bouton_dl[title]::before,
.bouton_locked[title]::before,
.bouton_shop[title]::before {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-weight: 500;
}

.bouton_dl[title]::after,
.bouton_locked[title]::after,
.bouton_shop[title]::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1f2937;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 10000;
}

.bouton_dl[title]:hover::before,
.bouton_dl[title]:hover::after,
.bouton_locked[title]:hover::before,
.bouton_locked[title]:hover::after,
.bouton_shop[title]:hover::before,
.bouton_shop[title]:hover::after {
    opacity: 1;
}

.col-5 {
    overflow: visible !important;
}

.table-row {
    overflow: visible !important;
}

/* ================================ */
/* RESPONSIVE TOOLTIPS */
/* ================================ */

@media (max-width: 872px) {
    .bouton_dl[title]::before,
    .bouton_locked[title]::before,
    .bouton_shop[title]::before {
        font-size: 0.75rem;
        padding: 7px 10px;
        bottom: calc(100% + 10px);
    }

    .bouton_dl[title]::after,
    .bouton_locked[title]::after,
    .bouton_shop[title]::after {
        bottom: calc(100% + 2px);
        border-width: 5px;
    }
}

@media (max-width: 576px) {
    .bouton_dl[title]::before,
    .bouton_locked[title]::before,
    .bouton_shop[title]::before {
        font-size: 0.72rem;
        padding: 6px 9px;
    }
}
