/**
 * Photothèque Styles
 * @author AK Digital
 */

/* Masquer le bouton back-top du thème quand la photothèque est présente */
.phototheque~.back-top,
.phototheque-terms~.back-top,
body:has(.phototheque) .back-top,
body:has(.phototheque-terms) .back-top {
    display: none !important;
}

/* Masquer la barre sticky de la photothèque quand les conditions générales sont affichées */
body:has(#phototheque-terms:not([style*="display: none"])) #phototheque-sticky {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Masquer la barre sticky quand le menu header (Catalogues) est ouvert */
body:has(.catmenu__dropdown--open) #phototheque-sticky {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Masquer la barre sticky quand la sidebar burger-menu (navigation mobile) est ouverte */
body:has(.burger-menu__sidebar--open) #phototheque-sticky {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Écran d'acceptation des conditions */
.phototheque-terms {
    margin: 0 auto;
    font-family: 'Lato', sans-serif;
}

.phototheque-terms__container {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    padding: 40px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.phototheque-terms__content {
    color: #2B2B2B;
    line-height: 1.7;
}

.phototheque-terms__content p {
    margin: 0 0 16px 0;
    font-size: 16px;
}

.phototheque-terms__content a {
    color: #0B3954;
    text-decoration: underline;
    font-weight: 500;
    word-break: break-all;
}

.phototheque-terms__content a:hover {
    color: #0a2e42;
}

.phototheque-terms__quote {
    background: #f8f9fa;
    border-left: 4px solid #0B3954 !important;
    padding: 24px !important;
    margin: 24px 0 !important;
    font-size: 15px;
    line-height: 1.8;
    color: #444;
    border-radius: 0 4px 4px 0;
    text-transform: none;
    font-style: normal !important;
}

body blockquote:not(.etheme-blockquote) {
    font-style: normal !important;
}

.phototheque-terms__accept-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 40px;
    background: #0B3954;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Lato', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 16px;
}

.phototheque-terms__accept-btn:hover {
    background: #0a2e42;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(11, 57, 84, 0.3);
}

.phototheque-terms__accept-btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .phototheque-terms {
        padding: 20px 16px;
    }

    .phototheque-terms__container {
        padding: 24px;
    }

    .phototheque-terms__content p {
        font-size: 15px;
    }

    .phototheque-terms__quote {
        padding: 16px !important;
        font-size: 13px;
    }

    .phototheque-terms__accept-btn {
        width: 100%;
        padding: 14px 24px;
        font-size: 13px;
    }
}

/* ========================================
   PHOTOTHEQUE PRINCIPAL
   ======================================== */

.phototheque {
    margin: 0 auto;
    font-family: 'Lato', sans-serif;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Toolbar (recherche + actions) */
.phototheque__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.phototheque__search {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    max-width: 500px;
    min-width: 280px;
}

.phototheque__search-icon {
    color: #0B3954;
    flex-shrink: 0;
}

.phototheque__search-wrapper {
    position: relative;
    flex: 1;
}

.phototheque__search-input {
    width: 100%;
    padding: 12px 44px 12px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 4px;
    font-size: 15px;
    font-family: 'Lato', sans-serif;
    color: #2B2B2B;
    background: #fff;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.phototheque__search-input::placeholder {
    color: #999;
}

.phototheque__search-input:focus {
    outline: none;
    border-color: #0B3954;
    box-shadow: 0 0 0 3px rgba(11, 57, 84, 0.1);
}

.phototheque__search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #f0f0f0;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    width: 26px;
    height: 26px;
    border-radius: 4px;
}

.phototheque__search-clear:hover {
    color: #fff;
    background: #0B3954;
}

.phototheque__toolbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.phototheque__select-all {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 4px;
    transition: all 0.2s ease;
    user-select: none;
}

.phototheque__select-all:hover {
    background: #f5f5f5;
}

.phototheque__select-all svg {
    flex-shrink: 0;
    color: #666;
    transition: color 0.2s ease;
}

.phototheque__select-all:has(input:checked) svg {
    color: #0B3954;
}

.phototheque__select-all input[type="checkbox"] {
    display: none;
}

.phototheque__btn--bulk-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #0B3954;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.phototheque__btn--bulk-download:hover:not(:disabled) {
    background: #0a2e42;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(11, 57, 84, 0.25);
}

.phototheque__btn--bulk-download:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

.phototheque__btn-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
}

/* ========================================
   FILTRES HORIZONTAUX
   ======================================== */

.phototheque__filters {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 50;
}

.phototheque__filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #fff;
    border: 2px solid #e5e5e5;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #444;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Lato', sans-serif;
    white-space: nowrap;
}

.phototheque__filter-btn>svg:first-child {
    flex-shrink: 0;
}

.phototheque__filter-btn:hover {
    border-color: #0B3954;
    color: #0B3954;
    background: #f8fbfc;
}

.phototheque__filter-btn.is-active {
    background: #0B3954;
    border-color: #0B3954;
    color: #fff;
}

.phototheque__filter-group {
    position: relative;
}

.phototheque__filter-btn--parent {
    padding-right: 14px;
}

.phototheque__filter-chevron {
    transition: transform 0.2s ease;
}

.phototheque__filter-group.is-open .phototheque__filter-chevron {
    transform: rotate(180deg);
}

.phototheque__filter-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 200px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 8px;
    z-index: 100;
    display: none;
}

.phototheque__filter-group.is-open .phototheque__filter-dropdown {
    display: block;
}

.phototheque__filter-dropdown-item {
    display: block;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    color: #444;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
    font-family: 'Lato', sans-serif;
}

.phototheque__filter-dropdown-item:hover {
    background: #f5f7f9;
    color: #0B3954;
}

.phototheque__filter-dropdown-item.is-active {
    background: #0B3954;
    color: #fff;
}

/* ========================================
   EN-TÊTE RÉSULTATS
   ======================================== */

.phototheque__results-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 24px;
}

.phototheque__results-title {
    font-size: 22px;
    font-weight: 700;
    color: #2B2B2B;
    margin: 0;
}

.phototheque__results-count {
    font-size: 15px;
    color: #888;
    font-weight: 400;
}

/* ========================================
   GRILLE PRODUITS
   ======================================== */

.phototheque__results {
    min-height: 400px;
    width: 100%;
    max-width: 100%;
    position: relative;
    box-sizing: border-box;
}

/* État de chargement - overlay par-dessus le contenu */
.phototheque__results.is-loading {
    pointer-events: none;
}

.phototheque__loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    color: #666;
    font-size: 15px;
    font-weight: 500;
}

.phototheque__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.phototheque__product {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
}

.phototheque__product:hover {
    border-color: #0B3954;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}

.phototheque__product-checkbox {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
}

.phototheque__product-checkbox input[type="checkbox"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
    opacity: 0;
    position: absolute;
}

.phototheque__product-checkbox label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #fff;
    border: 2px solid #0B3954;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.phototheque__product-checkbox input[type="checkbox"]:checked+label {
    background: #0B3954;
}

.phototheque__product-checkbox input[type="checkbox"]:checked+label::after {
    content: '';
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.phototheque__product-checkbox label:hover {
    transform: scale(1.1);
}

/* Image produit */
.phototheque__product-image {
    width: 100%;
    aspect-ratio: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 15px;
    box-sizing: border-box;
}

.phototheque__product-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.phototheque__product:hover .phototheque__product-image img {
    transform: scale(1.05);
}

/* Info produit */
.phototheque__product-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    border-top: 1px solid #f0f0f0;
}

.phototheque__product-title {
    font-size: 14px;
    font-weight: 600;
    color: #2B2B2B;
    margin: 0 0 12px 0;
    line-height: 1.4;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.phototheque__product-actions {
    display: flex;
    gap: 8px;
}

.phototheque__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Lato', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    flex: 1;
}

.phototheque__btn svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.phototheque__btn--view {
    background: #0B3954;
    color: #fff;
}

.phototheque__btn--view:hover {
    background: #0a2e42;
}

.phototheque__btn--download {
    background: #f5f5f5;
    color: #333;
}

.phototheque__btn--download:hover {
    background: #e8e8e8;
}

/* État vide / chargement */
.phototheque__empty {
    text-align: center;
    padding: 80px 20px;
    color: #888;
    min-height: 300px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.phototheque__empty p {
    font-size: 16px;
    margin: 0;
}

/* ========================================
   BARRE STICKY EN BAS
   ======================================== */

.phototheque-sticky {
    position: fixed;
    top: calc(var(--phototheque-header-offset, 123px) + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(calc(-100% - 40px));
    z-index: 9990;
    width: calc(100% - 40px);
    max-width: 1300px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible;
}

/* Masquer la barre sticky quand les conditions générales sont affichées */
body:has(#phototheque-terms:not([style*="display: none"])) #phototheque-sticky {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateX(-50%) translateY(calc(-100% - 40px)) !important;
}

/* Animation slide in */
.phototheque-sticky.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Animation slide out */
.phototheque-sticky.is-sliding-out {
    transform: translateX(-50%) translateY(calc(-100% - 40px));
    opacity: 0;
    visibility: hidden;
}

.phototheque-sticky__container {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    overflow: visible;
}

/* Recherche sticky */
.phototheque-sticky__search {
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 4px;
    padding: 8px 12px;
    min-width: 180px;
    max-width: 280px;
    flex: 1;
}

.phototheque-sticky__search svg {
    color: #666;
    flex-shrink: 0;
}

.phototheque-sticky__search-input {
    border: none;
    background: transparent;
    font-size: 14px;
    font-family: 'Lato', sans-serif;
    color: #333;
    width: 100%;
    outline: none;
}

.phototheque-sticky__search-input::placeholder {
    color: #999;
}

/* Filtres sticky */
.phototheque-sticky__filters-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f0f0f0;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    color: #444;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.phototheque-sticky__filters-toggle:hover {
    background: #e8e8e8;
    color: #0B3954;
}

.phototheque-sticky__filters-toggle.is-active {
    background: #0B3954;
    color: #fff;
    border-color: #0B3954;
}

.phototheque-sticky__filters {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 2;
    overflow: visible;
}

.phototheque-sticky__filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #f5f5f5;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Lato', sans-serif;
    white-space: nowrap;
}

.phototheque-sticky__filter:hover {
    background: #e8e8e8;
    color: #0B3954;
}

.phototheque-sticky__filter.is-active {
    background: #0B3954;
    color: #fff;
}

.phototheque-sticky__filter svg {
    flex-shrink: 0;
}

.phototheque-sticky__filter-group {
    position: relative;
    overflow: visible;
}

.phototheque-sticky__filter--parent {
    padding-right: 8px;
}

.phototheque-sticky__chevron {
    transition: transform 0.2s ease;
    margin-left: 2px;
}

.phototheque-sticky__filter-group.is-open .phototheque-sticky__chevron {
    transform: rotate(180deg);
}

/* Dropdown vers le bas */
.phototheque-sticky__dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    max-height: 280px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 8px;
    z-index: 99999;
    display: none;
}

.phototheque-sticky__filter-group.is-open .phototheque-sticky__dropdown {
    display: block;
    animation: stickyDropdownFadeIn 0.25s ease;
}

@keyframes stickyDropdownFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.phototheque-sticky__dropdown-item {
    display: block;
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    color: #444;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
    font-family: 'Lato', sans-serif;
}

.phototheque-sticky__dropdown-item:hover {
    background: #f5f7f9;
    color: #0B3954;
}

.phototheque-sticky__dropdown-item.is-active {
    background: #0B3954;
    color: #fff;
}

/* Actions sticky */
.phototheque-sticky__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.phototheque-sticky__select-all {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    width: 40px;
    height: 40px;
    background: #f5f5f5;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #555;
}

.phototheque-sticky__select-all:hover {
    background: #e8e8e8;
    color: #0B3954;
}

.phototheque-sticky__select-all input[type="checkbox"] {
    display: none;
}

.phototheque-sticky__select-all:has(input:checked) {
    background: #0B3954;
    color: #fff;
}

.phototheque-sticky__download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: #0B3954;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Lato', sans-serif;
}

.phototheque-sticky__download:hover:not(:disabled) {
    background: #0a2e42;
}

.phototheque-sticky__download:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.phototheque-sticky__download-count {
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    min-width: 18px;
    text-align: center;
}

.phototheque-sticky__scroll-top {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f5f5f5;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #555;
}

.phototheque-sticky__scroll-top:hover {
    background: #e8e8e8;
    color: #0B3954;
}
@media (max-width: 1024px) {
    .phototheque-sticky {
        left: 0;
        transform: translateY(calc(-100% - 40px));
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    }

}
/* Sticky bar pleine largeur sur mobile */
@media (max-width: 992px) {
    .phototheque-sticky {
        left: 0;
        transform: translateY(calc(-100% - 40px));
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    }

    .phototheque-sticky.is-visible {
        transform: translateY(0);
    }

    .phototheque-sticky.is-sliding-out {
        transform: translateY(calc(-100% - 40px));
    }
}

/* Responsive sticky bar */
@media (max-width: 900px) {
    .phototheque-sticky {
        width: 100%;
        border-radius: 0;
    }

    .phototheque-sticky__container {
        padding: 12px 16px;
        gap: 10px;
    }

    .phototheque-sticky__search {
        min-width: 120px;
        max-width: 180px;
    }

    .phototheque-sticky__filter span {
        display: none;
    }

    .phototheque-sticky__filter {
        padding: 8px 10px;
    }

    .phototheque-sticky__download {
        padding: 10px 12px;
    }

    .phototheque-sticky__download-count {
        display: none;
    }

    .phototheque-sticky__dropdown {
        min-width: 180px;
    }
}
@media (max-width: 767px) {
    .phototheque-sticky {
        width: 100%;
        border-radius: 0;
    }
}

@media (max-width: 600px) {
    .phototheque-sticky {
        width: 100%;
        border-radius: 0;
    }

    .phototheque-sticky__container {
        padding: 10px 12px;
        gap: 8px;
    }

    .phototheque-sticky__search {
        flex: 1;
        min-width: 0;
        max-width: none;
        padding: 6px 10px;
    }

    .phototheque-sticky__search-input {
        font-size: 13px;
        width: 100%;
    }

    /* Toggle filtres mobile */
    .phototheque-sticky__filters-toggle {
        display: flex;
    }

    .phototheque-sticky__filters {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-top: 1px solid #e0e0e0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        padding: 10px;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .phototheque-sticky__filters.is-open {
        display: flex;
    }

    .phototheque-sticky__filter span {
        display: inline;
    }

    .phototheque-sticky__filter,
    .phototheque-sticky__filter-group {
        flex: 1 1 calc(50% - 8px);
    }

    .phototheque-sticky__filter,
    .phototheque-sticky__filter-group .phototheque-sticky__filter--parent {
        width: 100%;
        justify-content: center;
    }

    .phototheque-sticky__filter {
        padding: 6px 8px;
    }

    .phototheque-sticky__select-all,
    .phototheque-sticky__scroll-top {
        width: 36px;
        height: 36px;
    }

    .phototheque-sticky__download {
        padding: 8px 10px;
    }

    .phototheque-sticky__chevron {
        display: none;
    }

    .phototheque-sticky__dropdown {
        min-width: 160px;
        left: 0;
        transform: translateX(0);
    }

    @keyframes stickyDropdownFadeIn {
        from {
            opacity: 0;
            transform: translateX(0) translateY(10px);
        }

        to {
            opacity: 1;
            transform: translateX(0) translateY(0);
        }
    }
}

/* Effet d'expansion du champ recherche sticky au focus (< 375px) */
@media (max-width: 375px) {
    .phototheque-sticky__container {
        position: relative;
    }

    .phototheque-sticky__search {
        transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    }

    .phototheque-sticky__container:has(.phototheque-sticky__search:focus-within) > :not(.phototheque-sticky__search) {
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    .phototheque-sticky__container:has(.phototheque-sticky__search:focus-within) .phototheque-sticky__search {
        position: absolute;
        top: 50%;
        left: 12px;
        right: 12px;
        transform: translateY(-50%);
        max-width: none;
        background: #fff;
        border: 1px solid #0B3954;
        border-radius: 4px;
        padding: 8px 12px;
        z-index: 30;
        box-shadow: 0 2px 8px rgba(11, 57, 84, 0.15);
    }
}

/* ========================================
   VISIONNEUSE
   ======================================== */

.phototheque-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
}

.phototheque-viewer__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
}

.phototheque-viewer__container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.phototheque-viewer__close,
.phototheque-viewer__prev,
.phototheque-viewer__next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    transition: all 0.2s ease;
    z-index: 10;
}

.phototheque-viewer__close:hover,
.phototheque-viewer__prev:hover,
.phototheque-viewer__next:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.phototheque-viewer__close {
    top: 24px;
    right: 24px;
}

.phototheque-viewer__prev {
    left: 24px;
}

.phototheque-viewer__next {
    right: 24px;
}

.phototheque-viewer__image-container {
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.phototheque-viewer__image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
}

.phototheque-viewer__info {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 20px;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1199px) {
    .phototheque__btn {
       padding: 10px 3px;
    }
}

@media (max-width: 1024px) {
    .phototheque__filters {
        justify-content: center;
    }
}

@media (max-width: 999px) {
    .phototheque__btn {
       padding: 10px 3px;
    }
}

@media (max-width: 660px) {
    .phototheque__filters {
        flex-wrap: wrap;
        justify-content: center;
    }

    .phototheque__filters>.phototheque__filter-btn,
    .phototheque__filters>.phototheque__filter-group {
        flex: 1 1 calc(50% - 8px);
        min-width: calc(50% - 8px);
    }

    .phototheque__filters>.phototheque__filter-btn,
    .phototheque__filters>.phototheque__filter-group>.phototheque__filter-btn--parent {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .phototheque__btn,
    .phototheque__btn--bulk-download,
    .phototheque__filter-btn,
    .phototheque__filter-dropdown-item,
    .phototheque__select-all,
    .phototheque-sticky__filter,
    .phototheque-sticky__download,
    .phototheque-sticky__dropdown-item {
        font-size: 13px;
    }
}

@media (max-width: 1100px) {
    .phototheque {
        padding: 24px;
    }

    .phototheque__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .phototheque__toolbar {
        flex-wrap: nowrap;
        gap: 12px;
    }

    .phototheque__search {
        min-width: 0;
        max-width: none;
    }

    .phototheque__toolbar-actions {
        gap: 8px;
        flex-shrink: 0;
    }

    .phototheque__select-all span {
        display: none;
    }

    .phototheque__select-all {
        padding: 10px;
    }

    .phototheque__btn--bulk-download {
        padding: 10px 14px;
    }

    .phototheque__btn-text {
        display: none;
    }

    .phototheque__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 600px) {
    .phototheque {
        padding: 16px;
    }

    .phototheque__filters {
        gap: 6px;
        padding: 12px 0;
    }

    .phototheque__filter-btn {
        padding: 8px 14px;
    }

    .phototheque__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .phototheque__product-actions {
        flex-direction: column;
    }

    .phototheque__toolbar-actions {
        gap: 6px;
    }

    .phototheque-viewer__container {
        padding: 20px;
    }

    .phototheque-viewer__close,
    .phototheque-viewer__prev,
    .phototheque-viewer__next {
        width: 44px;
        height: 44px;
    }

    .phototheque-viewer__prev {
        left: 12px;
    }

    .phototheque-viewer__next {
        right: 12px;
    }

    .phototheque-viewer__close {
        top: 12px;
        right: 12px;
    }
}

@media (max-width: 480px) {
    
    .phototheque__grid {
        grid-template-columns: 1fr;
    }

    .phototheque__product {
        max-height: 480px;
    }

    .phototheque__product-image {
        max-height: 200px;
    }

    .phototheque__product-actions {
        flex-direction: row;
    }

    .phototheque__btn,
    .phototheque__btn--bulk-download,
    .phototheque__filter-btn,
    .phototheque__filter-dropdown-item,
    .phototheque__select-all,
    .phototheque-terms__accept-btn,
    .phototheque-sticky__filter,
    .phototheque-sticky__download,
    .phototheque-sticky__dropdown-item {
        font-size: 12px;
    }

    .phototheque__btn {
        padding: 8px 10px;
    }
}

/* ========================================
   RÉSUMÉ DES PRODUITS SÉLECTIONNÉS
   ======================================== */

.phototheque-selected-summary {
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 16px;
    overflow: hidden;
    display: none;
}

.phototheque-selected-summary__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: transparent;
    border-bottom: 1px solid #f0f0f0;
}

.phototheque-selected-summary__title {
    font-size: 13px;
    font-weight: 500;
    color: #666;
}

.phototheque-selected-summary__close {
    background: transparent;
    border: none;
    padding: 2px;
    cursor: pointer;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    border-radius: 3px;
    opacity: 0.6;
}

.phototheque-selected-summary__close:hover {
    color: #666;
    opacity: 1;
}

.phototheque-selected-summary__list {
    max-height: 200px;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.phototheque-selected-summary__item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 12px;
}

.phototheque-selected-summary__item:hover {
    border-color: #d0d0d0;
    background: #fafafa;
}

.phototheque-selected-summary__item-image {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 3px;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #f0f0f0;
}

.phototheque-selected-summary__item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.phototheque-selected-summary__item-info {
    flex: 1;
    min-width: 0;
}

.phototheque-selected-summary__item-name {
    font-size: 12px;
    font-weight: 400;
    color: #555;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 150px;
}

.phototheque-selected-summary__item-remove {
    background: transparent;
    border: none;
    padding: 2px 4px;
    cursor: pointer;
    color: #bbb;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 3px;
    flex-shrink: 0;
    opacity: 0.7;
}

.phototheque-selected-summary__item-remove:hover {
    color: #d32f2f;
    opacity: 1;
    background: #ffebee;
}

@media (max-width: 768px) {
    .phototheque-selected-summary__list {
        max-height: 150px;
    }

    .phototheque-selected-summary__item-image {
        width: 28px;
        height: 28px;
    }

    .phototheque-selected-summary__item-name {
        font-size: 11px;
        max-width: 100px;
    }
}